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
-
-
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