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 db3789c74a934..4e3e273ce58ce 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
@@ -318,7 +318,8 @@ the main ServiceBusClientBuilder. -->
-
+
+
diff --git a/eng/common/pipelines/templates/steps/validate-all-packages.yml b/eng/common/pipelines/templates/steps/validate-all-packages.yml
new file mode 100644
index 0000000000000..db374478a06a1
--- /dev/null
+++ b/eng/common/pipelines/templates/steps/validate-all-packages.yml
@@ -0,0 +1,34 @@
+parameters:
+ ArtifactPath: $(Build.ArtifactStagingDirectory)
+ Artifacts: []
+ ConfigFileDir: $(Build.ArtifactStagingDirectory)/PackageInfo
+
+steps:
+ - ${{ if and(ne(variables['Skip.PackageValidation'], 'true'), eq(variables['System.TeamProject'], 'internal')) }}:
+ - pwsh: |
+ echo "##vso[task.setvariable variable=SetAsReleaseBuild]false"
+ displayName: "Set as release build"
+ condition: and(succeeded(), eq(variables['SetAsReleaseBuild'], ''))
+
+ - task: Powershell@2
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/scripts/Validate-All-Packages.ps1
+ arguments: >
+ -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name)
+ -ArtifactPath ${{ parameters.ArtifactPath }}
+ -RepoRoot $(Build.SourcesDirectory)
+ -APIKey $(azuresdk-apiview-apikey)
+ -ConfigFileDir '${{ parameters.ConfigFileDir }}'
+ -BuildDefinition $(System.CollectionUri)$(System.TeamProject)/_build?definitionId=$(System.DefinitionId)
+ -PipelineUrl $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)
+ -Devops_pat '$(azuresdk-azure-sdk-devops-release-work-item-pat)'
+ -IsReleaseBuild $$(SetAsReleaseBuild)
+ pwsh: true
+ workingDirectory: $(Pipeline.Workspace)
+ displayName: Validate packages and update work items
+ continueOnError: true
+ condition: >-
+ and(
+ succeededOrFailed(),
+ not(endsWith(variables['Build.Repository.Name'], '-pr'))
+ )
diff --git a/eng/common/scripts/ChangeLog-Operations.ps1 b/eng/common/scripts/ChangeLog-Operations.ps1
index e31d10dc87184..fb5f85c9a49fc 100644
--- a/eng/common/scripts/ChangeLog-Operations.ps1
+++ b/eng/common/scripts/ChangeLog-Operations.ps1
@@ -138,14 +138,27 @@ function Confirm-ChangeLogEntry {
[Parameter(Mandatory = $true)]
[String]$VersionString,
[boolean]$ForRelease = $false,
- [Switch]$SantizeEntry
+ [Switch]$SantizeEntry,
+ [PSCustomObject]$ChangeLogStatus = $null
)
+ if (!$ChangeLogStatus) {
+ $ChangeLogStatus = [PSCustomObject]@{
+ IsValid = $false
+ Message = ""
+ }
+ }
+ else {
+ # Do not stop the script on error when status object is passed as param
+ $ErrorActionPreference = 'Continue'
+ }
$changeLogEntries = Get-ChangeLogEntries -ChangeLogLocation $ChangeLogLocation
$changeLogEntry = $changeLogEntries[$VersionString]
if (!$changeLogEntry) {
- LogError "ChangeLog[${ChangeLogLocation}] does not have an entry for version ${VersionString}."
+ $ChangeLogStatus.Message = "ChangeLog[${ChangeLogLocation}] does not have an entry for version ${VersionString}."
+ $ChangeLogStatus.IsValid = $false
+ LogError "$($ChangeLogStatus.Message)"
return $false
}
@@ -161,14 +174,16 @@ function Confirm-ChangeLogEntry {
Write-Host "-----"
if ([System.String]::IsNullOrEmpty($changeLogEntry.ReleaseStatus)) {
- LogError "Entry does not have a correct release status. Please ensure the status is set to a date '($CHANGELOG_DATE_FORMAT)' or '$CHANGELOG_UNRELEASED_STATUS' if not yet released. See https://aka.ms/azsdk/guideline/changelogs for more info."
+ $ChangeLogStatus.Message = "Entry does not have a release status. Please ensure the status is set to a date '($CHANGELOG_DATE_FORMAT)' or '$CHANGELOG_UNRELEASED_STATUS' if not yet released. See https://aka.ms/azsdk/guideline/changelogs for more info."
+ $ChangeLogStatus.IsValid = $false
+ LogError "$($ChangeLogStatus.Message)"
return $false
}
if ($ForRelease -eq $True)
{
LogDebug "Verifying as a release build because ForRelease parameter is set to true"
- return Confirm-ChangeLogForRelease -changeLogEntry $changeLogEntry -changeLogEntries $changeLogEntries
+ return Confirm-ChangeLogForRelease -changeLogEntry $changeLogEntry -changeLogEntries $changeLogEntries -ChangeLogStatus $ChangeLogStatus
}
# If the release status is a valid date then verify like its about to be released
@@ -176,9 +191,11 @@ function Confirm-ChangeLogEntry {
if ($status -as [DateTime])
{
LogDebug "Verifying as a release build because the changelog entry has a valid date."
- return Confirm-ChangeLogForRelease -changeLogEntry $changeLogEntry -changeLogEntries $changeLogEntries
+ return Confirm-ChangeLogForRelease -changeLogEntry $changeLogEntry -changeLogEntries $changeLogEntries -ChangeLogStatus $ChangeLogStatus
}
+ $ChangeLogStatus.Message = "ChangeLog[${ChangeLogLocation}] has an entry for version ${VersionString}."
+ $ChangeLogStatus.IsValid = $true
return $true
}
@@ -338,15 +355,23 @@ function Confirm-ChangeLogForRelease {
[Parameter(Mandatory = $true)]
$changeLogEntry,
[Parameter(Mandatory = $true)]
- $changeLogEntries
+ $changeLogEntries,
+ $ChangeLogStatus = $null
)
+ if (!$ChangeLogStatus) {
+ $ChangeLogStatus = [PSCustomObject]@{
+ IsValid = $false
+ Message = ""
+ }
+ }
$entries = Sort-ChangeLogEntries -changeLogEntries $changeLogEntries
- $isValid = $true
+ $ChangeLogStatus.IsValid = $true
if ($changeLogEntry.ReleaseStatus -eq $CHANGELOG_UNRELEASED_STATUS) {
- LogError "Entry has no release date set. Please ensure to set a release date with format '$CHANGELOG_DATE_FORMAT'. See https://aka.ms/azsdk/guideline/changelogs for more info."
- $isValid = $false
+ $ChangeLogStatus.Message = "Entry has no release date set. Please ensure to set a release date with format '$CHANGELOG_DATE_FORMAT'. See https://aka.ms/azsdk/guideline/changelogs for more info."
+ $ChangeLogStatus.IsValid = $false
+ LogError "$($ChangeLogStatus.Message)"
}
else {
$status = $changeLogEntry.ReleaseStatus.Trim().Trim("()")
@@ -354,25 +379,29 @@ function Confirm-ChangeLogForRelease {
$releaseDate = [DateTime]$status
if ($status -ne ($releaseDate.ToString($CHANGELOG_DATE_FORMAT)))
{
- LogError "Date must be in the format $($CHANGELOG_DATE_FORMAT). See https://aka.ms/azsdk/guideline/changelogs for more info."
- $isValid = $false
+ $ChangeLogStatus.Message = "Date must be in the format $($CHANGELOG_DATE_FORMAT). See https://aka.ms/azsdk/guideline/changelogs for more info."
+ $ChangeLogStatus.IsValid = $false
+ LogError "$($ChangeLogStatus.Message)"
}
if (@($entries.ReleaseStatus)[0] -ne $changeLogEntry.ReleaseStatus)
{
- LogError "Invalid date [ $status ]. The date for the changelog being released must be the latest in the file."
- $isValid = $false
+ $ChangeLogStatus.Message = "Invalid date [ $status ]. The date for the changelog being released must be the latest in the file."
+ $ChangeLogStatus.IsValid = $false
+ LogError "$($ChangeLogStatus.Message)"
}
}
catch {
- LogError "Invalid date [ $status ] passed as status for Version [$($changeLogEntry.ReleaseVersion)]. See https://aka.ms/azsdk/guideline/changelogs for more info."
- $isValid = $false
+ $ChangeLogStatus.Message = "Invalid date [ $status ] passed as status for Version [$($changeLogEntry.ReleaseVersion)]. See https://aka.ms/azsdk/guideline/changelogs for more info."
+ $ChangeLogStatus.IsValid = $false
+ LogError "$($ChangeLogStatus.Message)"
}
}
if ([System.String]::IsNullOrWhiteSpace($changeLogEntry.ReleaseContent)) {
- LogError "Entry has no content. Please ensure to provide some content of what changed in this version. See https://aka.ms/azsdk/guideline/changelogs for more info."
- $isValid = $false
+ $ChangeLogStatus.Message = "Entry has no content. Please ensure to provide some content of what changed in this version. See https://aka.ms/azsdk/guideline/changelogs for more info."
+ $ChangeLogStatus.IsValid = $false
+ LogError "$($ChangeLogStatus.Message)"
}
$foundRecommendedSection = $false
@@ -391,12 +420,14 @@ function Confirm-ChangeLogForRelease {
}
if ($emptySections.Count -gt 0)
{
- LogError "The changelog entry has the following sections with no content ($($emptySections -join ', ')). Please ensure to either remove the empty sections or add content to the section."
- $isValid = $false
+ $ChangeLogStatus.Message = "The changelog entry has the following sections with no content ($($emptySections -join ', ')). Please ensure to either remove the empty sections or add content to the section."
+ $ChangeLogStatus.IsValid = $false
+ LogError "$($ChangeLogStatus.Message)"
}
if (!$foundRecommendedSection)
{
- LogWarning "The changelog entry did not contain any of the recommended sections ($($RecommendedSectionHeaders -join ', ')), please add at least one. See https://aka.ms/azsdk/guideline/changelogs for more info."
+ $ChangeLogStatus.Message = "The changelog entry did not contain any of the recommended sections ($($RecommendedSectionHeaders -join ', ')), please add at least one. See https://aka.ms/azsdk/guideline/changelogs for more info."
+ LogWarning "$($ChangeLogStatus.Message)"
}
- return $isValid
+ return $ChangeLogStatus.IsValid
}
\ No newline at end of file
diff --git a/eng/common/scripts/Helpers/ApiView-Helpers.ps1 b/eng/common/scripts/Helpers/ApiView-Helpers.ps1
index bf8b16a99e021..58ee8ee19ca1c 100644
--- a/eng/common/scripts/Helpers/ApiView-Helpers.ps1
+++ b/eng/common/scripts/Helpers/ApiView-Helpers.ps1
@@ -1,4 +1,4 @@
-function MapLanguageName($language)
+function MapLanguageToRequestParam($language)
{
$lang = $language
# Update language name to match those in API cosmos DB. Cosmos SQL is case sensitive and handling this within the query makes it slow.
@@ -6,7 +6,7 @@ function MapLanguageName($language)
$lang = "JavaScript"
}
elseif ($lang -eq "dotnet"){
- $lang = "C#"
+ $lang = "C%23"
}
elseif ($lang -eq "java"){
$lang = "Java"
@@ -23,17 +23,12 @@ function MapLanguageName($language)
function Check-ApiReviewStatus($packageName, $packageVersion, $language, $url, $apiKey, $apiApprovalStatus = $null, $packageNameStatus = $null)
{
# Get API view URL and API Key to check status
- Write-Host "Checking API review status"
- $lang = MapLanguageName -language $language
+ Write-Host "Checking API review status for package: ${packageName}"
+ $lang = MapLanguageToRequestParam -language $language
if ($lang -eq $null) {
return
}
$headers = @{ "ApiKey" = $apiKey }
- $body = @{
- language = $lang
- packageName = $packageName
- packageVersion = $packageVersion
- }
if (!$apiApprovalStatus) {
$apiApprovalStatus = [PSCustomObject]@{
@@ -51,7 +46,10 @@ function Check-ApiReviewStatus($packageName, $packageVersion, $language, $url, $
try
{
- $response = Invoke-WebRequest $url -Method 'GET' -Headers $headers -Body $body
+ $requestUrl = "${url}?language=${lang}&packageName=${packageName}&packageVersion=${packageVersion}"
+ Write-Host "Request to APIView: [${requestUrl}]"
+ $response = Invoke-WebRequest $requestUrl -Method 'GET' -Headers $headers
+ Write-Host "Response: $($response.StatusCode)"
Process-ReviewStatusCode -statusCode $response.StatusCode -packageName $packageName -apiApprovalStatus $apiApprovalStatus -packageNameStatus $packageNameStatus
if ($apiApprovalStatus.IsApproved) {
Write-Host $($apiApprovalStatus.Details)
diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1
index c03b6693edd41..805486245c5cc 100644
--- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1
+++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1
@@ -985,4 +985,46 @@ function UpdatePackageVersions($pkgWorkItem, $plannedVersions, $shippedVersions)
-Uri "https://dev.azure.com/azure-sdk/_apis/wit/workitems/${id}?api-version=6.0" `
-Headers (Get-DevOpsRestHeaders) -Body $body -ContentType "application/json-patch+json" | ConvertTo-Json -Depth 10 | ConvertFrom-Json -AsHashTable
return $response
+}
+
+function UpdateValidationStatus($pkgvalidationDetails, $BuildDefinition, $PipelineUrl)
+{
+ $pkgName = $pkgValidationDetails.Name
+ $versionString = $pkgValidationDetails.Version
+
+ $parsedNewVersion = [AzureEngSemanticVersion]::new($versionString)
+ $versionMajorMinor = "" + $parsedNewVersion.Major + "." + $parsedNewVersion.Minor
+ $workItem = FindPackageWorkItem -lang $LanguageDisplayName -packageName $pkgName -version $versionMajorMinor -includeClosed $true -outputCommand $false
+
+ if (!$workItem)
+ {
+ Write-Host"No work item found for package [$pkgName]."
+ return $false
+ }
+
+ $changeLogStatus = $pkgValidationDetails.ChangeLogValidation.Status
+ $changeLogDetails = $pkgValidationDetails.ChangeLogValidation.Message
+ $apiReviewStatus = $pkgValidationDetails.APIReviewValidation.Status
+ $apiReviewDetails = $pkgValidationDetails.APIReviewValidation.Message
+ $packageNameStatus = $pkgValidationDetails.PackageNameValidation.Status
+ $packageNameDetails = $pkgValidationDetails.PackageNameValidation.Message
+
+ $fields = @()
+ $fields += "`"PackageVersion=${versionString}`""
+ $fields += "`"ChangeLogStatus=${changeLogStatus}`""
+ $fields += "`"ChangeLogValidationDetails=${changeLogDetails}`""
+ $fields += "`"APIReviewStatus=${apiReviewStatus}`""
+ $fields += "`"APIReviewStatusDetails=${apiReviewDetails}`""
+ $fields += "`"PackageNameApprovalStatus=${packageNameStatus}`""
+ $fields += "`"PackageNameApprovalDetails=${packageNameDetails}`""
+ if ($BuildDefinition) {
+ $fields += "`"PipelineDefinition=$BuildDefinition`""
+ }
+ if ($PipelineUrl) {
+ $fields += "`"LatestPipelineRun=$PipelineUrl`""
+ }
+
+ $workItem = UpdateWorkItem -id $workItem.id -fields $fields
+ Write-Host "[$($workItem.id)]$LanguageDisplayName - $pkgName($versionMajorMinor) - Updated"
+ return $true
}
\ No newline at end of file
diff --git a/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 b/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1
index c8ac48e4fa868..b3a0da8036bf0 100644
--- a/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1
+++ b/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1
@@ -15,7 +15,8 @@ param(
[string]$packageNewLibrary = "true",
[string]$relatedWorkItemId = $null,
[string]$tag = $null,
- [string]$devops_pat = $env:DEVOPS_PAT
+ [string]$devops_pat = $env:DEVOPS_PAT,
+ [bool]$inRelease = $true
)
#Requires -Version 6.0
Set-StrictMode -Version 3
@@ -97,8 +98,11 @@ Write-Host " PackageDisplayName: $($workItem.fields['Custom.PackageDisplayName'
Write-Host " ServiceName: $($workItem.fields['Custom.ServiceName'])"
Write-Host " PackageType: $($workItem.fields['Custom.PackageType'])"
Write-Host ""
-Write-Host "Marking item [$($workItem.id)]$($workItem.fields['System.Title']) as '$state' for '$releaseType'"
-$updatedWI = UpdatePackageWorkItemReleaseState -id $workItem.id -state "In Release" -releaseType $releaseType -outputCommand $false
+if ($inRelease)
+{
+ Write-Host "Marking item [$($workItem.id)]$($workItem.fields['System.Title']) as '$state' for '$releaseType'"
+ $updatedWI = UpdatePackageWorkItemReleaseState -id $workItem.id -state "In Release" -releaseType $releaseType -outputCommand $false
+}
$updatedWI = UpdatePackageVersions $workItem -plannedVersions $plannedVersions
Write-Host "Release tracking item is at https://dev.azure.com/azure-sdk/Release/_workitems/edit/$($updatedWI.id)/"
diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1
new file mode 100644
index 0000000000000..46d76195ba143
--- /dev/null
+++ b/eng/common/scripts/Validate-All-Packages.ps1
@@ -0,0 +1,52 @@
+[CmdletBinding()]
+Param (
+ [Parameter(Mandatory=$True)]
+ [array]$ArtifactList,
+ [Parameter(Mandatory=$True)]
+ [string]$ArtifactPath,
+ [Parameter(Mandatory=$True)]
+ [string]$RepoRoot,
+ [Parameter(Mandatory=$True)]
+ [string]$APIKey,
+ [string]$ConfigFileDir,
+ [string]$BuildDefinition,
+ [string]$PipelineUrl,
+ [string]$APIViewUri = "https://apiview.dev/AutoReview/GetReviewStatus",
+ [string]$Devops_pat = $env:DEVOPS_PAT,
+ [bool] $IsReleaseBuild = $false
+)
+
+Set-StrictMode -Version 3
+. (Join-Path $PSScriptRoot common.ps1)
+
+function ProcessPackage($PackageName, $ConfigFileDir)
+{
+ Write-Host "Artifact path: $($ArtifactPath)"
+ Write-Host "Package Name: $($PackageName)"
+ Write-Host "Config File directory: $($ConfigFileDir)"
+
+ &$EngCommonScriptsDir/Validate-Package.ps1 `
+ -PackageName $PackageName `
+ -ArtifactPath $ArtifactPath `
+ -RepoRoot $RepoRoot `
+ -APIViewUri $APIViewUri `
+ -APIKey $APIKey `
+ -BuildDefinition $BuildDefinition `
+ -PipelineUrl $PipelineUrl `
+ -ConfigFileDir $ConfigFileDir `
+ -Devops_pat $Devops_pat
+ if ($LASTEXITCODE -ne 0) {
+ Write-Error "Failed to validate package $PackageName"
+ exit 1
+ }
+}
+
+# Check if package config file is present. This file has package version, SDK type etc info.
+if (-not $ConfigFileDir) {
+ $ConfigFileDir = Join-Path -Path $ArtifactPath "PackageInfo"
+}
+foreach ($artifact in $ArtifactList)
+{
+ Write-Host "Processing $($artifact.name)"
+ ProcessPackage -PackageName $artifact.name -ConfigFileDir $ConfigFileDir
+}
\ No newline at end of file
diff --git a/eng/common/scripts/Validate-Package.ps1 b/eng/common/scripts/Validate-Package.ps1
new file mode 100644
index 0000000000000..57f093d76e695
--- /dev/null
+++ b/eng/common/scripts/Validate-Package.ps1
@@ -0,0 +1,252 @@
+#This script is responsible for release preparedness check that's run as part of build pipeline.
+
+[CmdletBinding()]
+param (
+ [Parameter(Mandatory = $true)]
+ [string] $PackageName,
+ [Parameter(Mandatory = $true)]
+ [string] $ArtifactPath,
+ [Parameter(Mandatory=$True)]
+ [string] $RepoRoot,
+ [Parameter(Mandatory=$True)]
+ [string] $APIKey,
+ [Parameter(Mandatory=$True)]
+ [string] $ConfigFileDir,
+ [string] $BuildDefinition,
+ [string] $PipelineUrl,
+ [string] $APIViewUri,
+ [string] $Devops_pat = $env:DEVOPS_PAT,
+ [bool] $IsReleaseBuild = $false
+)
+Set-StrictMode -Version 3
+
+. (Join-Path $PSScriptRoot common.ps1)
+. ${PSScriptRoot}\Helpers\ApiView-Helpers.ps1
+. ${PSScriptRoot}\Helpers\DevOps-WorkItem-Helpers.ps1
+
+if (!$Devops_pat) {
+ az account show *> $null
+ if (!$?) {
+ Write-Host 'Running az login...'
+ az login *> $null
+ }
+}
+else {
+ # Login using PAT
+ LoginToAzureDevops $Devops_pat
+}
+
+az extension show -n azure-devops *> $null
+if (!$?){
+ az extension add --name azure-devops
+} else {
+ # Force update the extension to the latest version if it was already installed
+ # this is needed to ensure we have the authentication issue fixed from earlier versions
+ az extension update -n azure-devops *> $null
+}
+
+CheckDevOpsAccess
+
+# Function to validate change log
+function ValidateChangeLog($changeLogPath, $versionString, $validationStatus)
+{
+ try
+ {
+ $ChangeLogStatus = [PSCustomObject]@{
+ IsValid = $false
+ Message = ""
+ }
+ $changeLogFullPath = Join-Path $RepoRoot $changeLogPath
+ Write-Host "Path to change log: [$changeLogFullPath]"
+ if (Test-Path $changeLogFullPath)
+ {
+ Confirm-ChangeLogEntry -ChangeLogLocation $changeLogFullPath -VersionString $versionString -ForRelease $true -ChangeLogStatus $ChangeLogStatus
+ $validationStatus.Status = if ($ChangeLogStatus.IsValid) { "Success" } else { "Failed" }
+ $validationStatus.Message = $ChangeLogStatus.Message
+ }
+ else {
+ $validationStatus.Status = "Failed"
+ $validationStatus.Message = "Change log is not found in [$changeLogPath]. Change log file must be present in package root directory."
+ }
+ }
+ catch
+ {
+ Write-Host "Current directory: $(Get-Location)"
+ $validationStatus.Status = "Failed"
+ $validationStatus.Message = $_.Exception.Message
+ }
+}
+
+# Function to verify API review status
+function VerifyAPIReview($packageName, $packageVersion, $language)
+{
+ $APIReviewValidation = [PSCustomObject]@{
+ Name = "API Review Approval"
+ Status = "Pending"
+ Message = ""
+ }
+ $PackageNameValidation = [PSCustomObject]@{
+ Name = "Package Name Approval"
+ Status = "Pending"
+ Message = ""
+ }
+
+ try
+ {
+ $apiStatus = [PSCustomObject]@{
+ IsApproved = $false
+ Details = ""
+ }
+ $packageNameStatus = [PSCustomObject]@{
+ IsApproved = $false
+ Details = ""
+ }
+ Write-Host "Checking API review status for package $packageName with version $packageVersion. language [$language]."
+ Check-ApiReviewStatus $packageName $packageVersion $language $APIViewUri $APIKey $apiStatus $packageNameStatus
+
+ Write-Host "API review approval details: $($apiStatus.Details)"
+ Write-Host "Package name approval details: $($packageNameStatus.Details)"
+ #API review approval status
+ $APIReviewValidation.Message = $apiStatus.Details
+ $APIReviewValidation.Status = if ($apiStatus.IsApproved) { "Approved" } else { "Pending" }
+
+ # Package name approval status
+ $PackageNameValidation.Status = if ($packageNameStatus.IsApproved) { "Approved" } else { "Pending" }
+ $PackageNameValidation.Message = $packageNameStatus.Details
+ }
+ catch
+ {
+ Write-Warning "Failed to get API review status. Error: $_"
+ $PackageNameValidation.Status = "Failed"
+ $PackageNameValidation.Message = $_.Exception.Message
+ $APIReviewValidation.Status = "Failed"
+ $APIReviewValidation.Message = $_.Exception.Message
+ }
+
+ return [PSCustomObject]@{
+ ApiviewApproval = $APIReviewValidation
+ PackageNameApproval = $PackageNameValidation
+ }
+}
+
+
+function IsVersionShipped($packageName, $packageVersion)
+{
+ # This function will decide if a package version is already shipped or not
+ Write-Host "Checking if a version is already shipped for package $packageName with version $packageVersion."
+ $parsedNewVersion = [AzureEngSemanticVersion]::new($packageVersion)
+ $versionMajorMinor = "" + $parsedNewVersion.Major + "." + $parsedNewVersion.Minor
+ $workItem = FindPackageWorkItem -lang $LanguageDisplayName -packageName $packageName -version $versionMajorMinor -includeClosed $true -outputCommand $false
+ if ($workItem)
+ {
+ # Check if the package version is already shipped
+ $shippedVersionSet = ParseVersionSetFromMDField $workItem.fields["Custom.ShippedPackages"]
+ if ($shippedVersionSet.ContainsKey($packageVersion)) {
+ return $true
+ }
+ }
+ else {
+ Write-Host "No work item found for package [$packageName]. Creating new work item for package."
+ }
+ return $false
+}
+
+function CreateUpdatePackageWorkItem($pkgInfo)
+{
+ # This function will create or update package work item in Azure DevOps
+ $versionString = $pkgInfo.Version
+ $packageName = $pkgInfo.Name
+ $plannedDate = $pkgInfo.ReleaseStatus
+ $setReleaseState = $true
+ if (!$plannedDate -or $plannedDate -eq "Unreleased")
+ {
+ $setReleaseState = $false
+ $plannedDate = "unknown"
+ }
+
+ # Create or update package work item
+ &$EngCommonScriptsDir/Update-DevOps-Release-WorkItem.ps1 `
+ -language $LanguageDisplayName `
+ -packageName $packageName `
+ -version $versionString `
+ -plannedDate $plannedDate `
+ -packageRepoPath $pkgInfo.serviceDirectory `
+ -packageType $pkgInfo.SDKType `
+ -packageNewLibrary $pkgInfo.IsNewSDK `
+ -serviceName "unknown" `
+ -packageDisplayName "unknown" `
+ -inRelease $IsReleaseBuild `
+ -devops_pat $Devops_pat
+
+ if ($LASTEXITCODE -ne 0)
+ {
+ Write-Host "Update of the Devops Release WorkItem failed."
+ return $false
+ }
+ return $true
+}
+
+# Read package property file and identify all packages to process
+Write-Host "Processing package: $PackageName"
+Write-Host "Is Release Build: $IsReleaseBuild"
+$packagePropertyFile = Join-Path $ConfigFileDir "$PackageName.json"
+$pkgInfo = Get-Content $packagePropertyFile | ConvertFrom-Json
+
+$changeLogPath = $pkgInfo.ChangeLogPath
+$versionString = $pkgInfo.Version
+Write-Host "Checking if we need to create or update work item for package $packageName with version $versionString."
+$isShipped = IsVersionShipped $packageName $versionString
+if ($isShipped) {
+ Write-Host "Package work item already exists for version [$versionString] that is marked as shipped. Skipping the update of package work item."
+ exit 0
+}
+
+Write-Host "Validating package $packageName with version $versionString."
+
+# Change log validation
+$changeLogStatus = [PSCustomObject]@{
+ Name = "Change Log Validation"
+ Status = "Success"
+ Message = ""
+}
+ValidateChangeLog $changeLogPath $versionString $changeLogStatus
+
+# API review and package name validation
+$apireviewDetails = VerifyAPIReview $PackageName $pkgInfo.Version $Language
+
+$pkgValidationDetails= [PSCustomObject]@{
+ Name = $PackageName
+ Version = $pkgInfo.Version
+ ChangeLogValidation = $changeLogStatus
+ APIReviewValidation = $apireviewDetails.ApiviewApproval
+ PackageNameValidation = $apireviewDetails.PackageNameApproval
+}
+
+$output = ConvertTo-Json $pkgValidationDetails
+Write-Host "Output: $($output)"
+
+# Create json token file in artifact path
+$tokenFile = Join-Path $ArtifactPath "$PackageName-Validation.json"
+$output | Out-File -FilePath $tokenFile -Encoding utf8
+
+# Create DevOps work item
+$updatedWi = CreateUpdatePackageWorkItem $pkgInfo
+
+# Update validation status in package work item
+if ($updatedWi) {
+ Write-Host "Updating validation status in package work item."
+ $updatedWi = UpdateValidationStatus $pkgValidationDetails $BuildDefinition $PipelineUrl
+}
+
+# Fail the build if any validation is not successful for a release build
+Write-Host "Change log status:" $changelogStatus.Status
+Write-Host "API Review status:" $apireviewDetails.ApiviewApproval.Status
+Write-Host "Package Name status:" $apireviewDetails.PackageNameApproval.Status
+
+if ($IsReleaseBuild)
+{
+ if (!$updatedWi -or $changelogStatus.Status -ne "Success" -or $apireviewDetails.ApiviewApproval.Status -ne "Approved" -or $apireviewDetails.PackageNameApproval.Status -ne "Approved") {
+ Write-Error "At least one of the Validations above failed for package $PackageName with version $versionString."
+ exit 1
+ }
+}
\ No newline at end of file
diff --git a/eng/pipelines/templates/jobs/ci.tests.yml b/eng/pipelines/templates/jobs/ci.tests.yml
index 1ae88d231a82f..0c0d141968360 100644
--- a/eng/pipelines/templates/jobs/ci.tests.yml
+++ b/eng/pipelines/templates/jobs/ci.tests.yml
@@ -47,7 +47,7 @@ parameters:
default: 60
jobs:
- - job:
+ - job: Test_${{ parameters.OSName }}
displayName: 'Test'
dependsOn:
- ${{ parameters.DependsOn }}
diff --git a/eng/pipelines/templates/jobs/live.tests.yml b/eng/pipelines/templates/jobs/live.tests.yml
index d7c9009131b16..3bea1efd0ad05 100644
--- a/eng/pipelines/templates/jobs/live.tests.yml
+++ b/eng/pipelines/templates/jobs/live.tests.yml
@@ -24,7 +24,7 @@ parameters:
OSName:
jobs:
- - job:
+ - job: LiveTest_${{ parameters.OSName }}
dependsOn: ${{ parameters.DependsOn }}
condition: and(succeededOrFailed(), ne(${{ parameters.Matrix }}, '{}'))
strategy:
diff --git a/eng/pipelines/templates/jobs/native.live.tests.yml b/eng/pipelines/templates/jobs/native.live.tests.yml
index 1660e94d174ed..ba36bebeb0407 100644
--- a/eng/pipelines/templates/jobs/native.live.tests.yml
+++ b/eng/pipelines/templates/jobs/native.live.tests.yml
@@ -66,7 +66,7 @@ parameters:
type: string
jobs:
- - job:
+ - job: NativeLiveTest_${{ parameters.OSName }}
dependsOn: ${{ parameters.DependsOn }}
condition: and(succeededOrFailed(), ne(${{ parameters.Matrix }}, '{}'))
strategy:
diff --git a/eng/pipelines/templates/stages/platform-matrix.json b/eng/pipelines/templates/stages/platform-matrix.json
index 672b982e45c24..d89661584da18 100644
--- a/eng/pipelines/templates/stages/platform-matrix.json
+++ b/eng/pipelines/templates/stages/platform-matrix.json
@@ -67,13 +67,17 @@
"TestOptions": ""
},
{
- "Agent": { "ubuntu-20.04": { "OSVmImage": "MMSUbuntu20.04", "Pool": "azsdk-pool-mms-ubuntu-2004-general" } },
+ "Agent": {
+ "ubuntu-20.04": { "OSVmImage": "env:LINUXVMIMAGE", "Pool": "env:LINUXPOOL" }
+ },
"JavaTestVersion": "1.17",
"AZURE_TEST_HTTP_CLIENTS": "JdkHttpClientProvider",
"TestFromSource": false
},
{
- "Agent": { "ubuntu-20.04": { "OSVmImage": "MMSUbuntu20.04", "Pool": "azsdk-pool-mms-ubuntu-2004-general" } },
+ "Agent": {
+ "ubuntu-20.04": { "OSVmImage": "env:LINUXVMIMAGE", "Pool": "env:LINUXPOOL" }
+ },
"JavaTestVersion": "1.17",
"AZURE_TEST_HTTP_CLIENTS": "VertxAsyncHttpClientProvider",
"TestFromSource": false
diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt
index 183fb2585631f..e879fca40aafd 100644
--- a/eng/versioning/external_dependencies.txt
+++ b/eng/versioning/external_dependencies.txt
@@ -394,6 +394,7 @@ cosmos_org.scalastyle:scalastyle-maven-plugin;1.0.0
## Cosmos Kafka connector under sdk\cosmos\azure-cosmos-kafka-connect\pom.xml
# Cosmos Kafka connector runtime dependencies
cosmos_org.apache.kafka:connect-api;3.6.0
+cosmos_com.jayway.jsonpath:json-path;2.9.0
# Cosmos Kafka connector tests only
cosmos_org.apache.kafka:connect-runtime;3.6.0
cosmos_org.testcontainers:testcontainers;1.19.5
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 4b793ee964b19..7d37d107cba70 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -109,7 +109,7 @@ com.azure.cosmos.spark:azure-cosmos-spark_3-1_2-12;4.28.4;4.29.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-2_2-12;4.28.4;4.29.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.28.4;4.29.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;4.28.4;4.29.0-beta.1
-com.azure:azure-cosmos-encryption;2.8.0;2.9.0
+com.azure:azure-cosmos-encryption;2.9.0;2.10.0-beta.1
com.azure:azure-cosmos-test;1.0.0-beta.6;1.0.0-beta.7
com.azure:azure-cosmos-tests;1.0.0-beta.1;1.0.0-beta.1
com.azure.cosmos.kafka:azure-cosmos-kafka-connect;1.0.0-beta.1;1.0.0-beta.1
@@ -165,7 +165,7 @@ com.azure:azure-mixedreality-remoterendering;1.1.27;1.2.0-beta.1
com.azure:azure-monitor-opentelemetry-exporter;1.0.0-beta.21;1.0.0-beta.22
com.azure:azure-monitor-ingestion;1.1.5;1.2.0-beta.1
com.azure:azure-monitor-ingestion-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-monitor-query;1.2.10;1.3.0-beta.3
+com.azure:azure-monitor-query;1.3.0;1.4.0-beta.1
com.azure:azure-monitor-query-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-perf-test-parent;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-quantum-jobs;1.0.0-beta.1;1.0.0-beta.2
@@ -183,7 +183,7 @@ com.azure:azure-security-keyvault-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-sdk-template;1.1.1234;1.2.2-beta.1
com.azure:azure-sdk-template-two;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-sdk-template-three;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-spring-data-cosmos;3.43.0;3.44.0-beta.1
+com.azure:azure-spring-data-cosmos;3.44.0;3.45.0-beta.1
com.azure:azure-storage-blob;12.25.3;12.26.0-beta.1
com.azure:azure-storage-blob-batch;12.21.3;12.22.0-beta.1
com.azure:azure-storage-blob-changefeed;12.0.0-beta.19;12.0.0-beta.20
@@ -203,58 +203,58 @@ com.azure:perf-test-core;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-ai-vision-imageanalysis;1.0.0-beta.2;1.0.0-beta.3
com.azure.spring:azure-monitor-spring-native;1.0.0-beta.1;1.0.0-beta.1
com.azure.spring:azure-monitor-spring-native-test;1.0.0-beta.1;1.0.0-beta.1
-com.azure.spring:spring-cloud-azure-appconfiguration-config-web;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-appconfiguration-config;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-feature-management-web;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-feature-management;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-appconfiguration-config;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-dependencies;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-messaging-azure;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-messaging-azure-eventhubs;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-messaging-azure-servicebus;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-messaging-azure-storage-queue;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-integration-azure-core;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-integration-azure-eventhubs;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-integration-azure-servicebus;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-integration-azure-storage-queue;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-core;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-actuator-autoconfigure;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-actuator;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-autoconfigure;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-resourcemanager;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-service;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-active-directory;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-active-directory-b2c;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-actuator;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-appconfiguration;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-cosmos;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-data-cosmos;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-eventhubs;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-eventgrid;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-jdbc-mysql;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-jdbc-postgresql;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-redis;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-keyvault;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-keyvault-certificates;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;4.16.0;4.17.0-beta.1
+com.azure.spring:spring-cloud-azure-appconfiguration-config-web;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-appconfiguration-config;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-feature-management-web;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-feature-management;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-appconfiguration-config;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-dependencies;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-messaging-azure;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-messaging-azure-eventhubs;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-messaging-azure-servicebus;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-messaging-azure-storage-queue;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-integration-azure-core;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-integration-azure-eventhubs;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-integration-azure-servicebus;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-integration-azure-storage-queue;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-core;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-actuator-autoconfigure;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-actuator;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-autoconfigure;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-resourcemanager;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-service;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-active-directory;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-active-directory-b2c;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-actuator;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-appconfiguration;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-cosmos;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-data-cosmos;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-eventhubs;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-eventgrid;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-jdbc-mysql;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-jdbc-postgresql;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-redis;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-keyvault;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-keyvault-certificates;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;4.17.0;4.18.0-beta.1
com.azure.spring:spring-cloud-azure-starter-monitor;1.0.0-beta.4;1.0.0-beta.5
-com.azure.spring:spring-cloud-azure-starter-servicebus-jms;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-servicebus;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-storage;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-storage-blob;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-storage-file-share;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-storage-queue;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-integration-eventhubs;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-integration-servicebus;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-integration-storage-queue;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-stream-eventhubs;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-stream-servicebus;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-starter;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-stream-binder-eventhubs-core;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-stream-binder-servicebus;4.16.0;4.17.0-beta.1
-com.azure.spring:spring-cloud-azure-trace-sleuth;4.16.0;4.17.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-servicebus-jms;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-servicebus;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-storage;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-storage-blob;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-storage-file-share;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-storage-queue;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-integration-eventhubs;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-integration-servicebus;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-integration-storage-queue;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-stream-eventhubs;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-stream-servicebus;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-starter;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-stream-binder-eventhubs-core;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-stream-binder-eventhubs;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-stream-binder-servicebus;4.17.0;4.18.0-beta.1
+com.azure.spring:spring-cloud-azure-trace-sleuth;4.17.0;4.18.0-beta.1
com.azure.resourcemanager:azure-resourcemanager;2.37.0;2.38.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-appplatform;2.37.0;2.38.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-appservice;2.37.0;2.38.0-beta.1
@@ -355,7 +355,7 @@ com.azure.resourcemanager:azure-resourcemanager-marketplaceordering;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-timeseriesinsights;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-streamanalytics;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-operationsmanagement;1.0.0-beta.2;1.0.0-beta.3
-com.azure.resourcemanager:azure-resourcemanager-batch;1.0.0;1.1.0-beta.4
+com.azure.resourcemanager:azure-resourcemanager-batch;1.0.0;1.1.0-beta.5
com.azure.resourcemanager:azure-resourcemanager-datalakeanalytics;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-datalakestore;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-iotcentral;1.0.0;1.1.0-beta.2
@@ -435,7 +435,7 @@ com.azure.resourcemanager:azure-resourcemanager-managementgroups;1.0.0-beta.1;1.
com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-iotfirmwaredefense;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-quantum;1.0.0-beta.2;1.0.0-beta.3
-com.azure.resourcemanager:azure-resourcemanager-sphere;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-sphere;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-chaos;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-defendereasm;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-hdinsight-containers;1.0.0-beta.1;1.0.0-beta.2
diff --git a/sdk/attestation/azure-security-attestation/pom.xml b/sdk/attestation/azure-security-attestation/pom.xml
index 8b57ecce91ebc..6d876824d3292 100644
--- a/sdk/attestation/azure-security-attestation/pom.xml
+++ b/sdk/attestation/azure-security-attestation/pom.xml
@@ -116,6 +116,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -159,4 +165,21 @@
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md
index 8ce9a2ef2121a..a27735d6a0d19 100644
--- a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md
+++ b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 1.1.0-beta.4 (Unreleased)
+## 1.1.0-beta.5 (Unreleased)
### Features Added
@@ -10,6 +10,36 @@
### Other Changes
+## 1.1.0-beta.4 (2024-03-27)
+
+- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+### Features Added
+
+* `models.UpgradePolicy` was added
+
+* `models.RollingUpgradePolicy` was added
+
+* `models.UpgradeMode` was added
+
+* `models.AutomaticOSUpgradePolicy` was added
+
+#### `models.SupportedSku` was modified
+
+* `batchSupportEndOfLife()` was added
+
+#### `models.Pool$Definition` was modified
+
+* `withUpgradePolicy(models.UpgradePolicy)` was added
+
+#### `models.Pool` was modified
+
+* `upgradePolicy()` was added
+
+#### `models.Pool$Update` was modified
+
+* `withUpgradePolicy(models.UpgradePolicy)` was added
+
## 1.1.0-beta.3 (2023-12-22)
- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/batch/azure-resourcemanager-batch/README.md b/sdk/batch/azure-resourcemanager-batch/README.md
index f908ce11a8f11..7144bd45b7cb8 100644
--- a/sdk/batch/azure-resourcemanager-batch/README.md
+++ b/sdk/batch/azure-resourcemanager-batch/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Batch client library for Java.
-This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-batch
- 1.1.0-beta.3
+ 1.1.0-beta.4
```
[//]: # ({x-version-update-end})
diff --git a/sdk/batch/azure-resourcemanager-batch/SAMPLE.md b/sdk/batch/azure-resourcemanager-batch/SAMPLE.md
index 547c72d529c7b..98a2b88c9c403 100644
--- a/sdk/batch/azure-resourcemanager-batch/SAMPLE.md
+++ b/sdk/batch/azure-resourcemanager-batch/SAMPLE.md
@@ -81,7 +81,8 @@
*/
public final class ApplicationCreateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationCreate.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationCreate.json
*/
/**
* Sample code: ApplicationCreate.
@@ -89,7 +90,8 @@ public final class ApplicationCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationCreate(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.applications().define("app1").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withDisplayName("myAppName").withAllowUpdates(false).create();
+ manager.applications().define("app1").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withDisplayName("myAppName").withAllowUpdates(false).create();
}
}
```
@@ -102,7 +104,8 @@ public final class ApplicationCreateSamples {
*/
public final class ApplicationDeleteSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationDelete.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationDelete.json
*/
/**
* Sample code: ApplicationDelete.
@@ -110,7 +113,8 @@ public final class ApplicationDeleteSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationDelete(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.applications().deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE);
+ manager.applications().deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -123,7 +127,8 @@ public final class ApplicationDeleteSamples {
*/
public final class ApplicationGetSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationGet.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationGet.json
*/
/**
* Sample code: ApplicationGet.
@@ -131,7 +136,8 @@ public final class ApplicationGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationGet(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.applications().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE);
+ manager.applications().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -144,7 +150,8 @@ public final class ApplicationGetSamples {
*/
public final class ApplicationListSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationList.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationList.json
*/
/**
* Sample code: ApplicationList.
@@ -152,7 +159,8 @@ public final class ApplicationListSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationList(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.applications().list("default-azurebatch-japaneast", "sampleacct", null, com.azure.core.util.Context.NONE);
+ manager.applications().list("default-azurebatch-japaneast", "sampleacct", null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -167,7 +175,8 @@ import com.azure.resourcemanager.batch.models.Application;
*/
public final class ApplicationUpdateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationUpdate.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationUpdate.json
*/
/**
* Sample code: ApplicationUpdate.
@@ -175,7 +184,9 @@ public final class ApplicationUpdateSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationUpdate(com.azure.resourcemanager.batch.BatchManager manager) {
- Application resource = manager.applications().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE).getValue();
+ Application resource = manager.applications()
+ .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE)
+ .getValue();
resource.update().withDisplayName("myAppName").withAllowUpdates(true).withDefaultVersion("2").apply();
}
}
@@ -191,7 +202,8 @@ import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParamete
*/
public final class ApplicationPackageActivateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageActivate.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageActivate.json
*/
/**
* Sample code: ApplicationPackageActivate.
@@ -199,7 +211,8 @@ public final class ApplicationPackageActivateSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationPackageActivate(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.applicationPackages().activateWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", new ActivateApplicationPackageParameters().withFormat("zip"), com.azure.core.util.Context.NONE);
+ manager.applicationPackages().activateWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1",
+ new ActivateApplicationPackageParameters().withFormat("zip"), com.azure.core.util.Context.NONE);
}
}
```
@@ -212,7 +225,8 @@ public final class ApplicationPackageActivateSamples {
*/
public final class ApplicationPackageCreateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageCreate.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageCreate.json
*/
/**
* Sample code: ApplicationPackageCreate.
@@ -220,7 +234,8 @@ public final class ApplicationPackageCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationPackageCreate(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.applicationPackages().define("1").withExistingApplication("default-azurebatch-japaneast", "sampleacct", "app1").create();
+ manager.applicationPackages().define("1")
+ .withExistingApplication("default-azurebatch-japaneast", "sampleacct", "app1").create();
}
}
```
@@ -233,7 +248,8 @@ public final class ApplicationPackageCreateSamples {
*/
public final class ApplicationPackageDeleteSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageDelete.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageDelete.json
*/
/**
* Sample code: ApplicationPackageDelete.
@@ -241,7 +257,8 @@ public final class ApplicationPackageDeleteSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationPackageDelete(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.applicationPackages().deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", com.azure.core.util.Context.NONE);
+ manager.applicationPackages().deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -254,7 +271,8 @@ public final class ApplicationPackageDeleteSamples {
*/
public final class ApplicationPackageGetSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageGet.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageGet.json
*/
/**
* Sample code: ApplicationPackageGet.
@@ -262,7 +280,8 @@ public final class ApplicationPackageGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationPackageGet(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.applicationPackages().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", com.azure.core.util.Context.NONE);
+ manager.applicationPackages().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -275,7 +294,8 @@ public final class ApplicationPackageGetSamples {
*/
public final class ApplicationPackageListSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/ApplicationPackageList.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/ApplicationPackageList.json
*/
/**
* Sample code: ApplicationPackageList.
@@ -283,7 +303,8 @@ public final class ApplicationPackageListSamples {
* @param manager Entry point to BatchManager.
*/
public static void applicationPackageList(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.applicationPackages().list("default-azurebatch-japaneast", "sampleacct", "app1", null, com.azure.core.util.Context.NONE);
+ manager.applicationPackages().list("default-azurebatch-japaneast", "sampleacct", "app1", null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -300,14 +321,14 @@ import com.azure.resourcemanager.batch.models.ResourceIdentityType;
import com.azure.resourcemanager.batch.models.UserAssignedIdentities;
import java.util.HashMap;
import java.util.Map;
-import java.util.stream.Collectors;
/**
* Samples for BatchAccount Create.
*/
public final class BatchAccountCreateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountCreate_BYOS.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountCreate_BYOS.json
*/
/**
* Sample code: BatchAccountCreate_BYOS.
@@ -315,11 +336,20 @@ public final class BatchAccountCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void batchAccountCreateBYOS(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().define("sampleacct").withRegion("japaneast").withExistingResourceGroup("default-azurebatch-japaneast").withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")).withPoolAllocationMode(PoolAllocationMode.USER_SUBSCRIPTION).withKeyVaultReference(new KeyVaultReference().withId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample").withUrl("http://sample.vault.azure.net/")).create();
+ manager.batchAccounts().define("sampleacct").withRegion("japaneast")
+ .withExistingResourceGroup("default-azurebatch-japaneast")
+ .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
+ .withPoolAllocationMode(PoolAllocationMode.USER_SUBSCRIPTION)
+ .withKeyVaultReference(new KeyVaultReference().withId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample")
+ .withUrl("http://sample.vault.azure.net/"))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountCreate_UserAssignedIdentity.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * BatchAccountCreate_UserAssignedIdentity.json
*/
/**
* Sample code: BatchAccountCreate_UserAssignedIdentity.
@@ -327,11 +357,20 @@ public final class BatchAccountCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void batchAccountCreateUserAssignedIdentity(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().define("sampleacct").withRegion("japaneast").withExistingResourceGroup("default-azurebatch-japaneast").withIdentity(new BatchAccountIdentity().withType(ResourceIdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", new UserAssignedIdentities()))).withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")).create();
+ manager.batchAccounts().define("sampleacct").withRegion("japaneast")
+ .withExistingResourceGroup("default-azurebatch-japaneast")
+ .withIdentity(new BatchAccountIdentity().withType(ResourceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
+ new UserAssignedIdentities())))
+ .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateBatchAccountCreate.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateBatchAccountCreate.json
*/
/**
* Sample code: PrivateBatchAccountCreate.
@@ -339,11 +378,19 @@ public final class BatchAccountCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void privateBatchAccountCreate(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().define("sampleacct").withRegion("japaneast").withExistingResourceGroup("default-azurebatch-japaneast").withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")).withKeyVaultReference(new KeyVaultReference().withId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample").withUrl("http://sample.vault.azure.net/")).withPublicNetworkAccess(PublicNetworkAccessType.DISABLED).create();
+ manager.batchAccounts().define("sampleacct").withRegion("japaneast")
+ .withExistingResourceGroup("default-azurebatch-japaneast")
+ .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
+ .withKeyVaultReference(new KeyVaultReference().withId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample")
+ .withUrl("http://sample.vault.azure.net/"))
+ .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED).create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountCreate_SystemAssignedIdentity.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * BatchAccountCreate_SystemAssignedIdentity.json
*/
/**
* Sample code: BatchAccountCreate_SystemAssignedIdentity.
@@ -351,11 +398,17 @@ public final class BatchAccountCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void batchAccountCreateSystemAssignedIdentity(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().define("sampleacct").withRegion("japaneast").withExistingResourceGroup("default-azurebatch-japaneast").withIdentity(new BatchAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)).withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")).create();
+ manager.batchAccounts().define("sampleacct").withRegion("japaneast")
+ .withExistingResourceGroup("default-azurebatch-japaneast")
+ .withIdentity(new BatchAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountCreate_Default.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountCreate_Default.json
*/
/**
* Sample code: BatchAccountCreate_Default.
@@ -363,7 +416,11 @@ public final class BatchAccountCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void batchAccountCreateDefault(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().define("sampleacct").withRegion("japaneast").withExistingResourceGroup("default-azurebatch-japaneast").withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")).create();
+ manager.batchAccounts().define("sampleacct").withRegion("japaneast")
+ .withExistingResourceGroup("default-azurebatch-japaneast")
+ .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
+ .create();
}
// Use "Map.of" if available
@@ -388,7 +445,8 @@ public final class BatchAccountCreateSamples {
*/
public final class BatchAccountDeleteSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountDelete.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountDelete.json
*/
/**
* Sample code: BatchAccountDelete.
@@ -409,7 +467,8 @@ public final class BatchAccountDeleteSamples {
*/
public final class BatchAccountGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateBatchAccountGet.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateBatchAccountGet.json
*/
/**
* Sample code: PrivateBatchAccountGet.
@@ -417,11 +476,13 @@ public final class BatchAccountGetByResourceGroupSamples {
* @param manager Entry point to BatchManager.
*/
public static void privateBatchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE);
+ manager.batchAccounts().getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct",
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountGet.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountGet.json
*/
/**
* Sample code: BatchAccountGet.
@@ -429,7 +490,8 @@ public final class BatchAccountGetByResourceGroupSamples {
* @param manager Entry point to BatchManager.
*/
public static void batchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE);
+ manager.batchAccounts().getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -442,7 +504,8 @@ public final class BatchAccountGetByResourceGroupSamples {
*/
public final class BatchAccountGetDetectorSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/DetectorGet.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/DetectorGet.json
*/
/**
* Sample code: GetDetector.
@@ -450,7 +513,8 @@ public final class BatchAccountGetDetectorSamples {
* @param manager Entry point to BatchManager.
*/
public static void getDetector(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().getDetectorWithResponse("default-azurebatch-japaneast", "sampleacct", "poolsAndNodes", com.azure.core.util.Context.NONE);
+ manager.batchAccounts().getDetectorWithResponse("default-azurebatch-japaneast", "sampleacct", "poolsAndNodes",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -463,7 +527,8 @@ public final class BatchAccountGetDetectorSamples {
*/
public final class BatchAccountGetKeysSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountGetKeys.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountGetKeys.json
*/
/**
* Sample code: BatchAccountGetKeys.
@@ -471,7 +536,8 @@ public final class BatchAccountGetKeysSamples {
* @param manager Entry point to BatchManager.
*/
public static void batchAccountGetKeys(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().getKeysWithResponse("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE);
+ manager.batchAccounts().getKeysWithResponse("default-azurebatch-japaneast", "sampleacct",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -484,7 +550,8 @@ public final class BatchAccountGetKeysSamples {
*/
public final class BatchAccountListSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountList.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountList.json
*/
/**
* Sample code: BatchAccountList.
@@ -505,7 +572,9 @@ public final class BatchAccountListSamples {
*/
public final class BatchAccountListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountListByResourceGroup.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountListByResourceGroup.
+ * json
*/
/**
* Sample code: BatchAccountListByResourceGroup.
@@ -526,7 +595,8 @@ public final class BatchAccountListByResourceGroupSamples {
*/
public final class BatchAccountListDetectorsSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/DetectorList.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/DetectorList.json
*/
/**
* Sample code: ListDetectors.
@@ -534,7 +604,8 @@ public final class BatchAccountListDetectorsSamples {
* @param manager Entry point to BatchManager.
*/
public static void listDetectors(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().listDetectors("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE);
+ manager.batchAccounts().listDetectors("default-azurebatch-japaneast", "sampleacct",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -547,7 +618,8 @@ public final class BatchAccountListDetectorsSamples {
*/
public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * BatchAccountListOutboundNetworkDependenciesEndpoints.json
*/
/**
* Sample code: ListOutboundNetworkDependencies.
@@ -555,7 +627,8 @@ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples {
* @param manager Entry point to BatchManager.
*/
public static void listOutboundNetworkDependencies(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().listOutboundNetworkDependenciesEndpoints("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE);
+ manager.batchAccounts().listOutboundNetworkDependenciesEndpoints("default-azurebatch-japaneast", "sampleacct",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -565,14 +638,14 @@ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples {
```java
import com.azure.resourcemanager.batch.models.AccountKeyType;
import com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameters;
-import java.util.stream.Collectors;
/**
* Samples for BatchAccount RegenerateKey.
*/
public final class BatchAccountRegenerateKeySamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountRegenerateKey.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountRegenerateKey.json
*/
/**
* Sample code: BatchAccountRegenerateKey.
@@ -580,7 +653,9 @@ public final class BatchAccountRegenerateKeySamples {
* @param manager Entry point to BatchManager.
*/
public static void batchAccountRegenerateKey(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().regenerateKeyWithResponse("default-azurebatch-japaneast", "sampleacct", new BatchAccountRegenerateKeyParameters().withKeyName(AccountKeyType.PRIMARY), com.azure.core.util.Context.NONE);
+ manager.batchAccounts().regenerateKeyWithResponse("default-azurebatch-japaneast", "sampleacct",
+ new BatchAccountRegenerateKeyParameters().withKeyName(AccountKeyType.PRIMARY),
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -593,7 +668,8 @@ public final class BatchAccountRegenerateKeySamples {
*/
public final class BatchAccountSynchronizeAutoStorageKeysSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountSynchronizeAutoStorageKeys.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * BatchAccountSynchronizeAutoStorageKeys.json
*/
/**
* Sample code: BatchAccountSynchronizeAutoStorageKeys.
@@ -601,7 +677,8 @@ public final class BatchAccountSynchronizeAutoStorageKeysSamples {
* @param manager Entry point to BatchManager.
*/
public static void batchAccountSynchronizeAutoStorageKeys(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.batchAccounts().synchronizeAutoStorageKeysWithResponse("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE);
+ manager.batchAccounts().synchronizeAutoStorageKeysWithResponse("default-azurebatch-japaneast", "sampleacct",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -617,7 +694,8 @@ import com.azure.resourcemanager.batch.models.BatchAccount;
*/
public final class BatchAccountUpdateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/BatchAccountUpdate.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/BatchAccountUpdate.json
*/
/**
* Sample code: BatchAccountUpdate.
@@ -625,8 +703,11 @@ public final class BatchAccountUpdateSamples {
* @param manager Entry point to BatchManager.
*/
public static void batchAccountUpdate(com.azure.resourcemanager.batch.BatchManager manager) {
- BatchAccount resource = manager.batchAccounts().getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE).getValue();
- resource.update().withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")).apply();
+ BatchAccount resource = manager.batchAccounts().getByResourceGroupWithResponse("default-azurebatch-japaneast",
+ "sampleacct", com.azure.core.util.Context.NONE).getValue();
+ resource.update().withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
+ .apply();
}
}
```
@@ -639,7 +720,8 @@ public final class BatchAccountUpdateSamples {
*/
public final class CertificateCancelDeletionSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateCancelDeletion.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateCancelDeletion.json
*/
/**
* Sample code: CertificateCancelDeletion.
@@ -647,7 +729,8 @@ public final class CertificateCancelDeletionSamples {
* @param manager Entry point to BatchManager.
*/
public static void certificateCancelDeletion(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.certificates().cancelDeletionWithResponse("default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE);
+ manager.certificates().cancelDeletionWithResponse("default-azurebatch-japaneast", "sampleacct",
+ "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE);
}
}
```
@@ -656,14 +739,14 @@ public final class CertificateCancelDeletionSamples {
```java
import com.azure.resourcemanager.batch.models.CertificateFormat;
-import java.util.stream.Collectors;
/**
* Samples for Certificate Create.
*/
public final class CertificateCreateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateCreate_Full.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateCreate_Full.json
*/
/**
* Sample code: CreateCertificate - Full.
@@ -671,11 +754,15 @@ public final class CertificateCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createCertificateFull(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.certificates().define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withPassword("").withThumbprintAlgorithm("sha1").withThumbprint("0a0e4f50d51beadeac1d35afc5116098e7902e6e").withFormat(CertificateFormat.PFX).create();
+ manager.certificates().define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e")
+ .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withPassword("")
+ .withThumbprintAlgorithm("sha1").withThumbprint("0a0e4f50d51beadeac1d35afc5116098e7902e6e")
+ .withFormat(CertificateFormat.PFX).create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateCreate_Minimal.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateCreate_Minimal.json
*/
/**
* Sample code: CreateCertificate - Minimal Pfx.
@@ -683,11 +770,14 @@ public final class CertificateCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createCertificateMinimalPfx(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.certificates().define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withPassword("").create();
+ manager.certificates().define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e")
+ .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withPassword("")
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateCreate_MinimalCer.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateCreate_MinimalCer.json
*/
/**
* Sample code: CreateCertificate - Minimal Cer.
@@ -695,7 +785,9 @@ public final class CertificateCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createCertificateMinimalCer(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.certificates().define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withFormat(CertificateFormat.CER).create();
+ manager.certificates().define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e")
+ .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withFormat(CertificateFormat.CER)
+ .create();
}
}
```
@@ -708,7 +800,8 @@ public final class CertificateCreateSamples {
*/
public final class CertificateDeleteSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateDelete.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateDelete.json
*/
/**
* Sample code: CertificateDelete.
@@ -716,7 +809,8 @@ public final class CertificateDeleteSamples {
* @param manager Entry point to BatchManager.
*/
public static void certificateDelete(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.certificates().delete("default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE);
+ manager.certificates().delete("default-azurebatch-japaneast", "sampleacct",
+ "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE);
}
}
```
@@ -729,7 +823,9 @@ public final class CertificateDeleteSamples {
*/
public final class CertificateGetSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateGetWithDeletionError.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateGetWithDeletionError.
+ * json
*/
/**
* Sample code: Get Certificate with Deletion Error.
@@ -737,11 +833,13 @@ public final class CertificateGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void getCertificateWithDeletionError(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.certificates().getWithResponse("default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE);
+ manager.certificates().getWithResponse("default-azurebatch-japaneast", "sampleacct",
+ "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateGet.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateGet.json
*/
/**
* Sample code: Get Certificate.
@@ -749,7 +847,8 @@ public final class CertificateGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void getCertificate(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.certificates().getWithResponse("default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE);
+ manager.certificates().getWithResponse("default-azurebatch-japaneast", "sampleacct",
+ "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE);
}
}
```
@@ -762,7 +861,8 @@ public final class CertificateGetSamples {
*/
public final class CertificateListByBatchAccountSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateListWithFilter.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateListWithFilter.json
*/
/**
* Sample code: ListCertificates - Filter and Select.
@@ -770,11 +870,15 @@ public final class CertificateListByBatchAccountSamples {
* @param manager Entry point to BatchManager.
*/
public static void listCertificatesFilterAndSelect(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.certificates().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, "properties/format,properties/provisioningState", "properties/provisioningStateTransitionTime gt '2017-05-01' or properties/provisioningState eq 'Failed'", com.azure.core.util.Context.NONE);
+ manager.certificates().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null,
+ "properties/format,properties/provisioningState",
+ "properties/provisioningStateTransitionTime gt '2017-05-01' or properties/provisioningState eq 'Failed'",
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateList.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateList.json
*/
/**
* Sample code: ListCertificates.
@@ -782,7 +886,8 @@ public final class CertificateListByBatchAccountSamples {
* @param manager Entry point to BatchManager.
*/
public static void listCertificates(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.certificates().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", 1, null, null, com.azure.core.util.Context.NONE);
+ manager.certificates().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", 1, null, null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -797,7 +902,8 @@ import com.azure.resourcemanager.batch.models.Certificate;
*/
public final class CertificateUpdateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/CertificateUpdate.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/CertificateUpdate.json
*/
/**
* Sample code: UpdateCertificate.
@@ -805,7 +911,8 @@ public final class CertificateUpdateSamples {
* @param manager Entry point to BatchManager.
*/
public static void updateCertificate(com.azure.resourcemanager.batch.BatchManager manager) {
- Certificate resource = manager.certificates().getWithResponse("default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE).getValue();
+ Certificate resource = manager.certificates().getWithResponse("default-azurebatch-japaneast", "sampleacct",
+ "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", com.azure.core.util.Context.NONE).getValue();
resource.update().withData("MIIJsgIBAzCCCW4GCSqGSIb3DQE...").withPassword("").apply();
}
}
@@ -821,19 +928,23 @@ import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters;
*/
public final class LocationCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationCheckNameAvailability_AlreadyExists.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * LocationCheckNameAvailability_AlreadyExists.json
*/
/**
* Sample code: LocationCheckNameAvailability_AlreadyExists.
*
* @param manager Entry point to BatchManager.
*/
- public static void locationCheckNameAvailabilityAlreadyExists(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.locations().checkNameAvailabilityWithResponse("japaneast", new CheckNameAvailabilityParameters().withName("existingaccountname"), com.azure.core.util.Context.NONE);
+ public static void
+ locationCheckNameAvailabilityAlreadyExists(com.azure.resourcemanager.batch.BatchManager manager) {
+ manager.locations().checkNameAvailabilityWithResponse("japaneast",
+ new CheckNameAvailabilityParameters().withName("existingaccountname"), com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationCheckNameAvailability_Available.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * LocationCheckNameAvailability_Available.json
*/
/**
* Sample code: LocationCheckNameAvailability_Available.
@@ -841,7 +952,8 @@ public final class LocationCheckNameAvailabilitySamples {
* @param manager Entry point to BatchManager.
*/
public static void locationCheckNameAvailabilityAvailable(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.locations().checkNameAvailabilityWithResponse("japaneast", new CheckNameAvailabilityParameters().withName("newaccountname"), com.azure.core.util.Context.NONE);
+ manager.locations().checkNameAvailabilityWithResponse("japaneast",
+ new CheckNameAvailabilityParameters().withName("newaccountname"), com.azure.core.util.Context.NONE);
}
}
```
@@ -854,7 +966,8 @@ public final class LocationCheckNameAvailabilitySamples {
*/
public final class LocationGetQuotasSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationGetQuotas.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/LocationGetQuotas.json
*/
/**
* Sample code: LocationGetQuotas.
@@ -875,7 +988,8 @@ public final class LocationGetQuotasSamples {
*/
public final class LocationListSupportedCloudServiceSkusSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationListCloudServiceSkus.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/LocationListCloudServiceSkus.json
*/
/**
* Sample code: LocationListCloudServiceSkus.
@@ -896,7 +1010,9 @@ public final class LocationListSupportedCloudServiceSkusSamples {
*/
public final class LocationListSupportedVirtualMachineSkusSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/LocationListVirtualMachineSkus.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/LocationListVirtualMachineSkus.
+ * json
*/
/**
* Sample code: LocationListVirtualMachineSkus.
@@ -917,7 +1033,8 @@ public final class LocationListSupportedVirtualMachineSkusSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/OperationsList.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/OperationsList.json
*/
/**
* Sample code: OperationsList.
@@ -939,6 +1056,7 @@ import com.azure.resourcemanager.batch.models.ApplicationPackageReference;
import com.azure.resourcemanager.batch.models.AutoScaleSettings;
import com.azure.resourcemanager.batch.models.AutoUserScope;
import com.azure.resourcemanager.batch.models.AutoUserSpecification;
+import com.azure.resourcemanager.batch.models.AutomaticOSUpgradePolicy;
import com.azure.resourcemanager.batch.models.BatchPoolIdentity;
import com.azure.resourcemanager.batch.models.CachingType;
import com.azure.resourcemanager.batch.models.CertificateReference;
@@ -975,6 +1093,7 @@ import com.azure.resourcemanager.batch.models.PoolEndpointConfiguration;
import com.azure.resourcemanager.batch.models.PoolIdentityType;
import com.azure.resourcemanager.batch.models.PublicIpAddressConfiguration;
import com.azure.resourcemanager.batch.models.ResourceFile;
+import com.azure.resourcemanager.batch.models.RollingUpgradePolicy;
import com.azure.resourcemanager.batch.models.ScaleSettings;
import com.azure.resourcemanager.batch.models.SecurityProfile;
import com.azure.resourcemanager.batch.models.SecurityTypes;
@@ -983,37 +1102,55 @@ import com.azure.resourcemanager.batch.models.StartTask;
import com.azure.resourcemanager.batch.models.StorageAccountType;
import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy;
import com.azure.resourcemanager.batch.models.UefiSettings;
+import com.azure.resourcemanager.batch.models.UpgradeMode;
+import com.azure.resourcemanager.batch.models.UpgradePolicy;
import com.azure.resourcemanager.batch.models.UserAccount;
import com.azure.resourcemanager.batch.models.UserAssignedIdentities;
import com.azure.resourcemanager.batch.models.UserIdentity;
-import com.azure.resourcemanager.batch.models.VirtualMachineConfiguration;
import com.azure.resourcemanager.batch.models.VMExtension;
+import com.azure.resourcemanager.batch.models.VirtualMachineConfiguration;
import com.azure.resourcemanager.batch.models.WindowsConfiguration;
import java.io.IOException;
import java.time.Duration;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
-import java.util.stream.Collectors;
/**
* Samples for Pool Create.
*/
public final class PoolCreateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
*/
/**
* Sample code: CreatePool - VirtualMachineConfiguration ServiceArtifactReference.
*
* @param manager Entry point to BatchManager.
*/
- public static void createPoolVirtualMachineConfigurationServiceArtifactReference(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("Standard_d4s_v3").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer").withOffer("WindowsServer").withSku("2019-datacenter-smalldisk").withVersion("latest")).withNodeAgentSkuId("batch.node.windows amd64").withWindowsConfiguration(new WindowsConfiguration().withEnableAutomaticUpdates(false)).withServiceArtifactReference(new ServiceArtifactReference().withId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile")))).withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(2).withTargetLowPriorityNodes(0))).create();
+ public static void createPoolVirtualMachineConfigurationServiceArtifactReference(
+ com.azure.resourcemanager.batch.BatchManager manager) {
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("Standard_d4s_v3")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer")
+ .withOffer("WindowsServer").withSku("2019-datacenter-smalldisk").withVersion("latest"))
+ .withNodeAgentSkuId("batch.node.windows amd64")
+ .withWindowsConfiguration(new WindowsConfiguration().withEnableAutomaticUpdates(false))
+ .withServiceArtifactReference(new ServiceArtifactReference().withId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"))))
+ .withScaleSettings(new ScaleSettings()
+ .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(2).withTargetLowPriorityNodes(0)))
+ .withUpgradePolicy(new UpgradePolicy().withMode(UpgradeMode.AUTOMATIC)
+ .withAutomaticOSUpgradePolicy(new AutomaticOSUpgradePolicy().withEnableAutomaticOSUpgrade(true)))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_SecurityProfile.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_SecurityProfile.json
*/
/**
* Sample code: CreatePool - SecurityProfile.
@@ -1021,59 +1158,125 @@ public final class PoolCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createPoolSecurityProfile(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("Standard_d4s_v3").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("Canonical").withOffer("UbuntuServer").withSku("18_04-lts-gen2").withVersion("latest")).withNodeAgentSkuId("batch.node.ubuntu 18.04").withSecurityProfile(new SecurityProfile().withSecurityType(SecurityTypes.TRUSTED_LAUNCH).withEncryptionAtHost(true).withUefiSettings(new UefiSettings().withVTpmEnabled(false))))).withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))).create();
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("Standard_d4s_v3")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration()
+ .withVirtualMachineConfiguration(new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("Canonical").withOffer("UbuntuServer")
+ .withSku("18_04-lts-gen2").withVersion("latest"))
+ .withNodeAgentSkuId("batch.node.ubuntu 18.04")
+ .withSecurityProfile(new SecurityProfile().withSecurityType(SecurityTypes.TRUSTED_LAUNCH)
+ .withEncryptionAtHost(true).withUefiSettings(new UefiSettings().withVTpmEnabled(false)))))
+ .withScaleSettings(new ScaleSettings()
+ .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0)))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
*/
/**
* Sample code: CreatePool - VirtualMachineConfiguration OSDisk.
*
* @param manager Entry point to BatchManager.
*/
- public static void createPoolVirtualMachineConfigurationOSDisk(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("Standard_d2s_v3").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("microsoftwindowsserver").withOffer("windowsserver").withSku("2022-datacenter-smalldisk")).withNodeAgentSkuId("batch.node.windows amd64").withOsDisk(new OSDisk().withCaching(CachingType.READ_WRITE).withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.STANDARD_SSD_LRS)).withDiskSizeGB(100).withWriteAcceleratorEnabled(false)))).withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))).create();
+ public static void
+ createPoolVirtualMachineConfigurationOSDisk(com.azure.resourcemanager.batch.BatchManager manager) {
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("Standard_d2s_v3")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("microsoftwindowsserver")
+ .withOffer("windowsserver").withSku("2022-datacenter-smalldisk"))
+ .withNodeAgentSkuId("batch.node.windows amd64")
+ .withOsDisk(new OSDisk().withCaching(CachingType.READ_WRITE)
+ .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.STANDARD_SSD_LRS))
+ .withDiskSizeGB(100).withWriteAcceleratorEnabled(false))))
+ .withScaleSettings(new ScaleSettings()
+ .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0)))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolCreate_MinimalCloudServiceConfiguration.json
*/
/**
* Sample code: CreatePool - Minimal CloudServiceConfiguration.
*
* @param manager Entry point to BatchManager.
*/
- public static void createPoolMinimalCloudServiceConfiguration(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("STANDARD_D4").withDeploymentConfiguration(new DeploymentConfiguration().withCloudServiceConfiguration(new CloudServiceConfiguration().withOsFamily("5"))).withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(3))).create();
+ public static void
+ createPoolMinimalCloudServiceConfiguration(com.azure.resourcemanager.batch.BatchManager manager) {
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("STANDARD_D4")
+ .withDeploymentConfiguration(new DeploymentConfiguration()
+ .withCloudServiceConfiguration(new CloudServiceConfiguration().withOsFamily("5")))
+ .withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(3)))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolCreate_MinimalVirtualMachineConfiguration.json
*/
/**
* Sample code: CreatePool - Minimal VirtualMachineConfiguration.
*
* @param manager Entry point to BatchManager.
*/
- public static void createPoolMinimalVirtualMachineConfiguration(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("STANDARD_D4").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("Canonical").withOffer("UbuntuServer").withSku("18.04-LTS").withVersion("latest")).withNodeAgentSkuId("batch.node.ubuntu 18.04"))).withScaleSettings(new ScaleSettings().withAutoScale(new AutoScaleSettings().withFormula("$TargetDedicatedNodes=1").withEvaluationInterval(Duration.parse("PT5M")))).create();
+ public static void
+ createPoolMinimalVirtualMachineConfiguration(com.azure.resourcemanager.batch.BatchManager manager) {
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("STANDARD_D4")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration()
+ .withVirtualMachineConfiguration(
+ new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("Canonical")
+ .withOffer("UbuntuServer").withSku("18.04-LTS").withVersion("latest"))
+ .withNodeAgentSkuId("batch.node.ubuntu 18.04")))
+ .withScaleSettings(new ScaleSettings().withAutoScale(new AutoScaleSettings()
+ .withFormula("$TargetDedicatedNodes=1").withEvaluationInterval(Duration.parse("PT5M"))))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolCreate_VirtualMachineConfiguration_Extensions.json
*/
/**
* Sample code: CreatePool - VirtualMachineConfiguration Extensions.
*
* @param manager Entry point to BatchManager.
*/
- public static void createPoolVirtualMachineConfigurationExtensions(com.azure.resourcemanager.batch.BatchManager manager) throws IOException {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("STANDARD_D4").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("Canonical").withOffer("0001-com-ubuntu-server-focal").withSku("20_04-lts")).withNodeAgentSkuId("batch.node.ubuntu 20.04").withExtensions(Arrays.asList(new VMExtension().withName("batchextension1").withPublisher("Microsoft.Azure.KeyVault").withType("KeyVaultForLinux").withTypeHandlerVersion("2.0").withAutoUpgradeMinorVersion(true).withEnableAutomaticUpgrade(true).withSettings(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"authenticationSettingsKey\":\"authenticationSettingsValue\",\"secretsManagementSettingsKey\":\"secretsManagementSettingsValue\"}", Object.class, SerializerEncoding.JSON)))))).withScaleSettings(new ScaleSettings().withAutoScale(new AutoScaleSettings().withFormula("$TargetDedicatedNodes=1").withEvaluationInterval(Duration.parse("PT5M")))).withTargetNodeCommunicationMode(NodeCommunicationMode.DEFAULT).create();
+ public static void createPoolVirtualMachineConfigurationExtensions(
+ com.azure.resourcemanager.batch.BatchManager manager) throws IOException {
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("STANDARD_D4")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("Canonical")
+ .withOffer("0001-com-ubuntu-server-focal").withSku("20_04-lts"))
+ .withNodeAgentSkuId("batch.node.ubuntu 20.04")
+ .withExtensions(Arrays.asList(new VMExtension().withName("batchextension1")
+ .withPublisher("Microsoft.Azure.KeyVault").withType("KeyVaultForLinux")
+ .withTypeHandlerVersion("2.0").withAutoUpgradeMinorVersion(true)
+ .withEnableAutomaticUpgrade(true)
+ .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize(
+ "{\"authenticationSettingsKey\":\"authenticationSettingsValue\",\"secretsManagementSettingsKey\":\"secretsManagementSettingsValue\"}",
+ Object.class, SerializerEncoding.JSON))))))
+ .withScaleSettings(new ScaleSettings().withAutoScale(new AutoScaleSettings()
+ .withFormula("$TargetDedicatedNodes=1").withEvaluationInterval(Duration.parse("PT5M"))))
+ .withTargetNodeCommunicationMode(NodeCommunicationMode.DEFAULT).create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_UserAssignedIdentities.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_UserAssignedIdentities
+ * .json
*/
/**
* Sample code: CreatePool - UserAssignedIdentities.
@@ -1081,11 +1284,64 @@ public final class PoolCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createPoolUserAssignedIdentities(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withIdentity(new BatchPoolIdentity().withType(PoolIdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", new UserAssignedIdentities(), "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", new UserAssignedIdentities()))).withVmSize("STANDARD_D4").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("Canonical").withOffer("UbuntuServer").withSku("18.04-LTS").withVersion("latest")).withNodeAgentSkuId("batch.node.ubuntu 18.04"))).withScaleSettings(new ScaleSettings().withAutoScale(new AutoScaleSettings().withFormula("$TargetDedicatedNodes=1").withEvaluationInterval(Duration.parse("PT5M")))).create();
- }
-
- /*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_AcceleratedNetworking.json
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withIdentity(new BatchPoolIdentity().withType(PoolIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
+ new UserAssignedIdentities(),
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2",
+ new UserAssignedIdentities())))
+ .withVmSize("STANDARD_D4")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration()
+ .withVirtualMachineConfiguration(
+ new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("Canonical")
+ .withOffer("UbuntuServer").withSku("18.04-LTS").withVersion("latest"))
+ .withNodeAgentSkuId("batch.node.ubuntu 18.04")))
+ .withScaleSettings(new ScaleSettings().withAutoScale(new AutoScaleSettings()
+ .withFormula("$TargetDedicatedNodes=1").withEvaluationInterval(Duration.parse("PT5M"))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_UpgradePolicy.json
+ */
+ /**
+ * Sample code: CreatePool - UpgradePolicy.
+ *
+ * @param manager Entry point to BatchManager.
+ */
+ public static void createPoolUpgradePolicy(com.azure.resourcemanager.batch.BatchManager manager) {
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("Standard_d4s_v3")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer")
+ .withOffer("WindowsServer").withSku("2019-datacenter-smalldisk").withVersion("latest"))
+ .withNodeAgentSkuId("batch.node.windows amd64")
+ .withWindowsConfiguration(new WindowsConfiguration().withEnableAutomaticUpdates(false))
+ .withNodePlacementConfiguration(
+ new NodePlacementConfiguration().withPolicy(NodePlacementPolicyType.ZONAL))))
+ .withScaleSettings(new ScaleSettings()
+ .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(2).withTargetLowPriorityNodes(0)))
+ .withUpgradePolicy(
+ new UpgradePolicy().withMode(UpgradeMode.AUTOMATIC)
+ .withAutomaticOSUpgradePolicy(new AutomaticOSUpgradePolicy().withDisableAutomaticRollback(true)
+ .withEnableAutomaticOSUpgrade(true).withUseRollingUpgradePolicy(true)
+ .withOsRollingUpgradeDeferral(true))
+ .withRollingUpgradePolicy(new RollingUpgradePolicy().withEnableCrossZoneUpgrade(true)
+ .withMaxBatchInstancePercent(20).withMaxUnhealthyInstancePercent(20)
+ .withMaxUnhealthyUpgradedInstancePercent(20).withPauseTimeBetweenBatches("PT0S")
+ .withPrioritizeUnhealthyInstances(false).withRollbackFailedInstancesOnPolicyBreach(false)))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_AcceleratedNetworking.
+ * json
*/
/**
* Sample code: CreatePool - accelerated networking.
@@ -1093,11 +1349,24 @@ public final class PoolCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createPoolAcceleratedNetworking(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("STANDARD_D1_V2").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer").withOffer("WindowsServer").withSku("2016-datacenter-smalldisk").withVersion("latest")).withNodeAgentSkuId("batch.node.windows amd64"))).withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))).withNetworkConfiguration(new NetworkConfiguration().withSubnetId("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123").withEnableAcceleratedNetworking(true)).create();
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("STANDARD_D1_V2")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer")
+ .withOffer("WindowsServer").withSku("2016-datacenter-smalldisk").withVersion("latest"))
+ .withNodeAgentSkuId("batch.node.windows amd64")))
+ .withScaleSettings(new ScaleSettings()
+ .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0)))
+ .withNetworkConfiguration(new NetworkConfiguration().withSubnetId(
+ "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123")
+ .withEnableAcceleratedNetworking(true))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolCreate_VirtualMachineConfiguration.json
*/
/**
* Sample code: CreatePool - Full VirtualMachineConfiguration.
@@ -1105,11 +1374,51 @@ public final class PoolCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createPoolFullVirtualMachineConfiguration(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("STANDARD_D4").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer").withOffer("WindowsServer").withSku("2016-Datacenter-SmallDisk").withVersion("latest")).withNodeAgentSkuId("batch.node.windows amd64").withWindowsConfiguration(new WindowsConfiguration().withEnableAutomaticUpdates(false)).withDataDisks(Arrays.asList(new DataDisk().withLun(0).withCaching(CachingType.READ_WRITE).withDiskSizeGB(30).withStorageAccountType(StorageAccountType.PREMIUM_LRS), new DataDisk().withLun(1).withCaching(CachingType.NONE).withDiskSizeGB(200).withStorageAccountType(StorageAccountType.STANDARD_LRS))).withLicenseType("Windows_Server").withDiskEncryptionConfiguration(new DiskEncryptionConfiguration().withTargets(Arrays.asList(DiskEncryptionTarget.OS_DISK, DiskEncryptionTarget.TEMPORARY_DISK))).withNodePlacementConfiguration(new NodePlacementConfiguration().withPolicy(NodePlacementPolicyType.ZONAL)).withOsDisk(new OSDisk().withEphemeralOSDiskSettings(new DiffDiskSettings().withPlacement(DiffDiskPlacement.CACHE_DISK))))).withScaleSettings(new ScaleSettings().withAutoScale(new AutoScaleSettings().withFormula("$TargetDedicatedNodes=1").withEvaluationInterval(Duration.parse("PT5M")))).withNetworkConfiguration(new NetworkConfiguration().withEndpointConfiguration(new PoolEndpointConfiguration().withInboundNatPools(Arrays.asList(new InboundNatPool().withName("testnat").withProtocol(InboundEndpointProtocol.TCP).withBackendPort(12001).withFrontendPortRangeStart(15000).withFrontendPortRangeEnd(15100).withNetworkSecurityGroupRules(Arrays.asList(new NetworkSecurityGroupRule().withPriority(150).withAccess(NetworkSecurityGroupRuleAccess.ALLOW).withSourceAddressPrefix("192.100.12.45").withSourcePortRanges(Arrays.asList("1", "2")), new NetworkSecurityGroupRule().withPriority(3500).withAccess(NetworkSecurityGroupRuleAccess.DENY).withSourceAddressPrefix("*").withSourcePortRanges(Arrays.asList("*")))))))).create();
- }
-
- /*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_SharedImageGallery.json
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("STANDARD_D4")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration()
+ .withVirtualMachineConfiguration(new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer")
+ .withOffer("WindowsServer").withSku("2016-Datacenter-SmallDisk").withVersion("latest"))
+ .withNodeAgentSkuId("batch.node.windows amd64")
+ .withWindowsConfiguration(new WindowsConfiguration().withEnableAutomaticUpdates(false))
+ .withDataDisks(Arrays.asList(
+ new DataDisk().withLun(0).withCaching(CachingType.READ_WRITE).withDiskSizeGB(30)
+ .withStorageAccountType(StorageAccountType.PREMIUM_LRS),
+ new DataDisk().withLun(1).withCaching(CachingType.NONE).withDiskSizeGB(200)
+ .withStorageAccountType(StorageAccountType.STANDARD_LRS)))
+ .withLicenseType("Windows_Server")
+ .withDiskEncryptionConfiguration(new DiskEncryptionConfiguration().withTargets(
+ Arrays.asList(DiskEncryptionTarget.OS_DISK, DiskEncryptionTarget.TEMPORARY_DISK)))
+ .withNodePlacementConfiguration(
+ new NodePlacementConfiguration().withPolicy(NodePlacementPolicyType.ZONAL))
+ .withOsDisk(new OSDisk().withEphemeralOSDiskSettings(
+ new DiffDiskSettings().withPlacement(DiffDiskPlacement.CACHE_DISK)))))
+ .withScaleSettings(
+ new ScaleSettings()
+ .withAutoScale(
+ new AutoScaleSettings().withFormula(
+ "$TargetDedicatedNodes=1").withEvaluationInterval(
+ Duration.parse("PT5M"))))
+ .withNetworkConfiguration(
+ new NetworkConfiguration()
+ .withEndpointConfiguration(new PoolEndpointConfiguration().withInboundNatPools(
+ Arrays.asList(new InboundNatPool().withName("testnat").withProtocol(InboundEndpointProtocol.TCP)
+ .withBackendPort(12001).withFrontendPortRangeStart(15000).withFrontendPortRangeEnd(15100)
+ .withNetworkSecurityGroupRules(Arrays.asList(new NetworkSecurityGroupRule()
+ .withPriority(150).withAccess(NetworkSecurityGroupRuleAccess.ALLOW)
+ .withSourceAddressPrefix("192.100.12.45").withSourcePortRanges(Arrays.asList("1", "2")),
+ new NetworkSecurityGroupRule().withPriority(3500)
+ .withAccess(NetworkSecurityGroupRuleAccess.DENY).withSourceAddressPrefix("*")
+ .withSourcePortRanges(Arrays.asList("*"))))))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_SharedImageGallery.
+ * json
*/
/**
* Sample code: CreatePool - Custom Image.
@@ -1117,11 +1426,18 @@ public final class PoolCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createPoolCustomImage(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("STANDARD_D4").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withId("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1")).withNodeAgentSkuId("batch.node.ubuntu 18.04"))).create();
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("STANDARD_D4")
+ .withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(
+ new VirtualMachineConfiguration().withImageReference(new ImageReference().withId(
+ "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"))
+ .withNodeAgentSkuId("batch.node.ubuntu 18.04")))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_CloudServiceConfiguration.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolCreate_CloudServiceConfiguration.json
*/
/**
* Sample code: CreatePool - Full CloudServiceConfiguration.
@@ -1129,11 +1445,51 @@ public final class PoolCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createPoolFullCloudServiceConfiguration(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withDisplayName("my-pool-name").withVmSize("STANDARD_D4").withDeploymentConfiguration(new DeploymentConfiguration().withCloudServiceConfiguration(new CloudServiceConfiguration().withOsFamily("4").withOsVersion("WA-GUEST-OS-4.45_201708-01"))).withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withResizeTimeout(Duration.parse("PT8M")).withTargetDedicatedNodes(6).withTargetLowPriorityNodes(28).withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION))).withInterNodeCommunication(InterNodeCommunicationState.ENABLED).withNetworkConfiguration(new NetworkConfiguration().withSubnetId("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123").withPublicIpAddressConfiguration(new PublicIpAddressConfiguration().withProvision(IpAddressProvisioningType.USER_MANAGED).withIpAddressIds(Arrays.asList("/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135", "/subscriptions/subid2/resourceGroups/rg24/providers/Microsoft.Network/publicIPAddresses/ip268")))).withTaskSlotsPerNode(13).withTaskSchedulingPolicy(new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.PACK)).withUserAccounts(Arrays.asList(new UserAccount().withName("username1").withPassword("fakeTokenPlaceholder").withElevationLevel(ElevationLevel.ADMIN).withLinuxUserConfiguration(new LinuxUserConfiguration().withUid(1234).withGid(4567).withSshPrivateKey("fakeTokenPlaceholder")))).withMetadata(Arrays.asList(new MetadataItem().withName("metadata-1").withValue("value-1"), new MetadataItem().withName("metadata-2").withValue("value-2"))).withStartTask(new StartTask().withCommandLine("cmd /c SET").withResourceFiles(Arrays.asList(new ResourceFile().withHttpUrl("https://testaccount.blob.core.windows.net/example-blob-file").withFilePath("c:\\temp\\gohere").withFileMode("777"))).withEnvironmentSettings(Arrays.asList(new EnvironmentSetting().withName("MYSET").withValue("1234"))).withUserIdentity(new UserIdentity().withAutoUser(new AutoUserSpecification().withScope(AutoUserScope.POOL).withElevationLevel(ElevationLevel.ADMIN))).withMaxTaskRetryCount(6).withWaitForSuccess(true)).withCertificates(Arrays.asList(new CertificateReference().withId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567").withStoreLocation(CertificateStoreLocation.LOCAL_MACHINE).withStoreName("MY").withVisibility(Arrays.asList(CertificateVisibility.REMOTE_USER)))).withApplicationPackages(Arrays.asList(new ApplicationPackageReference().withId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234").withVersion("asdf"))).withApplicationLicenses(Arrays.asList("app-license0", "app-license1")).create();
- }
-
- /*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_NoPublicIPAddresses.json
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withDisplayName("my-pool-name").withVmSize("STANDARD_D4")
+ .withDeploymentConfiguration(new DeploymentConfiguration().withCloudServiceConfiguration(
+ new CloudServiceConfiguration().withOsFamily("4").withOsVersion("WA-GUEST-OS-4.45_201708-01")))
+ .withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings()
+ .withResizeTimeout(Duration.parse("PT8M")).withTargetDedicatedNodes(6).withTargetLowPriorityNodes(28)
+ .withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION)))
+ .withInterNodeCommunication(InterNodeCommunicationState.ENABLED)
+ .withNetworkConfiguration(new NetworkConfiguration().withSubnetId(
+ "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123")
+ .withPublicIpAddressConfiguration(new PublicIpAddressConfiguration()
+ .withProvision(IpAddressProvisioningType.USER_MANAGED)
+ .withIpAddressIds(Arrays.asList(
+ "/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135",
+ "/subscriptions/subid2/resourceGroups/rg24/providers/Microsoft.Network/publicIPAddresses/ip268"))))
+ .withTaskSlotsPerNode(13)
+ .withTaskSchedulingPolicy(new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.PACK))
+ .withUserAccounts(Arrays.asList(new UserAccount().withName("username1").withPassword("fakeTokenPlaceholder")
+ .withElevationLevel(ElevationLevel.ADMIN)
+ .withLinuxUserConfiguration(new LinuxUserConfiguration().withUid(1234).withGid(4567)
+ .withSshPrivateKey("fakeTokenPlaceholder"))))
+ .withMetadata(Arrays.asList(new MetadataItem().withName("metadata-1").withValue("value-1"),
+ new MetadataItem().withName("metadata-2").withValue("value-2")))
+ .withStartTask(new StartTask().withCommandLine("cmd /c SET")
+ .withResourceFiles(Arrays.asList(
+ new ResourceFile().withHttpUrl("https://testaccount.blob.core.windows.net/example-blob-file")
+ .withFilePath("c:\\temp\\gohere").withFileMode("777")))
+ .withEnvironmentSettings(Arrays.asList(new EnvironmentSetting().withName("MYSET").withValue("1234")))
+ .withUserIdentity(new UserIdentity().withAutoUser(
+ new AutoUserSpecification().withScope(AutoUserScope.POOL).withElevationLevel(ElevationLevel.ADMIN)))
+ .withMaxTaskRetryCount(6).withWaitForSuccess(true))
+ .withCertificates(Arrays.asList(new CertificateReference().withId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567")
+ .withStoreLocation(CertificateStoreLocation.LOCAL_MACHINE).withStoreName("MY")
+ .withVisibility(Arrays.asList(CertificateVisibility.REMOTE_USER))))
+ .withApplicationPackages(Arrays.asList(new ApplicationPackageReference().withId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234")
+ .withVersion("asdf")))
+ .withApplicationLicenses(Arrays.asList("app-license0", "app-license1")).create();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_NoPublicIPAddresses.
+ * json
*/
/**
* Sample code: CreatePool - No public IP.
@@ -1141,11 +1497,22 @@ public final class PoolCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("STANDARD_D4").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withId("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1")).withNodeAgentSkuId("batch.node.ubuntu 18.04"))).withNetworkConfiguration(new NetworkConfiguration().withSubnetId("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123").withPublicIpAddressConfiguration(new PublicIpAddressConfiguration().withProvision(IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES))).create();
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("STANDARD_D4")
+ .withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(
+ new VirtualMachineConfiguration().withImageReference(new ImageReference().withId(
+ "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"))
+ .withNodeAgentSkuId("batch.node.ubuntu 18.04")))
+ .withNetworkConfiguration(new NetworkConfiguration().withSubnetId(
+ "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123")
+ .withPublicIpAddressConfiguration(
+ new PublicIpAddressConfiguration().withProvision(IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES)))
+ .create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_ResourceTags.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_ResourceTags.json
*/
/**
* Sample code: CreatePool - ResourceTags.
@@ -1153,11 +1520,21 @@ public final class PoolCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createPoolResourceTags(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("Standard_d4s_v3").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("Canonical").withOffer("UbuntuServer").withSku("18_04-lts-gen2").withVersion("latest")).withNodeAgentSkuId("batch.node.ubuntu 18.04"))).withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))).withResourceTags(mapOf("TagName1", "TagValue1", "TagName2", "TagValue2")).create();
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("Standard_d4s_v3")
+ .withDeploymentConfiguration(
+ new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration()
+ .withImageReference(new ImageReference().withPublisher("Canonical").withOffer("UbuntuServer")
+ .withSku("18_04-lts-gen2").withVersion("latest"))
+ .withNodeAgentSkuId("batch.node.ubuntu 18.04")))
+ .withScaleSettings(new ScaleSettings()
+ .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0)))
+ .withResourceTags(mapOf("TagName1", "TagValue1", "TagName2", "TagValue2")).create();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_PublicIPs.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_PublicIPs.json
*/
/**
* Sample code: CreatePool - Public IPs.
@@ -1165,7 +1542,19 @@ public final class PoolCreateSamples {
* @param manager Entry point to BatchManager.
*/
public static void createPoolPublicIPs(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct").withVmSize("STANDARD_D4").withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration().withImageReference(new ImageReference().withId("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1")).withNodeAgentSkuId("batch.node.ubuntu 18.04"))).withNetworkConfiguration(new NetworkConfiguration().withSubnetId("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123").withPublicIpAddressConfiguration(new PublicIpAddressConfiguration().withProvision(IpAddressProvisioningType.USER_MANAGED).withIpAddressIds(Arrays.asList("/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135")))).create();
+ manager.pools().define("testpool").withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct")
+ .withVmSize("STANDARD_D4")
+ .withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration(
+ new VirtualMachineConfiguration().withImageReference(new ImageReference().withId(
+ "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"))
+ .withNodeAgentSkuId("batch.node.ubuntu 18.04")))
+ .withNetworkConfiguration(new NetworkConfiguration().withSubnetId(
+ "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123")
+ .withPublicIpAddressConfiguration(new PublicIpAddressConfiguration()
+ .withProvision(IpAddressProvisioningType.USER_MANAGED)
+ .withIpAddressIds(Arrays.asList(
+ "/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135"))))
+ .create();
}
// Use "Map.of" if available
@@ -1190,7 +1579,8 @@ public final class PoolCreateSamples {
*/
public final class PoolDeleteSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolDelete.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolDelete.json
*/
/**
* Sample code: DeletePool.
@@ -1198,7 +1588,8 @@ public final class PoolDeleteSamples {
* @param manager Entry point to BatchManager.
*/
public static void deletePool(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().delete("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE);
+ manager.pools().delete("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1211,7 +1602,8 @@ public final class PoolDeleteSamples {
*/
public final class PoolDisableAutoScaleSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolDisableAutoScale.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolDisableAutoScale.json
*/
/**
* Sample code: Disable AutoScale.
@@ -1219,7 +1611,8 @@ public final class PoolDisableAutoScaleSamples {
* @param manager Entry point to BatchManager.
*/
public static void disableAutoScale(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().disableAutoScaleWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE);
+ manager.pools().disableAutoScaleWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1232,7 +1625,8 @@ public final class PoolDisableAutoScaleSamples {
*/
public final class PoolGetSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_SecurityProfile.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet_SecurityProfile.json
*/
/**
* Sample code: GetPool - SecurityProfile.
@@ -1240,23 +1634,28 @@ public final class PoolGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void getPoolSecurityProfile(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE);
+ manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolGet_VirtualMachineConfiguration_Extensions.json
*/
/**
* Sample code: GetPool - VirtualMachineConfiguration Extensions.
*
* @param manager Entry point to BatchManager.
*/
- public static void getPoolVirtualMachineConfigurationExtensions(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE);
+ public static void
+ getPoolVirtualMachineConfigurationExtensions(com.azure.resourcemanager.batch.BatchManager manager) {
+ manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_VirtualMachineConfiguration_MangedOSDisk.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolGet_VirtualMachineConfiguration_MangedOSDisk.json
*/
/**
* Sample code: GetPool - VirtualMachineConfiguration OSDisk.
@@ -1264,23 +1663,43 @@ public final class PoolGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void getPoolVirtualMachineConfigurationOSDisk(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE);
+ manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet_UpgradePolicy.json
+ */
+ /**
+ * Sample code: GetPool - UpgradePolicy.
+ *
+ * @param manager Entry point to BatchManager.
+ */
+ public static void getPoolUpgradePolicy(com.azure.resourcemanager.batch.BatchManager manager) {
+ manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/
+ * PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json
*/
/**
* Sample code: GetPool - VirtualMachineConfiguration ServiceArtifactReference.
*
* @param manager Entry point to BatchManager.
*/
- public static void getPoolVirtualMachineConfigurationServiceArtifactReference(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE);
+ public static void getPoolVirtualMachineConfigurationServiceArtifactReference(
+ com.azure.resourcemanager.batch.BatchManager manager) {
+ manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet_AcceleratedNetworking.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet_AcceleratedNetworking.
+ * json
*/
/**
* Sample code: GetPool - AcceleratedNetworking.
@@ -1288,11 +1707,12 @@ public final class PoolGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void getPoolAcceleratedNetworking(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE);
+ manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolGet.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolGet.json
*/
/**
* Sample code: GetPool.
@@ -1300,7 +1720,8 @@ public final class PoolGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void getPool(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE);
+ manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1313,7 +1734,7 @@ public final class PoolGetSamples {
*/
public final class PoolListByBatchAccountSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolList.json
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolList.json
*/
/**
* Sample code: ListPool.
@@ -1321,11 +1742,13 @@ public final class PoolListByBatchAccountSamples {
* @param manager Entry point to BatchManager.
*/
public static void listPool(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, null, null, com.azure.core.util.Context.NONE);
+ manager.pools().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, null, null,
+ com.azure.core.util.Context.NONE);
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolListWithFilter.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolListWithFilter.json
*/
/**
* Sample code: ListPoolWithFilter.
@@ -1333,7 +1756,10 @@ public final class PoolListByBatchAccountSamples {
* @param manager Entry point to BatchManager.
*/
public static void listPoolWithFilter(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", 50, "properties/allocationState,properties/provisioningStateTransitionTime,properties/currentDedicatedNodes,properties/currentLowPriorityNodes", "startswith(name, 'po') or (properties/allocationState eq 'Steady' and properties/provisioningStateTransitionTime lt datetime'2017-02-02')", com.azure.core.util.Context.NONE);
+ manager.pools().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", 50,
+ "properties/allocationState,properties/provisioningStateTransitionTime,properties/currentDedicatedNodes,properties/currentLowPriorityNodes",
+ "startswith(name, 'po') or (properties/allocationState eq 'Steady' and properties/provisioningStateTransitionTime lt datetime'2017-02-02')",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1346,7 +1772,8 @@ public final class PoolListByBatchAccountSamples {
*/
public final class PoolStopResizeSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolStopResize.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolStopResize.json
*/
/**
* Sample code: StopPoolResize.
@@ -1354,7 +1781,8 @@ public final class PoolStopResizeSamples {
* @param manager Entry point to BatchManager.
*/
public static void stopPoolResize(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.pools().stopResizeWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE);
+ manager.pools().stopResizeWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1375,14 +1803,14 @@ import com.azure.resourcemanager.batch.models.ScaleSettings;
import com.azure.resourcemanager.batch.models.StartTask;
import java.time.Duration;
import java.util.Arrays;
-import java.util.stream.Collectors;
/**
* Samples for Pool Update.
*/
public final class PoolUpdateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolUpdate_EnableAutoScale.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolUpdate_EnableAutoScale.json
*/
/**
* Sample code: UpdatePool - Enable Autoscale.
@@ -1390,12 +1818,18 @@ public final class PoolUpdateSamples {
* @param manager Entry point to BatchManager.
*/
public static void updatePoolEnableAutoscale(com.azure.resourcemanager.batch.BatchManager manager) {
- Pool resource = manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE).getValue();
- resource.update().withScaleSettings(new ScaleSettings().withAutoScale(new AutoScaleSettings().withFormula("$TargetDedicatedNodes=34"))).apply();
+ Pool resource = manager.pools()
+ .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withScaleSettings(
+ new ScaleSettings().withAutoScale(new AutoScaleSettings().withFormula("$TargetDedicatedNodes=34")))
+ .apply();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolUpdate_RemoveStartTask.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolUpdate_RemoveStartTask.json
*/
/**
* Sample code: UpdatePool - Remove Start Task.
@@ -1403,12 +1837,15 @@ public final class PoolUpdateSamples {
* @param manager Entry point to BatchManager.
*/
public static void updatePoolRemoveStartTask(com.azure.resourcemanager.batch.BatchManager manager) {
- Pool resource = manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE).getValue();
+ Pool resource = manager.pools()
+ .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE)
+ .getValue();
resource.update().withStartTask(new StartTask()).apply();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolUpdate_ResizePool.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolUpdate_ResizePool.json
*/
/**
* Sample code: UpdatePool - Resize Pool.
@@ -1416,12 +1853,19 @@ public final class PoolUpdateSamples {
* @param manager Entry point to BatchManager.
*/
public static void updatePoolResizePool(com.azure.resourcemanager.batch.BatchManager manager) {
- Pool resource = manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE).getValue();
- resource.update().withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withResizeTimeout(Duration.parse("PT8M")).withTargetDedicatedNodes(5).withTargetLowPriorityNodes(0).withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION))).apply();
+ Pool resource = manager.pools()
+ .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings()
+ .withResizeTimeout(Duration.parse("PT8M")).withTargetDedicatedNodes(5).withTargetLowPriorityNodes(0)
+ .withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION)))
+ .apply();
}
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolUpdate_OtherProperties.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolUpdate_OtherProperties.json
*/
/**
* Sample code: UpdatePool - Other Properties.
@@ -1429,8 +1873,19 @@ public final class PoolUpdateSamples {
* @param manager Entry point to BatchManager.
*/
public static void updatePoolOtherProperties(com.azure.resourcemanager.batch.BatchManager manager) {
- Pool resource = manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE).getValue();
- resource.update().withMetadata(Arrays.asList(new MetadataItem().withName("key1").withValue("value1"))).withCertificates(Arrays.asList(new CertificateReference().withId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567").withStoreLocation(CertificateStoreLocation.LOCAL_MACHINE).withStoreName("MY"))).withApplicationPackages(Arrays.asList(new ApplicationPackageReference().withId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234"), new ApplicationPackageReference().withId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_5678").withVersion("1.0"))).withTargetNodeCommunicationMode(NodeCommunicationMode.SIMPLIFIED).apply();
+ Pool resource = manager.pools()
+ .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update().withMetadata(Arrays.asList(new MetadataItem().withName("key1").withValue("value1")))
+ .withCertificates(Arrays.asList(new CertificateReference().withId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567")
+ .withStoreLocation(CertificateStoreLocation.LOCAL_MACHINE).withStoreName("MY")))
+ .withApplicationPackages(Arrays.asList(new ApplicationPackageReference().withId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234"),
+ new ApplicationPackageReference().withId(
+ "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_5678")
+ .withVersion("1.0")))
+ .withTargetNodeCommunicationMode(NodeCommunicationMode.SIMPLIFIED).apply();
}
}
```
@@ -1443,7 +1898,9 @@ public final class PoolUpdateSamples {
*/
public final class PrivateEndpointConnectionDeleteSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateEndpointConnectionDelete.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateEndpointConnectionDelete.
+ * json
*/
/**
* Sample code: PrivateEndpointConnectionDelete.
@@ -1451,7 +1908,9 @@ public final class PrivateEndpointConnectionDeleteSamples {
* @param manager Entry point to BatchManager.
*/
public static void privateEndpointConnectionDelete(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.privateEndpointConnections().delete("default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", com.azure.core.util.Context.NONE);
+ manager.privateEndpointConnections().delete("default-azurebatch-japaneast", "sampleacct",
+ "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1464,7 +1923,8 @@ public final class PrivateEndpointConnectionDeleteSamples {
*/
public final class PrivateEndpointConnectionGetSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateEndpointConnectionGet.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateEndpointConnectionGet.json
*/
/**
* Sample code: GetPrivateEndpointConnection.
@@ -1472,7 +1932,9 @@ public final class PrivateEndpointConnectionGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void getPrivateEndpointConnection(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.privateEndpointConnections().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", com.azure.core.util.Context.NONE);
+ manager.privateEndpointConnections().getWithResponse("default-azurebatch-japaneast", "sampleacct",
+ "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1485,7 +1947,9 @@ public final class PrivateEndpointConnectionGetSamples {
*/
public final class PrivateEndpointConnectionListByBatchAccountSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateEndpointConnectionsList.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateEndpointConnectionsList.
+ * json
*/
/**
* Sample code: ListPrivateEndpointConnections.
@@ -1493,7 +1957,8 @@ public final class PrivateEndpointConnectionListByBatchAccountSamples {
* @param manager Entry point to BatchManager.
*/
public static void listPrivateEndpointConnections(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.privateEndpointConnections().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, com.azure.core.util.Context.NONE);
+ manager.privateEndpointConnections().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1504,14 +1969,15 @@ public final class PrivateEndpointConnectionListByBatchAccountSamples {
import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner;
import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState;
import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus;
-import java.util.stream.Collectors;
/**
* Samples for PrivateEndpointConnection Update.
*/
public final class PrivateEndpointConnectionUpdateSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateEndpointConnectionUpdate.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateEndpointConnectionUpdate.
+ * json
*/
/**
* Sample code: UpdatePrivateEndpointConnection.
@@ -1519,7 +1985,12 @@ public final class PrivateEndpointConnectionUpdateSamples {
* @param manager Entry point to BatchManager.
*/
public static void updatePrivateEndpointConnection(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.privateEndpointConnections().update("default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.APPROVED).withDescription("Approved by xyz.abc@company.com")), null, com.azure.core.util.Context.NONE);
+ manager.privateEndpointConnections().update("default-azurebatch-japaneast", "sampleacct",
+ "testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0",
+ new PrivateEndpointConnectionInner().withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.APPROVED)
+ .withDescription("Approved by xyz.abc@company.com")),
+ null, com.azure.core.util.Context.NONE);
}
}
```
@@ -1532,7 +2003,8 @@ public final class PrivateEndpointConnectionUpdateSamples {
*/
public final class PrivateLinkResourceGetSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateLinkResourceGet.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateLinkResourceGet.json
*/
/**
* Sample code: GetPrivateLinkResource.
@@ -1540,7 +2012,8 @@ public final class PrivateLinkResourceGetSamples {
* @param manager Entry point to BatchManager.
*/
public static void getPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.privateLinkResources().getWithResponse("default-azurebatch-japaneast", "sampleacct", "batchAccount", com.azure.core.util.Context.NONE);
+ manager.privateLinkResources().getWithResponse("default-azurebatch-japaneast", "sampleacct", "batchAccount",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1553,7 +2026,8 @@ public final class PrivateLinkResourceGetSamples {
*/
public final class PrivateLinkResourceListByBatchAccountSamples {
/*
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PrivateLinkResourcesList.json
+ * x-ms-original-file:
+ * specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PrivateLinkResourcesList.json
*/
/**
* Sample code: ListPrivateLinkResource.
@@ -1561,7 +2035,8 @@ public final class PrivateLinkResourceListByBatchAccountSamples {
* @param manager Entry point to BatchManager.
*/
public static void listPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) {
- manager.privateLinkResources().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, com.azure.core.util.Context.NONE);
+ manager.privateLinkResources().listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null,
+ com.azure.core.util.Context.NONE);
}
}
```
diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml
index 1dd3584e5f069..483f97dd1cbc5 100644
--- a/sdk/batch/azure-resourcemanager-batch/pom.xml
+++ b/sdk/batch/azure-resourcemanager-batch/pom.xml
@@ -14,11 +14,11 @@
com.azure.resourcemanagerazure-resourcemanager-batch
- 1.1.0-beta.4
+ 1.1.0-beta.5jarMicrosoft Azure SDK for Batch Management
- This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2023-11.
+ This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2024-02.https://github.com/Azure/azure-sdk-for-java
@@ -88,8 +88,6 @@
4.11.0test
-
-
net.bytebuddybyte-buddy
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java
index 967c18cbf3cff..44e9afc66c17a 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java
@@ -232,7 +232,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil
StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.batch").append("/")
- .append("1.1.0-beta.3");
+ .append("1.1.0-beta.4");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java
index 859c9eb66fefe..e14b5c0d97a2d 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java
@@ -22,6 +22,7 @@
import com.azure.resourcemanager.batch.models.ScaleSettings;
import com.azure.resourcemanager.batch.models.StartTask;
import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy;
+import com.azure.resourcemanager.batch.models.UpgradePolicy;
import com.azure.resourcemanager.batch.models.UserAccount;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
@@ -684,6 +685,29 @@ public NodeCommunicationMode currentNodeCommunicationMode() {
return this.innerProperties() == null ? null : this.innerProperties().currentNodeCommunicationMode();
}
+ /**
+ * Get the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.
+ *
+ * @return the upgradePolicy value.
+ */
+ public UpgradePolicy upgradePolicy() {
+ return this.innerProperties() == null ? null : this.innerProperties().upgradePolicy();
+ }
+
+ /**
+ * Set the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.
+ *
+ * @param upgradePolicy the upgradePolicy value to set.
+ * @return the PoolInner object itself.
+ */
+ public PoolInner withUpgradePolicy(UpgradePolicy upgradePolicy) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PoolProperties();
+ }
+ this.innerProperties().withUpgradePolicy(upgradePolicy);
+ return this;
+ }
+
/**
* Get the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. When specified,
* these tags are propagated to the backing Azure resources associated with the pool. This property can only be
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java
index 30e881d4035b8..3cf497e8b7ed4 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java
@@ -20,6 +20,7 @@
import com.azure.resourcemanager.batch.models.ScaleSettings;
import com.azure.resourcemanager.batch.models.StartTask;
import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy;
+import com.azure.resourcemanager.batch.models.UpgradePolicy;
import com.azure.resourcemanager.batch.models.UserAccount;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -256,6 +257,12 @@ public final class PoolProperties {
@JsonProperty(value = "currentNodeCommunicationMode", access = JsonProperty.Access.WRITE_ONLY)
private NodeCommunicationMode currentNodeCommunicationMode;
+ /*
+ * Describes an upgrade policy - automatic, manual, or rolling.
+ */
+ @JsonProperty(value = "upgradePolicy")
+ private UpgradePolicy upgradePolicy;
+
/*
* The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to
* the backing Azure resources associated with the pool. This property can only be specified when the Batch account
@@ -812,6 +819,26 @@ public NodeCommunicationMode currentNodeCommunicationMode() {
return this.currentNodeCommunicationMode;
}
+ /**
+ * Get the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.
+ *
+ * @return the upgradePolicy value.
+ */
+ public UpgradePolicy upgradePolicy() {
+ return this.upgradePolicy;
+ }
+
+ /**
+ * Set the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.
+ *
+ * @param upgradePolicy the upgradePolicy value to set.
+ * @return the PoolProperties object itself.
+ */
+ public PoolProperties withUpgradePolicy(UpgradePolicy upgradePolicy) {
+ this.upgradePolicy = upgradePolicy;
+ return this;
+ }
+
/**
* Get the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. When specified,
* these tags are propagated to the backing Azure resources associated with the pool. This property can only be
@@ -878,5 +905,8 @@ public void validate() {
if (mountConfiguration() != null) {
mountConfiguration().forEach(e -> e.validate());
}
+ if (upgradePolicy() != null) {
+ upgradePolicy().validate();
+ }
}
}
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/SupportedSkuInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/SupportedSkuInner.java
index 9f6c68567eda2..7653f77443b16 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/SupportedSkuInner.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/SupportedSkuInner.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.batch.models.SkuCapability;
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
import java.util.List;
/**
@@ -32,6 +33,12 @@ public final class SupportedSkuInner {
@JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY)
private List capabilities;
+ /*
+ * The time when Azure Batch service will retire this SKU.
+ */
+ @JsonProperty(value = "batchSupportEndOfLife", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime batchSupportEndOfLife;
+
/**
* Creates an instance of SupportedSkuInner class.
*/
@@ -65,6 +72,15 @@ public List capabilities() {
return this.capabilities;
}
+ /**
+ * Get the batchSupportEndOfLife property: The time when Azure Batch service will retire this SKU.
+ *
+ * @return the batchSupportEndOfLife value.
+ */
+ public OffsetDateTime batchSupportEndOfLife() {
+ return this.batchSupportEndOfLife;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationImpl.java
index 951a5c31d7791..e12cda1fd8e16 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationImpl.java
@@ -104,9 +104,9 @@ public Application apply(Context context) {
ApplicationImpl(ApplicationInner innerObject, com.azure.resourcemanager.batch.BatchManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.accountName = Utils.getValueFromIdByName(innerObject.id(), "batchAccounts");
- this.applicationName = Utils.getValueFromIdByName(innerObject.id(), "applications");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "batchAccounts");
+ this.applicationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applications");
}
public Application refresh() {
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesImpl.java
index 6e4f82e27ebe0..97b9f417b1122 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesImpl.java
@@ -88,33 +88,33 @@ public PagedIterable list(String resourceGroupName, String a
String applicationName) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, accountName, applicationName);
- return Utils.mapPage(inner, inner1 -> new ApplicationPackageImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationPackageImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String accountName, String applicationName,
Integer maxresults, Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, accountName, applicationName, maxresults, context);
- return Utils.mapPage(inner, inner1 -> new ApplicationPackageImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationPackageImpl(inner1, this.manager()));
}
public ApplicationPackage getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
}
- String versionName = Utils.getValueFromIdByName(id, "versions");
+ String versionName = ResourceManagerUtils.getValueFromIdByName(id, "versions");
if (versionName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id)));
@@ -124,22 +124,22 @@ public ApplicationPackage getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
}
- String versionName = Utils.getValueFromIdByName(id, "versions");
+ String versionName = ResourceManagerUtils.getValueFromIdByName(id, "versions");
if (versionName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id)));
@@ -148,22 +148,22 @@ public Response getByIdWithResponse(String id, Context conte
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
}
- String versionName = Utils.getValueFromIdByName(id, "versions");
+ String versionName = ResourceManagerUtils.getValueFromIdByName(id, "versions");
if (versionName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id)));
@@ -172,22 +172,22 @@ public void deleteById(String id) {
}
public Response deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
}
- String versionName = Utils.getValueFromIdByName(id, "versions");
+ String versionName = ResourceManagerUtils.getValueFromIdByName(id, "versions");
if (versionName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id)));
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsImpl.java
index cdb4c6cbe2e2c..221e7244875f9 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsImpl.java
@@ -59,28 +59,28 @@ public Application get(String resourceGroupName, String accountName, String appl
public PagedIterable list(String resourceGroupName, String accountName) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName);
- return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String accountName, Integer maxresults,
Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, accountName, maxresults, context);
- return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager()));
}
public Application getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
@@ -89,17 +89,17 @@ public Application getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
@@ -108,17 +108,17 @@ public Response getByIdWithResponse(String id, Context context) {
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
@@ -127,17 +127,17 @@ public void deleteById(String id) {
}
public Response deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java
index 062eb68393016..2e156870c1025 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java
@@ -221,8 +221,8 @@ public BatchAccount apply(Context context) {
BatchAccountImpl(BatchAccountInner innerObject, com.azure.resourcemanager.batch.BatchManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.accountName = Utils.getValueFromIdByName(innerObject.id(), "batchAccounts");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "batchAccounts");
}
public BatchAccount refresh() {
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsImpl.java
index d3a046a9e85a5..d232d54743697 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsImpl.java
@@ -65,22 +65,22 @@ public BatchAccount getByResourceGroup(String resourceGroupName, String accountN
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return Utils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return Utils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager()));
}
public Response synchronizeAutoStorageKeysWithResponse(String resourceGroupName, String accountName,
@@ -137,14 +137,14 @@ public BatchAccountKeys getKeys(String resourceGroupName, String accountName) {
public PagedIterable listDetectors(String resourceGroupName, String accountName) {
PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, accountName);
- return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager()));
}
public PagedIterable listDetectors(String resourceGroupName, String accountName,
Context context) {
PagedIterable inner
= this.serviceClient().listDetectors(resourceGroupName, accountName, context);
- return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager()));
}
public Response getDetectorWithResponse(String resourceGroupName, String accountName,
@@ -172,23 +172,25 @@ public PagedIterable listOutboundNetworkDependencie
String accountName) {
PagedIterable inner
= this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName);
- return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager()));
}
public PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName,
String accountName, Context context) {
PagedIterable inner
= this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName, context);
- return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager()));
}
public BatchAccount getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
@@ -197,12 +199,12 @@ public BatchAccount getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
@@ -211,12 +213,12 @@ public Response getByIdWithResponse(String id, Context context) {
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
@@ -225,12 +227,12 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java
index 948a6a1284da3..dc425322e44e6 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java
@@ -274,7 +274,7 @@ public PoolsClient getPools() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-11-01";
+ this.apiVersion = "2024-02-01";
this.batchAccounts = new BatchAccountsClientImpl(this);
this.applicationPackages = new ApplicationPackagesClientImpl(this);
this.applications = new ApplicationsClientImpl(this);
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java
index ee3685216e0f6..f8b5492f47af1 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java
@@ -147,9 +147,9 @@ public Certificate apply(Context context) {
CertificateImpl(CertificateInner innerObject, com.azure.resourcemanager.batch.BatchManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.accountName = Utils.getValueFromIdByName(innerObject.id(), "batchAccounts");
- this.certificateName = Utils.getValueFromIdByName(innerObject.id(), "certificates");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "batchAccounts");
+ this.certificateName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "certificates");
}
public Certificate refresh() {
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesImpl.java
index ec7723eb233a8..f8a926a5636b7 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesImpl.java
@@ -31,14 +31,14 @@ public CertificatesImpl(CertificatesClient innerClient,
public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) {
PagedIterable inner = this.serviceClient().listByBatchAccount(resourceGroupName, accountName);
- return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager()));
}
public PagedIterable listByBatchAccount(String resourceGroupName, String accountName,
Integer maxresults, String select, String filter, Context context) {
PagedIterable inner = this.serviceClient().listByBatchAccount(resourceGroupName, accountName,
maxresults, select, filter, context);
- return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager()));
}
public void delete(String resourceGroupName, String accountName, String certificateName) {
@@ -92,17 +92,17 @@ public Certificate cancelDeletion(String resourceGroupName, String accountName,
}
public Certificate getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String certificateName = Utils.getValueFromIdByName(id, "certificates");
+ String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates");
if (certificateName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
@@ -111,17 +111,17 @@ public Certificate getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String certificateName = Utils.getValueFromIdByName(id, "certificates");
+ String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates");
if (certificateName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
@@ -130,17 +130,17 @@ public Response getByIdWithResponse(String id, Context context) {
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String certificateName = Utils.getValueFromIdByName(id, "certificates");
+ String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates");
if (certificateName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
@@ -149,17 +149,17 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String certificateName = Utils.getValueFromIdByName(id, "certificates");
+ String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates");
if (certificateName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsImpl.java
index 37e7331e32a2b..46d0f835da714 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsImpl.java
@@ -52,26 +52,26 @@ public BatchLocationQuota getQuotas(String locationName) {
public PagedIterable listSupportedVirtualMachineSkus(String locationName) {
PagedIterable inner = this.serviceClient().listSupportedVirtualMachineSkus(locationName);
- return Utils.mapPage(inner, inner1 -> new SupportedSkuImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new SupportedSkuImpl(inner1, this.manager()));
}
public PagedIterable listSupportedVirtualMachineSkus(String locationName, Integer maxresults,
String filter, Context context) {
PagedIterable inner
= this.serviceClient().listSupportedVirtualMachineSkus(locationName, maxresults, filter, context);
- return Utils.mapPage(inner, inner1 -> new SupportedSkuImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new SupportedSkuImpl(inner1, this.manager()));
}
public PagedIterable listSupportedCloudServiceSkus(String locationName) {
PagedIterable inner = this.serviceClient().listSupportedCloudServiceSkus(locationName);
- return Utils.mapPage(inner, inner1 -> new SupportedSkuImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new SupportedSkuImpl(inner1, this.manager()));
}
public PagedIterable listSupportedCloudServiceSkus(String locationName, Integer maxresults,
String filter, Context context) {
PagedIterable inner
= this.serviceClient().listSupportedCloudServiceSkus(locationName, maxresults, filter, context);
- return Utils.mapPage(inner, inner1 -> new SupportedSkuImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new SupportedSkuImpl(inner1, this.manager()));
}
public Response checkNameAvailabilityWithResponse(String locationName,
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsImpl.java
index 8a2c1788468ce..09bc2618980af 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsImpl.java
@@ -26,12 +26,12 @@ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.ba
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
private OperationsClient serviceClient() {
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java
index 2d2ac3b6cfc2c..c0e593b45e43c 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java
@@ -24,6 +24,7 @@
import com.azure.resourcemanager.batch.models.ScaleSettings;
import com.azure.resourcemanager.batch.models.StartTask;
import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy;
+import com.azure.resourcemanager.batch.models.UpgradePolicy;
import com.azure.resourcemanager.batch.models.UserAccount;
import java.time.OffsetDateTime;
import java.util.Collections;
@@ -193,6 +194,10 @@ public NodeCommunicationMode currentNodeCommunicationMode() {
return this.innerModel().currentNodeCommunicationMode();
}
+ public UpgradePolicy upgradePolicy() {
+ return this.innerModel().upgradePolicy();
+ }
+
public Map resourceTags() {
Map inner = this.innerModel().resourceTags();
if (inner != null) {
@@ -273,9 +278,9 @@ public Pool apply(Context context) {
PoolImpl(PoolInner innerObject, com.azure.resourcemanager.batch.BatchManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.accountName = Utils.getValueFromIdByName(innerObject.id(), "batchAccounts");
- this.poolName = Utils.getValueFromIdByName(innerObject.id(), "pools");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "batchAccounts");
+ this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "pools");
}
public Pool refresh() {
@@ -391,6 +396,11 @@ public PoolImpl withTargetNodeCommunicationMode(NodeCommunicationMode targetNode
return this;
}
+ public PoolImpl withUpgradePolicy(UpgradePolicy upgradePolicy) {
+ this.innerModel().withUpgradePolicy(upgradePolicy);
+ return this;
+ }
+
public PoolImpl withResourceTags(Map resourceTags) {
this.innerModel().withResourceTags(resourceTags);
return this;
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsImpl.java
index 3a9ebbcebcca9..05352143dee82 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsImpl.java
@@ -31,14 +31,14 @@ public PoolsImpl(PoolsClient innerClient, com.azure.resourcemanager.batch.BatchM
public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) {
PagedIterable inner = this.serviceClient().listByBatchAccount(resourceGroupName, accountName);
- return Utils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager()));
}
public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults,
String select, String filter, Context context) {
PagedIterable inner = this.serviceClient().listByBatchAccount(resourceGroupName, accountName,
maxresults, select, filter, context);
- return Utils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager()));
}
public void delete(String resourceGroupName, String accountName, String poolName) {
@@ -113,17 +113,17 @@ public Pool stopResize(String resourceGroupName, String accountName, String pool
}
public Pool getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String poolName = Utils.getValueFromIdByName(id, "pools");
+ String poolName = ResourceManagerUtils.getValueFromIdByName(id, "pools");
if (poolName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'pools'.", id)));
@@ -132,17 +132,17 @@ public Pool getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String poolName = Utils.getValueFromIdByName(id, "pools");
+ String poolName = ResourceManagerUtils.getValueFromIdByName(id, "pools");
if (poolName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'pools'.", id)));
@@ -151,17 +151,17 @@ public Response getByIdWithResponse(String id, Context context) {
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String poolName = Utils.getValueFromIdByName(id, "pools");
+ String poolName = ResourceManagerUtils.getValueFromIdByName(id, "pools");
if (poolName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'pools'.", id)));
@@ -170,17 +170,17 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String accountName = Utils.getValueFromIdByName(id, "batchAccounts");
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts");
if (accountName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id)));
}
- String poolName = Utils.getValueFromIdByName(id, "pools");
+ String poolName = ResourceManagerUtils.getValueFromIdByName(id, "pools");
if (poolName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'pools'.", id)));
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsImpl.java
index efc34c57e5284..d406f5a15d860 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsImpl.java
@@ -30,14 +30,14 @@ public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClie
public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) {
PagedIterable inner
= this.serviceClient().listByBatchAccount(resourceGroupName, accountName);
- return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
}
public PagedIterable listByBatchAccount(String resourceGroupName, String accountName,
Integer maxresults, Context context) {
PagedIterable inner
= this.serviceClient().listByBatchAccount(resourceGroupName, accountName, maxresults, context);
- return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
}
public Response getWithResponse(String resourceGroupName, String accountName,
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesImpl.java
index b310d6a4a11d4..7e2a729b812e3 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesImpl.java
@@ -30,14 +30,14 @@ public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient,
public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) {
PagedIterable inner
= this.serviceClient().listByBatchAccount(resourceGroupName, accountName);
- return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
}
public PagedIterable listByBatchAccount(String resourceGroupName, String accountName,
Integer maxresults, Context context) {
PagedIterable inner
= this.serviceClient().listByBatchAccount(resourceGroupName, accountName, maxresults, context);
- return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
}
public Response getWithResponse(String resourceGroupName, String accountName,
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/Utils.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ResourceManagerUtils.java
similarity index 99%
rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/Utils.java
rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ResourceManagerUtils.java
index 98c1d460a912c..b12b25795b245 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/Utils.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ResourceManagerUtils.java
@@ -19,8 +19,8 @@
import java.util.stream.Stream;
import reactor.core.publisher.Flux;
-final class Utils {
- private Utils() {
+final class ResourceManagerUtils {
+ private ResourceManagerUtils() {
}
static String getValueFromIdByName(String id, String name) {
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/SupportedSkuImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/SupportedSkuImpl.java
index adc5878d40ec5..bf6aa5f40b17b 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/SupportedSkuImpl.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/SupportedSkuImpl.java
@@ -7,6 +7,7 @@
import com.azure.resourcemanager.batch.fluent.models.SupportedSkuInner;
import com.azure.resourcemanager.batch.models.SkuCapability;
import com.azure.resourcemanager.batch.models.SupportedSku;
+import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
@@ -37,6 +38,10 @@ public List capabilities() {
}
}
+ public OffsetDateTime batchSupportEndOfLife() {
+ return this.innerModel().batchSupportEndOfLife();
+ }
+
public SupportedSkuInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutomaticOSUpgradePolicy.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutomaticOSUpgradePolicy.java
new file mode 100644
index 0000000000000..3507367bbce78
--- /dev/null
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutomaticOSUpgradePolicy.java
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.batch.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The configuration parameters used for performing automatic OS upgrade.
+ */
+@Fluent
+public final class AutomaticOSUpgradePolicy {
+ /*
+ * Whether OS image rollback feature should be disabled.
+ */
+ @JsonProperty(value = "disableAutomaticRollback")
+ private Boolean disableAutomaticRollback;
+
+ /*
+ * Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a
+ * newer version of the OS image becomes available.
If this is set to true for Windows based pools,
+ * [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/
+ * create?tabs=HTTP#windowsconfiguration)
+ * cannot be set to true.
+ */
+ @JsonProperty(value = "enableAutomaticOSUpgrade")
+ private Boolean enableAutomaticOSUpgrade;
+
+ /*
+ * Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to
+ * the default policy if no policy is defined on the VMSS.
+ */
+ @JsonProperty(value = "useRollingUpgradePolicy")
+ private Boolean useRollingUpgradePolicy;
+
+ /*
+ * Defer OS upgrades on the TVMs if they are running tasks.
+ */
+ @JsonProperty(value = "osRollingUpgradeDeferral")
+ private Boolean osRollingUpgradeDeferral;
+
+ /**
+ * Creates an instance of AutomaticOSUpgradePolicy class.
+ */
+ public AutomaticOSUpgradePolicy() {
+ }
+
+ /**
+ * Get the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.
+ *
+ * @return the disableAutomaticRollback value.
+ */
+ public Boolean disableAutomaticRollback() {
+ return this.disableAutomaticRollback;
+ }
+
+ /**
+ * Set the disableAutomaticRollback property: Whether OS image rollback feature should be disabled.
+ *
+ * @param disableAutomaticRollback the disableAutomaticRollback value to set.
+ * @return the AutomaticOSUpgradePolicy object itself.
+ */
+ public AutomaticOSUpgradePolicy withDisableAutomaticRollback(Boolean disableAutomaticRollback) {
+ this.disableAutomaticRollback = disableAutomaticRollback;
+ return this;
+ }
+
+ /**
+ * Get the enableAutomaticOSUpgrade property: Indicates whether OS upgrades should automatically be applied to
+ * scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br
+ * /><br /> If this is set to true for Windows based pools,
+ * [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration)
+ * cannot be set to true.
+ *
+ * @return the enableAutomaticOSUpgrade value.
+ */
+ public Boolean enableAutomaticOSUpgrade() {
+ return this.enableAutomaticOSUpgrade;
+ }
+
+ /**
+ * Set the enableAutomaticOSUpgrade property: Indicates whether OS upgrades should automatically be applied to
+ * scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br
+ * /><br /> If this is set to true for Windows based pools,
+ * [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration)
+ * cannot be set to true.
+ *
+ * @param enableAutomaticOSUpgrade the enableAutomaticOSUpgrade value to set.
+ * @return the AutomaticOSUpgradePolicy object itself.
+ */
+ public AutomaticOSUpgradePolicy withEnableAutomaticOSUpgrade(Boolean enableAutomaticOSUpgrade) {
+ this.enableAutomaticOSUpgrade = enableAutomaticOSUpgrade;
+ return this;
+ }
+
+ /**
+ * Get the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS
+ * Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
+ *
+ * @return the useRollingUpgradePolicy value.
+ */
+ public Boolean useRollingUpgradePolicy() {
+ return this.useRollingUpgradePolicy;
+ }
+
+ /**
+ * Set the useRollingUpgradePolicy property: Indicates whether rolling upgrade policy should be used during Auto OS
+ * Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.
+ *
+ * @param useRollingUpgradePolicy the useRollingUpgradePolicy value to set.
+ * @return the AutomaticOSUpgradePolicy object itself.
+ */
+ public AutomaticOSUpgradePolicy withUseRollingUpgradePolicy(Boolean useRollingUpgradePolicy) {
+ this.useRollingUpgradePolicy = useRollingUpgradePolicy;
+ return this;
+ }
+
+ /**
+ * Get the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.
+ *
+ * @return the osRollingUpgradeDeferral value.
+ */
+ public Boolean osRollingUpgradeDeferral() {
+ return this.osRollingUpgradeDeferral;
+ }
+
+ /**
+ * Set the osRollingUpgradeDeferral property: Defer OS upgrades on the TVMs if they are running tasks.
+ *
+ * @param osRollingUpgradeDeferral the osRollingUpgradeDeferral value to set.
+ * @return the AutomaticOSUpgradePolicy object itself.
+ */
+ public AutomaticOSUpgradePolicy withOsRollingUpgradeDeferral(Boolean osRollingUpgradeDeferral) {
+ this.osRollingUpgradeDeferral = osRollingUpgradeDeferral;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java
index a8b5f852c8f69..8493f4c442bb0 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java
@@ -304,6 +304,13 @@ public interface Pool {
*/
NodeCommunicationMode currentNodeCommunicationMode();
+ /**
+ * Gets the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.
+ *
+ * @return the upgradePolicy value.
+ */
+ UpgradePolicy upgradePolicy();
+
/**
* Gets the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. When specified,
* these tags are propagated to the backing Azure resources associated with the pool. This property can only be
@@ -369,8 +376,8 @@ interface WithCreate extends DefinitionStages.WithIdentity, DefinitionStages.Wit
DefinitionStages.WithTaskSchedulingPolicy, DefinitionStages.WithUserAccounts, DefinitionStages.WithMetadata,
DefinitionStages.WithStartTask, DefinitionStages.WithCertificates, DefinitionStages.WithApplicationPackages,
DefinitionStages.WithApplicationLicenses, DefinitionStages.WithMountConfiguration,
- DefinitionStages.WithTargetNodeCommunicationMode, DefinitionStages.WithResourceTags,
- DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch {
+ DefinitionStages.WithTargetNodeCommunicationMode, DefinitionStages.WithUpgradePolicy,
+ DefinitionStages.WithResourceTags, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch {
/**
* Executes the create request.
*
@@ -733,6 +740,19 @@ interface WithTargetNodeCommunicationMode {
WithCreate withTargetNodeCommunicationMode(NodeCommunicationMode targetNodeCommunicationMode);
}
+ /**
+ * The stage of the Pool definition allowing to specify upgradePolicy.
+ */
+ interface WithUpgradePolicy {
+ /**
+ * Specifies the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling..
+ *
+ * @param upgradePolicy Describes an upgrade policy - automatic, manual, or rolling.
+ * @return the next definition stage.
+ */
+ WithCreate withUpgradePolicy(UpgradePolicy upgradePolicy);
+ }
+
/**
* The stage of the Pool definition allowing to specify resourceTags.
*/
@@ -800,7 +820,8 @@ interface Update extends UpdateStages.WithIdentity, UpdateStages.WithDisplayName
UpdateStages.WithTaskSlotsPerNode, UpdateStages.WithTaskSchedulingPolicy, UpdateStages.WithUserAccounts,
UpdateStages.WithMetadata, UpdateStages.WithStartTask, UpdateStages.WithCertificates,
UpdateStages.WithApplicationPackages, UpdateStages.WithApplicationLicenses, UpdateStages.WithMountConfiguration,
- UpdateStages.WithTargetNodeCommunicationMode, UpdateStages.WithResourceTags, UpdateStages.WithIfMatch {
+ UpdateStages.WithTargetNodeCommunicationMode, UpdateStages.WithUpgradePolicy, UpdateStages.WithResourceTags,
+ UpdateStages.WithIfMatch {
/**
* Executes the update request.
*
@@ -1167,6 +1188,19 @@ interface WithTargetNodeCommunicationMode {
Update withTargetNodeCommunicationMode(NodeCommunicationMode targetNodeCommunicationMode);
}
+ /**
+ * The stage of the Pool update allowing to specify upgradePolicy.
+ */
+ interface WithUpgradePolicy {
+ /**
+ * Specifies the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling..
+ *
+ * @param upgradePolicy Describes an upgrade policy - automatic, manual, or rolling.
+ * @return the next definition stage.
+ */
+ Update withUpgradePolicy(UpgradePolicy upgradePolicy);
+ }
+
/**
* The stage of the Pool update allowing to specify resourceTags.
*/
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/RollingUpgradePolicy.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/RollingUpgradePolicy.java
new file mode 100644
index 0000000000000..67fb8e8650b3c
--- /dev/null
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/RollingUpgradePolicy.java
@@ -0,0 +1,267 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.batch.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The configuration parameters used while performing a rolling upgrade.
+ */
+@Fluent
+public final class RollingUpgradePolicy {
+ /*
+ * Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain
+ * and maxBatchInstancePercent to determine the batch size. If this field is not set, Azure Azure Batch will not
+ * set its default value. The value of enableCrossZoneUpgrade on the created VirtualMachineScaleSet will be decided
+ * by the default configurations on VirtualMachineScaleSet. This field is able to be set to true or false only when
+ * using NodePlacementConfiguration as Zonal.
+ */
+ @JsonProperty(value = "enableCrossZoneUpgrade")
+ private Boolean enableCrossZoneUpgrade;
+
+ /*
+ * The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling
+ * upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the
+ * percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be
+ * between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with
+ * value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.
+ */
+ @JsonProperty(value = "maxBatchInstancePercent")
+ private Integer maxBatchInstancePercent;
+
+ /*
+ * The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously
+ * unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine
+ * health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch.
+ * The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and
+ * maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more
+ * than maxUnhealthyInstancePercent.
+ */
+ @JsonProperty(value = "maxUnhealthyInstancePercent")
+ private Integer maxUnhealthyInstancePercent;
+
+ /*
+ * The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This
+ * check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts.
+ * The value of this field should be between 0 and 100, inclusive.
+ */
+ @JsonProperty(value = "maxUnhealthyUpgradedInstancePercent")
+ private Integer maxUnhealthyUpgradedInstancePercent;
+
+ /*
+ * The wait time between completing the update for all virtual machines in one batch and starting the next batch.
+ * The time duration should be specified in ISO 8601 format.
+ */
+ @JsonProperty(value = "pauseTimeBetweenBatches")
+ private String pauseTimeBetweenBatches;
+
+ /*
+ * Upgrade all unhealthy instances in a scale set before any healthy instances.
+ */
+ @JsonProperty(value = "prioritizeUnhealthyInstances")
+ private Boolean prioritizeUnhealthyInstances;
+
+ /*
+ * Rollback failed instances to previous model if the Rolling Upgrade policy is violated.
+ */
+ @JsonProperty(value = "rollbackFailedInstancesOnPolicyBreach")
+ private Boolean rollbackFailedInstancesOnPolicyBreach;
+
+ /**
+ * Creates an instance of RollingUpgradePolicy class.
+ */
+ public RollingUpgradePolicy() {
+ }
+
+ /**
+ * Get the enableCrossZoneUpgrade property: Allow VMSS to ignore AZ boundaries when constructing upgrade batches.
+ * Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. If this field
+ * is not set, Azure Azure Batch will not set its default value. The value of enableCrossZoneUpgrade on the created
+ * VirtualMachineScaleSet will be decided by the default configurations on VirtualMachineScaleSet. This field is
+ * able to be set to true or false only when using NodePlacementConfiguration as Zonal.
+ *
+ * @return the enableCrossZoneUpgrade value.
+ */
+ public Boolean enableCrossZoneUpgrade() {
+ return this.enableCrossZoneUpgrade;
+ }
+
+ /**
+ * Set the enableCrossZoneUpgrade property: Allow VMSS to ignore AZ boundaries when constructing upgrade batches.
+ * Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. If this field
+ * is not set, Azure Azure Batch will not set its default value. The value of enableCrossZoneUpgrade on the created
+ * VirtualMachineScaleSet will be decided by the default configurations on VirtualMachineScaleSet. This field is
+ * able to be set to true or false only when using NodePlacementConfiguration as Zonal.
+ *
+ * @param enableCrossZoneUpgrade the enableCrossZoneUpgrade value to set.
+ * @return the RollingUpgradePolicy object itself.
+ */
+ public RollingUpgradePolicy withEnableCrossZoneUpgrade(Boolean enableCrossZoneUpgrade) {
+ this.enableCrossZoneUpgrade = enableCrossZoneUpgrade;
+ return this;
+ }
+
+ /**
+ * Get the maxBatchInstancePercent property: The maximum percent of total virtual machine instances that will be
+ * upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in
+ * previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher
+ * reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and
+ * maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more
+ * than maxUnhealthyInstancePercent.
+ *
+ * @return the maxBatchInstancePercent value.
+ */
+ public Integer maxBatchInstancePercent() {
+ return this.maxBatchInstancePercent;
+ }
+
+ /**
+ * Set the maxBatchInstancePercent property: The maximum percent of total virtual machine instances that will be
+ * upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in
+ * previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher
+ * reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and
+ * maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more
+ * than maxUnhealthyInstancePercent.
+ *
+ * @param maxBatchInstancePercent the maxBatchInstancePercent value to set.
+ * @return the RollingUpgradePolicy object itself.
+ */
+ public RollingUpgradePolicy withMaxBatchInstancePercent(Integer maxBatchInstancePercent) {
+ this.maxBatchInstancePercent = maxBatchInstancePercent;
+ return this;
+ }
+
+ /**
+ * Get the maxUnhealthyInstancePercent property: The maximum percentage of the total virtual machine instances in
+ * the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in
+ * an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will
+ * be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both
+ * maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of
+ * maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.
+ *
+ * @return the maxUnhealthyInstancePercent value.
+ */
+ public Integer maxUnhealthyInstancePercent() {
+ return this.maxUnhealthyInstancePercent;
+ }
+
+ /**
+ * Set the maxUnhealthyInstancePercent property: The maximum percentage of the total virtual machine instances in
+ * the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in
+ * an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will
+ * be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both
+ * maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of
+ * maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent.
+ *
+ * @param maxUnhealthyInstancePercent the maxUnhealthyInstancePercent value to set.
+ * @return the RollingUpgradePolicy object itself.
+ */
+ public RollingUpgradePolicy withMaxUnhealthyInstancePercent(Integer maxUnhealthyInstancePercent) {
+ this.maxUnhealthyInstancePercent = maxUnhealthyInstancePercent;
+ return this;
+ }
+
+ /**
+ * Get the maxUnhealthyUpgradedInstancePercent property: The maximum percentage of upgraded virtual machine
+ * instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If
+ * this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and
+ * 100, inclusive.
+ *
+ * @return the maxUnhealthyUpgradedInstancePercent value.
+ */
+ public Integer maxUnhealthyUpgradedInstancePercent() {
+ return this.maxUnhealthyUpgradedInstancePercent;
+ }
+
+ /**
+ * Set the maxUnhealthyUpgradedInstancePercent property: The maximum percentage of upgraded virtual machine
+ * instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If
+ * this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and
+ * 100, inclusive.
+ *
+ * @param maxUnhealthyUpgradedInstancePercent the maxUnhealthyUpgradedInstancePercent value to set.
+ * @return the RollingUpgradePolicy object itself.
+ */
+ public RollingUpgradePolicy withMaxUnhealthyUpgradedInstancePercent(Integer maxUnhealthyUpgradedInstancePercent) {
+ this.maxUnhealthyUpgradedInstancePercent = maxUnhealthyUpgradedInstancePercent;
+ return this;
+ }
+
+ /**
+ * Get the pauseTimeBetweenBatches property: The wait time between completing the update for all virtual machines
+ * in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.
+ *
+ * @return the pauseTimeBetweenBatches value.
+ */
+ public String pauseTimeBetweenBatches() {
+ return this.pauseTimeBetweenBatches;
+ }
+
+ /**
+ * Set the pauseTimeBetweenBatches property: The wait time between completing the update for all virtual machines
+ * in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.
+ *
+ * @param pauseTimeBetweenBatches the pauseTimeBetweenBatches value to set.
+ * @return the RollingUpgradePolicy object itself.
+ */
+ public RollingUpgradePolicy withPauseTimeBetweenBatches(String pauseTimeBetweenBatches) {
+ this.pauseTimeBetweenBatches = pauseTimeBetweenBatches;
+ return this;
+ }
+
+ /**
+ * Get the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy
+ * instances.
+ *
+ * @return the prioritizeUnhealthyInstances value.
+ */
+ public Boolean prioritizeUnhealthyInstances() {
+ return this.prioritizeUnhealthyInstances;
+ }
+
+ /**
+ * Set the prioritizeUnhealthyInstances property: Upgrade all unhealthy instances in a scale set before any healthy
+ * instances.
+ *
+ * @param prioritizeUnhealthyInstances the prioritizeUnhealthyInstances value to set.
+ * @return the RollingUpgradePolicy object itself.
+ */
+ public RollingUpgradePolicy withPrioritizeUnhealthyInstances(Boolean prioritizeUnhealthyInstances) {
+ this.prioritizeUnhealthyInstances = prioritizeUnhealthyInstances;
+ return this;
+ }
+
+ /**
+ * Get the rollbackFailedInstancesOnPolicyBreach property: Rollback failed instances to previous model if the
+ * Rolling Upgrade policy is violated.
+ *
+ * @return the rollbackFailedInstancesOnPolicyBreach value.
+ */
+ public Boolean rollbackFailedInstancesOnPolicyBreach() {
+ return this.rollbackFailedInstancesOnPolicyBreach;
+ }
+
+ /**
+ * Set the rollbackFailedInstancesOnPolicyBreach property: Rollback failed instances to previous model if the
+ * Rolling Upgrade policy is violated.
+ *
+ * @param rollbackFailedInstancesOnPolicyBreach the rollbackFailedInstancesOnPolicyBreach value to set.
+ * @return the RollingUpgradePolicy object itself.
+ */
+ public RollingUpgradePolicy
+ withRollbackFailedInstancesOnPolicyBreach(Boolean rollbackFailedInstancesOnPolicyBreach) {
+ this.rollbackFailedInstancesOnPolicyBreach = rollbackFailedInstancesOnPolicyBreach;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSku.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSku.java
index d314a153bce16..72afbfb41fde3 100644
--- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSku.java
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSku.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.batch.models;
import com.azure.resourcemanager.batch.fluent.models.SupportedSkuInner;
+import java.time.OffsetDateTime;
import java.util.List;
/**
@@ -32,6 +33,13 @@ public interface SupportedSku {
*/
List capabilities();
+ /**
+ * Gets the batchSupportEndOfLife property: The time when Azure Batch service will retire this SKU.
+ *
+ * @return the batchSupportEndOfLife value.
+ */
+ OffsetDateTime batchSupportEndOfLife();
+
/**
* Gets the inner com.azure.resourcemanager.batch.fluent.models.SupportedSkuInner object.
*
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UpgradeMode.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UpgradeMode.java
new file mode 100644
index 0000000000000..532e215d80418
--- /dev/null
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UpgradeMode.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.batch.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values
+ * are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale
+ * set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in
+ * the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs
+ * updates in batches with an optional pause time in between.
+ */
+public enum UpgradeMode {
+ /**
+ * Enum value automatic.
+ */
+ AUTOMATIC("automatic"),
+
+ /**
+ * Enum value manual.
+ */
+ MANUAL("manual"),
+
+ /**
+ * Enum value rolling.
+ */
+ ROLLING("rolling");
+
+ /**
+ * The actual serialized value for a UpgradeMode instance.
+ */
+ private final String value;
+
+ UpgradeMode(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a UpgradeMode instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed UpgradeMode object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static UpgradeMode fromString(String value) {
+ if (value == null) {
+ return null;
+ }
+ UpgradeMode[] items = UpgradeMode.values();
+ for (UpgradeMode item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UpgradePolicy.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UpgradePolicy.java
new file mode 100644
index 0000000000000..bd5bbf2ba9a0d
--- /dev/null
+++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UpgradePolicy.java
@@ -0,0 +1,135 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.batch.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Describes an upgrade policy - automatic, manual, or rolling.
+ */
+@Fluent
+public final class UpgradePolicy {
+ /*
+ * Specifies the mode of an upgrade to virtual machines in the scale set.
Possible values are:
**Manual** - You control the application of updates to virtual machines in the scale set. You do this by
+ * using the manualUpgrade action.
**Automatic** - All virtual machines in the scale set are
+ * automatically updated at the same time.
+ * @param context context containing span to which attribute is added.
+ */
+ default void setAttribute(String key, Object value, Context context) {
+ Objects.requireNonNull(value, "'value' cannot be null.");
+ setAttribute(key, value.toString(), context);
+ }
+
/**
* Sets the name for spans that are created.
*
@@ -620,6 +641,16 @@ default AutoCloseable makeSpanCurrent(Context context) {
return NoopTracer.INSTANCE.makeSpanCurrent(context);
}
+ /**
+ * Checks if span is sampled in.
+ *
+ * @param span Span to check.
+ * @return true if span is recording, false otherwise.
+ */
+ default boolean isRecording(Context span) {
+ return true;
+ }
+
/**
* Checks if tracer is enabled.
*
diff --git a/sdk/core/azure-core/src/main/java/module-info.java b/sdk/core/azure-core/src/main/java/module-info.java
index 652f094e1f500..eae31b0a33997 100644
--- a/sdk/core/azure-core/src/main/java/module-info.java
+++ b/sdk/core/azure-core/src/main/java/module-info.java
@@ -2,7 +2,7 @@
// Licensed under the MIT License.
module com.azure.core {
- requires com.azure.json;
+ requires transitive com.azure.json;
requires transitive reactor.core;
requires transitive org.reactivestreams;
requires transitive org.slf4j;
diff --git a/sdk/core/azure-core/src/test/java/com/azure/core/util/tracing/RestProxyTracingTests.java b/sdk/core/azure-core/src/test/java/com/azure/core/util/tracing/RestProxyTracingTests.java
index 933deddbdc979..98f2faeb48f37 100644
--- a/sdk/core/azure-core/src/test/java/com/azure/core/util/tracing/RestProxyTracingTests.java
+++ b/sdk/core/azure-core/src/test/java/com/azure/core/util/tracing/RestProxyTracingTests.java
@@ -56,8 +56,8 @@ void beforeEach() {
@SyncAsyncTest
public void restProxySuccess() throws Exception {
- SyncAsyncExtension.execute(() -> testInterface.testMethodReturnsMonoVoidSync(),
- () -> testInterface.testMethodReturnsMonoVoid().block());
+ SyncAsyncExtension.execute(() -> testInterface.testMethodReturnsMonoVoidSync(Context.NONE),
+ () -> testInterface.testMethodReturnsMonoVoid(Context.NONE).block());
assertEquals(2, tracer.getSpans().size());
Span restProxy = tracer.getSpans().get(0);
@@ -69,9 +69,28 @@ public void restProxySuccess() throws Exception {
assertNull(restProxy.getErrorMessage());
}
+ @SyncAsyncTest
+ public void restProxyNested() throws Exception {
+ Context outerSpan = tracer.start("outer", Context.NONE);
+ SyncAsyncExtension.execute(() -> testInterface.testMethodReturnsMonoVoidSync(outerSpan),
+ () -> testInterface.testMethodReturnsMonoVoid(outerSpan).block());
+ tracer.end(null, null, outerSpan);
+
+ assertEquals(3, tracer.getSpans().size());
+ Span outer = tracer.getSpans().get(0);
+ Span restProxy = tracer.getSpans().get(1);
+ Span http = tracer.getSpans().get(2);
+
+ assertEquals(getSpan(restProxy.getStartContext()), outer);
+ assertEquals(getSpan(http.getStartContext()), restProxy);
+ assertTrue(restProxy.getName().startsWith("myService.testMethodReturnsMonoVoid"));
+ assertNull(restProxy.getThrowable());
+ assertNull(restProxy.getErrorMessage());
+ }
+
@Test
public void restProxyCancelAsync() {
- testInterface.testMethodDelays().timeout(Duration.ofMillis(10)).toFuture().cancel(true);
+ StepVerifier.create(testInterface.testMethodDelays()).expectSubscription().thenCancel().verify();
assertEquals(2, tracer.getSpans().size());
Span restProxy = tracer.getSpans().get(0);
@@ -235,11 +254,11 @@ public HttpResponse sendSync(HttpRequest request, Context context) {
interface TestInterface {
@Get("my/url/path")
@ExpectedResponses({ 200 })
- Mono testMethodReturnsMonoVoid();
+ Mono testMethodReturnsMonoVoid(Context context);
@Get("my/url/path")
@ExpectedResponses({ 200 })
- Response testMethodReturnsMonoVoidSync();
+ Response testMethodReturnsMonoVoidSync(Context context);
@Post("my/url/path")
@ExpectedResponses({ 500 })
diff --git a/sdk/cosmos/azure-cosmos-benchmark/pom.xml b/sdk/cosmos/azure-cosmos-benchmark/pom.xml
index b4c9da6dc97cd..e0c704b43599a 100644
--- a/sdk/cosmos/azure-cosmos-benchmark/pom.xml
+++ b/sdk/cosmos/azure-cosmos-benchmark/pom.xml
@@ -57,7 +57,7 @@ Licensed under the MIT License.
com.azureazure-cosmos-encryption
- 2.9.0
+ 2.10.0-beta.1
diff --git a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md
index cac0209b00fad..763f39923c3aa 100644
--- a/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md
+++ b/sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md
@@ -1,5 +1,15 @@
## Release History
+### 2.10.0-beta.1 (Unreleased)
+
+#### Features Added
+
+#### Breaking Changes
+
+#### Bugs Fixed
+
+#### Other Changes
+
### 2.9.0 (2024-03-26)
#### Other Changes
* Updated `azure-cosmos` to version `4.57.0`.
diff --git a/sdk/cosmos/azure-cosmos-encryption/pom.xml b/sdk/cosmos/azure-cosmos-encryption/pom.xml
index ea1d311c501a5..0ceb980d9e13b 100644
--- a/sdk/cosmos/azure-cosmos-encryption/pom.xml
+++ b/sdk/cosmos/azure-cosmos-encryption/pom.xml
@@ -13,7 +13,7 @@ Licensed under the MIT License.
com.azureazure-cosmos-encryption
- 2.9.0
+ 2.10.0-beta.1Encryption Plugin for Azure Cosmos DB SDKThis Package contains Encryption Plugin for Microsoft Azure Cosmos SDKjar
@@ -57,7 +57,7 @@ Licensed under the MIT License.
com.azureazure-cosmos
- 4.57.0
+ 4.58.0-beta.1
diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md
index 532c376c58a94..489d2af49ea33 100644
--- a/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md
+++ b/sdk/cosmos/azure-cosmos-kafka-connect/CHANGELOG.md
@@ -3,7 +3,8 @@
### 1.0.0-beta.1 (Unreleased)
#### Features Added
-* Added Source connector. See [PR 39410](https://github.com/Azure/azure-sdk-for-java/pull/39410)
+* Added Source connector. See [PR 39410](https://github.com/Azure/azure-sdk-for-java/pull/39410)
+* Added Sink connector. See [PR 39434](https://github.com/Azure/azure-sdk-for-java/pull/39434)
#### Breaking Changes
diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/doc/configuration-reference.md b/sdk/cosmos/azure-cosmos-kafka-connect/doc/configuration-reference.md
index 8512ba8d7af79..064aaab81a76e 100644
--- a/sdk/cosmos/azure-cosmos-kafka-connect/doc/configuration-reference.md
+++ b/sdk/cosmos/azure-cosmos-kafka-connect/doc/configuration-reference.md
@@ -23,3 +23,16 @@
| `kafka.connect.cosmos.source.metadata.storage.topic` | `_cosmos.metadata.topic` | The name of the topic where the metadata are stored. The metadata topic will be created if it does not already exist, else it will use the pre-created topic. |
| `kafka.connect.cosmos.source.messageKey.enabled` | `true` | Whether to set the kafka record message key. |
| `kafka.connect.cosmos.source.messageKey.field` | `id` | The field to use as the message key. |
+
+## Sink Connector Configuration
+| Config Property Name | Default | Description |
+|:---------------------------------------------------------------|:--------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `kafka.connect.cosmos.sink.database.name` | None | Cosmos DB database name. |
+| `kafka.connect.cosmos.sink.containers.topicMap` | None | A comma delimited list of Kafka topics mapped to Cosmos containers. For example: topic1#con1,topic2#con2. |
+| `kafka.connect.cosmos.sink.errors.tolerance` | `None` | Error tolerance level after exhausting all retries. `None` for fail on error. `All` for log and continue |
+| `kafka.connect.cosmos.sink.bulk.enabled` | `true` | Flag to indicate whether Cosmos DB bulk mode is enabled for Sink connector. By default it is true. |
+| `kafka.connect.cosmos.sink.bulk.maxConcurrentCosmosPartitions` | `-1` | Cosmos DB Item Write Max Concurrent Cosmos Partitions. If not specified it will be determined based on the number of the container's physical partitions which would indicate every batch is expected to have data from all Cosmos physical partitions. If specified it indicates from at most how many Cosmos Physical Partitions each batch contains data. So this config can be used to make bulk processing more efficient when input data in each batch has been repartitioned to balance to how many Cosmos partitions each batch needs to write. This is mainly useful for very large containers (with hundreds of physical partitions. |
+| `kafka.connect.cosmos.sink.bulk.initialBatchSize` | `1` | Cosmos DB initial bulk micro batch size - a micro batch will be flushed to the backend when the number of documents enqueued exceeds this size - or the target payload size is met. The micro batch size is getting automatically tuned based on the throttling rate. By default the initial micro batch size is 1. Reduce this when you want to avoid that the first few requests consume too many RUs. |
+| `kafka.connect.cosmos.sink.write.strategy` | `ItemOverwrite` | Cosmos DB Item write Strategy: `ItemOverwrite` (using upsert), `ItemAppend` (using create, ignore pre-existing items i.e., Conflicts), `ItemDelete` (deletes based on id/pk of data frame), `ItemDeleteIfNotModified` (deletes based on id/pk of data frame if etag hasn't changed since collecting id/pk), `ItemOverwriteIfNotModified` (using create if etag is empty, update/replace with etag pre-condition otherwise, if document was updated the pre-condition failure is ignored) |
+| `kafka.connect.cosmos.sink.maxRetryCount` | `10` | Cosmos DB max retry attempts on write failures for Sink connector. By default, the connector will retry on transient write errors for up to 10 times. |
+| `kafka.connect.cosmos.sink.id.strategy` | `ProvidedInValueStrategy` | A strategy used to populate the document with an ``id``. Valid strategies are: ``TemplateStrategy``, ``FullKeyStrategy``, ``KafkaMetadataStrategy``, ``ProvidedInKeyStrategy``, ``ProvidedInValueStrategy``. Configuration properties prefixed with``id.strategy`` are passed through to the strategy. For example, when using ``id.strategy=TemplateStrategy`` , the property ``id.strategy.template`` is passed through to the template strategy and used to specify the template string to be used in constructing the ``id``. |
diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml b/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml
index 76bdce066b676..09e1447d9d227 100644
--- a/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml
+++ b/sdk/cosmos/azure-cosmos-kafka-connect/pom.xml
@@ -44,14 +44,17 @@ Licensed under the MIT License.
true
+ --add-opens com.azure.cosmos/com.azure.cosmos.implementation=ALL-UNNAMED
+ --add-opens com.azure.cosmos/com.azure.cosmos.implementation.apachecommons.lang=ALL-UNNAMED
+ --add-opens com.azure.cosmos/com.azure.cosmos.implementation.caches=ALL-UNNAMED
+ --add-opens com.azure.cosmos/com.azure.cosmos.implementation.faultinjection=ALL-UNNAMED
+ --add-opens com.azure.cosmos/com.azure.cosmos.implementation.routing=ALL-UNNAMED
--add-opens com.azure.cosmos.kafka.connect/com.azure.cosmos.kafka.connect=ALL-UNNAMED
--add-opens com.azure.cosmos.kafka.connect/com.azure.cosmos.kafka.connect.implementation=ALL-UNNAMED
+ --add-opens com.azure.cosmos.kafka.connect/com.azure.cosmos.kafka.connect.implementation.sink=ALL-UNNAMED
+ --add-opens com.azure.cosmos.kafka.connect/com.azure.cosmos.kafka.connect.implementation.sink.idStrategy=ALL-UNNAMED
--add-opens com.azure.cosmos.kafka.connect/com.azure.cosmos.kafka.connect.implementation.source=com.fasterxml.jackson.databind,ALL-UNNAMED
- --add-opens com.azure.cosmos/com.azure.cosmos.implementation.routing=ALL-UNNAMED
- --add-opens com.azure.cosmos/com.azure.cosmos.implementation.apachecommons.lang=ALL-UNNAMED
- --add-exports com.azure.cosmos/com.azure.cosmos.implementation.changefeed.common=com.azure.cosmos.kafka.connect
- --add-exports com.azure.cosmos/com.azure.cosmos.implementation.feedranges=com.azure.cosmos.kafka.connect
- --add-exports com.azure.cosmos/com.azure.cosmos.implementation.query=com.azure.cosmos.kafka.connect
+
@@ -83,6 +86,13 @@ Licensed under the MIT License.
provided
+
+ com.azure
+ azure-cosmos-test
+ 1.0.0-beta.7
+ test
+
+
org.apache.commonscommons-collections4
@@ -96,6 +106,24 @@ Licensed under the MIT License.
test1.10.0
+
+ com.jayway.jsonpath
+ json-path
+ 2.9.0
+
+
+
+ org.apache.kafka
+ connect-runtime
+ 3.6.0
+ test
+
+
+ jackson-jaxrs-json-provider
+ com.fasterxml.jackson.jaxrs
+
+
+ org.apache.kafka
@@ -238,6 +266,7 @@ Licensed under the MIT License.
com.azure:*org.apache.kafka:connect-api:[3.6.0]io.confluent:kafka-connect-maven-plugin:[0.12.0]
+ com.jayway.jsonpath:json-path:[2.9.0]org.sourcelab:kafka-connect-client:[4.0.4]
@@ -322,6 +351,10 @@ Licensed under the MIT License.
reactor${shadingPrefix}.reactor
+
+ com.jayway.jsonpath
+ ${shadingPrefix}.com.jayway.jsonpath
+
@@ -459,7 +492,7 @@ Licensed under the MIT License.
- kafka-integration
+ kafkakafka
diff --git a/sdk/cosmos/azure-cosmos-kafka-connect/src/main/java/com/azure/cosmos/kafka/connect/CosmosSinkConnector.java b/sdk/cosmos/azure-cosmos-kafka-connect/src/main/java/com/azure/cosmos/kafka/connect/CosmosSinkConnector.java
new file mode 100644
index 0000000000000..ef38399c74396
--- /dev/null
+++ b/sdk/cosmos/azure-cosmos-kafka-connect/src/main/java/com/azure/cosmos/kafka/connect/CosmosSinkConnector.java
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.cosmos.kafka.connect;
+
+import com.azure.cosmos.kafka.connect.implementation.KafkaCosmosConstants;
+import com.azure.cosmos.kafka.connect.implementation.sink.CosmosSinkConfig;
+import com.azure.cosmos.kafka.connect.implementation.sink.CosmosSinkTask;
+import org.apache.kafka.common.config.ConfigDef;
+import org.apache.kafka.connect.connector.Task;
+import org.apache.kafka.connect.sink.SinkConnector;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * A Sink connector that publishes topic messages to CosmosDB.
+ */
+public class CosmosSinkConnector extends SinkConnector {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CosmosSinkConnector.class);
+
+ private CosmosSinkConfig sinkConfig;
+
+ @Override
+ public void start(Map props) {
+ LOGGER.info("Starting the kafka cosmos sink connector");
+ this.sinkConfig = new CosmosSinkConfig(props);
+ }
+
+ @Override
+ public Class extends Task> taskClass() {
+ return CosmosSinkTask.class;
+ }
+
+ @Override
+ public List
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.junit.jupiterjunit-jupiter-api
@@ -143,4 +149,21 @@
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/documentintelligence/azure-ai-documentintelligence/pom.xml b/sdk/documentintelligence/azure-ai-documentintelligence/pom.xml
index 57ccc71e79458..4f2215414655a 100644
--- a/sdk/documentintelligence/azure-ai-documentintelligence/pom.xml
+++ b/sdk/documentintelligence/azure-ai-documentintelligence/pom.xml
@@ -74,6 +74,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.junit.jupiterjunit-jupiter-api
@@ -99,4 +105,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml
index 6f2ed9a93c2e7..15deae3511dc9 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml
+++ b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml
@@ -73,6 +73,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.junit.jupiterjunit-jupiter-api
@@ -98,4 +104,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/identity/azure-identity-broker-samples/src/samples/java/com/azure/identity/broker/JavaDocCodeSnippets.java b/sdk/identity/azure-identity-broker-samples/src/samples/java/com/azure/identity/broker/JavaDocCodeSnippets.java
index b08c5b654cf4f..218505960e068 100644
--- a/sdk/identity/azure-identity-broker-samples/src/samples/java/com/azure/identity/broker/JavaDocCodeSnippets.java
+++ b/sdk/identity/azure-identity-broker-samples/src/samples/java/com/azure/identity/broker/JavaDocCodeSnippets.java
@@ -42,7 +42,9 @@ public void configureCredentialForWindows() {
public void configureCredentialForDefaultAccount() {
// BEGIN: com.azure.identity.broker.interactivebrowserbrokercredentialbuilder.useinteractivebrowserbroker.defaultaccount
+ long windowHandle = getWindowHandle(); // Samples below
InteractiveBrowserCredential cred = new InteractiveBrowserBrokerCredentialBuilder()
+ .setWindowHandle(windowHandle)
.useDefaultBrokerAccount()
.build();
// END: com.azure.identity.broker.interactivebrowserbrokercredentialbuilder.useinteractivebrowserbroker.defaultaccount
diff --git a/sdk/identity/azure-identity-broker/README.md b/sdk/identity/azure-identity-broker/README.md
index f08a3d3c81279..6c5236be9a7d1 100644
--- a/sdk/identity/azure-identity-broker/README.md
+++ b/sdk/identity/azure-identity-broker/README.md
@@ -94,7 +94,9 @@ InteractiveBrowserCredential cred = new InteractiveBrowserBrokerCredentialBuilde
When this option is enabled, the credential will attempt to silently use the default broker account. If using the default account fails, the credential will fall back to interactive authentication.
```java com.azure.identity.broker.interactivebrowserbrokercredentialbuilder.useinteractivebrowserbroker.defaultaccount
+long windowHandle = getWindowHandle(); // Samples below
InteractiveBrowserCredential cred = new InteractiveBrowserBrokerCredentialBuilder()
+ .setWindowHandle(windowHandle)
.useDefaultBrokerAccount()
.build();
```
diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md
index 660aaa8ef471e..3a98cbe29b878 100644
--- a/sdk/identity/azure-identity/README.md
+++ b/sdk/identity/azure-identity/README.md
@@ -1,6 +1,6 @@
# Azure Identity client library for Java
-The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) ([formerly Azure Active Directory](https://learn.microsoft.com/azure/active-directory/fundamentals/new-name)) token authentication support across the Azure SDK. It provides a set of [TokenCredential](https://learn.microsoft.com/java/api/com.azure.core.credential.tokencredential?view=azure-java-stable) implementations that can be used to construct Azure SDK clients that support Microsoft Entra token authentication.
+The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/entra/fundamentals/whatis) ([formerly Azure Active Directory](https://learn.microsoft.com/entra/fundamentals/new-name)) token authentication support across the Azure SDK. It provides a set of [TokenCredential](https://learn.microsoft.com/java/api/com.azure.core.credential.tokencredential?view=azure-java-stable) implementations that can be used to construct Azure SDK clients that support Microsoft Entra token authentication.
[Source code][source] | [API reference documentation][javadoc] | [Microsoft Entra ID documentation][entraid_doc]
@@ -187,15 +187,15 @@ public void createDefaultAzureCredentialForIntelliJ() {
## Managed Identity support
-The [Managed identity authentication](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) is supported via either the `DefaultAzureCredential` or the `ManagedIdentityCredential` directly for the following Azure Services:
+The [Managed identity authentication](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview) is supported via either the `DefaultAzureCredential` or the `ManagedIdentityCredential` directly for the following Azure Services:
- [Azure App Service and Azure Functions](https://learn.microsoft.com/azure/app-service/overview-managed-identity?tabs=dotnet)
- [Azure Arc](https://learn.microsoft.com/azure/azure-arc/servers/managed-identity-authentication)
- [Azure Cloud Shell](https://learn.microsoft.com/azure/cloud-shell/msi-authorization)
- [Azure Kubernetes Service](https://learn.microsoft.com/azure/aks/use-managed-identity)
- [Azure Service Fabric](https://learn.microsoft.com/azure/service-fabric/concepts-managed-identity)
-- [Azure Virtual Machines](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token)
-- [Azure Virtual Machines Scale Sets](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/qs-configure-powershell-windows-vmss)
+- [Azure Virtual Machines](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-to-use-vm-token)
+- [Azure Virtual Machines Scale Sets](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/qs-configure-powershell-windows-vmss)
**Note:** Use `azure-identity` version `1.7.0` or later to utilize [token caching](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/TOKEN_CACHING.md) support for managed identity authentication.
@@ -339,13 +339,13 @@ Not all credentials require this configuration. Credentials that authenticate th
@@ -540,7 +540,7 @@ Configuration is attempted in the above order. For example, if values for a clie
## Continuous Access Evaluation
-As of v1.10.0, accessing resources protected by [Continuous Access Evaluation](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) (CAE) is possible on a per-request basis. This can be enabled using the [`TokenRequestContext.setCaeEnabled(boolean)` API](https://learn.microsoft.com/java/api/com.azure.core.credential.tokenrequestcontext?view=azure-java-stable#com-azure-core-credential-tokenrequestcontext-setcaeenabled(boolean)). CAE isn't supported for developer credentials.
+As of v1.10.0, accessing resources protected by [Continuous Access Evaluation](https://learn.microsoft.com/entra/identity/conditional-access/concept-continuous-access-evaluation) (CAE) is possible on a per-request basis. This can be enabled using the [`TokenRequestContext.setCaeEnabled(boolean)` API](https://learn.microsoft.com/java/api/com.azure.core.credential.tokenrequestcontext?view=azure-java-stable#com-azure-core-credential-tokenrequestcontext-setcaeenabled(boolean)). CAE isn't supported for developer credentials.
## Token caching
Token caching is a feature provided by the Azure Identity library that allows apps to:
diff --git a/sdk/identity/azure-identity/TROUBLESHOOTING.md b/sdk/identity/azure-identity/TROUBLESHOOTING.md
index 51b9636d9c6d8..163727c51ff3d 100644
--- a/sdk/identity/azure-identity/TROUBLESHOOTING.md
+++ b/sdk/identity/azure-identity/TROUBLESHOOTING.md
@@ -66,7 +66,7 @@ This error contains several pieces of information:
- __Failing Credential Type__: The type of credential that failed to authenticate. This can be helpful when diagnosing issues with chained credential types such as `DefaultAzureCredential` or `ChainedTokenCredential`.
-- __STS Error Code and Message__: The error code and message returned from the Microsoft Entra STS. This can give insight into the specific reason the request failed. For instance, in this specific case because the provided client secret is incorrect. More information on STS error codes can be found [here](https://learn.microsoft.com/azure/active-directory/develop/reference-aadsts-error-codes#aadsts-error-codes).
+- __STS Error Code and Message__: The error code and message returned from the Microsoft Entra STS. This can give insight into the specific reason the request failed. For instance, in this specific case because the provided client secret is incorrect. More information on STS error codes can be found [here](https://learn.microsoft.com/entra/identity-platform/reference-error-codes#aadsts-error-codes).
- __Correlation ID and Timestamp__: The correlation ID and call Timestamp used to identify the request in server-side logs. This information can be useful to support engineers when diagnosing unexpected STS failures.
@@ -97,17 +97,17 @@ The underlying MSAL library, MSAL4J, also has detailed logging. It is highly ver
| Error Code | Issue | Mitigation |
|---|---|---|
-|AADSTS7000215|An invalid client secret was provided.|Ensure the `clientSecret` provided when constructing the credential is valid. If unsure, create a new client secret using the Azure portal. Details on creating a new client secret can be found [here](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret).|
-|AADSTS7000222|An expired client secret was provided.|Create a new client secret using the Azure portal. Details on creating a new client secret can be found [here](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret).|
-|AADSTS700016|The specified application wasn't found in the specified tenant.|Ensure the specified `clientId` and `tenantId` are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the instructions [here](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).|
+|AADSTS7000215|An invalid client secret was provided.|Ensure the `clientSecret` provided when constructing the credential is valid. If unsure, create a new client secret using the Azure portal. Details on creating a new client secret can be found [here](https://learn.microsoft.com/entra/identity-platform/howto-create-service-principal-portal#option-2-create-a-new-application-secret).|
+|AADSTS7000222|An expired client secret was provided.|Create a new client secret using the Azure portal. Details on creating a new client secret can be found [here](https://learn.microsoft.com/entra/identity-platform/howto-create-service-principal-portal#option-2-create-a-new-application-secret).|
+|AADSTS700016|The specified application wasn't found in the specified tenant.|Ensure the specified `clientId` and `tenantId` are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the instructions [here](https://learn.microsoft.com/entra/identity-platform/howto-create-service-principal-portal).|
## Troubleshoot `ClientCertificateCredential` authentication issues
`ClientAuthenticationException`
| Error Code | Description | Mitigation |
|---|---|---|
-|AADSTS700027|Client assertion contains an invalid signature.|Ensure the specified certificate has been uploaded to the Microsoft Entra application registration. Instructions for uploading certificates to the application registration can be found [here](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#option-1-upload-a-certificate).|
-|AADSTS700016|The specified application wasn't found in the specified tenant.| Ensure the specified `clientId` and `tenantId` are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the instructions [here](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).|
+|AADSTS700027|Client assertion contains an invalid signature.|Ensure the specified certificate has been uploaded to the Microsoft Entra application registration. Instructions for uploading certificates to the application registration can be found [here](https://learn.microsoft.com/entra/identity-platform/howto-create-service-principal-portal#option-1-upload-a-certificate).|
+|AADSTS700016|The specified application wasn't found in the specified tenant.| Ensure the specified `clientId` and `tenantId` are correct for your application registration. For multi-tenant apps, ensure the application has been added to the desired tenant by a tenant admin. To add a new application in the desired tenant, follow the instructions [here](https://learn.microsoft.com/entra/identity-platform/howto-create-service-principal-portal).|
## Troubleshoot `ClientAssertionCredential` authentication issues
@@ -115,9 +115,9 @@ The underlying MSAL library, MSAL4J, also has detailed logging. It is highly ver
| Error Code | Description | Mitigation |
|---|---|---|
-|AADSTS700021| Client assertion application identifier doesn't match 'client_id' parameter. Review the documentation at https://learn.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials | Ensure the JWT assertion created has the correct values specified for the `sub` and `issuer` value of the payload, both of these should have the value be equal to `clientId`. Refer documentation for [client assertion format](https://learn.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials)|
-|AADSTS700023| Client assertion audience claim does not match Realm issuer. Review the documentation at https://learn.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials. | Ensure the audience `aud` field in the JWT assertion created has the correct value for the audience specified in the payload. This should be set to `https://login.microsoftonline.com/{tenantId}/v2`.|
-|AADSTS50027| JWT token is invalid or malformed. | Ensure the JWT assertion token is in the valid format. Refer to the documentation for [client assertion format](https://learn.microsoft.com/azure/active-directory/develop/active-directory-certificate-credentials).|
+|AADSTS700021| Client assertion application identifier doesn't match 'client_id' parameter. Review the documentation at https://learn.microsoft.com/entra/identity-platform/certificate-credentials | Ensure the JWT assertion created has the correct values specified for the `sub` and `issuer` value of the payload, both of these should have the value be equal to `clientId`. Refer documentation for [client assertion format](https://learn.microsoft.com/entra/identity-platform/certificate-credentials)|
+|AADSTS700023| Client assertion audience claim does not match Realm issuer. Review the documentation at https://learn.microsoft.com/entra/identity-platform/certificate-credentials. | Ensure the audience `aud` field in the JWT assertion created has the correct value for the audience specified in the payload. This should be set to `https://login.microsoftonline.com/{tenantId}/v2`.|
+|AADSTS50027| JWT token is invalid or malformed. | Ensure the JWT assertion token is in the valid format. Refer to the documentation for [client assertion format](https://learn.microsoft.com/entra/identity-platform/certificate-credentials).|
## Troubleshoot `UsernamePasswordCredential` authentication issues
`ClientAuthenticationException`
@@ -136,7 +136,7 @@ The `ManagedIdentityCredential` is designed to work on a variety of Azure hosts
|Azure Arc|[Configuration](https://learn.microsoft.com/azure/azure-arc/servers/managed-identity-authentication)||
|Azure Kubernetes Service|[Configuration](https://azure.github.io/aad-pod-identity/docs/)|[Troubleshooting](#azure-kubernetes-service-managed-identity)|
|Azure Service Fabric|[Configuration](https://learn.microsoft.com/azure/service-fabric/concepts-managed-identity)||
-|Azure Virtual Machines and Scale Sets|[Configuration](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm)|[Troubleshooting](#azure-virtual-machine-managed-identity)|
+|Azure Virtual Machines and Scale Sets|[Configuration](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/qs-configure-portal-windows-vm)|[Troubleshooting](#azure-virtual-machine-managed-identity)|
### Azure Virtual Machine Managed Identity
@@ -144,10 +144,10 @@ The `ManagedIdentityCredential` is designed to work on a variety of Azure hosts
| Error Message |Description| Mitigation |
|---|---|---|
-|The requested identity hasn't been assigned to this resource.|The IMDS endpoint responded with a status code of 400, indicating the requested identity isn't assigned to the VM.|If using a user assigned identity, ensure the specified `clientId` is correct.If using a system assigned identity, make sure it has been enabled properly. Instructions to enable the system assigned identity on an Azure VM can be found [here](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm#enable-system-assigned-managed-identity-on-an-existing-vm).|
+|The requested identity hasn't been assigned to this resource.|The IMDS endpoint responded with a status code of 400, indicating the requested identity isn't assigned to the VM.|If using a user assigned identity, ensure the specified `clientId` is correct.If using a system assigned identity, make sure it has been enabled properly. Instructions to enable the system assigned identity on an Azure VM can be found [here](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/qs-configure-portal-windows-vm#enable-system-assigned-managed-identity-on-an-existing-vm).|
|The request failed due to a gateway error.|The request to the IMDS endpoint failed due to a gateway error, 502 or 504 status code.|Calls via proxy or gateway aren't supported by IMDS. Disable proxies or gateways running on the VM for calls to the IMDS endpoint `http://169.254.169.254/`|
-|No response received from the managed identity endpoint.|No response was received for the request to IMDS or the request timed out.|
Ensure managed identity has been properly configured on the VM. Instructions for configuring the manged identity can be found [here](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm).
Verify the IMDS endpoint is reachable on the VM, see [below](#verify-imds-is-available-on-the-vm) for instructions.
|
-|Multiple attempts failed to obtain a token from the managed identity endpoint.|Retries to retrieve a token from the IMDS endpoint have been exhausted.|
Refer to inner exception messages for more details on specific failures. If the data has been truncated, more detail can be obtained by [collecting logs](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md#enable-client-logging).
Ensure managed identity has been properly configured on the VM. Instructions for configuring the manged identity can be found [here](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm).
Verify the IMDS endpoint is reachable on the VM, see [below](#verify-imds-is-available-on-the-vm) for instructions.
|
+|No response received from the managed identity endpoint.|No response was received for the request to IMDS or the request timed out.|
Ensure managed identity has been properly configured on the VM. Instructions for configuring the manged identity can be found [here](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/qs-configure-portal-windows-vm).
Verify the IMDS endpoint is reachable on the VM, see [below](#verify-imds-is-available-on-the-vm) for instructions.
|
+|Multiple attempts failed to obtain a token from the managed identity endpoint.|Retries to retrieve a token from the IMDS endpoint have been exhausted.|
Refer to inner exception messages for more details on specific failures. If the data has been truncated, more detail can be obtained by [collecting logs](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md#enable-client-logging).
Ensure managed identity has been properly configured on the VM. Instructions for configuring the manged identity can be found [here](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/qs-configure-portal-windows-vm).
Verify the IMDS endpoint is reachable on the VM, see [below](#verify-imds-is-available-on-the-vm) for instructions.
|
#### Verify IMDS is available on the VM
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java
index 19f5f26bb1713..361f7a615a9a8 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AadCredentialBuilderBase.java
@@ -136,7 +136,7 @@ public T disableInstanceDiscovery() {
/**
* Enables additional support logging for public and confidential client applications. This enables
- * PII logging in MSAL4J as described here.
+ * PII logging in MSAL4J as described here.
*
*
This operation will log PII including tokens. It should only be used when directed by support.
*
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java
index 87e7ea51bd142..00c23d95f5c92 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredential.java
@@ -22,7 +22,7 @@
/**
*
Authorization Code authentication in Azure is a type of authentication mechanism that allows users to
- * authenticate with Microsoft Entra ID
+ * authenticate with Microsoft Entra ID
* and obtain an authorization code that can be used to request an access token to access
* Azure resources. It is a widely used authentication mechanism and is supported by a wide range of Azure services
* and applications. It provides a secure and scalable way to authenticate users and grant them access to Azure
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java
index e0b727cadb50e..330d04e31c64d 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AuthorizationCodeCredentialBuilder.java
@@ -13,7 +13,7 @@
*
Fluent credential builder for instantiating a {@link AuthorizationCodeCredential}.
*
*
Authorization Code authentication in Azure is a type of authentication mechanism that allows users to
- * authenticate with Microsoft Entra ID
+ * authenticate with Microsoft Entra ID
* and obtain an authorization code that can be used to request an access token to access
* Azure resources. It is a widely used authentication mechanism and is supported by a wide range of Azure services
* and applications. It provides a secure and scalable way to authenticate users and grant them access to Azure
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureCliCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureCliCredential.java
index 56d9f0b8de541..0818a9d7b22cd 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureCliCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureCliCredential.java
@@ -20,7 +20,7 @@
* terminal. It allows users to
* authenticate interactively as a
* user and/or a service principal against
- * Microsoft Entra ID.
+ * Microsoft Entra ID.
* The AzureCliCredential authenticates in a development environment and acquires a token on behalf of the
* logged-in user or service principal in Azure CLI. It acts as the Azure CLI logged in user or service principal
* and executes an Azure CLI command underneath to authenticate the application against Microsoft Entra ID.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureCliCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureCliCredentialBuilder.java
index da07d5cad70cf..d41caf547f26b 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureCliCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureCliCredentialBuilder.java
@@ -19,7 +19,7 @@
* terminal. It allows users to
* authenticate interactively as a
* user and/or a service principal against
- * Microsoft Entra ID.
+ * Microsoft Entra ID.
* The AzureCliCredential authenticates in a development environment and acquires a token on behalf of the
* logged-in user or service principal in Azure CLI. It acts as the Azure CLI logged in user or service principal
* and executes an Azure CLI command underneath to authenticate the application against Microsoft Entra ID.
Azure Developer CLI is a command-line interface tool that allows developers to create, manage, and deploy
* resources in Azure. It's built on top of the Azure CLI and provides additional functionality specific
* to Azure developers. It allows users to authenticate as a user and/or a service principal against
- * Microsoft Entra ID.
+ * Microsoft Entra ID.
* The AzureDeveloperCliCredential authenticates in a development environment and acquires a token on behalf of
* the logged-in user or service principal in Azure Developer CLI. It acts as the Azure Developer CLI logged in user or
* service principal and executes an Azure CLI command underneath to authenticate the application against
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureDeveloperCliCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureDeveloperCliCredentialBuilder.java
index d1f3f51cf30d4..4fc66874eadc1 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureDeveloperCliCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzureDeveloperCliCredentialBuilder.java
@@ -18,7 +18,7 @@
*
Azure Developer CLI is a command-line interface tool that allows developers to create, manage, and deploy
* resources in Azure. It's built on top of the Azure CLI and provides additional functionality specific
* to Azure developers. It allows users to authenticate as a user and/or a service principal against
- * Microsoft Entra ID.
+ * Microsoft Entra ID.
* The AzureDeveloperCliCredential authenticates in a development environment and acquires a token on behalf of
* the logged-in user or service principal in Azure Developer CLI. It acts as the Azure Developer CLI logged in user or
* service principal and executes an Azure CLI command underneath to authenticate the application against
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzurePowerShellCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzurePowerShellCredential.java
index 16fd494da1fda..365e18fd5c0cf 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzurePowerShellCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzurePowerShellCredential.java
@@ -19,7 +19,7 @@
* or terminal. It allows users to
* authenticate interactively
* as a user and/or a service principal against
- * Microsoft Entra ID.
+ * Microsoft Entra ID.
* The AzurePowershellCredential authenticates in a development environment and acquires a token on behalf of the
* logged-in user or service principal in Azure Powershell. It acts as the Azure Powershell logged in user or
* service principal and executes an Azure Powershell command underneath to authenticate the application against
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzurePowerShellCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzurePowerShellCredentialBuilder.java
index 5bc634f6ec944..77f431ddb19ea 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzurePowerShellCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/AzurePowerShellCredentialBuilder.java
@@ -17,7 +17,7 @@
* or terminal. It allows users to
* authenticate interactively
* as a user and/or a service principal against
- * Microsoft Entra ID.
+ * Microsoft Entra ID.
* The {@link AzurePowerShellCredential} authenticates in a development environment and acquires a token on
* behalf of the logged-in user or service principal in Azure Powershell. It acts as the Azure Powershell logged in
* user or service principal and executes an Azure Powershell command underneath to authenticate the application
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientAssertionCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientAssertionCredential.java
index bf788fcad345a..5dd062b019c6a 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientAssertionCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientAssertionCredential.java
@@ -25,7 +25,7 @@
* In this authentication method, the client application creates a JSON Web Token (JWT) that includes information about
* the service principal (such as its client ID and tenant ID) and signs it using a client secret. The client then
* sends this token to
- * Microsoft Entra ID as proof of its
+ * Microsoft Entra ID as proof of its
* identity. Microsoft Entra ID verifies the token signature and checks that the service principal has
* the necessary permissions to access the requested Azure resource. If the token is valid and the service principal is
* authorized, Microsoft Entra ID issues an access token that the client application can use to access the requested resource.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientAssertionCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientAssertionCredentialBuilder.java
index 57c9744d2c6cd..2bf56a64ddc3f 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientAssertionCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientAssertionCredentialBuilder.java
@@ -18,7 +18,7 @@
* In this authentication method, the client application creates a JSON Web Token (JWT) that includes information about
* the service principal (such as its client ID and tenant ID) and signs it using a client secret. The client then
* sends this token to
- * Microsoft Entra ID as proof of its
+ * Microsoft Entra ID as proof of its
* identity. Microsoft Entra ID verifies the token signature and checks that the service principal has
* the necessary permissions to access the requested Azure resource. If the token is valid and the service principal is
* authorized, Microsoft Entra ID issues an access token that the client application can use to access the requested resource.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java
index 471725f45fd89..0ce162f1fa594 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredential.java
@@ -21,12 +21,12 @@
/**
*
The ClientCertificateCredential acquires a token via service principal authentication. It is a type of
* authentication in Azure that enables a non-interactive login to
- * Microsoft Entra ID, allowing
+ * Microsoft Entra ID, allowing
* an application or service to authenticate itself with Azure resources.
* A Service Principal is essentially an identity created for an application in Microsoft Entra ID that can be used to
* authenticate with Azure resources. It's like a "user identity" for the application or service, and it provides
* a way for the application to authenticate itself with Azure resources without needing to use a user's credentials.
- * Microsoft Entra ID allows users
+ * Microsoft Entra ID allows users
* to register service principals which can be used as an identity for authentication.
* A client certificate associated with the registered service principal is used as the password when authenticating
* the service principal.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java
index 6c3337a21aa1c..523f14ca1c236 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientCertificateCredentialBuilder.java
@@ -15,12 +15,12 @@
*
*
The ClientCertificateCredential acquires a token via service principal authentication. It is a type of
* authentication in Azure that enables a non-interactive login to
- * Microsoft Entra ID, allowing an
+ * Microsoft Entra ID, allowing an
* application or service to authenticate itself with Azure resources.
* A Service Principal is essentially an identity created for an application in Microsoft Entra ID that can be used to
* authenticate with Azure resources. It's like a "user identity" for the application or service, and it provides
* a way for the application to authenticate itself with Azure resources without needing to use a user's credentials.
- * Microsoft Entra ID allows users to
+ * Microsoft Entra ID allows users to
* register service principals which can be used as an identity for authentication.
* A client certificate associated with the registered service principal is used as the password when authenticating
* the service principal.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredential.java
index 3450e10676669..37e43a328ff17 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredential.java
@@ -21,12 +21,12 @@
/**
*
The ClientSecretCredential acquires a token via service principal authentication. It is a type of authentication
* in Azure that enables a non-interactive login to
- * Microsoft Entra ID, allowing an
+ * Microsoft Entra ID, allowing an
* application or service to authenticate itself with Azure resources.
* A Service Principal is essentially an identity created for an application in Microsoft Entra ID that can be used to
* authenticate with Azure resources. It's like a "user identity" for the application or service, and it provides
* a way for the application to authenticate itself with Azure resources without needing to use a user's credentials.
- * Microsoft Entra ID allows users to
+ * Microsoft Entra ID allows users to
* register service principals which can be used as an identity for authentication.
* A client secret associated with the registered service principal is used as the password when authenticating the
* service principal.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java
index b77e79c032a46..b5f099d20d751 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ClientSecretCredentialBuilder.java
@@ -11,12 +11,12 @@
*
*
The {@link ClientSecretCredential} acquires a token via service principal authentication. It is a type of
* authentication in Azure that enables a non-interactive login to
- * Microsoft Entra ID, allowing an
+ * Microsoft Entra ID, allowing an
* application or service to authenticate itself with Azure resources.
* A Service Principal is essentially an identity created for an application in Microsoft Entra ID that can be used to
* authenticate with Azure resources. It's like a "user identity" for the application or service, and it provides
* a way for the application to authenticate itself with Azure resources without needing to use a user's credentials.
- * Microsoft Entra ID allows users to
+ * Microsoft Entra ID allows users to
* register service principals which can be used as an identity for authentication.
* A client secret associated with the registered service principal is used as the password when authenticating the
* service principal.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java
index 938ecd7175b2a..04dd2052e5720 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredential.java
@@ -72,7 +72,7 @@
*
Sample: Construct DefaultAzureCredential with User Assigned Managed Identity
*
*
User-Assigned Managed Identity (UAMI) in Azure is a feature that allows you to create an identity in
- * Microsoft Entra ID that is
+ * Microsoft Entra ID that is
* associated with one or more Azure resources. This identity can then be used to authenticate and
* authorize access to various Azure services and resources. The following code sample demonstrates the creation of
* a DefaultAzureCredential to target a user assigned managed identity, using the
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java
index 56c15539aa095..40c2193924f3e 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DefaultAzureCredentialBuilder.java
@@ -43,7 +43,7 @@
*
Sample: Construct DefaultAzureCredential with User Assigned Managed Identity
*
*
User-Assigned Managed Identity (UAMI) in Azure is a feature that allows you to create an identity in
- * Microsoft Entra ID that is
+ * Microsoft Entra ID that is
* associated with one or more Azure resources. This identity can then be used to authenticate and
* authorize access to various Azure services and resources. The following code sample demonstrates the creation of
* a {@link DefaultAzureCredential} to target a user assigned managed identity, using the DefaultAzureCredentialBuilder
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java
index 60fb3819f6917..281e96eab17f0 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredential.java
@@ -22,7 +22,7 @@
/**
*
Device code authentication is a type of authentication flow offered by
- * Microsoft Entra ID that
+ * Microsoft Entra ID that
* allows users to sign in to applications on devices that don't have a web browser or a keyboard.
* This authentication method is particularly useful for devices such as smart TVs, gaming consoles, and
* Internet of Things (IoT) devices that may not have the capability to enter a username and password.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java
index 47b61f240490f..051a8fd03af4b 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/DeviceCodeCredentialBuilder.java
@@ -15,7 +15,7 @@
* Fluent credential builder for instantiating a {@link DeviceCodeCredential}.
*
*
Device code authentication is a type of authentication flow offered by
- * Microsoft Entra ID that
+ * Microsoft Entra ID that
* allows users to sign in to applications on devices that don't have a web browser or a keyboard.
* This authentication method is particularly useful for devices such as smart TVs, gaming consoles, and
* Internet of Things (IoT) devices that may not have the capability to enter a username and password.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/IntelliJCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/IntelliJCredential.java
index da6fa2e039679..73785dbf6c26e 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/IntelliJCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/IntelliJCredential.java
@@ -28,7 +28,7 @@
* for IntelliJ plugin for the IntelliJ IDEA development environment. It
* enables developers to create, test, and deploy Java applications to the Azure cloud platform. In order to
* use the plugin authentication as a user or service principal against
- * Microsoft Entra ID is required.
+ * Microsoft Entra ID is required.
* The IntelliJCredential authenticates in a development environment and acquires a token on behalf of the
* logged-in account in Azure Toolkit for IntelliJ. It uses the logged in user information on the IntelliJ IDE and uses
* it to authenticate the application against Microsoft Entra ID.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/IntelliJCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/IntelliJCredentialBuilder.java
index 1bb985361ddfc..f19677c4432e2 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/IntelliJCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/IntelliJCredentialBuilder.java
@@ -20,7 +20,7 @@
* for IntelliJ plugin for the IntelliJ IDEA development environment. It enables developers to create, test, and
* deploy Java applications to the Azure cloud platform. In order to use the plugin authentication as a user or
* service principal against
- * Microsoft Entra ID is required.
+ * Microsoft Entra ID is required.
* The {@link IntelliJCredential} authenticates in a development environment and acquires a token on behalf of the
* logged-in account in Azure Toolkit for IntelliJ. It uses the logged in user information on the IntelliJ IDE and uses
* it to authenticate the application against Microsoft Entra ID.
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java
index 7d759b93e0e21..ed1212233330a 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredential.java
@@ -21,7 +21,7 @@
/**
*
Interactive browser authentication is a type of authentication flow offered by
- * Microsoft Entra ID
+ * Microsoft Entra ID
* that enables users to sign in to applications and services using a web browser. This authentication method is
* commonly used for web applications, where users enter their credentials directly into a web page.
* With interactive browser authentication, the user navigates to a web application and is prompted to enter their
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java
index 33cd7966217bf..1b13ff9c7cdd6 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/InteractiveBrowserCredentialBuilder.java
@@ -16,7 +16,7 @@
* Fluent credential builder for instantiating a {@link InteractiveBrowserCredential}.
*
*
Interactive browser authentication is a type of authentication flow offered by
- * Microsoft Entra ID
+ * Microsoft Entra ID
* that enables users to sign in to applications and services using a web browser. This authentication method is
* commonly used for web applications, where users enter their credentials directly into a web page.
* With interactive browser authentication, the user navigates to a web application and is prompted to enter their
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java
index 3b9b27d1b9f72..22201b8c8778a 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredential.java
@@ -19,9 +19,9 @@
import java.time.Duration;
/**
- *
Azure
* Managed Identity is a feature in
- * Microsoft Entra ID
+ * Microsoft Entra ID
* that provides a way for applications running on Azure to authenticate themselves with Azure resources without
* needing to manage or store any secrets like passwords or keys.
* The ManagedIdentityCredential authenticates the configured managed identity (system or user assigned) of an
@@ -62,7 +62,7 @@
*
Sample: Construct a User Assigned ManagedIdentityCredential
*
*
User-Assigned Managed Identity (UAMI) in Azure is a feature that allows you to create an identity in
- * Microsoft Entra ID
+ * Microsoft Entra ID
* that is associated with one or more Azure resources. This identity can then be
* used to authenticate and authorize access to various Azure services and resources. The following code sample
* demonstrates the creation of a ManagedIdentityCredential to target a user assigned managed identity, using the
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java
index 6d6b57ed66fea..1fa8f853c6215 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/ManagedIdentityCredentialBuilder.java
@@ -8,9 +8,9 @@
/**
*
Fluent credential builder for instantiating a {@link ManagedIdentityCredential}.
Azure
* Managed Identity is a feature in
- * Microsoft Entra ID
+ * Microsoft Entra ID
* that provides a way for applications running on Azure to authenticate themselves with Azure resources without
* needing to manage or store any secrets like passwords or keys.
* The {@link ManagedIdentityCredential} authenticates the configured managed identity (system or user assigned) of an
@@ -36,7 +36,7 @@
*
Sample: Construct a User Assigned ManagedIdentityCredential
*
*
User-Assigned Managed Identity (UAMI) in Azure is a feature that allows you to create an identity in
- * Microsoft Entra ID
+ * Microsoft Entra ID
* that is associated with one or more Azure resources. This identity can then be used to authenticate and
* authorize access to various Azure services and resources. The following code sample demonstrates the creation of a
* {@link ManagedIdentityCredential} to target a user assigned managed identity, using the
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java
index cfad0d11b1194..24d8645c6e4e0 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredential.java
@@ -22,7 +22,7 @@
/**
*
Username password authentication is a common type of authentication flow used by many applications and services,
- * including Microsoft Entra ID.
+ * including Microsoft Entra ID.
* With username password authentication, users enter their username and password credentials to sign
* in to an application or service.
* The UsernamePasswordCredential authenticates a public client application and acquires a token using the
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java
index efddd8327f65d..a273855fd8005 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/UsernamePasswordCredentialBuilder.java
@@ -14,7 +14,7 @@
* Fluent credential builder for instantiating a {@link UsernamePasswordCredential}.
*
*
Username password authentication is a common type of authentication flow used by many applications and services,
- * including Microsoft Entra ID.
+ * including Microsoft Entra ID.
* With username password authentication, users enter their username and password credentials to sign
* in to an application or service.
* The {@link UsernamePasswordCredential} authenticates a public client application and acquires a token using the
diff --git a/sdk/identity/azure-identity/src/main/java/com/azure/identity/package-info.java b/sdk/identity/azure-identity/src/main/java/com/azure/identity/package-info.java
index 985ea4dd706cf..f3ab5e6949b3a 100644
--- a/sdk/identity/azure-identity/src/main/java/com/azure/identity/package-info.java
+++ b/sdk/identity/azure-identity/src/main/java/com/azure/identity/package-info.java
@@ -3,7 +3,7 @@
/**
*
The Azure Identity library provides
- * Microsoft Entra ID token
+ * Microsoft Entra ID token
* authentication support across the
* Azure SDK. The library focuses on
* OAuth authentication with Microsoft Entra ID, and it offers various credential classes capable of acquiring a Microsoft Entra token
@@ -120,9 +120,9 @@
*
*
Authenticating on Azure Hosted Platforms via Managed Identity
Azure
* Managed Identity is a feature in
- * Microsoft Entra ID
+ * Microsoft Entra ID
* that provides a way for applications running on Azure to authenticate themselves with Azure resources without
* needing to manage or store any secrets like passwords or keys.
*
@@ -192,12 +192,12 @@
*
Authenticate with Service Principals
*
*
Service Principal authentication is a type of authentication in Azure that enables a non-interactive login to
- * Microsoft Entra ID, allowing an
+ * Microsoft Entra ID, allowing an
* application or service to authenticate itself with Azure resources.
* A Service Principal is essentially an identity created for an application in Microsoft Entra ID that can be used to
* authenticate with Azure resources. It's like a "user identity" for the application or service, and it provides
* a way for the application to authenticate itself with Azure resources without needing to use a user's credentials.
- * Microsoft Entra ID allows users to
+ * Microsoft Entra ID allows users to
* register service principals which can be used as an identity for authentication.
* A client secret and/or a client certificate associated with the registered service principal is used as the password
* when authenticating the service principal.
@@ -269,7 +269,7 @@
*
*
User credential authentication is a type of authentication in Azure that involves a user providing their
* username and password to authenticate with Azure resources. In Azure, user credential authentication can be used to
- * authenticate with Microsoft Entra ID.
The Azure Identity library supports user credentials based authentication via
* {@link com.azure.identity.InteractiveBrowserCredential}, {@link com.azure.identity.DeviceCodeCredential} and
diff --git a/sdk/keyvault/azure-security-keyvault-administration/pom.xml b/sdk/keyvault/azure-security-keyvault-administration/pom.xml
index 7cc8340b504c8..4b9aec1e70dcf 100644
--- a/sdk/keyvault/azure-security-keyvault-administration/pom.xml
+++ b/sdk/keyvault/azure-security-keyvault-administration/pom.xml
@@ -103,6 +103,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-security-keyvault-keys
@@ -122,4 +128,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml
index c9a9907557599..62d134f066421 100644
--- a/sdk/keyvault/azure-security-keyvault-certificates/pom.xml
+++ b/sdk/keyvault/azure-security-keyvault-certificates/pom.xml
@@ -98,6 +98,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -138,4 +144,21 @@
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/keyvault/azure-security-keyvault-keys/pom.xml b/sdk/keyvault/azure-security-keyvault-keys/pom.xml
index 0c0458d0b0ecb..8bab779e35e93 100644
--- a/sdk/keyvault/azure-security-keyvault-keys/pom.xml
+++ b/sdk/keyvault/azure-security-keyvault-keys/pom.xml
@@ -102,6 +102,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -123,4 +129,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml
index af2e1baee6438..72de3404b5599 100644
--- a/sdk/keyvault/azure-security-keyvault-secrets/pom.xml
+++ b/sdk/keyvault/azure-security-keyvault-secrets/pom.xml
@@ -68,6 +68,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.junit.jupiterjunit-jupiter-api
@@ -114,4 +120,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/maps/azure-maps-elevation/pom.xml b/sdk/maps/azure-maps-elevation/pom.xml
index 9848b47c7e36d..12fec3ccdb963 100644
--- a/sdk/maps/azure-maps-elevation/pom.xml
+++ b/sdk/maps/azure-maps-elevation/pom.xml
@@ -64,6 +64,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -101,4 +107,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/maps/azure-maps-geolocation/pom.xml b/sdk/maps/azure-maps-geolocation/pom.xml
index 23b09858ac127..d98ffa1b79812 100644
--- a/sdk/maps/azure-maps-geolocation/pom.xml
+++ b/sdk/maps/azure-maps-geolocation/pom.xml
@@ -68,6 +68,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -105,4 +111,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/maps/azure-maps-render/pom.xml b/sdk/maps/azure-maps-render/pom.xml
index 3d4e7164a1bd7..8a9072d8c1713 100644
--- a/sdk/maps/azure-maps-render/pom.xml
+++ b/sdk/maps/azure-maps-render/pom.xml
@@ -77,6 +77,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -114,4 +120,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/maps/azure-maps-route/pom.xml b/sdk/maps/azure-maps-route/pom.xml
index 219a1f1330409..d6686feee86f5 100644
--- a/sdk/maps/azure-maps-route/pom.xml
+++ b/sdk/maps/azure-maps-route/pom.xml
@@ -77,6 +77,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -120,4 +126,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/maps/azure-maps-search/pom.xml b/sdk/maps/azure-maps-search/pom.xml
index 9bd1b2edd105d..5262610de9994 100644
--- a/sdk/maps/azure-maps-search/pom.xml
+++ b/sdk/maps/azure-maps-search/pom.xml
@@ -78,6 +78,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -115,4 +121,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/maps/azure-maps-timezone/pom.xml b/sdk/maps/azure-maps-timezone/pom.xml
index 4c4b5e2eaaecf..15eed78a98d58 100644
--- a/sdk/maps/azure-maps-timezone/pom.xml
+++ b/sdk/maps/azure-maps-timezone/pom.xml
@@ -74,6 +74,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -111,4 +117,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/maps/azure-maps-traffic/pom.xml b/sdk/maps/azure-maps-traffic/pom.xml
index 177c33248fd59..e4fb67655a947 100644
--- a/sdk/maps/azure-maps-traffic/pom.xml
+++ b/sdk/maps/azure-maps-traffic/pom.xml
@@ -65,6 +65,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -102,4 +108,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/maps/azure-maps-weather/pom.xml b/sdk/maps/azure-maps-weather/pom.xml
index d46fec7ee3bcc..49a6e6a25008f 100644
--- a/sdk/maps/azure-maps-weather/pom.xml
+++ b/sdk/maps/azure-maps-weather/pom.xml
@@ -75,6 +75,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -112,4 +118,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/pom.xml b/sdk/metricsadvisor/azure-ai-metricsadvisor/pom.xml
index a67f389a77c6e..bb33b112ea9ad 100644
--- a/sdk/metricsadvisor/azure-ai-metricsadvisor/pom.xml
+++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/pom.xml
@@ -71,6 +71,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.junit.jupiterjunit-jupiter-api
@@ -96,4 +102,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/mixedreality/azure-mixedreality-authentication/pom.xml b/sdk/mixedreality/azure-mixedreality-authentication/pom.xml
index 2f45b30461680..36748a677ab52 100644
--- a/sdk/mixedreality/azure-mixedreality-authentication/pom.xml
+++ b/sdk/mixedreality/azure-mixedreality-authentication/pom.xml
@@ -55,6 +55,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.junit.jupiterjunit-jupiter-api
@@ -102,4 +108,21 @@
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml b/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml
index 885eefb52fd97..24213dcc7c860 100644
--- a/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml
+++ b/sdk/modelsrepository/azure-iot-modelsrepository/pom.xml
@@ -73,6 +73,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.junit.jupiterjunit-jupiter-api
@@ -131,4 +137,21 @@
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/monitor/azure-monitor-ingestion/CHANGELOG.md b/sdk/monitor/azure-monitor-ingestion/CHANGELOG.md
index 53d412567e5e5..30a74593c1f25 100644
--- a/sdk/monitor/azure-monitor-ingestion/CHANGELOG.md
+++ b/sdk/monitor/azure-monitor-ingestion/CHANGELOG.md
@@ -4,6 +4,9 @@
### Features Added
+- Introduced `LogsIngestionAudience` to allow specification of the audience of logs ingestion clients.
+- Support for the scopes of non-public clouds.
+
### Breaking Changes
### Bugs Fixed
diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/LogsIngestionClientBuilder.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/LogsIngestionClientBuilder.java
index 9d27d086e59c7..071e0eb274d3c 100644
--- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/LogsIngestionClientBuilder.java
+++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/LogsIngestionClientBuilder.java
@@ -20,6 +20,7 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.monitor.ingestion.implementation.IngestionUsingDataCollectionRulesClientBuilder;
import com.azure.monitor.ingestion.implementation.IngestionUsingDataCollectionRulesServiceVersion;
+import com.azure.monitor.ingestion.models.LogsIngestionAudience;
import java.net.MalformedURLException;
import java.net.URL;
@@ -171,6 +172,19 @@ public LogsIngestionClientBuilder credential(TokenCredential tokenCredential) {
return this;
}
+
+ /**
+ * Sets the audience for the authorization scope of log ingestion clients. If this value is not set, the default
+ * audience will be the azure public cloud.
+ *
+ * @param audience the audience value.
+ * @return the updated {@link LogsIngestionClientBuilder}.
+ */
+ public LogsIngestionClientBuilder audience(LogsIngestionAudience audience) {
+ innerLogBuilder.audience(audience);
+ return this;
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesAsyncClient.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesAsyncClient.java
index 736c735ca2e4e..6410374635f80 100644
--- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesAsyncClient.java
+++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesAsyncClient.java
@@ -17,14 +17,17 @@
import com.azure.core.util.BinaryData;
import reactor.core.publisher.Mono;
-/** Initializes a new instance of the asynchronous IngestionUsingDataCollectionRulesClient type. */
+/**
+ * Initializes a new instance of the asynchronous IngestionUsingDataCollectionRulesClient type.
+ */
@ServiceClient(builder = IngestionUsingDataCollectionRulesClientBuilder.class, isAsync = true)
public final class IngestionUsingDataCollectionRulesAsyncClient {
- @Generated private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
+ @Generated
+ private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
/**
* Initializes an instance of IngestionUsingDataCollectionRulesAsyncClient class.
- *
+ *
* @param serviceClient the service client implementation.
*/
@Generated
@@ -34,28 +37,23 @@ public final class IngestionUsingDataCollectionRulesAsyncClient {
/**
* Ingestion API used to directly ingest data using Data Collection Rules
- *
- *
See error response code and error response message for more detail.
- *
- *
Header Parameters
- *
+ *
+ * See error response code and error response message for more detail.
+ *
Header Parameters
*
*
Header Parameters
*
Name
Type
Required
Description
*
Content-Encoding
String
No
gzip
*
x-ms-client-request-id
String
No
Client request Id
*
- *
* You can add these to a request with {@link RequestOptions#addHeader}
- *
- *
Request Body Schema
- *
+ *
Request Body Schema
*
{@code
* [
* Object (Required)
* ]
* }
- *
+ *
* @param ruleId The immutable Id of the Data Collection Rule resource.
* @param stream The streamDeclaration name as defined in the Data Collection Rule.
* @param body An array of objects matching the schema defined by the provided stream.
@@ -68,8 +66,8 @@ public final class IngestionUsingDataCollectionRulesAsyncClient {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> uploadWithResponse(
- String ruleId, String stream, BinaryData body, RequestOptions requestOptions) {
+ public Mono> uploadWithResponse(String ruleId, String stream, BinaryData body,
+ RequestOptions requestOptions) {
return this.serviceClient.uploadWithResponseAsync(ruleId, stream, body, requestOptions);
}
}
diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClient.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClient.java
index 4fe8cb55eb44b..9af4b9ba8ed33 100644
--- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClient.java
+++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClient.java
@@ -16,45 +16,43 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
-/** Initializes a new instance of the synchronous IngestionUsingDataCollectionRulesClient type. */
+/**
+ * Initializes a new instance of the synchronous IngestionUsingDataCollectionRulesClient type.
+ */
@ServiceClient(builder = IngestionUsingDataCollectionRulesClientBuilder.class)
public final class IngestionUsingDataCollectionRulesClient {
- @Generated private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
+ @Generated
+ private final IngestionUsingDataCollectionRulesClientImpl serviceClient;
/**
* Initializes an instance of IngestionUsingDataCollectionRulesClient class.
- *
- * @param client the async client.
+ *
+ * @param serviceClient the service client implementation.
*/
@Generated
- IngestionUsingDataCollectionRulesClient(IngestionUsingDataCollectionRulesClientImpl client) {
- this.serviceClient = client;
+ IngestionUsingDataCollectionRulesClient(IngestionUsingDataCollectionRulesClientImpl serviceClient) {
+ this.serviceClient = serviceClient;
}
/**
* Ingestion API used to directly ingest data using Data Collection Rules
- *
- *
See error response code and error response message for more detail.
- *
- *
Header Parameters
- *
+ *
+ * See error response code and error response message for more detail.
+ *
Header Parameters
*
*
Header Parameters
*
Name
Type
Required
Description
*
Content-Encoding
String
No
gzip
*
x-ms-client-request-id
String
No
Client request Id
*
- *
* You can add these to a request with {@link RequestOptions#addHeader}
- *
- *
Request Body Schema
- *
+ *
Request Body Schema
*
{@code
* [
* Object (Required)
* ]
* }
- *
+ *
* @param ruleId The immutable Id of the Data Collection Rule resource.
* @param stream The streamDeclaration name as defined in the Data Collection Rule.
* @param body An array of objects matching the schema defined by the provided stream.
@@ -67,8 +65,8 @@ public final class IngestionUsingDataCollectionRulesClient {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response uploadWithResponse(
- String ruleId, String stream, BinaryData body, RequestOptions requestOptions) {
+ public Response uploadWithResponse(String ruleId, String stream, BinaryData body,
+ RequestOptions requestOptions) {
return this.serviceClient.uploadWithResponse(ruleId, stream, body, requestOptions);
}
}
diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientBuilder.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientBuilder.java
index fba9adabadcf0..e42664a704975 100644
--- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientBuilder.java
+++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientBuilder.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-
package com.azure.monitor.ingestion.implementation;
+import com.azure.monitor.ingestion.models.LogsIngestionAudience;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.client.traits.ConfigurationTrait;
@@ -12,6 +12,7 @@
import com.azure.core.client.traits.TokenCredentialTrait;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
@@ -20,9 +21,8 @@
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.AddHeadersPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
-import com.azure.core.http.policy.CookiePolicy;
-import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
@@ -33,36 +33,44 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.builder.ClientBuilderUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.serializer.JacksonAdapter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
-import java.util.stream.Collectors;
-/** A builder for creating a new instance of the IngestionUsingDataCollectionRulesClient type. */
+/**
+ * A builder for creating a new instance of the IngestionUsingDataCollectionRulesClient type.
+ */
@ServiceClientBuilder(
- serviceClients = {
- IngestionUsingDataCollectionRulesClient.class,
- IngestionUsingDataCollectionRulesAsyncClient.class
- })
+ serviceClients = {
+ IngestionUsingDataCollectionRulesClient.class,
+ IngestionUsingDataCollectionRulesAsyncClient.class })
public final class IngestionUsingDataCollectionRulesClientBuilder
- implements HttpTrait,
- ConfigurationTrait,
- TokenCredentialTrait,
- EndpointTrait {
- @Generated private static final String SDK_NAME = "name";
+ implements HttpTrait,
+ ConfigurationTrait,
+ TokenCredentialTrait,
+ EndpointTrait {
- @Generated private static final String SDK_VERSION = "version";
+ @Generated
+ private static final String SDK_NAME = "name";
- @Generated private static final String[] DEFAULT_SCOPES = new String[] {"https://monitor.azure.com//.default"};
+ @Generated
+ private static final String SDK_VERSION = "version";
+
+ @Generated
+ private static final String[] DEFAULT_SCOPES = new String[] { "https://monitor.azure.com//.default" };
@Generated
private static final Map PROPERTIES = CoreUtils.getProperties("azure-monitor-ingestion.properties");
- @Generated private final List pipelinePolicies;
+ @Generated
+ private final List pipelinePolicies;
- /** Create an instance of the IngestionUsingDataCollectionRulesClientBuilder. */
+ /**
+ * Create an instance of the IngestionUsingDataCollectionRulesClientBuilder.
+ */
@Generated
public IngestionUsingDataCollectionRulesClientBuilder() {
this.pipelinePolicies = new ArrayList<>();
@@ -71,12 +79,18 @@ public IngestionUsingDataCollectionRulesClientBuilder() {
/*
* The HTTP pipeline to send requests through.
*/
- @Generated private HttpPipeline pipeline;
+ @Generated
+ private HttpPipeline pipeline;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public IngestionUsingDataCollectionRulesClientBuilder pipeline(HttpPipeline pipeline) {
+ if (this.pipeline != null && pipeline == null) {
+ LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured.");
+ }
this.pipeline = pipeline;
return this;
}
@@ -84,9 +98,12 @@ public IngestionUsingDataCollectionRulesClientBuilder pipeline(HttpPipeline pipe
/*
* The HTTP client used to send the request.
*/
- @Generated private HttpClient httpClient;
+ @Generated
+ private HttpClient httpClient;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public IngestionUsingDataCollectionRulesClientBuilder httpClient(HttpClient httpClient) {
@@ -97,9 +114,12 @@ public IngestionUsingDataCollectionRulesClientBuilder httpClient(HttpClient http
/*
* The logging configuration for HTTP requests and responses.
*/
- @Generated private HttpLogOptions httpLogOptions;
+ @Generated
+ private HttpLogOptions httpLogOptions;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public IngestionUsingDataCollectionRulesClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
@@ -110,9 +130,12 @@ public IngestionUsingDataCollectionRulesClientBuilder httpLogOptions(HttpLogOpti
/*
* The client options such as application ID and custom headers to set on a request.
*/
- @Generated private ClientOptions clientOptions;
+ @Generated
+ private ClientOptions clientOptions;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public IngestionUsingDataCollectionRulesClientBuilder clientOptions(ClientOptions clientOptions) {
@@ -123,9 +146,12 @@ public IngestionUsingDataCollectionRulesClientBuilder clientOptions(ClientOption
/*
* The retry options to configure retry policy for failed requests.
*/
- @Generated private RetryOptions retryOptions;
+ @Generated
+ private RetryOptions retryOptions;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public IngestionUsingDataCollectionRulesClientBuilder retryOptions(RetryOptions retryOptions) {
@@ -133,7 +159,9 @@ public IngestionUsingDataCollectionRulesClientBuilder retryOptions(RetryOptions
return this;
}
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public IngestionUsingDataCollectionRulesClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
@@ -145,9 +173,12 @@ public IngestionUsingDataCollectionRulesClientBuilder addPolicy(HttpPipelinePoli
/*
* The configuration store that is used during construction of the service client.
*/
- @Generated private Configuration configuration;
+ @Generated
+ private Configuration configuration;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public IngestionUsingDataCollectionRulesClientBuilder configuration(Configuration configuration) {
@@ -158,9 +189,12 @@ public IngestionUsingDataCollectionRulesClientBuilder configuration(Configuratio
/*
* The TokenCredential used for authentication.
*/
- @Generated private TokenCredential tokenCredential;
+ @Generated
+ private TokenCredential tokenCredential;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public IngestionUsingDataCollectionRulesClientBuilder credential(TokenCredential tokenCredential) {
@@ -171,9 +205,12 @@ public IngestionUsingDataCollectionRulesClientBuilder credential(TokenCredential
/*
* The service endpoint
*/
- @Generated private String endpoint;
+ @Generated
+ private String endpoint;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public IngestionUsingDataCollectionRulesClientBuilder endpoint(String endpoint) {
@@ -184,7 +221,8 @@ public IngestionUsingDataCollectionRulesClientBuilder endpoint(String endpoint)
/*
* Service version
*/
- @Generated private IngestionUsingDataCollectionRulesServiceVersion serviceVersion;
+ @Generated
+ private IngestionUsingDataCollectionRulesServiceVersion serviceVersion;
/**
* Sets Service version.
@@ -193,8 +231,8 @@ public IngestionUsingDataCollectionRulesClientBuilder endpoint(String endpoint)
* @return the IngestionUsingDataCollectionRulesClientBuilder.
*/
@Generated
- public IngestionUsingDataCollectionRulesClientBuilder serviceVersion(
- IngestionUsingDataCollectionRulesServiceVersion serviceVersion) {
+ public IngestionUsingDataCollectionRulesClientBuilder
+ serviceVersion(IngestionUsingDataCollectionRulesServiceVersion serviceVersion) {
this.serviceVersion = serviceVersion;
return this;
}
@@ -202,7 +240,8 @@ public IngestionUsingDataCollectionRulesClientBuilder serviceVersion(
/*
* The retry policy that will attempt to retry failed requests, if applicable.
*/
- @Generated private RetryPolicy retryPolicy;
+ @Generated
+ private RetryPolicy retryPolicy;
/**
* Sets The retry policy that will attempt to retry failed requests, if applicable.
@@ -224,18 +263,17 @@ public IngestionUsingDataCollectionRulesClientBuilder retryPolicy(RetryPolicy re
@Generated
private IngestionUsingDataCollectionRulesClientImpl buildInnerClient() {
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
- IngestionUsingDataCollectionRulesServiceVersion localServiceVersion =
- (serviceVersion != null) ? serviceVersion : IngestionUsingDataCollectionRulesServiceVersion.getLatest();
- IngestionUsingDataCollectionRulesClientImpl client =
- new IngestionUsingDataCollectionRulesClientImpl(
- localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, localServiceVersion);
+ IngestionUsingDataCollectionRulesServiceVersion localServiceVersion
+ = (serviceVersion != null) ? serviceVersion : IngestionUsingDataCollectionRulesServiceVersion.getLatest();
+ IngestionUsingDataCollectionRulesClientImpl client = new IngestionUsingDataCollectionRulesClientImpl(
+ localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion);
return client;
}
@Generated
private HttpPipeline createHttpPipeline() {
- Configuration buildConfiguration =
- (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;
+ Configuration buildConfiguration
+ = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;
HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions;
ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions;
List policies = new ArrayList<>();
@@ -246,33 +284,30 @@ private HttpPipeline createHttpPipeline() {
policies.add(new RequestIdPolicy());
policies.add(new AddHeadersFromContextPolicy());
HttpHeaders headers = new HttpHeaders();
- localClientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue()));
+ localClientOptions.getHeaders()
+ .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue()));
if (headers.getSize() > 0) {
policies.add(new AddHeadersPolicy(headers));
}
- policies.addAll(
- this.pipelinePolicies.stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
- .collect(Collectors.toList()));
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .forEach(p -> policies.add(p));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));
policies.add(new AddDatePolicy());
- policies.add(new CookiePolicy());
if (tokenCredential != null) {
- policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES));
+ policies.add(new BearerTokenAuthenticationPolicy(tokenCredential,
+ audience == null ? DEFAULT_SCOPES : new String[] { audience.toString() }));
}
- policies.addAll(
- this.pipelinePolicies.stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
- .collect(Collectors.toList()));
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .forEach(p -> policies.add(p));
HttpPolicyProviders.addAfterRetryPolicies(policies);
- policies.add(new HttpLoggingPolicy(httpLogOptions));
- HttpPipeline httpPipeline =
- new HttpPipelineBuilder()
- .policies(policies.toArray(new HttpPipelinePolicy[0]))
- .httpClient(httpClient)
- .clientOptions(localClientOptions)
- .build();
+ policies.add(new HttpLoggingPolicy(localHttpLogOptions));
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .httpClient(httpClient)
+ .clientOptions(localClientOptions)
+ .build();
return httpPipeline;
}
@@ -293,7 +328,26 @@ public IngestionUsingDataCollectionRulesAsyncClient buildAsyncClient() {
*/
@Generated
public IngestionUsingDataCollectionRulesClient buildClient() {
- return new IngestionUsingDataCollectionRulesClient(
- buildInnerClient());
+ return new IngestionUsingDataCollectionRulesClient(buildInnerClient());
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(IngestionUsingDataCollectionRulesClientBuilder.class);
+
+ /**
+ * The audience indicating the authorization scope of log ingestion clients.
+ */
+ @Generated()
+ private LogsIngestionAudience audience;
+
+ /**
+ * Sets The audience.
+ *
+ * @param audience the audience indicating the authorization scope of log ingestion clients.
+ * @return the IngestionUsingDataCollectionRulesClientBuilder.
+ */
+ @Generated()
+ public IngestionUsingDataCollectionRulesClientBuilder audience(LogsIngestionAudience audience) {
+ this.audience = audience;
+ return this;
}
}
diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientImpl.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientImpl.java
index f563f013c9cd8..0ae66b24f53ae 100644
--- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientImpl.java
+++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesClientImpl.java
@@ -22,7 +22,6 @@
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.http.rest.RequestOptions;
@@ -36,57 +35,65 @@
import com.azure.core.util.serializer.SerializerAdapter;
import reactor.core.publisher.Mono;
-/** Initializes a new instance of the IngestionUsingDataCollectionRulesClient type. */
+/**
+ * Initializes a new instance of the IngestionUsingDataCollectionRulesClient type.
+ */
public final class IngestionUsingDataCollectionRulesClientImpl {
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final IngestionUsingDataCollectionRulesClientService service;
/**
- * The Data Collection Endpoint for the Data Collection Rule, for example
- * https://dce-name.eastus-2.ingest.monitor.azure.com.
+ * The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.
*/
private final String endpoint;
/**
- * Gets The Data Collection Endpoint for the Data Collection Rule, for example
- * https://dce-name.eastus-2.ingest.monitor.azure.com.
- *
+ * Gets The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.
+ *
* @return the endpoint value.
*/
public String getEndpoint() {
return this.endpoint;
}
- /** Service version. */
+ /**
+ * Service version.
+ */
private final IngestionUsingDataCollectionRulesServiceVersion serviceVersion;
/**
* Gets Service version.
- *
+ *
* @return the serviceVersion value.
*/
public IngestionUsingDataCollectionRulesServiceVersion getServiceVersion() {
return this.serviceVersion;
}
- /** The HTTP pipeline to send requests through. */
+ /**
+ * The HTTP pipeline to send requests through.
+ */
private final HttpPipeline httpPipeline;
/**
* Gets The HTTP pipeline to send requests through.
- *
+ *
* @return the httpPipeline value.
*/
public HttpPipeline getHttpPipeline() {
return this.httpPipeline;
}
- /** The serializer to serialize an object into a string. */
+ /**
+ * The serializer to serialize an object into a string.
+ */
private final SerializerAdapter serializerAdapter;
/**
* Gets The serializer to serialize an object into a string.
- *
+ *
* @return the serializerAdapter value.
*/
public SerializerAdapter getSerializerAdapter() {
@@ -95,138 +102,94 @@ public SerializerAdapter getSerializerAdapter() {
/**
* Initializes an instance of IngestionUsingDataCollectionRulesClient client.
- *
- * @param endpoint The Data Collection Endpoint for the Data Collection Rule, for example
- * https://dce-name.eastus-2.ingest.monitor.azure.com.
+ *
+ * @param endpoint The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.
* @param serviceVersion Service version.
*/
- public IngestionUsingDataCollectionRulesClientImpl(
- String endpoint, IngestionUsingDataCollectionRulesServiceVersion serviceVersion) {
- this(
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build(),
- JacksonAdapter.createDefaultSerializerAdapter(),
- endpoint,
- serviceVersion);
+ IngestionUsingDataCollectionRulesClientImpl(String endpoint,
+ IngestionUsingDataCollectionRulesServiceVersion serviceVersion) {
+ this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(),
+ JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion);
}
/**
* Initializes an instance of IngestionUsingDataCollectionRulesClient client.
- *
+ *
* @param httpPipeline The HTTP pipeline to send requests through.
- * @param endpoint The Data Collection Endpoint for the Data Collection Rule, for example
- * https://dce-name.eastus-2.ingest.monitor.azure.com.
+ * @param endpoint The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.
* @param serviceVersion Service version.
*/
- public IngestionUsingDataCollectionRulesClientImpl(
- HttpPipeline httpPipeline,
- String endpoint,
+ IngestionUsingDataCollectionRulesClientImpl(HttpPipeline httpPipeline, String endpoint,
IngestionUsingDataCollectionRulesServiceVersion serviceVersion) {
this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion);
}
/**
* Initializes an instance of IngestionUsingDataCollectionRulesClient client.
- *
+ *
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
- * @param endpoint The Data Collection Endpoint for the Data Collection Rule, for example
- * https://dce-name.eastus-2.ingest.monitor.azure.com.
+ * @param endpoint The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.
* @param serviceVersion Service version.
*/
- public IngestionUsingDataCollectionRulesClientImpl(
- HttpPipeline httpPipeline,
- SerializerAdapter serializerAdapter,
- String endpoint,
- IngestionUsingDataCollectionRulesServiceVersion serviceVersion) {
+ IngestionUsingDataCollectionRulesClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ String endpoint, IngestionUsingDataCollectionRulesServiceVersion serviceVersion) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.endpoint = endpoint;
this.serviceVersion = serviceVersion;
- this.service =
- RestProxy.create(
- IngestionUsingDataCollectionRulesClientService.class,
- this.httpPipeline,
- this.getSerializerAdapter());
+ this.service = RestProxy.create(IngestionUsingDataCollectionRulesClientService.class, this.httpPipeline,
+ this.getSerializerAdapter());
}
/**
- * The interface defining all the services for IngestionUsingDataCollectionRulesClient to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for IngestionUsingDataCollectionRulesClient to be used by the proxy service to perform REST calls.
*/
@Host("{endpoint}")
@ServiceInterface(name = "IngestionUsingDataCo")
public interface IngestionUsingDataCollectionRulesClientService {
@Post("/dataCollectionRules/{ruleId}/streams/{stream}")
- @ExpectedResponses({204})
- @UnexpectedResponseExceptionType(
- value = ClientAuthenticationException.class,
- code = {401})
- @UnexpectedResponseExceptionType(
- value = ResourceNotFoundException.class,
- code = {404})
- @UnexpectedResponseExceptionType(
- value = ResourceModifiedException.class,
- code = {409})
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> upload(
- @HostParam("endpoint") String endpoint,
- @PathParam("ruleId") String ruleId,
- @PathParam("stream") String stream,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") BinaryData body,
- @HeaderParam("Accept") String accept,
- RequestOptions requestOptions,
- Context context);
+ Mono> upload(@HostParam("endpoint") String endpoint, @PathParam("ruleId") String ruleId,
+ @PathParam("stream") String stream, @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") BinaryData body, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions, Context context);
@Post("/dataCollectionRules/{ruleId}/streams/{stream}")
- @ExpectedResponses({204})
- @UnexpectedResponseExceptionType(
- value = ClientAuthenticationException.class,
- code = {401})
- @UnexpectedResponseExceptionType(
- value = ResourceNotFoundException.class,
- code = {404})
- @UnexpectedResponseExceptionType(
- value = ResourceModifiedException.class,
- code = {409})
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Response uploadSync(
- @HostParam("endpoint") String endpoint,
- @PathParam("ruleId") String ruleId,
- @PathParam("stream") String stream,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") BinaryData body,
- @HeaderParam("Accept") String accept,
- RequestOptions requestOptions,
- Context context);
+ Response uploadSync(@HostParam("endpoint") String endpoint, @PathParam("ruleId") String ruleId,
+ @PathParam("stream") String stream, @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") BinaryData body, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions, Context context);
}
/**
* Ingestion API used to directly ingest data using Data Collection Rules
- *
- *
See error response code and error response message for more detail.
- *
- *
Header Parameters
- *
+ *
+ * See error response code and error response message for more detail.
+ *
Header Parameters
*
*
Header Parameters
*
Name
Type
Required
Description
*
Content-Encoding
String
No
gzip
*
x-ms-client-request-id
String
No
Client request Id
*
- *
* You can add these to a request with {@link RequestOptions#addHeader}
- *
- *
Request Body Schema
- *
+ *
Request Body Schema
*
{@code
* [
* Object (Required)
* ]
* }
- *
+ *
* @param ruleId The immutable Id of the Data Collection Rule resource.
* @param stream The streamDeclaration name as defined in the Data Collection Rule.
* @param body An array of objects matching the schema defined by the provided stream.
@@ -238,58 +201,44 @@ Response uploadSync(
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> uploadWithResponseAsync(
- String ruleId, String stream, BinaryData body, RequestOptions requestOptions) {
+ public Mono> uploadWithResponseAsync(String ruleId, String stream, BinaryData body,
+ RequestOptions requestOptions) {
if (ruleId == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Parameter ruleId is required and cannot be null."));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("Parameter ruleId is required and cannot be null."));
}
if (stream == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Parameter stream is required and cannot be null."));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("Parameter stream is required and cannot be null."));
}
if (body == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Parameter body is required and cannot be null."));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("Parameter body is required and cannot be null."));
}
final String accept = "application/json";
- return FluxUtil.withContext(
- context ->
- service.upload(
- this.getEndpoint(),
- ruleId,
- stream,
- this.getServiceVersion().getVersion(),
- body,
- accept,
- requestOptions,
- context));
+ return FluxUtil.withContext(context -> service.upload(this.getEndpoint(), ruleId, stream,
+ this.getServiceVersion().getVersion(), body, accept, requestOptions, context));
}
/**
* Ingestion API used to directly ingest data using Data Collection Rules
- *
- *
See error response code and error response message for more detail.
- *
- *
Header Parameters
- *
+ *
+ * See error response code and error response message for more detail.
+ *
Header Parameters
*
*
Header Parameters
*
Name
Type
Required
Description
*
Content-Encoding
String
No
gzip
*
x-ms-client-request-id
String
No
Client request Id
*
- *
* You can add these to a request with {@link RequestOptions#addHeader}
- *
- *
Request Body Schema
- *
+ *
Request Body Schema
*
{@code
* [
* Object (Required)
* ]
* }
- *
+ *
* @param ruleId The immutable Id of the Data Collection Rule resource.
* @param stream The streamDeclaration name as defined in the Data Collection Rule.
* @param body An array of objects matching the schema defined by the provided stream.
@@ -301,30 +250,23 @@ public Mono> uploadWithResponseAsync(
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response uploadWithResponse(
- String ruleId, String stream, BinaryData body, RequestOptions requestOptions) {
+ public Response uploadWithResponse(String ruleId, String stream, BinaryData body,
+ RequestOptions requestOptions) {
if (ruleId == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Parameter ruleId is required and cannot be null."));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("Parameter ruleId is required and cannot be null."));
}
if (stream == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Parameter stream is required and cannot be null."));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("Parameter stream is required and cannot be null."));
}
if (body == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Parameter body is required and cannot be null."));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("Parameter body is required and cannot be null."));
}
final String accept = "application/json";
- return service.uploadSync(
- this.getEndpoint(),
- ruleId,
- stream,
- this.getServiceVersion().getVersion(),
- body,
- accept,
- requestOptions,
- requestOptions.getContext());
+ return service.uploadSync(this.getEndpoint(), ruleId, stream, this.getServiceVersion().getVersion(), body,
+ accept, requestOptions, Context.NONE);
}
private static final ClientLogger LOGGER = new ClientLogger(IngestionUsingDataCollectionRulesClientImpl.class);
diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesServiceVersion.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesServiceVersion.java
index 706e1f3a03402..1a6e5ef84d752 100644
--- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesServiceVersion.java
+++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/IngestionUsingDataCollectionRulesServiceVersion.java
@@ -6,9 +6,13 @@
import com.azure.core.util.ServiceVersion;
-/** Service version of IngestionUsingDataCollectionRulesClient. */
+/**
+ * Service version of IngestionUsingDataCollectionRulesClient.
+ */
public enum IngestionUsingDataCollectionRulesServiceVersion implements ServiceVersion {
- /** Enum value 2023-01-01. */
+ /**
+ * Enum value 2023-01-01.
+ */
V2023_01_01("2023-01-01");
private final String version;
@@ -17,7 +21,9 @@ public enum IngestionUsingDataCollectionRulesServiceVersion implements ServiceVe
this.version = version;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public String getVersion() {
return this.version;
@@ -25,7 +31,7 @@ public String getVersion() {
/**
* Gets the latest service version supported by this client library.
- *
+ *
* @return The latest {@link IngestionUsingDataCollectionRulesServiceVersion}.
*/
public static IngestionUsingDataCollectionRulesServiceVersion getLatest() {
diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/package-info.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/package-info.java
index f4ceffac4b6b5..e7584cdc91ee6 100644
--- a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/package-info.java
+++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/implementation/package-info.java
@@ -2,5 +2,8 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-/** Package containing the classes for IngestionUsingDataCollectionRules. null. */
+/**
+ * Package containing the classes for IngestionUsingDataCollectionRules.
+ * null.
+ */
package com.azure.monitor.ingestion.implementation;
diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/models/LogsIngestionAudience.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/models/LogsIngestionAudience.java
new file mode 100644
index 0000000000000..4b3ed2c370b97
--- /dev/null
+++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/com/azure/monitor/ingestion/models/LogsIngestionAudience.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.monitor.ingestion.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+
+import java.util.Collection;
+
+/**
+ * The audience indicating the authorization scope of log ingestion clients.
+ */
+public class LogsIngestionAudience extends ExpandableStringEnum {
+
+ /**
+ * Static value for Azure Public Cloud.
+ */
+ public static final LogsIngestionAudience AZURE_PUBLIC_CLOUD = fromString("https://monitor.azure.com//.default");
+
+ /**
+ * Static value for Azure US Government.
+ */
+ private static final LogsIngestionAudience AZURE_GOVERNMENT = fromString("https://monitor.azure.us//.default");
+
+ /**
+ * Static value for Azure China.
+ */
+ private static final LogsIngestionAudience AZURE_CHINA = fromString("https://monitor.azure.cn//.default");
+
+ /**
+ * @deprecated Creates an instance of LogsIngestionAudience.
+ */
+ @Deprecated
+ LogsIngestionAudience() {
+ }
+
+ /**
+ * Creates an instance of LogsIngestionAudience.
+ *
+ * @param name the string value.
+ * @return the LogsIngestionAudience.
+ */
+ public static LogsIngestionAudience fromString(String name) {
+ return fromString(name, LogsIngestionAudience.class);
+ }
+
+ /**
+ * Get the collection of LogsIngestionAudience values.
+ *
+ * @return the collection of LogsIngestionAudience values.
+ */
+ public static Collection values() {
+ return values(LogsIngestionAudience.class);
+ }
+
+}
diff --git a/sdk/monitor/azure-monitor-ingestion/src/main/java/module-info.java b/sdk/monitor/azure-monitor-ingestion/src/main/java/module-info.java
index d392257ae5dd0..2b4903531d628 100644
--- a/sdk/monitor/azure-monitor-ingestion/src/main/java/module-info.java
+++ b/sdk/monitor/azure-monitor-ingestion/src/main/java/module-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
module com.azure.monitor.ingestion {
requires transitive com.azure.core;
-
exports com.azure.monitor.ingestion;
exports com.azure.monitor.ingestion.models;
diff --git a/sdk/monitor/azure-monitor-ingestion/swagger/README.md b/sdk/monitor/azure-monitor-ingestion/swagger/README.md
index 4610d90a08391..b42ec32ab9824 100644
--- a/sdk/monitor/azure-monitor-ingestion/swagger/README.md
+++ b/sdk/monitor/azure-monitor-ingestion/swagger/README.md
@@ -2,13 +2,19 @@
## Code generation settings
+### Manual Modifications
+
+The following edits need to be made manually after code generation:
+- Rollback the edits to `module-info` file
+
```yaml
java: true
-use: '@autorest/java@4.1.9'
+use: '@autorest/java@4.26.2'
output-folder: ../
license-header: MICROSOFT_MIT_SMALL
input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/data-plane/ingestion/stable/2023-01-01/DataCollectionRules.json
namespace: com.azure.monitor.ingestion.implementation
+implementation-subpackage: ""
generate-client-interfaces: false
sync-methods: all
add-context-parameter: true
@@ -21,4 +27,5 @@ client-side-validations: true
artifact-id: azure-monitor-ingestion
data-plane: true
enable-sync-stack: true
+customization-class: src/main/java/MonitorIngestionCustomizations.java
```
diff --git a/sdk/monitor/azure-monitor-ingestion/swagger/pom.xml b/sdk/monitor/azure-monitor-ingestion/swagger/pom.xml
new file mode 100644
index 0000000000000..8876e3dcaf2d0
--- /dev/null
+++ b/sdk/monitor/azure-monitor-ingestion/swagger/pom.xml
@@ -0,0 +1,30 @@
+
+
+ 4.0.0
+
+ Microsoft Azure Monitor Ingestion client for Java
+ This package contains client functionality for Microsoft Monitor Ingestion
+
+ com.azure.tools
+ azure-monitor-ingestion-autorest-customization
+ 1.0.0-beta.1
+ jar
+
+
+ com.azure
+ azure-code-customization-parent
+ 1.0.0-beta.1
+ ../../../parents/azure-code-customization-parent
+
+
+
+
+ com.azure.tools
+ azure-autorest-customization
+ 1.0.0-beta.8
+
+
+
+
diff --git a/sdk/monitor/azure-monitor-ingestion/swagger/src/main/java/MonitorIngestionCustomizations.java b/sdk/monitor/azure-monitor-ingestion/swagger/src/main/java/MonitorIngestionCustomizations.java
new file mode 100644
index 0000000000000..fec434fbc6470
--- /dev/null
+++ b/sdk/monitor/azure-monitor-ingestion/swagger/src/main/java/MonitorIngestionCustomizations.java
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+import com.azure.autorest.customization.ClassCustomization;
+import com.azure.autorest.customization.Customization;
+import com.azure.autorest.customization.LibraryCustomization;
+import com.azure.autorest.customization.PackageCustomization;
+import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
+import com.github.javaparser.ast.body.TypeDeclaration;
+import com.github.javaparser.ast.stmt.BlockStmt;
+import org.slf4j.Logger;
+
+import java.util.function.Consumer;
+
+/**
+ * Customization class for Monitor. These customizations will be applied on top of the generated code.
+ */
+public class MonitorIngestionCustomizations extends Customization {
+
+ /**
+ * Customizes the generated code.
+ *
+ *
+ *
+ * The following customizations are applied:
+ *
+ *
+ *
The package customization for the package `com.azure.monitor.ingestion.implementation`.
+ *
+ *
+ * @param libraryCustomization The library customization.
+ * @param logger The logger.
+ */
+ @Override
+ public void customize(LibraryCustomization libraryCustomization, Logger logger) {
+ monitorIngestionImplementation(libraryCustomization.getPackage("com.azure.monitor.ingestion.implementation"), logger);
+ }
+
+ /**
+ * Customizes the generated code for the package com.azure.monitor.ingestion.implementation.
+ *
+ *
+ *
+ * The following classes are customized:
+ *
+ *
IngestionUsingDataCollectionRulesClientBuilder
+ *
+ *
+ * @param packageCustomization The package customization.
+ * @param logger The logger.
+ */
+ private void monitorIngestionImplementation(PackageCustomization packageCustomization, Logger logger) {
+ IngestionUsingDataCollectionRulesClientBuilderCustomization(packageCustomization.getClass("IngestionUsingDataCollectionRulesClientBuilder"), logger);
+ }
+
+ /**
+ * Customizes the generated code for `IngestionUsingDataCollectionRulesClientBuilder`.
+ *
+ *
+ *
+ * The following customizations are applied:
+ *
+ *
+ *
Adds an import statement for the class `LogsIngestionAudience`.
+ *
Adds a field `audience` of type `LogsIngestionAudience` to the class.
+ *
Adds a Javadoc for the field `audience`.
+ *
Adds the generated annotation to the field `audience`.
+ *
Adds a setter for the field `audience`.
+ *
Adds a Javadoc for the setter.
+ *
Adds the generated annotation to the setter.
+ *
Replaces the body of the method `createHttpPipeline()` with a custom implementation that sets the
+ * audience in the `BearerTokenAuthenticationPolicy`.
+ *
+ *
+ * @param classCustomization The class customization.
+ * @param logger The logger.
+ */
+ private void IngestionUsingDataCollectionRulesClientBuilderCustomization(ClassCustomization classCustomization, Logger logger) {
+ classCustomization.addImports("com.azure.monitor.ingestion.models.LogsIngestionAudience");
+
+
+
+ customizeAst(classCustomization, clazz -> {
+ clazz.addPrivateField("LogsIngestionAudience", "audience")
+ .addAnnotation("Generated")
+ .setJavadocComment("The audience indicating the authorization scope of log ingestion clients.")
+ .createSetter()
+ .setName("audience")
+ .setType("IngestionUsingDataCollectionRulesClientBuilder")
+ .setBody(new BlockStmt()
+ .addStatement("this.audience = audience;")
+ .addStatement("return this;"))
+ .addAnnotation("Generated")
+ .setJavadocComment("Sets The audience.\n" +
+ " *\n" +
+ " * @param audience the audience indicating the authorization scope of log ingestion clients.\n" +
+ " * @return the IngestionUsingDataCollectionRulesClientBuilder.");
+ });
+
+
+ classCustomization.getMethod("createHttpPipeline").replaceBody("Configuration buildConfiguration\n" +
+ " = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;\n" +
+ " HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions;\n" +
+ " ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions;\n" +
+ " List policies = new ArrayList<>();\n" +
+ " String clientName = PROPERTIES.getOrDefault(SDK_NAME, \"UnknownName\");\n" +
+ " String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, \"UnknownVersion\");\n" +
+ " String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions);\n" +
+ " policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));\n" +
+ " policies.add(new RequestIdPolicy());\n" +
+ " policies.add(new AddHeadersFromContextPolicy());\n" +
+ " HttpHeaders headers = new HttpHeaders();\n" +
+ " localClientOptions.getHeaders()\n" +
+ " .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue()));\n" +
+ " if (headers.getSize() > 0) {\n" +
+ " policies.add(new AddHeadersPolicy(headers));\n" +
+ " }\n" +
+ " this.pipelinePolicies.stream()\n" +
+ " .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)\n" +
+ " .forEach(p -> policies.add(p));\n" +
+ " HttpPolicyProviders.addBeforeRetryPolicies(policies);\n" +
+ " policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));\n" +
+ " policies.add(new AddDatePolicy());\n" +
+ " if (tokenCredential != null) {\n" +
+ " policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, audience == null ? DEFAULT_SCOPES : new String[] { audience.toString() }));\n" +
+ " }\n" +
+ " this.pipelinePolicies.stream()\n" +
+ " .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)\n" +
+ " .forEach(p -> policies.add(p));\n" +
+ " HttpPolicyProviders.addAfterRetryPolicies(policies);\n" +
+ " policies.add(new HttpLoggingPolicy(localHttpLogOptions));\n" +
+ " HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))\n" +
+ " .httpClient(httpClient)\n" +
+ " .clientOptions(localClientOptions)\n" +
+ " .build();\n" +
+ " return httpPipeline;");
+
+ }
+
+
+ /**
+ * Customizes the abstract syntax tree of a class.
+ * @param classCustomization The class customization.
+ * @param consumer The consumer.
+ */
+ private static void customizeAst(ClassCustomization classCustomization, Consumer consumer) {
+ classCustomization.customizeAst(ast -> consumer.accept(ast.getClassByName(classCustomization.getClassName())
+ .orElseThrow(() -> new RuntimeException("Class not found. " + classCustomization.getClassName()))));
+ }
+}
diff --git a/sdk/monitor/azure-monitor-query-perf/pom.xml b/sdk/monitor/azure-monitor-query-perf/pom.xml
index 796f03fd124c7..e40ac8ae211c8 100644
--- a/sdk/monitor/azure-monitor-query-perf/pom.xml
+++ b/sdk/monitor/azure-monitor-query-perf/pom.xml
@@ -31,7 +31,7 @@
com.azureazure-monitor-query
- 1.3.0-beta.3
+ 1.4.0-beta.1com.azure
diff --git a/sdk/monitor/azure-monitor-query/CHANGELOG.md b/sdk/monitor/azure-monitor-query/CHANGELOG.md
index 4502c7202cbfe..8232947998b2f 100644
--- a/sdk/monitor/azure-monitor-query/CHANGELOG.md
+++ b/sdk/monitor/azure-monitor-query/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 1.3.0-beta.3 (Unreleased)
+## 1.4.0-beta.1 (Unreleased)
### Features Added
@@ -8,11 +8,18 @@
### Bugs Fixed
-- Fixed the issue with `MetricsQueryClient` and `MetricsQueryAsyncClient` where the `listMetricDefinitions` method was returning
-`MetricsDefinition` objects with null values for `supportedAggregationTypes`.[(#36698)](https://github.com/Azure/azure-sdk-for-java/issues/36698)
-
### Other Changes
+## 1.3.0 (2024-03-26)
+
+### Features Added
+
+- Added `MetricsClient` and `MetricsAsyncClient` to support querying metrics for multiple resources in a single request.
+
+### Bugs Fixed
+
+- Fixed the issue with `MetricsQueryClient` and `MetricsQueryAsyncClient` where the `listMetricDefinitions` method was returning
+`MetricsDefinition` objects with null values for `supportedAggregationTypes`.[(#36698)](https://github.com/Azure/azure-sdk-for-java/issues/36698)
## 1.2.10 (2024-03-20)
@@ -23,7 +30,6 @@
- Upgraded `azure-core` from `1.46.0` to version `1.47.0`.
- Upgraded `azure-core-http-netty` from `1.14.0` to version `1.14.1`.
-
## 1.2.9 (2024-02-20)
### Other Changes
diff --git a/sdk/monitor/azure-monitor-query/README.md b/sdk/monitor/azure-monitor-query/README.md
index e506e2f9c2cc0..c186fc3caeee2 100644
--- a/sdk/monitor/azure-monitor-query/README.md
+++ b/sdk/monitor/azure-monitor-query/README.md
@@ -66,7 +66,7 @@ add the direct dependency to your project as follows.
com.azureazure-monitor-query
- 1.3.0-beta.2
+ 1.3.0
```
diff --git a/sdk/monitor/azure-monitor-query/pom.xml b/sdk/monitor/azure-monitor-query/pom.xml
index f053812ffff10..3a1ff8146fc49 100644
--- a/sdk/monitor/azure-monitor-query/pom.xml
+++ b/sdk/monitor/azure-monitor-query/pom.xml
@@ -11,7 +11,7 @@
com.azureazure-monitor-query
- 1.3.0-beta.3
+ 1.4.0-beta.1Microsoft Azure SDK for Azure Monitor Logs and Metrics QueryThis package contains the Microsoft Azure SDK for querying Azure Monitor's Logs and Metrics data sources.
diff --git a/sdk/openai/azure-ai-openai-assistants/pom.xml b/sdk/openai/azure-ai-openai-assistants/pom.xml
index 323f817c260f8..4153c4ef59974 100644
--- a/sdk/openai/azure-ai-openai-assistants/pom.xml
+++ b/sdk/openai/azure-ai-openai-assistants/pom.xml
@@ -92,6 +92,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+
@@ -127,4 +133,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/openai/azure-ai-openai/pom.xml b/sdk/openai/azure-ai-openai/pom.xml
index 64b678f710147..24e47a0eced92 100644
--- a/sdk/openai/azure-ai-openai/pom.xml
+++ b/sdk/openai/azure-ai-openai/pom.xml
@@ -95,14 +95,18 @@
1.7.36test
-
com.azureazure-core-http-okhttp1.11.19test
-
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.knuddelsjtokkit
@@ -130,4 +134,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/personalizer/azure-ai-personalizer/pom.xml b/sdk/personalizer/azure-ai-personalizer/pom.xml
index 3c85f55a30986..5b2b0aec0c453 100644
--- a/sdk/personalizer/azure-ai-personalizer/pom.xml
+++ b/sdk/personalizer/azure-ai-personalizer/pom.xml
@@ -70,6 +70,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.junit.jupiterjunit-jupiter-api
@@ -95,4 +101,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/assets.json b/sdk/remoterendering/azure-mixedreality-remoterendering/assets.json
index 248f3dbe9f3e8..97bec81035630 100644
--- a/sdk/remoterendering/azure-mixedreality-remoterendering/assets.json
+++ b/sdk/remoterendering/azure-mixedreality-remoterendering/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/remoterendering/azure-mixedreality-remoterendering",
- "Tag": "java/remoterendering/azure-mixedreality-remoterendering_24a8dbb81a"
+ "Tag": "java/remoterendering/azure-mixedreality-remoterendering_2fbd5a57df"
}
diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/pom.xml b/sdk/remoterendering/azure-mixedreality-remoterendering/pom.xml
index 730dcb99022fd..bac6e2e6bbf08 100644
--- a/sdk/remoterendering/azure-mixedreality-remoterendering/pom.xml
+++ b/sdk/remoterendering/azure-mixedreality-remoterendering/pom.xml
@@ -52,6 +52,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.junit.jupiterjunit-jupiter-api
@@ -89,4 +95,20 @@
test
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingAsyncClientTest.java b/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingAsyncClientTest.java
index 65a6fc7ac6d18..dec2e83187211 100644
--- a/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingAsyncClientTest.java
+++ b/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingAsyncClientTest.java
@@ -146,9 +146,10 @@ public void failedConversionMissingAssetTest(HttpClient httpClient) {
assertEquals(AssetConversionStatus.FAILED, conversion.getStatus());
assertNotNull(conversion.getError());
- // Invalid input provided. Check logs in output container for details.
- assertTrue(conversion.getError().getMessage().toLowerCase(Locale.ROOT).contains("invalid input"));
- assertTrue(conversion.getError().getMessage().toLowerCase(Locale.ROOT).contains("logs"));
+ assertEquals(conversion.getError().getCode(), "InputContainerError");
+ // Message: "Could not find the asset file in the storage account. Please make sure all paths and names are correct and the file is uploaded to storage."
+ assertNotNull(conversion.getError().getMessage());
+ assertTrue(conversion.getError().getMessage().toLowerCase(Locale.ROOT).contains("could not find the asset file in the storage account"));
})
.verifyComplete();
}
diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingClientTest.java b/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingClientTest.java
index 3676fe54f862a..b37bab4df0118 100644
--- a/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingClientTest.java
+++ b/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingClientTest.java
@@ -126,9 +126,10 @@ public void failedConversionMissingAssetTest(HttpClient httpClient) {
assertEquals(AssetConversionStatus.FAILED, conversion.getStatus());
assertNotNull(conversion.getError());
- // Invalid input provided. Check logs in output container for details.
- assertTrue(conversion.getError().getMessage().toLowerCase(Locale.ROOT).contains("invalid input"));
- assertTrue(conversion.getError().getMessage().toLowerCase(Locale.ROOT).contains("logs"));
+ assertEquals(conversion.getError().getCode(), "InputContainerError");
+ // Message: "Could not find the asset file in the storage account. Please make sure all paths and names are correct and the file is uploaded to storage."
+ assertNotNull(conversion.getError().getMessage());
+ assertTrue(conversion.getError().getMessage().toLowerCase(Locale.ROOT).contains("could not find the asset file in the storage account"));
}
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingTestBase.java b/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingTestBase.java
index 2765aaaa29546..208a9329d6407 100644
--- a/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingTestBase.java
+++ b/sdk/remoterendering/azure-mixedreality-remoterendering/src/test/java/com/azure/mixedreality/remoterendering/RemoteRenderingTestBase.java
@@ -41,7 +41,7 @@ public class RemoteRenderingTestBase extends TestProxyTestBase {
private final String serviceEndpoint = Configuration.getGlobalConfiguration().get("REMOTERENDERING_ARR_SERVICE_ENDPOINT");
// NOT REAL ACCOUNT DETAILS
- private final String playbackAccountId = "f5b3e69f-1e1b-46a5-a718-aea58a7a0f8e";
+ private final String playbackAccountId = "40831821-9a8b-4f81-b85f-018809a1f727";
private final String playbackAccountDomain = "mixedreality.azure.com";
private final String playbackAccountKey = "Sanitized";
private final String playbackStorageAccountName = "sdkTest";
diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md
index e4998ea24fbaf..bb6e4fab7148a 100644
--- a/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md
+++ b/sdk/resourcemanager/azure-resourcemanager-appservice/CHANGELOG.md
@@ -4,6 +4,8 @@
### Features Added
+- Supported disabling public network access in `WebApp` via `disablePublicNetworkAccess()`, for private link feature.
+
### Breaking Changes
### Bugs Fixed
diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/assets.json b/sdk/resourcemanager/azure-resourcemanager-appservice/assets.json
index 6c164a5492b81..24e51a5b338b5 100644
--- a/sdk/resourcemanager/azure-resourcemanager-appservice/assets.json
+++ b/sdk/resourcemanager/azure-resourcemanager-appservice/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-appservice",
- "Tag": "java/resourcemanager/azure-resourcemanager-appservice_c5279701f3"
+ "Tag": "java/resourcemanager/azure-resourcemanager-appservice_6d9bee9aaa"
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/WebAppBaseImpl.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/WebAppBaseImpl.java
index babd6545ca00d..129ae6436e414 100644
--- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/WebAppBaseImpl.java
+++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/WebAppBaseImpl.java
@@ -43,6 +43,7 @@
import com.azure.resourcemanager.appservice.models.OperatingSystem;
import com.azure.resourcemanager.appservice.models.PhpVersion;
import com.azure.resourcemanager.appservice.models.PlatformArchitecture;
+import com.azure.resourcemanager.appservice.models.PublicNetworkAccess;
import com.azure.resourcemanager.appservice.models.PythonVersion;
import com.azure.resourcemanager.appservice.models.RedundancyMode;
import com.azure.resourcemanager.appservice.models.RemoteVisualStudioVersion;
@@ -1835,6 +1836,31 @@ public FluentImplT withoutIpAddressRangeAccess(String ipAddressCidr) {
return (FluentImplT) this;
}
+ @Override
+ @SuppressWarnings("unchecked")
+ public FluentImplT enablePublicNetworkAccess() {
+ if (Objects.isNull(this.siteConfig)) {
+ this.siteConfig = new SiteConfigResourceInner();
+ }
+ this.siteConfig.withPublicNetworkAccess("Enabled");
+ return (FluentImplT) this;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public FluentImplT disablePublicNetworkAccess() {
+ if (Objects.isNull(this.siteConfig)) {
+ this.siteConfig = new SiteConfigResourceInner();
+ }
+ this.siteConfig.withPublicNetworkAccess("Disabled");
+ return (FluentImplT) this;
+ }
+
+ @Override
+ public PublicNetworkAccess publicNetworkAccess() {
+ return Objects.isNull(innerModel().publicNetworkAccess()) ? null : PublicNetworkAccess.fromString(innerModel().publicNetworkAccess());
+ }
+
@Override
@SuppressWarnings("unchecked")
public FluentImplT withContainerSize(int containerSize) {
diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/PublicNetworkAccess.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/PublicNetworkAccess.java
new file mode 100644
index 0000000000000..d93b630f80b89
--- /dev/null
+++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/PublicNetworkAccess.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.resourcemanager.appservice.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+
+import java.util.Collection;
+
+/**
+ * Whether requests from Public Network are allowed.
+ */
+public final class PublicNetworkAccess extends ExpandableStringEnum {
+ /**
+ * Static value Enabled for PublicNetworkAccess.
+ */
+ public static final PublicNetworkAccess ENABLED = fromString("Enabled");
+
+ /**
+ * Static value Disabled for PublicNetworkAccess.
+ */
+ public static final PublicNetworkAccess DISABLED = fromString("Disabled");
+
+ /**
+ * Creates a new instance of PublicNetworkAccess value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public PublicNetworkAccess() {
+ }
+
+ /**
+ * Creates or finds a PublicNetworkAccess from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding PublicNetworkAccess.
+ */
+ @JsonCreator
+ public static PublicNetworkAccess fromString(String name) {
+ return fromString(name, PublicNetworkAccess.class);
+ }
+
+ /**
+ * Gets known PublicNetworkAccess values.
+ *
+ * @return known PublicNetworkAccess values.
+ */
+ public static Collection values() {
+ return values(PublicNetworkAccess.class);
+ }
+}
diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/WebAppBase.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/WebAppBase.java
index 976fb50f74fb1..e3ec0b71638fa 100644
--- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/WebAppBase.java
+++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/WebAppBase.java
@@ -203,6 +203,13 @@ public interface WebAppBase extends HasName, GroupableResource streamAllLogsAsync();
+ /**
+ * Whether the web app can be accessed from public network.
+ *
+ * @return whether the web app can be accessed from public network.
+ */
+ PublicNetworkAccess publicNetworkAccess();
+
/**
* Verifies the ownership of the domain for a certificate order by verifying a hostname of the domain is bound to
* this web app.
@@ -940,6 +947,13 @@ interface WithNetworkAccess {
* @return the next stage of the definition
*/
WithCreate withAccessRule(IpSecurityRestriction ipSecurityRule);
+
+ /**
+ * Disables public network access for the web app.
+ *
+ * @return the next stage of the definition
+ */
+ WithCreate disablePublicNetworkAccess();
}
/** The stage of web app definition allowing to configure container size. */
@@ -1665,6 +1679,19 @@ interface WithNetworkAccess {
* @return the next stage of the update
*/
Update withoutIpAddressRangeAccess(String ipAddressCidr);
+
+ /**
+ * Enables public network access for the web app, for private link feature.
+ *
+ * @return the next stage of the update
+ */
+ Update enablePublicNetworkAccess();
+ /**
+ * Disables public network access for the web app, for private link feature.
+ *
+ * @return the next stage of the update
+ */
+ Update disablePublicNetworkAccess();
}
/** The stage of web app update allowing to configure container size. */
diff --git a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java
index 2f5c914515944..77b2abbaff1fc 100644
--- a/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java
+++ b/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/WebAppsTests.java
@@ -15,6 +15,7 @@
import com.azure.resourcemanager.appservice.models.LogLevel;
import com.azure.resourcemanager.appservice.models.NetFrameworkVersion;
import com.azure.resourcemanager.appservice.models.OperatingSystem;
+import com.azure.resourcemanager.appservice.models.PublicNetworkAccess;
import com.azure.resourcemanager.appservice.models.PricingTier;
import com.azure.resourcemanager.appservice.models.RemoteVisualStudioVersion;
import com.azure.resourcemanager.appservice.models.WebApp;
@@ -284,4 +285,45 @@ public void canUpdateIpRestriction() {
Assertions.assertEquals("Allow", webApp1.ipSecurityRules().iterator().next().action());
Assertions.assertEquals("Any", webApp1.ipSecurityRules().iterator().next().ipAddress());
}
+
+ @Test
+ public void canCreateWebAppWithDisablePublicNetworkAccess() {
+ resourceManager.resourceGroups().define(rgName1).withRegion(Region.US_WEST).create();
+ resourceManager.resourceGroups().define(rgName2).withRegion(Region.US_WEST).create();
+ WebApp webApp =
+ appServiceManager
+ .webApps()
+ .define(webappName1)
+ .withRegion(Region.US_WEST)
+ .withExistingResourceGroup(rgName1)
+ .withNewWindowsPlan(appServicePlanName1, PricingTier.BASIC_B1)
+ .disablePublicNetworkAccess()
+ .withRemoteDebuggingEnabled(RemoteVisualStudioVersion.VS2019)
+ .create();
+ webApp.refresh();
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, webApp.publicNetworkAccess());
+ }
+
+ @Test
+ public void canUpdatePublicNetworkAccess() {
+ resourceManager.resourceGroups().define(rgName1).withRegion(Region.US_WEST).create();
+ resourceManager.resourceGroups().define(rgName2).withRegion(Region.US_WEST).create();
+ WebApp webApp =
+ appServiceManager
+ .webApps()
+ .define(webappName1)
+ .withRegion(Region.US_WEST)
+ .withExistingResourceGroup(rgName1)
+ .withNewWindowsPlan(appServicePlanName1, PricingTier.BASIC_B1)
+ .withRemoteDebuggingEnabled(RemoteVisualStudioVersion.VS2019)
+ .create();
+
+ webApp.update().disablePublicNetworkAccess().apply();
+ webApp.refresh();
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, webApp.publicNetworkAccess());
+
+ webApp.update().enablePublicNetworkAccess().apply();
+ webApp.refresh();
+ Assertions.assertEquals(PublicNetworkAccess.ENABLED, webApp.publicNetworkAccess());
+ }
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md
index c0c3ae05a6493..c15bb1757023b 100644
--- a/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md
+++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/CHANGELOG.md
@@ -4,6 +4,8 @@
### Features Added
+- Supported disabling public network access in `KubernetesCluster` via `disablePublicNetworkAccess()`, for private link feature.
+
### Breaking Changes
### Bugs Fixed
diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/assets.json b/sdk/resourcemanager/azure-resourcemanager-containerservice/assets.json
index 885ec95ce7313..7ec4d96adc784 100644
--- a/sdk/resourcemanager/azure-resourcemanager-containerservice/assets.json
+++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-containerservice",
- "Tag": "java/resourcemanager/azure-resourcemanager-containerservice_93dbce086c"
+ "Tag": "java/resourcemanager/azure-resourcemanager-containerservice_bb2ea4e1ac"
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterImpl.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterImpl.java
index da99dfb18ca82..e1a65a2f47883 100644
--- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterImpl.java
+++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterImpl.java
@@ -40,6 +40,7 @@
import com.azure.resourcemanager.containerservice.models.ManagedClusterSkuName;
import com.azure.resourcemanager.containerservice.models.ManagedClusterSkuTier;
import com.azure.resourcemanager.containerservice.models.PowerState;
+import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess;
import com.azure.resourcemanager.containerservice.models.ResourceIdentityType;
import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity;
import com.azure.resourcemanager.resources.fluentcore.arm.models.PrivateEndpoint;
@@ -299,6 +300,11 @@ public String agentPoolResourceGroup() {
return innerModel().nodeResourceGroup();
}
+ @Override
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerModel().publicNetworkAccess();
+ }
+
@Override
public void start() {
this.startAsync().block();
@@ -705,6 +711,18 @@ public KubernetesClusterImpl withAgentPoolResourceGroup(String resourceGroupName
return this;
}
+ @Override
+ public KubernetesClusterImpl enablePublicNetworkAccess() {
+ this.innerModel().withPublicNetworkAccess(PublicNetworkAccess.ENABLED);
+ return this;
+ }
+
+ @Override
+ public KubernetesClusterImpl disablePublicNetworkAccess() {
+ this.innerModel().withPublicNetworkAccess(PublicNetworkAccess.DISABLED);
+ return this;
+ }
+
private static final class PrivateLinkResourceImpl implements PrivateLinkResource {
private final PrivateLinkResourceInner innerModel;
diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesCluster.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesCluster.java
index 0349723e74795..8e8c57e893c4f 100644
--- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesCluster.java
+++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesCluster.java
@@ -124,6 +124,13 @@ public interface KubernetesCluster
*/
String agentPoolResourceGroup();
+ /**
+ * Whether the kubernetes cluster can be accessed from public network.
+ *
+ * @return whether the kubernetes cluster can be accessed from public network.
+ */
+ PublicNetworkAccess publicNetworkAccess();
+
// Actions
/**
@@ -175,6 +182,7 @@ interface Definition
DefinitionStages.WithNetworkProfile,
DefinitionStages.WithAddOnProfiles,
DefinitionStages.WithManagedClusterSku,
+ DefinitionStages.WithPublicNetworkAccess,
KubernetesCluster.DefinitionStages.WithCreate {
}
@@ -596,6 +604,16 @@ interface WithAgentPoolResourceGroup {
WithCreate withAgentPoolResourceGroup(String resourceGroupName);
}
+ /** The stage of Kubernetes cluster definition allowing to configure network access settings. */
+ interface WithPublicNetworkAccess {
+ /**
+ * Disables public network access for the kubernetes cluster.
+ *
+ * @return the next stage of the definition
+ */
+ WithCreate disablePublicNetworkAccess();
+ }
+
/**
* 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.
@@ -615,6 +633,7 @@ interface WithCreate
WithDiskEncryption,
WithAgentPoolResourceGroup,
WithManagedClusterSku,
+ WithPublicNetworkAccess,
Resource.DefinitionWithTags {
}
}
@@ -630,6 +649,7 @@ interface Update
UpdateStages.WithLocalAccounts,
UpdateStages.WithVersion,
UpdateStages.WithManagedClusterSku,
+ UpdateStages.WithPublicNetworkAccess,
Resource.UpdateWithTags,
Appliable {
}
@@ -807,5 +827,22 @@ interface WithVersion {
*/
Update withVersion(String kubernetesVersion);
}
+
+
+ /** The stage of kubernetes cluster update allowing to configure network access settings. */
+ interface WithPublicNetworkAccess {
+ /**
+ * Enables public network access for the kubernetes cluster.
+ *
+ * @return the next stage of the update
+ */
+ Update enablePublicNetworkAccess();
+ /**
+ * Disables public network access for the kubernetes cluster.
+ *
+ * @return the next stage of the update
+ */
+ Update disablePublicNetworkAccess();
+ }
}
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java
index 550d4a67daf82..3f07b45e56734 100644
--- a/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java
+++ b/sdk/resourcemanager/azure-resourcemanager-containerservice/src/test/java/com/azure/resourcemanager/containerservice/KubernetesClustersTests.java
@@ -25,6 +25,7 @@
import com.azure.resourcemanager.containerservice.models.ManagedClusterSkuTier;
import com.azure.resourcemanager.containerservice.models.OSDiskType;
import com.azure.resourcemanager.containerservice.models.OrchestratorVersionProfile;
+import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess;
import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy;
import com.azure.resourcemanager.containerservice.models.ScaleSetPriority;
import com.azure.resourcemanager.resources.fluentcore.model.Accepted;
@@ -626,4 +627,63 @@ public void testUpdateManagedClusterSkuAndKubernetesSupportPlan() {
Assertions.assertEquals(ManagedClusterSkuTier.FREE, kubernetesCluster.sku().tier());
Assertions.assertEquals(KubernetesSupportPlan.KUBERNETES_OFFICIAL, kubernetesCluster.innerModel().supportPlan());
}
+
+ @Test
+ public void canCreateKubernetesClusterWithDisablePublicNetworkAccess() {
+ String aksName = generateRandomResourceName("aks", 15);
+ String dnsPrefix = generateRandomResourceName("dns", 10);
+ String agentPoolName = generateRandomResourceName("ap0", 10);
+
+ // create
+ KubernetesCluster kubernetesCluster =
+ containerServiceManager.kubernetesClusters().define(aksName)
+ .withRegion(Region.US_SOUTH_CENTRAL)
+ .withExistingResourceGroup(rgName)
+ .withDefaultVersion()
+ .withRootUsername("testaks")
+ .withSshKey(SSH_KEY)
+ .withSystemAssignedManagedServiceIdentity()
+ .defineAgentPool(agentPoolName)
+ .withVirtualMachineSize(ContainerServiceVMSizeTypes.STANDARD_D2_V2)
+ .withAgentPoolVirtualMachineCount(1)
+ .withAgentPoolType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS)
+ .withAgentPoolMode(AgentPoolMode.SYSTEM)
+ .attach()
+ .withDnsPrefix("mp1" + dnsPrefix)
+ .disablePublicNetworkAccess()
+ .create();
+
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, kubernetesCluster.publicNetworkAccess());
+ }
+
+ @Test
+ public void canUpdatePublicNetworkAccess() {
+ String aksName = generateRandomResourceName("aks", 15);
+ String dnsPrefix = generateRandomResourceName("dns", 10);
+ String agentPoolName = generateRandomResourceName("ap0", 10);
+
+ // create
+ KubernetesCluster kubernetesCluster =
+ containerServiceManager.kubernetesClusters().define(aksName)
+ .withRegion(Region.US_SOUTH_CENTRAL)
+ .withExistingResourceGroup(rgName)
+ .withDefaultVersion()
+ .withRootUsername("testaks")
+ .withSshKey(SSH_KEY)
+ .withSystemAssignedManagedServiceIdentity()
+ .defineAgentPool(agentPoolName)
+ .withVirtualMachineSize(ContainerServiceVMSizeTypes.STANDARD_D2_V2)
+ .withAgentPoolVirtualMachineCount(1)
+ .withAgentPoolType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS)
+ .withAgentPoolMode(AgentPoolMode.SYSTEM)
+ .attach()
+ .withDnsPrefix("mp1" + dnsPrefix)
+ .create();
+
+ kubernetesCluster.update().disablePublicNetworkAccess().apply();
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, kubernetesCluster.publicNetworkAccess());
+
+ kubernetesCluster.update().enablePublicNetworkAccess().apply();
+ Assertions.assertEquals(PublicNetworkAccess.ENABLED, kubernetesCluster.publicNetworkAccess());
+ }
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md
index 753325b59de28..9ab3766de616e 100644
--- a/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md
+++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/CHANGELOG.md
@@ -4,6 +4,8 @@
### Features Added
+- Supported disabling public network access in `CosmosDBAccount` via `disablePublicNetworkAccess()`, for private link feature.
+
### Breaking Changes
### Bugs Fixed
diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/assets.json b/sdk/resourcemanager/azure-resourcemanager-cosmos/assets.json
index 032ea75f28bc7..8537a56123aee 100644
--- a/sdk/resourcemanager/azure-resourcemanager-cosmos/assets.json
+++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-cosmos",
- "Tag": "java/resourcemanager/azure-resourcemanager-cosmos_166faee5e1"
+ "Tag": "java/resourcemanager/azure-resourcemanager-cosmos_dbcf178bc8"
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBAccountImpl.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBAccountImpl.java
index 3cbaeaade5a86..e27c33399d000 100644
--- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBAccountImpl.java
+++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/CosmosDBAccountImpl.java
@@ -24,6 +24,7 @@
import com.azure.resourcemanager.cosmos.models.IpAddressOrRange;
import com.azure.resourcemanager.cosmos.models.KeyKind;
import com.azure.resourcemanager.cosmos.models.Location;
+import com.azure.resourcemanager.cosmos.models.PublicNetworkAccess;
import com.azure.resourcemanager.cosmos.models.PrivateEndpointConnection;
import com.azure.resourcemanager.cosmos.models.PrivateLinkResource;
import com.azure.resourcemanager.cosmos.models.PrivateLinkServiceConnectionStateProperty;
@@ -80,6 +81,11 @@ public DatabaseAccountOfferType databaseAccountOfferType() {
return this.innerModel().databaseAccountOfferType();
}
+ @Override
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerModel().publicNetworkAccess();
+ }
+
@Override
public String ipRangeFilter() {
if (CoreUtils.isNullOrEmpty(ipRules())) {
@@ -507,6 +513,8 @@ private DatabaseAccountCreateUpdateParameters createUpdateParametersInner(Databa
.withVirtualNetworkRules(new ArrayList(this.virtualNetworkRulesMap.values()));
this.virtualNetworkRulesMap = null;
}
+ createUpdateParametersInner.withPublicNetworkAccess(inner.publicNetworkAccess());
+
return createUpdateParametersInner;
}
@@ -529,6 +537,7 @@ private DatabaseAccountUpdateParameters updateParametersInner(DatabaseAccountGet
virtualNetworkRulesMap = null;
}
this.addLocationsForParameters(new UpdateLocationParameters(updateParameters), this.failoverPolicies);
+ updateParameters.withPublicNetworkAccess(inner.publicNetworkAccess());
return updateParameters;
}
@@ -787,6 +796,18 @@ public Mono rejectPrivateEndpointConnectionAsync(String privateEndpointCon
.then();
}
+ @Override
+ public CosmosDBAccountImpl enablePublicNetworkAccess() {
+ this.innerModel().withPublicNetworkAccess(PublicNetworkAccess.ENABLED);
+ return this;
+ }
+
+ @Override
+ public CosmosDBAccountImpl disablePublicNetworkAccess() {
+ this.innerModel().withPublicNetworkAccess(PublicNetworkAccess.DISABLED);
+ return this;
+ }
+
interface HasLocations {
String location();
diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/CosmosDBAccount.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/CosmosDBAccount.java
index dd04ab0a08741..5687d1343d923 100644
--- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/CosmosDBAccount.java
+++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/models/CosmosDBAccount.java
@@ -36,6 +36,13 @@ public interface CosmosDBAccount
/** @return the offer type for the CosmosDB database account */
DatabaseAccountOfferType databaseAccountOfferType();
+ /**
+ * Whether the CosmosDB account can be accessed from public network.
+ *
+ * @return whether the CosmosDB account can be accessed from public network.
+ */
+ PublicNetworkAccess publicNetworkAccess();
+
/**
* @return specifies the set of IP addresses or IP address ranges in CIDR form.
* @deprecated use {@link #ipRules()}
@@ -397,6 +404,16 @@ interface WithPrivateEndpointConnection {
PrivateEndpointConnection.DefinitionStages.Blank defineNewPrivateEndpointConnection(
String name);
}
+
+ /** The stage of CosmosDB account definition allowing to configure network access settings. */
+ interface WithPublicNetworkAccess {
+ /**
+ * Disables public network access for the CosmosDB account.
+ *
+ * @return the next stage of the definition
+ */
+ WithCreate disablePublicNetworkAccess();
+ }
/**
* 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.
@@ -411,7 +428,8 @@ interface WithCreate
WithConnector,
WithKeyBasedMetadataWriteAccess,
WithPrivateEndpointConnection,
- DefinitionWithTags {
+ DefinitionWithTags,
+ WithPublicNetworkAccess {
}
}
@@ -431,7 +449,8 @@ interface WithOptionals
UpdateStages.WithConnector,
UpdateStages.WithKeyBasedMetadataWriteAccess,
UpdateStages.WithPrivateEndpointConnection,
- UpdateStages.WithIpRules {
+ UpdateStages.WithIpRules,
+ UpdateStages.WithPublicNetworkAccess {
}
/** The stage of the cosmos db definition allowing the definition of a write location. */
@@ -613,5 +632,21 @@ PrivateEndpointConnection.UpdateDefinitionStages.Blank defineNewP
*/
WithOptionals withoutPrivateEndpointConnection(String name);
}
+
+ /** The stage of CosmosDB account update allowing to configure network access settings. */
+ interface WithPublicNetworkAccess {
+ /**
+ * Enables public network access for the CosmosDB account.
+ *
+ * @return the next stage of the update
+ */
+ Update enablePublicNetworkAccess();
+ /**
+ * Disables public network access for the CosmosDB account.
+ *
+ * @return the next stage of the update
+ */
+ Update disablePublicNetworkAccess();
+ }
}
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java
index 8507bb15299a2..4de8ca0eac4d6 100644
--- a/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java
+++ b/sdk/resourcemanager/azure-resourcemanager-cosmos/src/test/java/com/azure/resourcemanager/cosmos/CosmosDBTests.java
@@ -13,6 +13,7 @@
import com.azure.resourcemanager.cosmos.models.CosmosDBAccount;
import com.azure.resourcemanager.cosmos.models.DatabaseAccountKind;
import com.azure.resourcemanager.cosmos.models.DefaultConsistencyLevel;
+import com.azure.resourcemanager.cosmos.models.PublicNetworkAccess;
import com.azure.resourcemanager.cosmos.models.PrivateEndpointConnection;
import com.azure.resourcemanager.network.models.Network;
import com.azure.resourcemanager.network.models.PrivateEndpoint;
@@ -279,4 +280,49 @@ public void canCreateCosmosDbAzureTableAccount() {
Assertions.assertEquals(cosmosDBAccount.readableReplications().size(), 2);
Assertions.assertEquals(cosmosDBAccount.defaultConsistencyLevel(), DefaultConsistencyLevel.EVENTUAL);
}
+
+ @Test
+ public void canCreateCosmosDBAccountWithDisablePublicNetworkAccess() {
+ final String cosmosDbAccountName = generateRandomResourceName("cosmosdb", 22);
+
+ CosmosDBAccount cosmosDBAccount =
+ cosmosManager
+ .databaseAccounts()
+ .define(cosmosDbAccountName)
+ .withRegion(Region.US_WEST_CENTRAL)
+ .withNewResourceGroup(rgName)
+ .withDataModelAzureTable()
+ .withEventualConsistency()
+ .withWriteReplication(Region.US_EAST)
+ .withReadReplication(Region.US_WEST)
+ .withTag("tag1", "value1")
+ .disablePublicNetworkAccess()
+ .create();
+
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, cosmosDBAccount.publicNetworkAccess());
+ }
+
+ @Test
+ public void canUpdatePublicNetworkAccess() {
+ final String cosmosDbAccountName = generateRandomResourceName("cosmosdb", 22);
+
+ CosmosDBAccount cosmosDBAccount =
+ cosmosManager
+ .databaseAccounts()
+ .define(cosmosDbAccountName)
+ .withRegion(Region.US_WEST_CENTRAL)
+ .withNewResourceGroup(rgName)
+ .withDataModelAzureTable()
+ .withEventualConsistency()
+ .withWriteReplication(Region.US_EAST)
+ .withReadReplication(Region.US_WEST)
+ .withTag("tag1", "value1")
+ .create();
+
+ cosmosDBAccount.update().disablePublicNetworkAccess().apply();
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, cosmosDBAccount.publicNetworkAccess());
+
+ cosmosDBAccount.update().enablePublicNetworkAccess().apply();
+ Assertions.assertEquals(PublicNetworkAccess.ENABLED, cosmosDBAccount.publicNetworkAccess());
+ }
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md
index 350f7c5721d1e..519b878fdc796 100644
--- a/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md
+++ b/sdk/resourcemanager/azure-resourcemanager-network/CHANGELOG.md
@@ -4,6 +4,8 @@
### Features Added
+- Supported setting `DeleteOptions` for public IP addresses associated with `NetworkInterface`.
+
### Breaking Changes
### Bugs Fixed
diff --git a/sdk/resourcemanager/azure-resourcemanager-network/assets.json b/sdk/resourcemanager/azure-resourcemanager-network/assets.json
index ccfb7e0098d77..daf9a4133b214 100644
--- a/sdk/resourcemanager/azure-resourcemanager-network/assets.json
+++ b/sdk/resourcemanager/azure-resourcemanager-network/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-network",
- "Tag": "java/resourcemanager/azure-resourcemanager-network_271269e41a"
+ "Tag": "java/resourcemanager/azure-resourcemanager-network_03b4909e5e"
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceImpl.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceImpl.java
index 3b2d2c6e2f5ea..1a8793482863c 100644
--- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceImpl.java
+++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceImpl.java
@@ -9,6 +9,7 @@
import com.azure.resourcemanager.network.NetworkManager;
import com.azure.resourcemanager.network.fluent.models.ApplicationSecurityGroupInner;
import com.azure.resourcemanager.network.models.ApplicationSecurityGroup;
+import com.azure.resourcemanager.network.models.DeleteOptions;
import com.azure.resourcemanager.network.models.IpAllocationMethod;
import com.azure.resourcemanager.network.models.LoadBalancer;
import com.azure.resourcemanager.network.models.Network;
@@ -32,6 +33,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -60,11 +62,14 @@ class NetworkInterfaceImpl
private NetworkSecurityGroup existingNetworkSecurityGroupToAssociate;
/** cached related resources. */
private NetworkSecurityGroup networkSecurityGroup;
+ /** the name of specified ip config name */
+ private Map specifiedIpConfigNames;
NetworkInterfaceImpl(String name, NetworkInterfaceInner innerModel, final NetworkManager networkManager) {
super(name, innerModel, networkManager);
this.nicName = name;
this.namer = this.manager().resourceManager().internalContext().createIdentifierProvider(this.nicName);
+ this.specifiedIpConfigNames = new HashMap();
initializeChildrenFromInner();
}
@@ -563,9 +568,25 @@ protected void beforeCreating() {
.withNetworkSecurityGroup(new NetworkSecurityGroupInner().withId(networkSecurityGroup.id()));
}
- NicIpConfigurationImpl.ensureConfigurations(this.nicIPConfigurations.values());
+ NicIpConfigurationImpl.ensureConfigurations(this.nicIPConfigurations.values(), this.specifiedIpConfigNames);
// Reset and update IP configs
this.innerModel().withIpConfigurations(innersFromWrappers(this.nicIPConfigurations.values()));
}
+
+ @Override
+ public NetworkInterfaceImpl withPrimaryPublicIPAddressDeleteOptions(DeleteOptions deleteOptions) {
+ this.ensureDeleteOptions(deleteOptions, "primary");
+ return this;
+ }
+
+ @Override
+ public NetworkInterfaceImpl update() {
+ this.specifiedIpConfigNames = new HashMap();
+ return super.update();
+ }
+
+ public void ensureDeleteOptions(DeleteOptions deleteOptions, String ipConfigName) {
+ this.specifiedIpConfigNames.put(ipConfigName, deleteOptions);
+ }
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NicIpConfigurationImpl.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NicIpConfigurationImpl.java
index aa05e3df0d123..ecca0e730cf00 100644
--- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NicIpConfigurationImpl.java
+++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NicIpConfigurationImpl.java
@@ -9,6 +9,7 @@
import com.azure.resourcemanager.network.models.ApplicationGateway;
import com.azure.resourcemanager.network.models.ApplicationGatewayBackendAddressPool;
import com.azure.resourcemanager.network.models.ApplicationSecurityGroup;
+import com.azure.resourcemanager.network.models.DeleteOptions;
import com.azure.resourcemanager.network.models.IpAllocationMethod;
import com.azure.resourcemanager.network.models.IpVersion;
import com.azure.resourcemanager.network.models.LoadBalancer;
@@ -28,6 +29,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
/** Implementation for NicIPConfiguration and its create and update interfaces. */
@@ -257,11 +259,11 @@ private List ensureInboundNatRules() {
return natRefs;
}
- protected static void ensureConfigurations(Collection nicIPConfigurations) {
+ protected static void ensureConfigurations(Collection nicIPConfigurations, Map specifiedIpConfigNames) {
for (NicIpConfiguration nicIPConfiguration : nicIPConfigurations) {
NicIpConfigurationImpl config = (NicIpConfigurationImpl) nicIPConfiguration;
config.innerModel().withSubnet(config.subnetToAssociate());
- config.innerModel().withPublicIpAddress(config.publicIPToAssociate());
+ config.innerModel().withPublicIpAddress(config.publicIPToAssociate(specifiedIpConfigNames.getOrDefault(config.name(), null)));
}
}
@@ -331,9 +333,10 @@ private SubnetInner subnetToAssociate() {
* public IP in create fluent chain. In case of update chain, if withoutPublicIP(..) is not specified then existing
* associated (if any) public IP will be returned.
*
+ * @param deleteOptions what happens to the public IP address when the VM using it is deleted
* @return public IP SubResource
*/
- private PublicIpAddressInner publicIPToAssociate() {
+ private PublicIpAddressInner publicIPToAssociate(DeleteOptions deleteOptions) {
String pipId = null;
if (this.removePrimaryPublicIPAssociation) {
return null;
@@ -344,8 +347,14 @@ private PublicIpAddressInner publicIPToAssociate() {
}
if (pipId != null) {
+ if (Objects.nonNull(deleteOptions)) {
+ return new PublicIpAddressInner().withId(pipId).withDeleteOption(deleteOptions);
+ }
return new PublicIpAddressInner().withId(pipId);
} else if (!this.isInCreateMode) {
+ if (Objects.nonNull(this.innerModel().publicIpAddress()) && Objects.nonNull(deleteOptions)) {
+ return this.innerModel().publicIpAddress().withDeleteOption(deleteOptions);
+ }
return this.innerModel().publicIpAddress();
} else {
return null;
@@ -400,4 +409,10 @@ NicIpConfigurationImpl withoutApplicationSecurityGroup(String name) {
}
return this;
}
+
+ @Override
+ public NicIpConfigurationImpl withPublicIPAddressDeleteOptions(DeleteOptions deleteOptions) {
+ this.parent().ensureDeleteOptions(deleteOptions, this.innerModel().name());
+ return this;
+ }
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NetworkInterface.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NetworkInterface.java
index 84f1a5cb888d8..e080c4b56b1b7 100644
--- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NetworkInterface.java
+++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NetworkInterface.java
@@ -256,6 +256,17 @@ interface WithAcceleratedNetworking {
WithCreate withAcceleratedNetworking();
}
+ /** The stage of the definition allowing to specify delete options for the public ip address. */
+ interface WithPublicIPAddressDeleteOptions {
+ /**
+ * Sets delete options for public ip address.
+ *
+ * @param deleteOptions the delete options for primary network interfaces
+ * @return the next stage of the update
+ */
+ WithCreate withPrimaryPublicIPAddressDeleteOptions(DeleteOptions deleteOptions);
+ }
+
/**
* The stage of the network interface 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.
@@ -268,7 +279,8 @@ interface WithCreate
WithSecondaryIPConfiguration,
WithAcceleratedNetworking,
WithLoadBalancer,
- WithApplicationSecurityGroup {
+ WithApplicationSecurityGroup,
+ WithPublicIPAddressDeleteOptions {
/**
* Enables IP forwarding in the network interface.
*
@@ -576,6 +588,18 @@ interface WithLoadBalancer {
*/
Update withoutLoadBalancerInboundNatRules();
}
+
+ /** The stage of the network interface update allowing to specify delete options for the public ip address. */
+ interface WithPublicIPAddressDeleteOptions {
+
+ /**
+ * Sets delete options for public ip address.
+ *
+ * @param deleteOptions the delete options for primary network interfaces
+ * @return the next stage of the update
+ */
+ Update withPrimaryPublicIPAddressDeleteOptions(DeleteOptions deleteOptions);
+ }
}
/** The template for an update operation, containing all the settings that can be modified. */
@@ -591,6 +615,7 @@ interface Update
UpdateStages.WithIPConfiguration,
UpdateStages.WithLoadBalancer,
UpdateStages.WithAcceleratedNetworking,
- UpdateStages.WithApplicationSecurityGroup {
+ UpdateStages.WithApplicationSecurityGroup,
+ UpdateStages.WithPublicIPAddressDeleteOptions {
}
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NicIpConfiguration.java b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NicIpConfiguration.java
index 2441c4d31d57d..fb6dcb288b463 100644
--- a/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NicIpConfiguration.java
+++ b/sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/NicIpConfiguration.java
@@ -188,6 +188,22 @@ WithAttach withExistingApplicationGatewayBackend(
ApplicationGateway appGateway, String backendName);
}
+
+ /** The stage of the definition allowing to specify delete options for the public ip address.
+ *
+ * @param the stage of the parent network interface definition to return to after attaching this
+ * definition
+ * */
+ interface WithPublicIPAddressDeleteOptions {
+ /**
+ * Sets delete options for public ip address.
+ *
+ * @param deleteOptions the delete options for primary network interfaces
+ * @return the next stage of the definition
+ */
+ WithAttach withPublicIPAddressDeleteOptions(DeleteOptions deleteOptions);
+ }
+
/**
* The final stage of network interface IP configuration.
*
@@ -201,7 +217,8 @@ interface WithAttach
extends Attachable.InDefinition,
WithPublicIPAddress,
WithLoadBalancer,
- WithApplicationGateway {
+ WithApplicationGateway,
+ WithPublicIPAddressDeleteOptions {
}
}
@@ -372,6 +389,22 @@ WithAttach withExistingApplicationGatewayBackend(
ApplicationGateway appGateway, String backendName);
}
+ /**
+ * The stage of the definition allowing to specify delete options for the public ip address.
+ *
+ * @param the stage of the parent network interface update to return to after attaching this
+ * definition
+ * */
+ interface WithPublicIPAddressDeleteOptions {
+ /**
+ * Sets delete options for public ip address.
+ *
+ * @param deleteOptions the delete options for primary network interfaces
+ * @return the next stage of the update
+ */
+ WithAttach withPublicIPAddressDeleteOptions(DeleteOptions deleteOptions);
+ }
+
/**
* The final stage of network interface IP configuration.
*
@@ -385,7 +418,8 @@ interface WithAttach
extends Attachable.InUpdate,
WithPublicIPAddress,
WithLoadBalancer,
- WithApplicationGateway {
+ WithApplicationGateway,
+ WithPublicIPAddressDeleteOptions {
}
}
@@ -396,7 +430,8 @@ interface Update
UpdateStages.WithPrivateIP,
UpdateStages.WithPublicIPAddress,
UpdateStages.WithLoadBalancer,
- UpdateStages.WithApplicationGateway {
+ UpdateStages.WithApplicationGateway,
+ UpdateStages.WithPublicIPAddressDeleteOptions {
}
/** Grouping of network interface IP configuration update stages. */
@@ -486,5 +521,16 @@ interface WithApplicationGateway {
*/
Update withoutApplicationGatewayBackends();
}
+
+ /** The stage of the network interface update allowing to specify delete options for the public ip address. */
+ interface WithPublicIPAddressDeleteOptions {
+ /**
+ * Sets delete options for public ip address.
+ *
+ * @param deleteOptions the delete options for primary network interfaces
+ * @return the next stage of the update
+ */
+ Update withPublicIPAddressDeleteOptions(DeleteOptions deleteOptions);
+ }
}
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkInterfaceOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkInterfaceOperationsTests.java
index 4f74986fe237c..41523fe1a7d4d 100644
--- a/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkInterfaceOperationsTests.java
+++ b/sdk/resourcemanager/azure-resourcemanager-network/src/test/java/com/azure/resourcemanager/network/NetworkInterfaceOperationsTests.java
@@ -6,6 +6,7 @@
import com.azure.core.management.Region;
import com.azure.resourcemanager.network.fluent.models.NatGatewayInner;
import com.azure.resourcemanager.network.models.ApplicationSecurityGroup;
+import com.azure.resourcemanager.network.models.DeleteOptions;
import com.azure.resourcemanager.network.models.NatGatewaySku;
import com.azure.resourcemanager.network.models.NatGatewaySkuName;
import com.azure.resourcemanager.network.models.Network;
@@ -509,6 +510,80 @@ public void canAssociateNatGateway() {
Assertions.assertEquals(gateway2.id(), subnet2.natGatewayId());
}
+ @Test
+ public void canCreateAndUpdateNicWithMultipleDeleteOptions() {
+ String subnetName = generateRandomResourceName("subnet-", 15);
+ resourceManager.resourceGroups().define(rgName).withRegion(Region.US_EAST).create();
+ Network vnet = networkManager.networks()
+ .define(generateRandomResourceName("vnet-", 15))
+ .withRegion(Region.US_EAST)
+ .withExistingResourceGroup(rgName)
+ .withAddressSpace("10.0.0.0/28")
+ .withSubnet(subnetName, "10.0.0.0/28")
+ .create();
+
+ NetworkInterface nic = networkManager.networkInterfaces()
+ .define(generateRandomResourceName("nic-", 15))
+ .withRegion(Region.US_EAST)
+ .withExistingResourceGroup(rgName)
+ .withExistingPrimaryNetwork(vnet)
+ .withSubnet(subnetName)
+ .withPrimaryPrivateIPAddressDynamic()
+ .withNewPrimaryPublicIPAddress()
+ .withPrimaryPublicIPAddressDeleteOptions(DeleteOptions.DELETE)
+ .defineSecondaryIPConfiguration("secondary1")
+ .withExistingNetwork(vnet)
+ .withSubnet(subnetName)
+ .withPrivateIpAddressDynamic()
+ .withNewPublicIpAddress()
+ .withPublicIPAddressDeleteOptions(DeleteOptions.DETACH)
+ .attach()
+ .defineSecondaryIPConfiguration("secondary2")
+ .withExistingNetwork(vnet)
+ .withSubnet(subnetName)
+ .withPrivateIpAddressDynamic()
+ .withNewPublicIpAddress()
+ .withPublicIPAddressDeleteOptions(DeleteOptions.DETACH)
+ .attach()
+ .create();
+
+ nic.refresh();
+ Assertions.assertEquals(DeleteOptions.DELETE, nic.primaryIPConfiguration().innerModel().publicIpAddress().deleteOption());
+ Assertions.assertEquals(DeleteOptions.DETACH, nic.ipConfigurations().get("secondary1").innerModel().publicIpAddress().deleteOption());
+ Assertions.assertEquals(DeleteOptions.DETACH, nic.ipConfigurations().get("secondary2").innerModel().publicIpAddress().deleteOption());
+
+ String existingPrimaryIpAddressId = nic.primaryIPConfiguration().publicIpAddressId();
+ nic.update().withNewPrimaryPublicIPAddress().withPrimaryPublicIPAddressDeleteOptions(DeleteOptions.DETACH).apply();
+ nic.refresh();
+ Assertions.assertFalse(existingPrimaryIpAddressId.equalsIgnoreCase(nic.primaryIPConfiguration().publicIpAddressId()));
+ Assertions.assertEquals(DeleteOptions.DETACH, nic.primaryIPConfiguration().innerModel().publicIpAddress().deleteOption());
+
+ String existingSecondary1IpAddressId = nic.ipConfigurations().get("secondary1").publicIpAddressId();
+ nic.update()
+ .withPrimaryPublicIPAddressDeleteOptions(DeleteOptions.DELETE)
+ .updateIPConfiguration("secondary1")
+ .withNewPublicIpAddress()
+ .withPublicIPAddressDeleteOptions(DeleteOptions.DELETE)
+ .parent()
+ .updateIPConfiguration("secondary2")
+ .withPublicIPAddressDeleteOptions(DeleteOptions.DELETE)
+ .parent()
+ .defineSecondaryIPConfiguration("secondary3")
+ .withExistingNetwork(vnet)
+ .withSubnet(subnetName)
+ .withPrivateIpAddressDynamic()
+ .withNewPublicIpAddress()
+ .withPublicIPAddressDeleteOptions(DeleteOptions.DELETE)
+ .attach()
+ .apply();
+ nic.refresh();
+ Assertions.assertFalse(existingSecondary1IpAddressId.equalsIgnoreCase(nic.ipConfigurations().get("secondary1").publicIpAddressId()));
+ Assertions.assertEquals(DeleteOptions.DELETE, nic.primaryIPConfiguration().innerModel().publicIpAddress().deleteOption());
+ Assertions.assertEquals(DeleteOptions.DELETE, nic.ipConfigurations().get("secondary1").innerModel().publicIpAddress().deleteOption());
+ Assertions.assertEquals(DeleteOptions.DELETE, nic.ipConfigurations().get("secondary2").innerModel().publicIpAddress().deleteOption());
+ Assertions.assertEquals(DeleteOptions.DELETE, nic.ipConfigurations().get("secondary3").innerModel().publicIpAddress().deleteOption());
+ }
+
private NatGatewayInner createNatGateway() {
String natGatewayName = generateRandomResourceName("natgw", 10);
return networkManager.serviceClient()
diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md
index 095cc473a508f..a62219792f44f 100644
--- a/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md
+++ b/sdk/resourcemanager/azure-resourcemanager-redis/CHANGELOG.md
@@ -4,6 +4,8 @@
### Features Added
+- Supported disabling public network access in `RedisCache` via `disablePublicNetworkAccess()`, for private link feature.
+
### Breaking Changes
### Bugs Fixed
diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/assets.json b/sdk/resourcemanager/azure-resourcemanager-redis/assets.json
index 916cca521e226..fb78b8e4a21aa 100644
--- a/sdk/resourcemanager/azure-resourcemanager-redis/assets.json
+++ b/sdk/resourcemanager/azure-resourcemanager-redis/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-redis",
- "Tag": "java/resourcemanager/azure-resourcemanager-redis_df48c9d2b2"
+ "Tag": "java/resourcemanager/azure-resourcemanager-redis_50169e9af1"
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisCacheImpl.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisCacheImpl.java
index bb5e24a0352a3..ef77728d300a0 100644
--- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisCacheImpl.java
+++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisCacheImpl.java
@@ -17,6 +17,7 @@
import com.azure.resourcemanager.redis.models.ExportRdbParameters;
import com.azure.resourcemanager.redis.models.ImportRdbParameters;
import com.azure.resourcemanager.redis.models.ProvisioningState;
+import com.azure.resourcemanager.redis.models.PublicNetworkAccess;
import com.azure.resourcemanager.redis.models.RebootType;
import com.azure.resourcemanager.redis.models.RedisAccessKeys;
import com.azure.resourcemanager.redis.models.RedisCache;
@@ -196,6 +197,11 @@ public RedisAccessKeys regenerateKey(RedisKeyType keyType) {
return cachedAccessKeys;
}
+ @Override
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerModel().publicNetworkAccess();
+ }
+
@Override
public void forceReboot(RebootType rebootType) {
RedisRebootParameters parameters = new RedisRebootParameters().withRebootType(rebootType);
@@ -730,6 +736,26 @@ public Mono rejectPrivateEndpointConnectionAsync(String privateEndpointCon
.then();
}
+ @Override
+ public RedisCacheImpl enablePublicNetworkAccess() {
+ if (isInCreateMode()) {
+ createParameters.withPublicNetworkAccess(PublicNetworkAccess.ENABLED);
+ } else {
+ updateParameters.withPublicNetworkAccess(PublicNetworkAccess.ENABLED);
+ }
+ return this;
+ }
+
+ @Override
+ public RedisCacheImpl disablePublicNetworkAccess() {
+ if (isInCreateMode()) {
+ createParameters.withPublicNetworkAccess(PublicNetworkAccess.DISABLED);
+ } else {
+ updateParameters.withPublicNetworkAccess(PublicNetworkAccess.DISABLED);
+ }
+ return this;
+ }
+
private static final class PrivateLinkResourceImpl implements PrivateLinkResource {
private final PrivateLinkResourceInner innerModel;
diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/models/RedisCache.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/models/RedisCache.java
index d90d3224632ef..fa34488de218a 100644
--- a/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/models/RedisCache.java
+++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/models/RedisCache.java
@@ -104,6 +104,13 @@ public interface RedisCache
*/
RedisAccessKeys regenerateKey(RedisKeyType keyType);
+ /**
+ * Whether the redis cache can be accessed from public network.
+ *
+ * @return whether the redis cache can be accessed from public network.
+ */
+ PublicNetworkAccess publicNetworkAccess();
+
/**************************************************************
* Fluent interfaces to provision a RedisCache
**************************************************************/
@@ -289,6 +296,13 @@ interface WithCreate extends Creatable, DefinitionWithTags,
UpdateStages.WithSku,
UpdateStages.WithNonSslPort,
- UpdateStages.WithRedisConfiguration {
+ UpdateStages.WithRedisConfiguration,
+ UpdateStages.WithPublicNetworkAccess {
/**
* The number of shards to be created on a Premium Cluster Cache.
*
diff --git a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java
index a782314764166..2d30aff4a33c9 100644
--- a/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java
+++ b/sdk/resourcemanager/azure-resourcemanager-redis/src/test/java/com/azure/resourcemanager/redis/RedisCacheOperationsTests.java
@@ -7,6 +7,7 @@
import com.azure.core.management.Region;
import com.azure.core.management.exception.ManagementException;
import com.azure.resourcemanager.redis.models.DayOfWeek;
+import com.azure.resourcemanager.redis.models.PublicNetworkAccess;
import com.azure.resourcemanager.redis.models.RebootType;
import com.azure.resourcemanager.redis.models.RedisAccessKeys;
import com.azure.resourcemanager.redis.models.RedisCache;
@@ -369,6 +370,42 @@ public void canCreateRedisWithRdbAof() {
assertSameVersion(RedisCache.RedisVersion.V6, redisCache.redisVersion());
}
+ @Test
+ public void canCreateRedisCacheWithDisablePublicNetworkAccess() {
+ resourceManager.resourceGroups().define(rgNameSecond).withRegion(Region.US_CENTRAL);
+
+ RedisCache redisCache =
+ redisManager
+ .redisCaches()
+ .define(rrName)
+ .withRegion(Region.ASIA_EAST)
+ .withNewResourceGroup(rgName)
+ .withBasicSku()
+ .disablePublicNetworkAccess()
+ .create();
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, redisCache.publicNetworkAccess());
+ }
+
+ @Test
+ public void canUpdatePublicNetworkAccess() {
+ resourceManager.resourceGroups().define(rgNameSecond).withRegion(Region.US_CENTRAL);
+
+ RedisCache redisCache =
+ redisManager
+ .redisCaches()
+ .define(rrName)
+ .withRegion(Region.ASIA_EAST)
+ .withNewResourceGroup(rgName)
+ .withBasicSku()
+ .create();
+
+ redisCache.update().disablePublicNetworkAccess().apply();
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, redisCache.publicNetworkAccess());
+
+ redisCache.update().enablePublicNetworkAccess().apply();
+ Assertions.assertEquals(PublicNetworkAccess.ENABLED, redisCache.publicNetworkAccess());
+ }
+
// e.g 6.xxxx
private static final Pattern MINOR_VERSION_REGEX = Pattern.compile("([1-9]+)\\..*");
diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java
index 5f3527fecc320..33fe365d46361 100644
--- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java
+++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageFunctionAppLogs.java
@@ -8,6 +8,8 @@
import com.azure.core.management.AzureEnvironment;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.resourcemanager.AzureResourceManager;
+import com.azure.resourcemanager.appservice.fluent.models.CsmPublishingCredentialsPoliciesEntityProperties;
+import com.azure.resourcemanager.appservice.models.FtpsState;
import com.azure.resourcemanager.appservice.models.FunctionApp;
import com.azure.resourcemanager.appservice.models.LogLevel;
import com.azure.core.management.Region;
@@ -61,11 +63,23 @@ public static boolean runSample(AzureResourceManager azureResourceManager) throw
.withLogLevel(LogLevel.VERBOSE)
.withApplicationLogsStoredOnFileSystem()
.attach()
+ .withFtpsState(FtpsState.ALL_ALLOWED)
.create();
System.out.println("Created function app " + app.name());
Utils.print(app);
+ app.manager().resourceManager().genericResources().define("ftp")
+ .withRegion(app.regionName())
+ .withExistingResourceGroup(app.resourceGroupName())
+ .withResourceType("basicPublishingCredentialsPolicies")
+ .withProviderNamespace("Microsoft.Web")
+ .withoutPlan()
+ .withParentResourcePath("sites/" + app.name())
+ .withApiVersion("2023-01-01")
+ .withProperties(new CsmPublishingCredentialsPoliciesEntityProperties().withAllow(true))
+ .create();
+
//============================================================
// Deploy to app 1 through FTP
diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java
index 8b34ccf121387..a78db8be5581c 100644
--- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java
+++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageLinuxWebAppStorageAccountConnection.java
@@ -8,7 +8,9 @@
import com.azure.core.management.AzureEnvironment;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.resourcemanager.AzureResourceManager;
+import com.azure.resourcemanager.appservice.fluent.models.CsmPublishingCredentialsPoliciesEntityProperties;
import com.azure.resourcemanager.appservice.models.ConnectionStringType;
+import com.azure.resourcemanager.appservice.models.FtpsState;
import com.azure.resourcemanager.appservice.models.PricingTier;
import com.azure.resourcemanager.appservice.models.RuntimeStack;
import com.azure.resourcemanager.appservice.models.WebApp;
@@ -101,11 +103,23 @@ public static boolean runSample(AzureResourceManager azureResourceManager) {
.withBuiltInImage(RuntimeStack.TOMCAT_8_5_JRE8)
.withConnectionString("storage.connectionString", connectionString, ConnectionStringType.CUSTOM)
.withAppSetting("storage.containerName", containerName)
+ .withFtpsState(FtpsState.ALL_ALLOWED)
.create();
System.out.println("Created web app " + app1.name());
Utils.print(app1);
+ app1.manager().resourceManager().genericResources().define("ftp")
+ .withRegion(app1.regionName())
+ .withExistingResourceGroup(app1.resourceGroupName())
+ .withResourceType("basicPublishingCredentialsPolicies")
+ .withProviderNamespace("Microsoft.Web")
+ .withoutPlan()
+ .withParentResourcePath("sites/" + app1.name())
+ .withApiVersion("2023-01-01")
+ .withProperties(new CsmPublishingCredentialsPoliciesEntityProperties().withAllow(true))
+ .create();
+
//============================================================
// Deploy a web app that connects to the storage account
// Source code: https://github.com/jianghaolu/azure-samples-blob-explorer
diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java
index c5522a09e7a20..20a4f2e38d7a4 100644
--- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java
+++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppCosmosDbThroughKeyVault.java
@@ -8,6 +8,8 @@
import com.azure.core.util.Configuration;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.resourcemanager.AzureResourceManager;
+import com.azure.resourcemanager.appservice.fluent.models.CsmPublishingCredentialsPoliciesEntityProperties;
+import com.azure.resourcemanager.appservice.models.FtpsState;
import com.azure.resourcemanager.appservice.models.JavaVersion;
import com.azure.resourcemanager.appservice.models.PricingTier;
import com.azure.resourcemanager.appservice.models.WebApp;
@@ -111,11 +113,23 @@ public static boolean runSample(AzureResourceManager azureResourceManager, Strin
.withWebContainer(WebContainer.TOMCAT_8_5_NEWEST)
.withAppSetting("AZURE_KEYVAULT_URI", vault.vaultUri())
.withSystemAssignedManagedServiceIdentity()
+ .withFtpsState(FtpsState.ALL_ALLOWED)
.create();
System.out.println("Created web app " + app.name());
Utils.print(app);
+ app.manager().resourceManager().genericResources().define("ftp")
+ .withRegion(app.regionName())
+ .withExistingResourceGroup(app.resourceGroupName())
+ .withResourceType("basicPublishingCredentialsPolicies")
+ .withProviderNamespace("Microsoft.Web")
+ .withoutPlan()
+ .withParentResourcePath("sites/" + app.name())
+ .withApiVersion("2023-01-01")
+ .withProperties(new CsmPublishingCredentialsPoliciesEntityProperties().withAllow(true))
+ .create();
+
//============================================================
// Update vault to allow the web app to access
diff --git a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java
index 48d562d80c09d..9647f8062963b 100644
--- a/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java
+++ b/sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/appservice/samples/ManageWebAppStorageAccountConnection.java
@@ -8,7 +8,9 @@
import com.azure.core.management.AzureEnvironment;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.resourcemanager.AzureResourceManager;
+import com.azure.resourcemanager.appservice.fluent.models.CsmPublishingCredentialsPoliciesEntityProperties;
import com.azure.resourcemanager.appservice.models.ConnectionStringType;
+import com.azure.resourcemanager.appservice.models.FtpsState;
import com.azure.resourcemanager.appservice.models.JavaVersion;
import com.azure.resourcemanager.appservice.models.PricingTier;
import com.azure.resourcemanager.appservice.models.WebApp;
@@ -102,11 +104,23 @@ public static boolean runSample(AzureResourceManager azureResourceManager) {
.withWebContainer(WebContainer.TOMCAT_8_0_NEWEST)
.withConnectionString("storage.connectionString", connectionString, ConnectionStringType.CUSTOM)
.withAppSetting("storage.containerName", containerName)
+ .withFtpsState(FtpsState.ALL_ALLOWED)
.create();
System.out.println("Created web app " + app1.name());
Utils.print(app1);
+ app1.manager().resourceManager().genericResources().define("ftp")
+ .withRegion(app1.regionName())
+ .withExistingResourceGroup(app1.resourceGroupName())
+ .withResourceType("basicPublishingCredentialsPolicies")
+ .withProviderNamespace("Microsoft.Web")
+ .withoutPlan()
+ .withParentResourcePath("sites/" + app1.name())
+ .withApiVersion("2023-01-01")
+ .withProperties(new CsmPublishingCredentialsPoliciesEntityProperties().withAllow(true))
+ .create();
+
//============================================================
// Deploy a web app that connects to the storage account
// Source code: https://github.com/jianghaolu/azure-samples-blob-explorer
diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md b/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md
index 9fc9422edfca1..8984047527d6f 100644
--- a/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md
+++ b/sdk/resourcemanager/azure-resourcemanager-storage/CHANGELOG.md
@@ -4,6 +4,8 @@
### Features Added
+- Supported disabling public network access in `StorageAccount` via `disablePublicNetworkAccess()`, for private link feature.
+
### Breaking Changes
### Bugs Fixed
diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/assets.json b/sdk/resourcemanager/azure-resourcemanager-storage/assets.json
index 285b19032c728..f11fbbe8e8a3c 100644
--- a/sdk/resourcemanager/azure-resourcemanager-storage/assets.json
+++ b/sdk/resourcemanager/azure-resourcemanager-storage/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-storage",
- "Tag": "java/resourcemanager/azure-resourcemanager-storage_9e28ed11a8"
+ "Tag": "java/resourcemanager/azure-resourcemanager-storage_3aaa86972f"
}
diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountImpl.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountImpl.java
index 5524285d8fc49..b0420002c3a1f 100644
--- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountImpl.java
+++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountImpl.java
@@ -37,6 +37,7 @@
import com.azure.resourcemanager.storage.models.PrivateLinkServiceConnectionState;
import com.azure.resourcemanager.storage.models.ProvisioningState;
import com.azure.resourcemanager.storage.models.PublicEndpoints;
+import com.azure.resourcemanager.storage.models.PublicNetworkAccess;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.StorageAccount;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
@@ -280,6 +281,11 @@ public String userAssignedIdentityIdForCustomerEncryptionKey() {
return this.encryptionHelper.userAssignedIdentityIdForKeyVault(this.innerModel());
}
+ @Override
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerModel().publicNetworkAccess();
+ }
+
@Override
public List getKeys() {
return this.getKeysAsync().block();
@@ -667,6 +673,26 @@ public StorageAccountImpl disableDefaultToOAuthAuthentication() {
return this;
}
+ @Override
+ public StorageAccountImpl enablePublicNetworkAccess() {
+ if (isInCreateMode()) {
+ createParameters.withPublicNetworkAccess(PublicNetworkAccess.ENABLED);
+ } else {
+ updateParameters.withPublicNetworkAccess(PublicNetworkAccess.ENABLED);
+ }
+ return this;
+ }
+
+ @Override
+ public StorageAccountImpl disablePublicNetworkAccess() {
+ if (isInCreateMode()) {
+ createParameters.withPublicNetworkAccess(PublicNetworkAccess.DISABLED);
+ } else {
+ updateParameters.withPublicNetworkAccess(PublicNetworkAccess.DISABLED);
+ }
+ return this;
+ }
+
@Override
public StorageAccountImpl withAccessFromAllNetworks() {
this.networkRulesHelper.withAccessFromAllNetworks();
diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccount.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccount.java
index 67b334aa5da02..ba729c4d2869a 100644
--- a/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccount.java
+++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/StorageAccount.java
@@ -252,6 +252,12 @@ public interface StorageAccount
* {@link StorageAccount#identityTypeForCustomerEncryptionKey()} is not {@link IdentityType#USER_ASSIGNED}
*/
String userAssignedIdentityIdForCustomerEncryptionKey();
+ /**
+ * Whether the storage account can be accessed from public network.
+ *
+ * @return whether the storage account can be accessed from public network.
+ */
+ PublicNetworkAccess publicNetworkAccess();
/** Container interface for all the definitions that need to be implemented. */
interface Definition
@@ -559,6 +565,12 @@ interface WithBlobAccess {
/** The stage of storage account definition allowing to configure network access settings. */
interface WithNetworkAccess {
+ /**
+ * Disables public network access for the storage account.
+ *
+ * @return the next stage of the definition
+ */
+ WithCreate disablePublicNetworkAccess();
/**
* Specifies that by default access to storage account should be allowed from all networks.
*
@@ -989,6 +1001,20 @@ interface WithBlobAccess {
/** The stage of storage account update allowing to configure network access. */
interface WithNetworkAccess {
+ /**
+ * Enables public network access for the storage account.
+ *
+ * @return the next stage of the update
+ */
+ Update enablePublicNetworkAccess();
+
+ /**
+ * Disables public network access for the storage account.
+ *
+ * @return the next stage of the update
+ */
+ Update disablePublicNetworkAccess();
+
/**
* Specifies that by default access to storage account should be allowed from all networks.
*
diff --git a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java
index 0131a6df615ff..beef09f1d178f 100644
--- a/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java
+++ b/sdk/resourcemanager/azure-resourcemanager-storage/src/test/java/com/azure/resourcemanager/storage/StorageAccountOperationsTests.java
@@ -11,6 +11,7 @@
import com.azure.resourcemanager.storage.models.IdentityType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
+import com.azure.resourcemanager.storage.models.PublicNetworkAccess;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccount;
import com.azure.resourcemanager.storage.models.StorageAccountEncryptionStatus;
@@ -714,4 +715,35 @@ public void updateIdentityFromNoneToSystemUserAssigned() {
Assertions.assertNotNull(storageAccount.systemAssignedManagedServiceIdentityTenantId());
Assertions.assertFalse(storageAccount.userAssignedManagedServiceIdentityIds().isEmpty());
}
+
+ @Test
+ public void canCreateStorageAccountWithDisabledPublicNetworkAccess() {
+ resourceManager.resourceGroups().define(rgName).withRegion(Region.US_EAST).create();
+ StorageAccount storageAccount = storageManager
+ .storageAccounts()
+ .define(saName)
+ .withRegion(Region.US_EAST)
+ .withExistingResourceGroup(rgName)
+ .withSystemAssignedManagedServiceIdentity()
+ .disablePublicNetworkAccess()
+ .create();
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, storageAccount.publicNetworkAccess());
+ }
+
+ @Test
+ public void canUpdatePublicNetworkAccess() {
+ resourceManager.resourceGroups().define(rgName).withRegion(Region.US_EAST).create();
+ StorageAccount storageAccount = storageManager
+ .storageAccounts()
+ .define(saName)
+ .withRegion(Region.US_EAST)
+ .withExistingResourceGroup(rgName)
+ .withSystemAssignedManagedServiceIdentity()
+ .create();
+ storageAccount.update().disablePublicNetworkAccess().apply();
+ Assertions.assertEquals(PublicNetworkAccess.DISABLED, storageAccount.publicNetworkAccess());
+
+ storageAccount.update().enablePublicNetworkAccess().apply();
+ Assertions.assertEquals(PublicNetworkAccess.ENABLED, storageAccount.publicNetworkAccess());
+ }
}
diff --git a/sdk/resourcemanager/azure-resourcemanager/pom.xml b/sdk/resourcemanager/azure-resourcemanager/pom.xml
index 6d6a1824231f3..8d8151f3dc7b0 100644
--- a/sdk/resourcemanager/azure-resourcemanager/pom.xml
+++ b/sdk/resourcemanager/azure-resourcemanager/pom.xml
@@ -223,6 +223,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ org.mockitomockito-core
@@ -267,6 +273,20 @@
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
diff --git a/sdk/resourcemanagerhybrid/azure-resourcemanager/pom.xml b/sdk/resourcemanagerhybrid/azure-resourcemanager/pom.xml
index a93804c9dfa55..5fb5642b2a6e3 100644
--- a/sdk/resourcemanagerhybrid/azure-resourcemanager/pom.xml
+++ b/sdk/resourcemanagerhybrid/azure-resourcemanager/pom.xml
@@ -156,6 +156,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.jcraftjsch
@@ -180,6 +186,21 @@
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
diff --git a/sdk/serialization/azure-xml/src/main/java/com/azure/xml/ReadValueCallback.java b/sdk/serialization/azure-xml/src/main/java/com/azure/xml/ReadValueCallback.java
index e98bced897c3e..c761e8764a4c4 100644
--- a/sdk/serialization/azure-xml/src/main/java/com/azure/xml/ReadValueCallback.java
+++ b/sdk/serialization/azure-xml/src/main/java/com/azure/xml/ReadValueCallback.java
@@ -4,7 +4,6 @@
package com.azure.xml;
import javax.xml.stream.XMLStreamException;
-import java.io.IOException;
/**
* A callback used when reading an XML value, such as {@link XmlReader#getNullableElement(ReadValueCallback)}.
@@ -20,9 +19,6 @@ public interface ReadValueCallback {
* @param input Input to the callback.
* @return The output of the callback.
* @throws XMLStreamException If an XML stream error occurs during application of the callback.
- * @throws IOException If an I/O error occurs during application of the callback, {@link XmlReader} and
- * {@link XmlWriter} APIs will catch {@link IOException IOExceptions} and wrap them in an
- * {@link XMLStreamException}.
*/
- R read(T input) throws XMLStreamException, IOException;
+ R read(T input) throws XMLStreamException;
}
diff --git a/sdk/serialization/azure-xml/src/main/java/com/azure/xml/XmlReader.java b/sdk/serialization/azure-xml/src/main/java/com/azure/xml/XmlReader.java
index 247bd898577dd..e6dd7f9241673 100644
--- a/sdk/serialization/azure-xml/src/main/java/com/azure/xml/XmlReader.java
+++ b/sdk/serialization/azure-xml/src/main/java/com/azure/xml/XmlReader.java
@@ -9,7 +9,6 @@
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.StringReader;
@@ -282,11 +281,7 @@ public T getNullableAttribute(String namespaceUri, String localName, ReadVal
return null;
}
- try {
- return converter.read(textValue);
- } catch (IOException ex) {
- throw new XMLStreamException(ex);
- }
+ return converter.read(textValue);
}
/**
@@ -441,11 +436,7 @@ public T getNullableElement(ReadValueCallback converter) throws X
return null;
}
- try {
- return converter.read(textValue);
- } catch (IOException ex) {
- throw new XMLStreamException(ex);
- }
+ return converter.read(textValue);
}
/**
@@ -502,11 +493,7 @@ private T readObject(QName startTagName, ReadValueCallback con
"Expected XML element to be '" + startTagName + "' but it was: " + tagName + "'.");
}
- try {
- return converter.read(this);
- } catch (IOException ex) {
- throw new XMLStreamException(ex);
- }
+ return converter.read(this);
}
/**
diff --git a/sdk/servicebus/azure-messaging-servicebus/pom.xml b/sdk/servicebus/azure-messaging-servicebus/pom.xml
index de869f7c2554f..e794114c5a974 100644
--- a/sdk/servicebus/azure-messaging-servicebus/pom.xml
+++ b/sdk/servicebus/azure-messaging-servicebus/pom.xml
@@ -85,6 +85,12 @@
1.11.19test
+
+ com.azure
+ azure-core-http-vertx
+ 1.0.0-beta.16
+ test
+ com.azureazure-identity
@@ -164,4 +170,21 @@
test
+
+
+
+ java12plus
+
+ [12,)
+
+
+
+ com.azure
+ azure-core-http-jdk-httpclient
+ 1.0.0-beta.11
+ test
+
+
+
+
diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/WindowedSubscriberFluxWindowIsolatedTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/WindowedSubscriberFluxWindowIsolatedTest.java
index 611d6b4dbd6cc..a78151e1bf010 100644
--- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/WindowedSubscriberFluxWindowIsolatedTest.java
+++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/WindowedSubscriberFluxWindowIsolatedTest.java
@@ -3,6 +3,7 @@
package com.azure.messaging.servicebus;
+import com.azure.core.util.logging.ClientLogger;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.parallel.Execution;
@@ -19,6 +20,7 @@
import java.util.Deque;
import java.util.List;
import java.util.concurrent.ConcurrentLinkedDeque;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import java.util.function.Supplier;
@@ -33,6 +35,8 @@
@Execution(ExecutionMode.SAME_THREAD)
@Isolated
public final class WindowedSubscriberFluxWindowIsolatedTest {
+ private final ClientLogger logger = new ClientLogger(WindowedSubscriberFluxWindowIsolatedTest.class);
+
@Test
@Execution(ExecutionMode.SAME_THREAD)
public void shouldCloseEmptyWindowOnTimeout() {
@@ -44,13 +48,14 @@ public void shouldCloseEmptyWindowOnTimeout() {
upstream.subscribe(subscriber);
final AtomicReference> rRef = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- rRef.set(r);
- return r.getWindowFlux();
- };
-
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ rRef.set(r);
+ return r.getWindowFlux();
+ };
+
verifier.create(scenario)
// Forward time to timeout empty windowTimeout.
.thenAwait(windowTimeout.plusSeconds(10))
@@ -74,13 +79,14 @@ public void shouldCloseStreamingWindowOnTimeout() {
upstream.subscribe(subscriber);
final AtomicReference> rRef = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- rRef.set(r);
- return r.getWindowFlux();
- };
-
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ rRef.set(r);
+ return r.getWindowFlux();
+ };
+
verifier.create(scenario)
.then(() -> upstream.next(1))
.then(() -> upstream.next(2))
@@ -108,17 +114,18 @@ public void shouldContinueToNextWindowWhenEmptyWindowTimeout() {
final AtomicReference> r0Ref = new AtomicReference<>();
final AtomicReference> r1Ref = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r0 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- final EnqueueResult r1 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- r0Ref.set(r0);
- r1Ref.set(r1);
- final Flux window0Flux = r0.getWindowFlux();
- final Flux window1Flux = r1.getWindowFlux();
- return window0Flux.concatWith(window1Flux);
- };
-
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r0 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ final EnqueueResult r1 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ r0Ref.set(r0);
+ r1Ref.set(r1);
+ final Flux window0Flux = r0.getWindowFlux();
+ final Flux window1Flux = r1.getWindowFlux();
+ return window0Flux.concatWith(window1Flux);
+ };
+
verifier.create(scenario)
// Forward time to timeout empty window0Flux,
.thenAwait(windowTimeout.plusSeconds(10))
@@ -154,17 +161,18 @@ public void shouldContinueToNextWindowWhenStreamingWindowTimeout() {
final AtomicReference> r0Ref = new AtomicReference<>();
final AtomicReference> r1Ref = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r0 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- final EnqueueResult r1 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- r0Ref.set(r0);
- r1Ref.set(r1);
- final Flux window0Flux = r0.getWindowFlux();
- final Flux window1Flux = r1.getWindowFlux();
- return window0Flux.concatWith(window1Flux);
- };
-
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r0 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ final EnqueueResult r1 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ r0Ref.set(r0);
+ r1Ref.set(r1);
+ final Flux window0Flux = r0.getWindowFlux();
+ final Flux window1Flux = r1.getWindowFlux();
+ return window0Flux.concatWith(window1Flux);
+ };
+
verifier.create(scenario)
.then(() -> upstream.next(1))
.then(() -> upstream.next(2))
@@ -186,9 +194,19 @@ public void shouldContinueToNextWindowWhenStreamingWindowTimeout() {
Assertions.assertFalse(work0.isCanceled());
final WindowWork work1 = r1Ref.get().getInnerWork();
- Assertions.assertNotEquals(windowSize, work1.getPending());
Assertions.assertTrue(work1.hasTimedOut());
Assertions.assertFalse(work1.isCanceled());
+ final boolean hasWindow1ReceivedNothing = work1.getPending() == windowSize;
+ if (hasWindow1ReceivedNothing) {
+ // The combination of VirtualTimeScheduler and WindowedSubscriber.drain() sometimes delays arrival of timeout
+ // signaling for window0, resulting window0 to timeout only after the emission of 3 (and 4). This result in
+ // window0 to receive 1, 2, 3 and 4, and window1 to receive nothing. Here asserting that, when/if this happens
+ // application still gets emitted events via window0.
+ //
+ final boolean hasWindow0ReceivedAll = work0.getPending() == windowSize - 4; // (demanded - received)
+ Assertions.assertTrue(hasWindow0ReceivedAll,
+ String.format("window0 pending: %d, window1 pending: %d", work0.getPending(), work1.getPending()));
+ }
}
@Test
@@ -204,19 +222,20 @@ public void shouldContinueToNextWindowWhenStreamingWindowCancels() {
final AtomicReference> r0Ref = new AtomicReference<>();
final AtomicReference> r1Ref = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r0 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- final EnqueueResult r1 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- r0Ref.set(r0);
- r1Ref.set(r1);
- final Flux window0Flux = r0.getWindowFlux();
- final Flux window1Flux = r1.getWindowFlux();
- return window0Flux
- .take(cancelAfter)
- .concatWith(window1Flux);
- };
-
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r0 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ final EnqueueResult r1 = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ r0Ref.set(r0);
+ r1Ref.set(r1);
+ final Flux window0Flux = r0.getWindowFlux();
+ final Flux window1Flux = r1.getWindowFlux();
+ return window0Flux
+ .take(cancelAfter)
+ .concatWith(window1Flux);
+ };
+
verifier.create(scenario)
.then(() -> upstream.next(1))
.then(() -> upstream.next(2))
@@ -248,13 +267,14 @@ public void shouldRequestWindowDemand() {
upstream.subscribe(subscriber);
final AtomicReference> rRef = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- rRef.set(r);
- return r.getWindowFlux();
- };
-
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ rRef.set(r);
+ return r.getWindowFlux();
+ };
+
verifier.create(scenario)
.thenAwait(windowTimeout.plusSeconds(10))
.verifyComplete();
@@ -279,18 +299,18 @@ public void shouldAccountPendingRequestWhenServingNextWindowDemand() {
final AtomicReference> r0Ref = new AtomicReference<>();
final AtomicReference> r1Ref = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r0 = subscriber.enqueueRequestImpl(window0Size, windowTimeout);
- final EnqueueResult r1 = subscriber.enqueueRequestImpl(window1Size, windowTimeout);
- r0Ref.set(r0);
- r1Ref.set(r1);
- final Flux window0Flux = r0.getWindowFlux();
- final Flux window1Flux = r1.getWindowFlux();
- return window0Flux.concatWith(window1Flux);
- };
-
-
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r0 = subscriber.enqueueRequestImpl(window0Size, windowTimeout);
+ final EnqueueResult r1 = subscriber.enqueueRequestImpl(window1Size, windowTimeout);
+ r0Ref.set(r0);
+ r1Ref.set(r1);
+ final Flux window0Flux = r0.getWindowFlux();
+ final Flux window1Flux = r1.getWindowFlux();
+ return window0Flux.concatWith(window1Flux);
+ };
+
verifier.create(scenario)
// timeout window0Flux without receiving (so pending request become 'windowSize0'), and pick next work.
.thenAwait(windowTimeout.plusSeconds(10))
@@ -322,17 +342,19 @@ public void shouldPickEnqueuedWindowRequestsOnSubscriptionReady() {
final AtomicReference> r0Ref = new AtomicReference<>();
final AtomicReference> r1Ref = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r0 = subscriber.enqueueRequestImpl(window0Size, windowTimeout);
- final EnqueueResult r1 = subscriber.enqueueRequestImpl(window1Size, windowTimeout);
- r0Ref.set(r0);
- r1Ref.set(r1);
- final Flux window0Flux = r0.getWindowFlux();
- final Flux window1Flux = r1.getWindowFlux();
- return window0Flux.concatWith(window1Flux);
- };
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r0 = subscriber.enqueueRequestImpl(window0Size, windowTimeout);
+ final EnqueueResult r1 = subscriber.enqueueRequestImpl(window1Size, windowTimeout);
+ r0Ref.set(r0);
+ r1Ref.set(r1);
+ final Flux window0Flux = r0.getWindowFlux();
+ final Flux window1Flux = r1.getWindowFlux();
+ return window0Flux.concatWith(window1Flux);
+ };
+
verifier.create(scenario)
// subscribe after enqueuing requests in 'scenario' (mimicking late arrival of subscription).
.then(() -> upstream.subscribe(subscriber))
@@ -366,14 +388,13 @@ public void shouldInvokeReleaserWhenNoWindowToService() {
final WindowedSubscriber subscriber = createSubscriber(options.setReleaser(releaser));
upstream.subscribe(subscriber);
- final AtomicReference> rRef = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- rRef.set(r);
- return r.getWindowFlux();
- };
-
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ return r.getWindowFlux();
+ };
+
verifier.create(scenario)
// forward time to timeout windowFlux without receiving.
.thenAwait(windowTimeout.plusSeconds(10))
@@ -400,14 +421,13 @@ public void shouldStopInvokingReleaserOnUpstreamTermination() {
final WindowedSubscriber subscriber = createSubscriber(options.setReleaser(releaser));
upstream.subscribe(subscriber);
- final AtomicReference> rRef = new AtomicReference<>();
- final Supplier> scenario = () -> {
- final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
- rRef.set(r);
- return r.getWindowFlux();
- };
-
try (VirtualTimeStepVerifier verifier = new VirtualTimeStepVerifier()) {
+ final Supplier> scenario = () -> {
+ verifier.logIfClosedUnexpectedly(logger);
+ final EnqueueResult r = subscriber.enqueueRequestImpl(windowSize, windowTimeout);
+ return r.getWindowFlux();
+ };
+
verifier.create(scenario)
// forward time to timeout windowFlux without receiving.
.thenAwait(windowTimeout.plusSeconds(10))
@@ -424,10 +444,11 @@ public void shouldStopInvokingReleaserOnUpstreamTermination() {
Assertions.assertEquals(Arrays.asList(1, 2), released);
}
- private static final class VirtualTimeStepVerifier implements AutoCloseable {
+ private static final class VirtualTimeStepVerifier extends AtomicBoolean implements AutoCloseable {
private final VirtualTimeScheduler scheduler;
VirtualTimeStepVerifier() {
+ super(false);
scheduler = VirtualTimeScheduler.create();
}
@@ -437,8 +458,21 @@ StepVerifier.Step create(Supplier> scenarioSupplier) {
@Override
public void close() {
+ super.set(true);
scheduler.dispose();
}
+
+ void logIfClosedUnexpectedly(ClientLogger logger) {
+ final boolean wasAutoClosed = get();
+ final boolean isSchedulerDisposed = scheduler.isDisposed();
+ if (wasAutoClosed || isSchedulerDisposed) {
+ if (!wasAutoClosed) {
+ logger.atError().log("VirtualTimeScheduler unavailable (unexpected close from outside of the test).");
+ } else {
+ logger.atError().log("VirtualTimeScheduler unavailable (unexpected close by the test).");
+ }
+ }
+ }
}
private static class Releaser implements Consumer {
diff --git a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/WindowedSubscriberIterableWindowTest.java b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/WindowedSubscriberIterableWindowTest.java
index e8d685dc8730d..524b1bc82ff3b 100644
--- a/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/WindowedSubscriberIterableWindowTest.java
+++ b/sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/WindowedSubscriberIterableWindowTest.java
@@ -655,7 +655,8 @@ public void shouldContinueToNextWindowOnEmptyWindowTimeout() {
final IterableStream window0Iterable = r0.getWindowIterable();
final IterableStream window1Iterable = r1.getWindowIterable();
-
+ // When time out triggers, it will close the window0Iterable stream, which will end the blocking collect() call
+ // by returning "empty" list since "no events were received" within the timeout.
final List list0 = window0Iterable.stream().collect(Collectors.toList());
Assertions.assertEquals(0, list0.size());
@@ -694,6 +695,8 @@ public void shouldContinueToNextWindowWhenStreamingWindowTimeout() {
upstream.next(1);
upstream.next(2);
+ // When time out triggers, it will close the window0Iterable stream, which will end the blocking collect() call
+ // and return the list, list0, with events received so far (which is less than demanded).
final List list0 = window0Iterable.stream().collect(Collectors.toList());
Assertions.assertEquals(Arrays.asList(1, 2), list0);
diff --git a/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md b/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md
index db7567eac8ac1..5a13d46e2c228 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md
+++ b/sdk/sphere/azure-resourcemanager-sphere/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.1.0-beta.1 (Unreleased)
### Features Added
@@ -10,6 +10,312 @@
### Other Changes
+## 1.0.0 (2024-03-26)
+
+- Azure Resource Manager AzureSphere client library for Java. This package contains Microsoft Azure SDK for AzureSphere Management SDK. Azure Sphere resource management API. Package tag package-2024-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+### Breaking Changes
+
+#### `models.CountDeviceResponse` was modified
+
+* `value()` was removed
+* `innerModel()` was removed
+
+#### `models.Product$Definition` was modified
+
+* `withDescription(java.lang.String)` was removed
+
+#### `models.ImageListResult` was modified
+
+* `withNextLink(java.lang.String)` was removed
+
+#### `models.PagedDeviceInsight` was modified
+
+* `withNextLink(java.lang.String)` was removed
+
+#### `AzureSphereManager` was modified
+
+* `fluent.AzureSphereManagementClient serviceClient()` -> `fluent.AzureSphereMgmtClient serviceClient()`
+
+#### `models.DeviceGroup$Update` was modified
+
+* `withAllowCrashDumpsCollection(models.AllowCrashDumpCollection)` was removed
+* `withDescription(java.lang.String)` was removed
+* `withUpdatePolicy(models.UpdatePolicy)` was removed
+* `withOsFeedType(models.OSFeedType)` was removed
+* `withRegionalDataBoundary(models.RegionalDataBoundary)` was removed
+
+#### `models.DeviceGroupListResult` was modified
+
+* `withNextLink(java.lang.String)` was removed
+
+#### `models.Catalogs` was modified
+
+* `models.CountDeviceResponse countDevices(java.lang.String,java.lang.String)` -> `models.CountDevicesResponse countDevices(java.lang.String,java.lang.String)`
+
+#### `models.DeploymentListResult` was modified
+
+* `withNextLink(java.lang.String)` was removed
+
+#### `models.Device$Definition` was modified
+
+* `withDeviceId(java.lang.String)` was removed
+
+#### `models.Catalog` was modified
+
+* `provisioningState()` was removed
+* `models.CountDeviceResponse countDevices()` -> `models.CountDevicesResponse countDevices()`
+
+#### `models.Device` was modified
+
+* `chipSku()` was removed
+* `provisioningState()` was removed
+* `lastAvailableOsVersion()` was removed
+* `lastOsUpdateUtc()` was removed
+* `deviceId()` was removed
+* `lastUpdateRequestUtc()` was removed
+* `lastInstalledOsVersion()` was removed
+
+#### `models.Product$Update` was modified
+
+* `withDescription(java.lang.String)` was removed
+
+#### `models.ProductListResult` was modified
+
+* `withNextLink(java.lang.String)` was removed
+
+#### `models.DeviceGroup$Definition` was modified
+
+* `withAllowCrashDumpsCollection(models.AllowCrashDumpCollection)` was removed
+* `withDescription(java.lang.String)` was removed
+* `withUpdatePolicy(models.UpdatePolicy)` was removed
+* `withRegionalDataBoundary(models.RegionalDataBoundary)` was removed
+* `withOsFeedType(models.OSFeedType)` was removed
+
+#### `models.DeviceGroup` was modified
+
+* `osFeedType()` was removed
+* `models.CountDeviceResponse countDevices()` -> `models.CountDevicesResponse countDevices()`
+* `provisioningState()` was removed
+* `hasDeployment()` was removed
+* `allowCrashDumpsCollection()` was removed
+* `regionalDataBoundary()` was removed
+* `description()` was removed
+* `updatePolicy()` was removed
+
+#### `models.DeviceUpdate` was modified
+
+* `withDeviceGroupId(java.lang.String)` was removed
+* `deviceGroupId()` was removed
+
+#### `models.CatalogListResult` was modified
+
+* `withNextLink(java.lang.String)` was removed
+
+#### `models.DeviceListResult` was modified
+
+* `withNextLink(java.lang.String)` was removed
+
+#### `models.Product` was modified
+
+* `description()` was removed
+* `models.CountDeviceResponse countDevices()` -> `models.CountDevicesResponse countDevices()`
+* `provisioningState()` was removed
+
+#### `models.Device$Update` was modified
+
+* `withDeviceGroupId(java.lang.String)` was removed
+
+#### `models.Image$Definition` was modified
+
+* `withRegionalDataBoundary(models.RegionalDataBoundary)` was removed
+* `withImage(java.lang.String)` was removed
+* `withImageId(java.lang.String)` was removed
+
+#### `models.Deployment` was modified
+
+* `deploymentId()` was removed
+* `deploymentDateUtc()` was removed
+* `provisioningState()` was removed
+* `deployedImages()` was removed
+
+#### `models.DeviceGroups` was modified
+
+* `models.CountDeviceResponse countDevices(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` -> `models.CountDevicesResponse countDevices(java.lang.String,java.lang.String,java.lang.String,java.lang.String)`
+
+#### `models.Products` was modified
+
+* `models.CountDeviceResponse countDevices(java.lang.String,java.lang.String,java.lang.String)` -> `models.CountDevicesResponse countDevices(java.lang.String,java.lang.String,java.lang.String)`
+
+#### `models.ProductUpdate` was modified
+
+* `withDescription(java.lang.String)` was removed
+* `description()` was removed
+
+#### `models.DeviceGroupUpdate` was modified
+
+* `regionalDataBoundary()` was removed
+* `withRegionalDataBoundary(models.RegionalDataBoundary)` was removed
+* `allowCrashDumpsCollection()` was removed
+* `updatePolicy()` was removed
+* `withAllowCrashDumpsCollection(models.AllowCrashDumpCollection)` was removed
+* `withOsFeedType(models.OSFeedType)` was removed
+* `withUpdatePolicy(models.UpdatePolicy)` was removed
+* `withDescription(java.lang.String)` was removed
+* `description()` was removed
+* `osFeedType()` was removed
+
+#### `models.CertificateListResult` was modified
+
+* `withNextLink(java.lang.String)` was removed
+
+#### `models.Image` was modified
+
+* `regionalDataBoundary()` was removed
+* `image()` was removed
+* `provisioningState()` was removed
+* `uri()` was removed
+* `imageName()` was removed
+* `imageId()` was removed
+* `description()` was removed
+* `componentId()` was removed
+* `imageType()` was removed
+
+#### `models.Deployment$Definition` was modified
+
+* `withDeploymentId(java.lang.String)` was removed
+* `withDeployedImages(java.util.List)` was removed
+
+#### `models.Certificate` was modified
+
+* `notBeforeUtc()` was removed
+* `subject()` was removed
+* `expiryUtc()` was removed
+* `certificate()` was removed
+* `thumbprint()` was removed
+* `provisioningState()` was removed
+* `status()` was removed
+
+### Features Added
+
+* `models.DeviceGroupProperties` was added
+
+* `models.DeviceProperties` was added
+
+* `models.CertificateProperties` was added
+
+* `models.CountDevicesResponse` was added
+
+* `models.DeploymentProperties` was added
+
+* `models.DeviceUpdateProperties` was added
+
+* `models.DeviceGroupUpdateProperties` was added
+
+* `models.CatalogProperties` was added
+
+* `models.ProductUpdateProperties` was added
+
+* `models.ImageProperties` was added
+
+* `models.ProductProperties` was added
+
+#### `models.CountDeviceResponse` was modified
+
+* `withValue(int)` was added
+* `validate()` was added
+
+#### `models.Product$Definition` was modified
+
+* `withProperties(models.ProductProperties)` was added
+
+#### `models.DeviceGroup$Update` was modified
+
+* `withProperties(models.DeviceGroupUpdateProperties)` was added
+
+#### `models.Catalogs` was modified
+
+* `uploadImage(java.lang.String,java.lang.String,fluent.models.ImageInner,com.azure.core.util.Context)` was added
+* `uploadImage(java.lang.String,java.lang.String,fluent.models.ImageInner)` was added
+
+#### `models.Device$Definition` was modified
+
+* `withProperties(models.DeviceProperties)` was added
+
+#### `models.Catalog` was modified
+
+* `uploadImage(fluent.models.ImageInner,com.azure.core.util.Context)` was added
+* `properties()` was added
+* `uploadImage(fluent.models.ImageInner)` was added
+
+#### `models.Device` was modified
+
+* `systemData()` was added
+* `properties()` was added
+
+#### `models.Product$Update` was modified
+
+* `withProperties(models.ProductUpdateProperties)` was added
+
+#### `models.DeviceGroup$Definition` was modified
+
+* `withProperties(models.DeviceGroupProperties)` was added
+
+#### `models.DeviceGroup` was modified
+
+* `properties()` was added
+* `systemData()` was added
+
+#### `models.DeviceUpdate` was modified
+
+* `properties()` was added
+* `withProperties(models.DeviceUpdateProperties)` was added
+
+#### `models.Product` was modified
+
+* `properties()` was added
+* `systemData()` was added
+
+#### `models.Device$Update` was modified
+
+* `withProperties(models.DeviceUpdateProperties)` was added
+
+#### `models.Image$Definition` was modified
+
+* `withProperties(models.ImageProperties)` was added
+
+#### `models.Deployment` was modified
+
+* `systemData()` was added
+* `properties()` was added
+
+#### `models.ProductUpdate` was modified
+
+* `withProperties(models.ProductUpdateProperties)` was added
+* `properties()` was added
+
+#### `models.DeviceGroupUpdate` was modified
+
+* `withProperties(models.DeviceGroupUpdateProperties)` was added
+* `properties()` was added
+
+#### `models.Catalog$Definition` was modified
+
+* `withProperties(models.CatalogProperties)` was added
+
+#### `models.Image` was modified
+
+* `systemData()` was added
+* `properties()` was added
+
+#### `models.Deployment$Definition` was modified
+
+* `withProperties(models.DeploymentProperties)` was added
+
+#### `models.Certificate` was modified
+
+* `properties()` was added
+
## 1.0.0-beta.1 (2023-07-21)
- Azure Resource Manager AzureSphere client library for Java. This package contains Microsoft Azure SDK for AzureSphere Management SDK. Azure Sphere resource management API. Package tag package-2022-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/sphere/azure-resourcemanager-sphere/README.md b/sdk/sphere/azure-resourcemanager-sphere/README.md
index 2c270ea9f71a9..8918acb6fd371 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/README.md
+++ b/sdk/sphere/azure-resourcemanager-sphere/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager AzureSphere client library for Java.
-This package contains Microsoft Azure SDK for AzureSphere Management SDK. Azure Sphere resource management API. Package tag package-2022-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for AzureSphere Management SDK. Azure Sphere resource management API. Package tag package-2024-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-sphere
- 1.0.0-beta.1
+ 1.0.0
```
[//]: # ({x-version-update-end})
@@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
### Authentication
-By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
+By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
@@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
-[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
diff --git a/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md b/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md
index 5bf2b6bf9674a..0f9c9ae9fc3c8 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md
+++ b/sdk/sphere/azure-resourcemanager-sphere/SAMPLE.md
@@ -14,6 +14,7 @@
- [ListDeviceInsights](#catalogs_listdeviceinsights)
- [ListDevices](#catalogs_listdevices)
- [Update](#catalogs_update)
+- [UploadImage](#catalogs_uploadimage)
## Certificates
@@ -71,14 +72,18 @@
### Catalogs_CountDevices
```java
-/** Samples for Catalogs CountDevices. */
+/**
+ * Samples for Catalogs CountDevices.
+ */
public final class CatalogsCountDevicesSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostCountDevicesCatalog.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostCountDevicesCatalog.
+ * json
*/
/**
* Sample code: Catalogs_CountDevices.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsCountDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
@@ -90,22 +95,21 @@ public final class CatalogsCountDevicesSamples {
### Catalogs_CreateOrUpdate
```java
-/** Samples for Catalogs CreateOrUpdate. */
+/**
+ * Samples for Catalogs CreateOrUpdate.
+ */
public final class CatalogsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutCatalog.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutCatalog.json
*/
/**
* Sample code: Catalogs_CreateOrUpdate.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .catalogs()
- .define("MyCatalog1")
- .withRegion("global")
- .withExistingResourceGroup("MyResourceGroup1")
+ manager.catalogs().define("MyCatalog1").withRegion("global").withExistingResourceGroup("MyResourceGroup1")
.create();
}
}
@@ -114,14 +118,17 @@ public final class CatalogsCreateOrUpdateSamples {
### Catalogs_Delete
```java
-/** Samples for Catalogs Delete. */
+/**
+ * Samples for Catalogs Delete.
+ */
public final class CatalogsDeleteSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteCatalog.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteCatalog.json
*/
/**
* Sample code: Catalogs_Delete.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
@@ -133,20 +140,22 @@ public final class CatalogsDeleteSamples {
### Catalogs_GetByResourceGroup
```java
-/** Samples for Catalogs GetByResourceGroup. */
+/**
+ * Samples for Catalogs GetByResourceGroup.
+ */
public final class CatalogsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalog.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCatalog.json
*/
/**
* Sample code: Catalogs_Get.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .catalogs()
- .getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE);
+ manager.catalogs().getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -154,14 +163,17 @@ public final class CatalogsGetByResourceGroupSamples {
### Catalogs_List
```java
-/** Samples for Catalogs List. */
+/**
+ * Samples for Catalogs List.
+ */
public final class CatalogsListSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalogsSub.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCatalogsSub.json
*/
/**
* Sample code: Catalogs_ListBySubscription.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsListBySubscription(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
@@ -173,14 +185,17 @@ public final class CatalogsListSamples {
### Catalogs_ListByResourceGroup
```java
-/** Samples for Catalogs ListByResourceGroup. */
+/**
+ * Samples for Catalogs ListByResourceGroup.
+ */
public final class CatalogsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCatalogsRG.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCatalogsRG.json
*/
/**
* Sample code: Catalogs_ListByResourceGroup.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsListByResourceGroup(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
@@ -192,21 +207,22 @@ public final class CatalogsListByResourceGroupSamples {
### Catalogs_ListDeployments
```java
-/** Samples for Catalogs ListDeployments. */
+/**
+ * Samples for Catalogs ListDeployments.
+ */
public final class CatalogsListDeploymentsSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDeploymentsByCatalog.json
+ * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
+ * PostListDeploymentsByCatalog.json
*/
/**
* Sample code: Catalogs_ListDeployments.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsListDeployments(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .catalogs()
- .listDeployments(
- "MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE);
+ manager.catalogs().listDeployments("MyResourceGroup1", "MyCatalog1", null, null, null, null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -216,28 +232,23 @@ public final class CatalogsListDeploymentsSamples {
```java
import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest;
-/** Samples for Catalogs ListDeviceGroups. */
+/**
+ * Samples for Catalogs ListDeviceGroups.
+ */
public final class CatalogsListDeviceGroupsSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDeviceGroupsCatalog.json
+ * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
+ * PostListDeviceGroupsCatalog.json
*/
/**
* Sample code: Catalogs_ListDeviceGroups.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsListDeviceGroups(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .catalogs()
- .listDeviceGroups(
- "MyResourceGroup1",
- "MyCatalog1",
- new ListDeviceGroupsRequest().withDeviceGroupName("MyDeviceGroup1"),
- null,
- null,
- null,
- null,
- com.azure.core.util.Context.NONE);
+ manager.catalogs().listDeviceGroups("MyResourceGroup1", "MyCatalog1",
+ new ListDeviceGroupsRequest().withDeviceGroupName("MyDeviceGroup1"), null, null, null, null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -245,21 +256,22 @@ public final class CatalogsListDeviceGroupsSamples {
### Catalogs_ListDeviceInsights
```java
-/** Samples for Catalogs ListDeviceInsights. */
+/**
+ * Samples for Catalogs ListDeviceInsights.
+ */
public final class CatalogsListDeviceInsightsSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDeviceInsightsCatalog.json
+ * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
+ * PostListDeviceInsightsCatalog.json
*/
/**
* Sample code: Catalogs_ListDeviceInsights.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsListDeviceInsights(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .catalogs()
- .listDeviceInsights(
- "MyResourceGroup1", "MyCatalog1", null, 10, null, null, com.azure.core.util.Context.NONE);
+ manager.catalogs().listDeviceInsights("MyResourceGroup1", "MyCatalog1", null, 10, null, null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -267,20 +279,23 @@ public final class CatalogsListDeviceInsightsSamples {
### Catalogs_ListDevices
```java
-/** Samples for Catalogs ListDevices. */
+/**
+ * Samples for Catalogs ListDevices.
+ */
public final class CatalogsListDevicesSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostListDevicesByCatalog.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostListDevicesByCatalog.
+ * json
*/
/**
* Sample code: Catalogs_ListDevices.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsListDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .catalogs()
- .listDevices("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE);
+ manager.catalogs().listDevices("MyResourceGroup1", "MyCatalog1", null, null, null, null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -290,44 +305,75 @@ public final class CatalogsListDevicesSamples {
```java
import com.azure.resourcemanager.sphere.models.Catalog;
-/** Samples for Catalogs Update. */
+/**
+ * Samples for Catalogs Update.
+ */
public final class CatalogsUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchCatalog.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchCatalog.json
*/
/**
* Sample code: Catalogs_Update.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void catalogsUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- Catalog resource =
- manager
- .catalogs()
- .getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE)
- .getValue();
+ Catalog resource = manager.catalogs()
+ .getByResourceGroupWithResponse("MyResourceGroup1", "MyCatalog1", com.azure.core.util.Context.NONE)
+ .getValue();
resource.update().apply();
}
}
```
+### Catalogs_UploadImage
+
+```java
+import com.azure.resourcemanager.sphere.fluent.models.ImageInner;
+import com.azure.resourcemanager.sphere.models.ImageProperties;
+
+/**
+ * Samples for Catalogs UploadImage.
+ */
+public final class CatalogsUploadImageSamples {
+ /*
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostUploadImageCatalog.
+ * json
+ */
+ /**
+ * Sample code: Catalogs_UploadImage.
+ *
+ * @param manager Entry point to AzureSphereManager.
+ */
+ public static void catalogsUploadImage(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
+ manager.catalogs().uploadImage("MyResourceGroup1", "MyCatalog1",
+ new ImageInner().withProperties(new ImageProperties().withImage("bXliYXNlNjRzdHJpbmc=")),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Certificates_Get
```java
-/** Samples for Certificates Get. */
+/**
+ * Samples for Certificates Get.
+ */
public final class CertificatesGetSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCertificate.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCertificate.json
*/
/**
* Sample code: Certificates_Get.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void certificatesGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .certificates()
- .getWithResponse("MyResourceGroup1", "MyCatalog1", "default", com.azure.core.util.Context.NONE);
+ manager.certificates().getWithResponse("MyResourceGroup1", "MyCatalog1", "default",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -335,20 +381,22 @@ public final class CertificatesGetSamples {
### Certificates_ListByCatalog
```java
-/** Samples for Certificates ListByCatalog. */
+/**
+ * Samples for Certificates ListByCatalog.
+ */
public final class CertificatesListByCatalogSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetCertificates.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetCertificates.json
*/
/**
* Sample code: Certificates_ListByCatalog.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void certificatesListByCatalog(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .certificates()
- .listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE);
+ manager.certificates().listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -356,21 +404,22 @@ public final class CertificatesListByCatalogSamples {
### Certificates_RetrieveCertChain
```java
-/** Samples for Certificates RetrieveCertChain. */
+/**
+ * Samples for Certificates RetrieveCertChain.
+ */
public final class CertificatesRetrieveCertChainSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostRetrieveCatalogCertChain.json
+ * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
+ * PostRetrieveCatalogCertChain.json
*/
/**
* Sample code: Certificates_RetrieveCertChain.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void certificatesRetrieveCertChain(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .certificates()
- .retrieveCertChainWithResponse(
- "MyResourceGroup1", "MyCatalog1", "active", com.azure.core.util.Context.NONE);
+ manager.certificates().retrieveCertChainWithResponse("MyResourceGroup1", "MyCatalog1", "active",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -380,26 +429,24 @@ public final class CertificatesRetrieveCertChainSamples {
```java
import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest;
-/** Samples for Certificates RetrieveProofOfPossessionNonce. */
+/**
+ * Samples for Certificates RetrieveProofOfPossessionNonce.
+ */
public final class CertificatesRetrieveProofOfPossessionNonceSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostRetrieveProofOfPossessionNonce.json
+ * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
+ * PostRetrieveProofOfPossessionNonce.json
*/
/**
* Sample code: Certificates_RetrieveProofOfPossessionNonce.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
- public static void certificatesRetrieveProofOfPossessionNonce(
- com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .certificates()
- .retrieveProofOfPossessionNonceWithResponse(
- "MyResourceGroup1",
- "MyCatalog1",
- "active",
- new ProofOfPossessionNonceRequest().withProofOfPossessionNonce("proofOfPossessionNonce"),
- com.azure.core.util.Context.NONE);
+ public static void
+ certificatesRetrieveProofOfPossessionNonce(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
+ manager.certificates().retrieveProofOfPossessionNonceWithResponse("MyResourceGroup1", "MyCatalog1", "active",
+ new ProofOfPossessionNonceRequest().withProofOfPossessionNonce("proofOfPossessionNonce"),
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -407,22 +454,22 @@ public final class CertificatesRetrieveProofOfPossessionNonceSamples {
### Deployments_CreateOrUpdate
```java
-/** Samples for Deployments CreateOrUpdate. */
+/**
+ * Samples for Deployments CreateOrUpdate.
+ */
public final class DeploymentsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDeployment.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutDeployment.json
*/
/**
* Sample code: Deployments_CreateOrUpdate.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deploymentsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deployments()
- .define("MyDeployment1")
- .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1")
- .create();
+ manager.deployments().define("MyDeployment1")
+ .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1").create();
}
}
```
@@ -430,26 +477,22 @@ public final class DeploymentsCreateOrUpdateSamples {
### Deployments_Delete
```java
-/** Samples for Deployments Delete. */
+/**
+ * Samples for Deployments Delete.
+ */
public final class DeploymentsDeleteSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDeployment.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteDeployment.json
*/
/**
* Sample code: Deployments_Delete.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deploymentsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deployments()
- .delete(
- "MyResourceGroup1",
- "MyCatalog1",
- "MyProductName1",
- "DeviceGroupName1",
- "MyDeploymentName1",
- com.azure.core.util.Context.NONE);
+ manager.deployments().delete("MyResourceGroup1", "MyCatalog1", "MyProductName1", "DeviceGroupName1",
+ "MyDeploymentName1", com.azure.core.util.Context.NONE);
}
}
```
@@ -457,26 +500,22 @@ public final class DeploymentsDeleteSamples {
### Deployments_Get
```java
-/** Samples for Deployments Get. */
+/**
+ * Samples for Deployments Get.
+ */
public final class DeploymentsGetSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeployment.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeployment.json
*/
/**
* Sample code: Deployments_Get.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deploymentsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deployments()
- .getWithResponse(
- "MyResourceGroup1",
- "MyCatalog1",
- "MyProduct1",
- "myDeviceGroup1",
- "MyDeployment1",
- com.azure.core.util.Context.NONE);
+ manager.deployments().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1",
+ "MyDeployment1", com.azure.core.util.Context.NONE);
}
}
```
@@ -484,29 +523,22 @@ public final class DeploymentsGetSamples {
### Deployments_ListByDeviceGroup
```java
-/** Samples for Deployments ListByDeviceGroup. */
+/**
+ * Samples for Deployments ListByDeviceGroup.
+ */
public final class DeploymentsListByDeviceGroupSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeployments.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeployments.json
*/
/**
* Sample code: Deployments_ListByDeviceGroup.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deploymentsListByDeviceGroup(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deployments()
- .listByDeviceGroup(
- "MyResourceGroup1",
- "MyCatalog1",
- "MyProduct1",
- "myDeviceGroup1",
- null,
- null,
- null,
- null,
- com.azure.core.util.Context.NONE);
+ manager.deployments().listByDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", null,
+ null, null, null, com.azure.core.util.Context.NONE);
}
}
```
@@ -517,30 +549,24 @@ public final class DeploymentsListByDeviceGroupSamples {
import com.azure.resourcemanager.sphere.models.ClaimDevicesRequest;
import java.util.Arrays;
-/** Samples for DeviceGroups ClaimDevices. */
+/**
+ * Samples for DeviceGroups ClaimDevices.
+ */
public final class DeviceGroupsClaimDevicesSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostClaimDevices.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostClaimDevices.json
*/
/**
* Sample code: DeviceGroups_ClaimDevices.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deviceGroupsClaimDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deviceGroups()
- .claimDevices(
- "MyResourceGroup1",
- "MyCatalog1",
- "MyProduct1",
- "MyDeviceGroup1",
- new ClaimDevicesRequest()
- .withDeviceIdentifiers(
- Arrays
- .asList(
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")),
- com.azure.core.util.Context.NONE);
+ manager.deviceGroups().claimDevices("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1",
+ new ClaimDevicesRequest().withDeviceIdentifiers(Arrays.asList(
+ "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")),
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -548,21 +574,22 @@ public final class DeviceGroupsClaimDevicesSamples {
### DeviceGroups_CountDevices
```java
-/** Samples for DeviceGroups CountDevices. */
+/**
+ * Samples for DeviceGroups CountDevices.
+ */
public final class DeviceGroupsCountDevicesSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostCountDevicesDeviceGroup.json
+ * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
+ * PostCountDevicesDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_CountDevices.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deviceGroupsCountDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deviceGroups()
- .countDevicesWithResponse(
- "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE);
+ manager.deviceGroups().countDevicesWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1",
+ "MyDeviceGroup1", com.azure.core.util.Context.NONE);
}
}
```
@@ -570,27 +597,28 @@ public final class DeviceGroupsCountDevicesSamples {
### DeviceGroups_CreateOrUpdate
```java
+import com.azure.resourcemanager.sphere.models.DeviceGroupProperties;
import com.azure.resourcemanager.sphere.models.OSFeedType;
import com.azure.resourcemanager.sphere.models.UpdatePolicy;
-/** Samples for DeviceGroups CreateOrUpdate. */
+/**
+ * Samples for DeviceGroups CreateOrUpdate.
+ */
public final class DeviceGroupsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDeviceGroup.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_CreateOrUpdate.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deviceGroupsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deviceGroups()
- .define("MyDeviceGroup1")
+ manager.deviceGroups().define("MyDeviceGroup1")
.withExistingProduct("MyResourceGroup1", "MyCatalog1", "MyProduct1")
- .withDescription("Description for MyDeviceGroup1")
- .withOsFeedType(OSFeedType.RETAIL)
- .withUpdatePolicy(UpdatePolicy.UPDATE_ALL)
+ .withProperties(new DeviceGroupProperties().withDescription("Description for MyDeviceGroup1")
+ .withOsFeedType(OSFeedType.RETAIL).withUpdatePolicy(UpdatePolicy.UPDATE_ALL))
.create();
}
}
@@ -599,20 +627,22 @@ public final class DeviceGroupsCreateOrUpdateSamples {
### DeviceGroups_Delete
```java
-/** Samples for DeviceGroups Delete. */
+/**
+ * Samples for DeviceGroups Delete.
+ */
public final class DeviceGroupsDeleteSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDeviceGroup.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_Delete.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deviceGroupsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deviceGroups()
- .delete("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE);
+ manager.deviceGroups().delete("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -620,21 +650,22 @@ public final class DeviceGroupsDeleteSamples {
### DeviceGroups_Get
```java
-/** Samples for DeviceGroups Get. */
+/**
+ * Samples for DeviceGroups Get.
+ */
public final class DeviceGroupsGetSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeviceGroup.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_Get.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deviceGroupsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deviceGroups()
- .getWithResponse(
- "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE);
+ manager.deviceGroups().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -642,28 +673,22 @@ public final class DeviceGroupsGetSamples {
### DeviceGroups_ListByProduct
```java
-/** Samples for DeviceGroups ListByProduct. */
+/**
+ * Samples for DeviceGroups ListByProduct.
+ */
public final class DeviceGroupsListByProductSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDeviceGroups.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDeviceGroups.json
*/
/**
* Sample code: DeviceGroups_ListByProduct.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deviceGroupsListByProduct(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .deviceGroups()
- .listByProduct(
- "MyResourceGroup1",
- "MyCatalog1",
- "MyProduct1",
- null,
- null,
- null,
- null,
- com.azure.core.util.Context.NONE);
+ manager.deviceGroups().listByProduct("MyResourceGroup1", "MyCatalog1", "MyProduct1", null, null, null, null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -673,23 +698,22 @@ public final class DeviceGroupsListByProductSamples {
```java
import com.azure.resourcemanager.sphere.models.DeviceGroup;
-/** Samples for DeviceGroups Update. */
+/**
+ * Samples for DeviceGroups Update.
+ */
public final class DeviceGroupsUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchDeviceGroup.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchDeviceGroup.json
*/
/**
* Sample code: DeviceGroups_Update.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void deviceGroupsUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- DeviceGroup resource =
- manager
- .deviceGroups()
- .getWithResponse(
- "MyResourceGroup1", "MyCatalog1", "MyProduct1", "MyDeviceGroup1", com.azure.core.util.Context.NONE)
- .getValue();
+ DeviceGroup resource = manager.deviceGroups().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1",
+ "MyDeviceGroup1", com.azure.core.util.Context.NONE).getValue();
resource.update().apply();
}
}
@@ -698,23 +722,23 @@ public final class DeviceGroupsUpdateSamples {
### Devices_CreateOrUpdate
```java
-/** Samples for Devices CreateOrUpdate. */
+/**
+ * Samples for Devices CreateOrUpdate.
+ */
public final class DevicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutDevice.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutDevice.json
*/
/**
* Sample code: Devices_CreateOrUpdate.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void devicesCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .devices()
- .define(
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
- .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1")
- .create();
+ manager.devices().define(
+ "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
+ .withExistingDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1").create();
}
}
```
@@ -722,26 +746,23 @@ public final class DevicesCreateOrUpdateSamples {
### Devices_Delete
```java
-/** Samples for Devices Delete. */
+/**
+ * Samples for Devices Delete.
+ */
public final class DevicesDeleteSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteDevice.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteDevice.json
*/
/**
* Sample code: Devices_Delete.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void devicesDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .devices()
- .delete(
- "MyResourceGroup1",
- "MyCatalog1",
- "MyProductName1",
- "DeviceGroupName1",
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- com.azure.core.util.Context.NONE);
+ manager.devices().delete("MyResourceGroup1", "MyCatalog1", "MyProductName1", "DeviceGroupName1",
+ "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -753,28 +774,25 @@ import com.azure.resourcemanager.sphere.models.CapabilityType;
import com.azure.resourcemanager.sphere.models.GenerateCapabilityImageRequest;
import java.util.Arrays;
-/** Samples for Devices GenerateCapabilityImage. */
+/**
+ * Samples for Devices GenerateCapabilityImage.
+ */
public final class DevicesGenerateCapabilityImageSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostGenerateDeviceCapabilityImage.json
+ * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
+ * PostGenerateDeviceCapabilityImage.json
*/
/**
* Sample code: Devices_GenerateCapabilityImage.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void devicesGenerateCapabilityImage(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .devices()
- .generateCapabilityImage(
- "MyResourceGroup1",
- "MyCatalog1",
- "MyProduct1",
- "myDeviceGroup1",
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- new GenerateCapabilityImageRequest()
- .withCapabilities(Arrays.asList(CapabilityType.APPLICATION_DEVELOPMENT)),
- com.azure.core.util.Context.NONE);
+ manager.devices().generateCapabilityImage("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1",
+ "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ new GenerateCapabilityImageRequest().withCapabilities(
+ Arrays.asList(CapabilityType.APPLICATION_DEVELOPMENT)),
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -782,26 +800,23 @@ public final class DevicesGenerateCapabilityImageSamples {
### Devices_Get
```java
-/** Samples for Devices Get. */
+/**
+ * Samples for Devices Get.
+ */
public final class DevicesGetSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDevice.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDevice.json
*/
/**
* Sample code: Devices_Get.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void devicesGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .devices()
- .getWithResponse(
- "MyResourceGroup1",
- "MyCatalog1",
- "MyProduct1",
- "myDeviceGroup1",
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- com.azure.core.util.Context.NONE);
+ manager.devices().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1",
+ "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -809,21 +824,22 @@ public final class DevicesGetSamples {
### Devices_ListByDeviceGroup
```java
-/** Samples for Devices ListByDeviceGroup. */
+/**
+ * Samples for Devices ListByDeviceGroup.
+ */
public final class DevicesListByDeviceGroupSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetDevices.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetDevices.json
*/
/**
* Sample code: Devices_ListByDeviceGroup.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void devicesListByDeviceGroup(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .devices()
- .listByDeviceGroup(
- "MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1", com.azure.core.util.Context.NONE);
+ manager.devices().listByDeviceGroup("MyResourceGroup1", "MyCatalog1", "MyProduct1", "myDeviceGroup1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -833,28 +849,24 @@ public final class DevicesListByDeviceGroupSamples {
```java
import com.azure.resourcemanager.sphere.models.Device;
-/** Samples for Devices Update. */
+/**
+ * Samples for Devices Update.
+ */
public final class DevicesUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchDevice.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchDevice.json
*/
/**
* Sample code: Devices_Update.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void devicesUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- Device resource =
- manager
- .devices()
- .getWithResponse(
- "MyResourceGroup1",
- "MyCatalog1",
- "MyProduct1",
- "MyDeviceGroup1",
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- com.azure.core.util.Context.NONE)
- .getValue();
+ Device resource = manager.devices().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1",
+ "MyDeviceGroup1",
+ "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ com.azure.core.util.Context.NONE).getValue();
resource.update().apply();
}
}
@@ -863,23 +875,25 @@ public final class DevicesUpdateSamples {
### Images_CreateOrUpdate
```java
-/** Samples for Images CreateOrUpdate. */
+import com.azure.resourcemanager.sphere.models.ImageProperties;
+
+/**
+ * Samples for Images CreateOrUpdate.
+ */
public final class ImagesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutImage.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutImage.json
*/
/**
* Sample code: Image_CreateOrUpdate.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void imageCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .images()
- .define("default")
+ manager.images().define("00000000-0000-0000-0000-000000000000")
.withExistingCatalog("MyResourceGroup1", "MyCatalog1")
- .withImage("bXliYXNlNjRzdHJpbmc=")
- .create();
+ .withProperties(new ImageProperties().withImage("bXliYXNlNjRzdHJpbmc=")).create();
}
}
```
@@ -887,18 +901,22 @@ public final class ImagesCreateOrUpdateSamples {
### Images_Delete
```java
-/** Samples for Images Delete. */
+/**
+ * Samples for Images Delete.
+ */
public final class ImagesDeleteSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteImage.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteImage.json
*/
/**
* Sample code: Images_Delete.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void imagesDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager.images().delete("MyResourceGroup1", "MyCatalog1", "imageID", com.azure.core.util.Context.NONE);
+ manager.images().delete("MyResourceGroup1", "MyCatalog1", "00000000-0000-0000-0000-000000000000",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -906,20 +924,22 @@ public final class ImagesDeleteSamples {
### Images_Get
```java
-/** Samples for Images Get. */
+/**
+ * Samples for Images Get.
+ */
public final class ImagesGetSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetImage.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetImage.json
*/
/**
* Sample code: Images_Get.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void imagesGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .images()
- .getWithResponse("MyResourceGroup1", "MyCatalog1", "myImageId", com.azure.core.util.Context.NONE);
+ manager.images().getWithResponse("MyResourceGroup1", "MyCatalog1", "00000000-0000-0000-0000-000000000000",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -927,20 +947,22 @@ public final class ImagesGetSamples {
### Images_ListByCatalog
```java
-/** Samples for Images ListByCatalog. */
+/**
+ * Samples for Images ListByCatalog.
+ */
public final class ImagesListByCatalogSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetImages.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetImages.json
*/
/**
* Sample code: Images_ListByCatalog.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void imagesListByCatalog(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .images()
- .listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null, com.azure.core.util.Context.NONE);
+ manager.images().listByCatalog("MyResourceGroup1", "MyCatalog1", null, null, null, null,
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -948,14 +970,17 @@ public final class ImagesListByCatalogSamples {
### Operations_List
```java
-/** Samples for Operations List. */
+/**
+ * Samples for Operations List.
+ */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetOperations.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetOperations.json
*/
/**
* Sample code: Operations_List.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void operationsList(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
@@ -967,20 +992,23 @@ public final class OperationsListSamples {
### Products_CountDevices
```java
-/** Samples for Products CountDevices. */
+/**
+ * Samples for Products CountDevices.
+ */
public final class ProductsCountDevicesSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostCountDevicesProduct.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PostCountDevicesProduct.
+ * json
*/
/**
* Sample code: Products_CountDevices.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void productsCountDevices(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .products()
- .countDevicesWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE);
+ manager.products().countDevicesWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -988,14 +1016,17 @@ public final class ProductsCountDevicesSamples {
### Products_CreateOrUpdate
```java
-/** Samples for Products CreateOrUpdate. */
+/**
+ * Samples for Products CreateOrUpdate.
+ */
public final class ProductsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PutProduct.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PutProduct.json
*/
/**
* Sample code: Products_CreateOrUpdate.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void productsCreateOrUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
@@ -1007,14 +1038,17 @@ public final class ProductsCreateOrUpdateSamples {
### Products_Delete
```java
-/** Samples for Products Delete. */
+/**
+ * Samples for Products Delete.
+ */
public final class ProductsDeleteSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/DeleteProduct.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/DeleteProduct.json
*/
/**
* Sample code: Products_Delete.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void productsDelete(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
@@ -1026,22 +1060,23 @@ public final class ProductsDeleteSamples {
### Products_GenerateDefaultDeviceGroups
```java
-/** Samples for Products GenerateDefaultDeviceGroups. */
+/**
+ * Samples for Products GenerateDefaultDeviceGroups.
+ */
public final class ProductsGenerateDefaultDeviceGroupsSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PostGenerateDefaultDeviceGroups.json
+ * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/
+ * PostGenerateDefaultDeviceGroups.json
*/
/**
* Sample code: Products_GenerateDefaultDeviceGroups.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
- public static void productsGenerateDefaultDeviceGroups(
- com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .products()
- .generateDefaultDeviceGroups(
- "MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE);
+ public static void
+ productsGenerateDefaultDeviceGroups(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
+ manager.products().generateDefaultDeviceGroups("MyResourceGroup1", "MyCatalog1", "MyProduct1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1049,20 +1084,22 @@ public final class ProductsGenerateDefaultDeviceGroupsSamples {
### Products_Get
```java
-/** Samples for Products Get. */
+/**
+ * Samples for Products Get.
+ */
public final class ProductsGetSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetProduct.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetProduct.json
*/
/**
* Sample code: Products_Get.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void productsGet(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- manager
- .products()
- .getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE);
+ manager.products().getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1070,14 +1107,17 @@ public final class ProductsGetSamples {
### Products_ListByCatalog
```java
-/** Samples for Products ListByCatalog. */
+/**
+ * Samples for Products ListByCatalog.
+ */
public final class ProductsListByCatalogSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/GetProducts.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/GetProducts.json
*/
/**
* Sample code: Products_ListByCatalog.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void productsListByCatalog(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
@@ -1091,22 +1131,23 @@ public final class ProductsListByCatalogSamples {
```java
import com.azure.resourcemanager.sphere.models.Product;
-/** Samples for Products Update. */
+/**
+ * Samples for Products Update.
+ */
public final class ProductsUpdateSamples {
/*
- * x-ms-original-file: specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/examples/PatchProduct.json
+ * x-ms-original-file:
+ * specification/sphere/resource-manager/Microsoft.AzureSphere/stable/2024-04-01/examples/PatchProduct.json
*/
/**
* Sample code: Products_Update.
- *
+ *
* @param manager Entry point to AzureSphereManager.
*/
public static void productsUpdate(com.azure.resourcemanager.sphere.AzureSphereManager manager) {
- Product resource =
- manager
- .products()
- .getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE)
- .getValue();
+ Product resource = manager.products()
+ .getWithResponse("MyResourceGroup1", "MyCatalog1", "MyProduct1", com.azure.core.util.Context.NONE)
+ .getValue();
resource.update().apply();
}
}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/pom.xml b/sdk/sphere/azure-resourcemanager-sphere/pom.xml
index 181c59053ef55..25fac3c84f3db 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/pom.xml
+++ b/sdk/sphere/azure-resourcemanager-sphere/pom.xml
@@ -14,11 +14,11 @@
com.azure.resourcemanagerazure-resourcemanager-sphere
- 1.0.0-beta.2
+ 1.1.0-beta.1jarMicrosoft Azure SDK for AzureSphere Management
- This package contains Microsoft Azure SDK for AzureSphere Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Sphere resource management API. Package tag package-2022-09-01-preview.
+ This package contains Microsoft Azure SDK for AzureSphere Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Sphere resource management API. Package tag package-2024-04-01.https://github.com/Azure/azure-sdk-for-java
@@ -87,8 +87,6 @@
4.11.0test
-
-
net.bytebuddybyte-buddy
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/AzureSphereManager.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/AzureSphereManager.java
index 6b49b7f12dc7d..e13e0d5d2607b 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/AzureSphereManager.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/AzureSphereManager.java
@@ -23,8 +23,8 @@
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.sphere.fluent.AzureSphereManagementClient;
-import com.azure.resourcemanager.sphere.implementation.AzureSphereManagementClientBuilder;
+import com.azure.resourcemanager.sphere.fluent.AzureSphereMgmtClient;
+import com.azure.resourcemanager.sphere.implementation.AzureSphereMgmtClientBuilder;
import com.azure.resourcemanager.sphere.implementation.CatalogsImpl;
import com.azure.resourcemanager.sphere.implementation.CertificatesImpl;
import com.azure.resourcemanager.sphere.implementation.DeploymentsImpl;
@@ -48,7 +48,10 @@
import java.util.Objects;
import java.util.stream.Collectors;
-/** Entry point to AzureSphereManager. Azure Sphere resource management API. */
+/**
+ * Entry point to AzureSphereManager.
+ * Azure Sphere resource management API.
+ */
public final class AzureSphereManager {
private Operations operations;
@@ -66,23 +69,19 @@ public final class AzureSphereManager {
private Devices devices;
- private final AzureSphereManagementClient clientObject;
+ private final AzureSphereMgmtClient clientObject;
private AzureSphereManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- this.clientObject =
- new AzureSphereManagementClientBuilder()
- .pipeline(httpPipeline)
- .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
- .subscriptionId(profile.getSubscriptionId())
- .defaultPollInterval(defaultPollInterval)
- .buildClient();
+ this.clientObject = new AzureSphereMgmtClientBuilder().pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval).buildClient();
}
/**
* Creates an instance of AzureSphere service API entry point.
- *
+ *
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the AzureSphere service API instance.
@@ -95,7 +94,7 @@ public static AzureSphereManager authenticate(TokenCredential credential, AzureP
/**
* Creates an instance of AzureSphere service API entry point.
- *
+ *
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
* @return the AzureSphere service API instance.
@@ -108,14 +107,16 @@ public static AzureSphereManager authenticate(HttpPipeline httpPipeline, AzurePr
/**
* Gets a Configurable instance that can be used to create AzureSphereManager with optional configuration.
- *
+ *
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
return new AzureSphereManager.Configurable();
}
- /** The Configurable allowing configurations to be set. */
+ /**
+ * The Configurable allowing configurations to be set.
+ */
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
@@ -187,8 +188,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
/**
* Sets the retry options for the HTTP pipeline retry policy.
- *
- *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
*
* @param retryOptions the retry options for the HTTP pipeline retry policy.
* @return the configurable object itself.
@@ -205,8 +206,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval =
- Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ this.defaultPollInterval
+ = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw LOGGER
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
@@ -226,21 +227,12 @@ public AzureSphereManager authenticate(TokenCredential credential, AzureProfile
Objects.requireNonNull(profile, "'profile' cannot be null.");
StringBuilder userAgentBuilder = new StringBuilder();
- userAgentBuilder
- .append("azsdk-java")
- .append("-")
- .append("com.azure.resourcemanager.sphere")
- .append("/")
- .append("1.0.0-beta.1");
+ userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.sphere").append("/")
+ .append("1.0.0");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
- userAgentBuilder
- .append(" (")
- .append(Configuration.getGlobalConfiguration().get("java.version"))
- .append("; ")
- .append(Configuration.getGlobalConfiguration().get("os.name"))
- .append("; ")
- .append(Configuration.getGlobalConfiguration().get("os.version"))
- .append("; auto-generated)");
+ userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}
@@ -259,38 +251,25 @@ public AzureSphereManager authenticate(TokenCredential credential, AzureProfile
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
- policies
- .addAll(
- this
- .policies
- .stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
- .collect(Collectors.toList()));
+ policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
- policies
- .addAll(
- this
- .policies
- .stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
- .collect(Collectors.toList()));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
- HttpPipeline httpPipeline =
- new HttpPipelineBuilder()
- .httpClient(httpClient)
- .policies(policies.toArray(new HttpPipelinePolicy[0]))
- .build();
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0])).build();
return new AzureSphereManager(httpPipeline, profile, defaultPollInterval);
}
}
/**
* Gets the resource collection API of Operations.
- *
+ *
* @return Resource collection API of Operations.
*/
public Operations operations() {
@@ -302,7 +281,7 @@ public Operations operations() {
/**
* Gets the resource collection API of Catalogs. It manages Catalog.
- *
+ *
* @return Resource collection API of Catalogs.
*/
public Catalogs catalogs() {
@@ -314,7 +293,7 @@ public Catalogs catalogs() {
/**
* Gets the resource collection API of Certificates.
- *
+ *
* @return Resource collection API of Certificates.
*/
public Certificates certificates() {
@@ -326,7 +305,7 @@ public Certificates certificates() {
/**
* Gets the resource collection API of Images. It manages Image.
- *
+ *
* @return Resource collection API of Images.
*/
public Images images() {
@@ -338,7 +317,7 @@ public Images images() {
/**
* Gets the resource collection API of Products. It manages Product.
- *
+ *
* @return Resource collection API of Products.
*/
public Products products() {
@@ -350,7 +329,7 @@ public Products products() {
/**
* Gets the resource collection API of DeviceGroups. It manages DeviceGroup.
- *
+ *
* @return Resource collection API of DeviceGroups.
*/
public DeviceGroups deviceGroups() {
@@ -362,7 +341,7 @@ public DeviceGroups deviceGroups() {
/**
* Gets the resource collection API of Deployments. It manages Deployment.
- *
+ *
* @return Resource collection API of Deployments.
*/
public Deployments deployments() {
@@ -374,7 +353,7 @@ public Deployments deployments() {
/**
* Gets the resource collection API of Devices. It manages Device.
- *
+ *
* @return Resource collection API of Devices.
*/
public Devices devices() {
@@ -385,10 +364,12 @@ public Devices devices() {
}
/**
- * @return Wrapped service client AzureSphereManagementClient providing direct access to the underlying
- * auto-generated API implementation, based on Azure REST API.
+ * Gets wrapped service client AzureSphereMgmtClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client AzureSphereMgmtClient.
*/
- public AzureSphereManagementClient serviceClient() {
+ public AzureSphereMgmtClient serviceClient() {
return this.clientObject;
}
}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereMgmtClient.java
similarity index 91%
rename from sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java
rename to sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereMgmtClient.java
index 82f217261953a..5a4f1d01f66cf 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereManagementClient.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/AzureSphereMgmtClient.java
@@ -7,95 +7,97 @@
import com.azure.core.http.HttpPipeline;
import java.time.Duration;
-/** The interface for AzureSphereManagementClient class. */
-public interface AzureSphereManagementClient {
+/**
+ * The interface for AzureSphereMgmtClient class.
+ */
+public interface AzureSphereMgmtClient {
/**
* Gets The ID of the target subscription.
- *
+ *
* @return the subscriptionId value.
*/
String getSubscriptionId();
/**
* Gets server parameter.
- *
+ *
* @return the endpoint value.
*/
String getEndpoint();
/**
* Gets Api Version.
- *
+ *
* @return the apiVersion value.
*/
String getApiVersion();
/**
* Gets The HTTP pipeline to send requests through.
- *
+ *
* @return the httpPipeline value.
*/
HttpPipeline getHttpPipeline();
/**
* Gets The default poll interval for long-running operation.
- *
+ *
* @return the defaultPollInterval value.
*/
Duration getDefaultPollInterval();
/**
* Gets the OperationsClient object to access its operations.
- *
+ *
* @return the OperationsClient object.
*/
OperationsClient getOperations();
/**
* Gets the CatalogsClient object to access its operations.
- *
+ *
* @return the CatalogsClient object.
*/
CatalogsClient getCatalogs();
/**
* Gets the CertificatesClient object to access its operations.
- *
+ *
* @return the CertificatesClient object.
*/
CertificatesClient getCertificates();
/**
* Gets the ImagesClient object to access its operations.
- *
+ *
* @return the ImagesClient object.
*/
ImagesClient getImages();
/**
* Gets the ProductsClient object to access its operations.
- *
+ *
* @return the ProductsClient object.
*/
ProductsClient getProducts();
/**
* Gets the DeviceGroupsClient object to access its operations.
- *
+ *
* @return the DeviceGroupsClient object.
*/
DeviceGroupsClient getDeviceGroups();
/**
* Gets the DeploymentsClient object to access its operations.
- *
+ *
* @return the DeploymentsClient object.
*/
DeploymentsClient getDeployments();
/**
* Gets the DevicesClient object to access its operations.
- *
+ *
* @return the DevicesClient object.
*/
DevicesClient getDevices();
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java
index b06050790d6c4..d66f6cffc0bce 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CatalogsClient.java
@@ -12,19 +12,22 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.sphere.fluent.models.CatalogInner;
-import com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner;
+import com.azure.resourcemanager.sphere.fluent.models.CountDevicesResponseInner;
import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner;
import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner;
import com.azure.resourcemanager.sphere.fluent.models.DeviceInner;
import com.azure.resourcemanager.sphere.fluent.models.DeviceInsightInner;
+import com.azure.resourcemanager.sphere.fluent.models.ImageInner;
import com.azure.resourcemanager.sphere.models.CatalogUpdate;
import com.azure.resourcemanager.sphere.models.ListDeviceGroupsRequest;
-/** An instance of this class provides access to all the operations defined in CatalogsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in CatalogsClient.
+ */
public interface CatalogsClient {
/**
* List Catalog resources by subscription ID.
- *
+ *
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response of a Catalog list operation as paginated response with {@link PagedIterable}.
@@ -34,7 +37,7 @@ public interface CatalogsClient {
/**
* List Catalog resources by subscription ID.
- *
+ *
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -46,7 +49,7 @@ public interface CatalogsClient {
/**
* List Catalog resources by resource group.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -58,7 +61,7 @@ public interface CatalogsClient {
/**
* List Catalog resources by resource group.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -71,7 +74,7 @@ public interface CatalogsClient {
/**
* Get a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param context The context to associate with this operation.
@@ -81,12 +84,12 @@ public interface CatalogsClient {
* @return a Catalog along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String catalogName, Context context);
+ Response getByResourceGroupWithResponse(String resourceGroupName, String catalogName,
+ Context context);
/**
* Get a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -99,7 +102,7 @@ Response getByResourceGroupWithResponse(
/**
* Create a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param resource Resource create parameters.
@@ -109,12 +112,12 @@ Response getByResourceGroupWithResponse(
* @return the {@link SyncPoller} for polling of an Azure Sphere catalog.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CatalogInner> beginCreateOrUpdate(
- String resourceGroupName, String catalogName, CatalogInner resource);
+ SyncPoller, CatalogInner> beginCreateOrUpdate(String resourceGroupName, String catalogName,
+ CatalogInner resource);
/**
* Create a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param resource Resource create parameters.
@@ -125,12 +128,12 @@ SyncPoller, CatalogInner> beginCreateOrUpdate(
* @return the {@link SyncPoller} for polling of an Azure Sphere catalog.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, CatalogInner> beginCreateOrUpdate(
- String resourceGroupName, String catalogName, CatalogInner resource, Context context);
+ SyncPoller, CatalogInner> beginCreateOrUpdate(String resourceGroupName, String catalogName,
+ CatalogInner resource, Context context);
/**
* Create a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param resource Resource create parameters.
@@ -144,7 +147,7 @@ SyncPoller, CatalogInner> beginCreateOrUpdate(
/**
* Create a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param resource Resource create parameters.
@@ -159,7 +162,7 @@ SyncPoller, CatalogInner> beginCreateOrUpdate(
/**
* Update a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param properties The resource properties to be updated.
@@ -170,12 +173,12 @@ SyncPoller, CatalogInner> beginCreateOrUpdate(
* @return an Azure Sphere catalog along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName, String catalogName, CatalogUpdate properties, Context context);
+ Response updateWithResponse(String resourceGroupName, String catalogName, CatalogUpdate properties,
+ Context context);
/**
* Update a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param properties The resource properties to be updated.
@@ -189,7 +192,7 @@ Response updateWithResponse(
/**
* Delete a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -202,7 +205,7 @@ Response updateWithResponse(
/**
* Delete a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param context The context to associate with this operation.
@@ -216,7 +219,7 @@ Response updateWithResponse(
/**
* Delete a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -228,7 +231,7 @@ Response updateWithResponse(
/**
* Delete a Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param context The context to associate with this operation.
@@ -241,7 +244,7 @@ Response updateWithResponse(
/**
* Counts devices in catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param context The context to associate with this operation.
@@ -251,12 +254,12 @@ Response updateWithResponse(
* @return response to the action call for count devices in a catalog along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response countDevicesWithResponse(
- String resourceGroupName, String catalogName, Context context);
+ Response countDevicesWithResponse(String resourceGroupName, String catalogName,
+ Context context);
/**
* Counts devices in catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -265,11 +268,11 @@ Response countDevicesWithResponse(
* @return response to the action call for count devices in a catalog.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CountDeviceResponseInner countDevices(String resourceGroupName, String catalogName);
+ CountDevicesResponseInner countDevices(String resourceGroupName, String catalogName);
/**
* Lists deployments for catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -282,7 +285,7 @@ Response countDevicesWithResponse(
/**
* Lists deployments for catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param filter Filter the result list using the given expression.
@@ -296,18 +299,12 @@ Response countDevicesWithResponse(
* @return the response of a Deployment list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listDeployments(
- String resourceGroupName,
- String catalogName,
- String filter,
- Integer top,
- Integer skip,
- Integer maxpagesize,
- Context context);
+ PagedIterable listDeployments(String resourceGroupName, String catalogName, String filter,
+ Integer top, Integer skip, Integer maxpagesize, Context context);
/**
* List the device groups for the catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param listDeviceGroupsRequest List device groups for catalog.
@@ -317,12 +314,12 @@ PagedIterable listDeployments(
* @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listDeviceGroups(
- String resourceGroupName, String catalogName, ListDeviceGroupsRequest listDeviceGroupsRequest);
+ PagedIterable listDeviceGroups(String resourceGroupName, String catalogName,
+ ListDeviceGroupsRequest listDeviceGroupsRequest);
/**
* List the device groups for the catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param listDeviceGroupsRequest List device groups for catalog.
@@ -337,19 +334,13 @@ PagedIterable listDeviceGroups(
* @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listDeviceGroups(
- String resourceGroupName,
- String catalogName,
- ListDeviceGroupsRequest listDeviceGroupsRequest,
- String filter,
- Integer top,
- Integer skip,
- Integer maxpagesize,
+ PagedIterable listDeviceGroups(String resourceGroupName, String catalogName,
+ ListDeviceGroupsRequest listDeviceGroupsRequest, String filter, Integer top, Integer skip, Integer maxpagesize,
Context context);
/**
* Lists device insights for catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -362,7 +353,7 @@ PagedIterable listDeviceGroups(
/**
* Lists device insights for catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param filter Filter the result list using the given expression.
@@ -376,18 +367,12 @@ PagedIterable listDeviceGroups(
* @return paged collection of DeviceInsight items as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listDeviceInsights(
- String resourceGroupName,
- String catalogName,
- String filter,
- Integer top,
- Integer skip,
- Integer maxpagesize,
- Context context);
+ PagedIterable listDeviceInsights(String resourceGroupName, String catalogName, String filter,
+ Integer top, Integer skip, Integer maxpagesize, Context context);
/**
* Lists devices for catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -400,7 +385,7 @@ PagedIterable listDeviceInsights(
/**
* Lists devices for catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param filter Filter the result list using the given expression.
@@ -414,12 +399,64 @@ PagedIterable listDeviceInsights(
* @return the response of a Device list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listDevices(
- String resourceGroupName,
- String catalogName,
- String filter,
- Integer top,
- Integer skip,
- Integer maxpagesize,
- Context context);
+ PagedIterable listDevices(String resourceGroupName, String catalogName, String filter, Integer top,
+ Integer skip, Integer maxpagesize, Context context);
+
+ /**
+ * Creates an image. Use this action when the image ID is unknown.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param uploadImageRequest Image upload request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginUploadImage(String resourceGroupName, String catalogName,
+ ImageInner uploadImageRequest);
+
+ /**
+ * Creates an image. Use this action when the image ID is unknown.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param uploadImageRequest Image upload request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginUploadImage(String resourceGroupName, String catalogName,
+ ImageInner uploadImageRequest, Context context);
+
+ /**
+ * Creates an image. Use this action when the image ID is unknown.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param uploadImageRequest Image upload request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void uploadImage(String resourceGroupName, String catalogName, ImageInner uploadImageRequest);
+
+ /**
+ * Creates an image. Use this action when the image ID is unknown.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param catalogName Name of catalog.
+ * @param uploadImageRequest Image upload request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void uploadImage(String resourceGroupName, String catalogName, ImageInner uploadImageRequest, Context context);
}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java
index a25275cddf218..b76a551fcd5e8 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/CertificatesClient.java
@@ -14,11 +14,13 @@
import com.azure.resourcemanager.sphere.fluent.models.ProofOfPossessionNonceResponseInner;
import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest;
-/** An instance of this class provides access to all the operations defined in CertificatesClient. */
+/**
+ * An instance of this class provides access to all the operations defined in CertificatesClient.
+ */
public interface CertificatesClient {
/**
* List Certificate resources by Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -31,7 +33,7 @@ public interface CertificatesClient {
/**
* List Certificate resources by Catalog.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param filter Filter the result list using the given expression.
@@ -45,18 +47,12 @@ public interface CertificatesClient {
* @return the response of a Certificate list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByCatalog(
- String resourceGroupName,
- String catalogName,
- String filter,
- Integer top,
- Integer skip,
- Integer maxpagesize,
- Context context);
+ PagedIterable listByCatalog(String resourceGroupName, String catalogName, String filter,
+ Integer top, Integer skip, Integer maxpagesize, Context context);
/**
* Get a Certificate.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
@@ -67,12 +63,12 @@ PagedIterable listByCatalog(
* @return a Certificate along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String catalogName, String serialNumber, Context context);
+ Response getWithResponse(String resourceGroupName, String catalogName, String serialNumber,
+ Context context);
/**
* Get a Certificate.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
@@ -86,7 +82,7 @@ Response getWithResponse(
/**
* Retrieves cert chain.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
@@ -97,12 +93,12 @@ Response getWithResponse(
* @return the certificate chain response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response retrieveCertChainWithResponse(
- String resourceGroupName, String catalogName, String serialNumber, Context context);
+ Response retrieveCertChainWithResponse(String resourceGroupName, String catalogName,
+ String serialNumber, Context context);
/**
* Retrieves cert chain.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
@@ -116,7 +112,7 @@ Response retrieveCertChainWithResponse(
/**
* Gets the proof of possession nonce.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
@@ -128,16 +124,13 @@ Response retrieveCertChainWithResponse(
* @return the proof of possession nonce along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response retrieveProofOfPossessionNonceWithResponse(
- String resourceGroupName,
- String catalogName,
- String serialNumber,
- ProofOfPossessionNonceRequest proofOfPossessionNonceRequest,
+ Response retrieveProofOfPossessionNonceWithResponse(String resourceGroupName,
+ String catalogName, String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest,
Context context);
/**
* Gets the proof of possession nonce.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
@@ -148,9 +141,6 @@ Response retrieveProofOfPossessionNonceWith
* @return the proof of possession nonce.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ProofOfPossessionNonceResponseInner retrieveProofOfPossessionNonce(
- String resourceGroupName,
- String catalogName,
- String serialNumber,
- ProofOfPossessionNonceRequest proofOfPossessionNonceRequest);
+ ProofOfPossessionNonceResponseInner retrieveProofOfPossessionNonce(String resourceGroupName, String catalogName,
+ String serialNumber, ProofOfPossessionNonceRequest proofOfPossessionNonceRequest);
}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java
index 0d59f94edfa18..c02caa703a712 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeploymentsClient.java
@@ -13,12 +13,14 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.sphere.fluent.models.DeploymentInner;
-/** An instance of this class provides access to all the operations defined in DeploymentsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in DeploymentsClient.
+ */
public interface DeploymentsClient {
/**
* List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be
* used for product or device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
@@ -29,13 +31,13 @@ public interface DeploymentsClient {
* @return the response of a Deployment list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByDeviceGroup(
- String resourceGroupName, String catalogName, String productName, String deviceGroupName);
+ PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName,
+ String deviceGroupName);
/**
* List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be
* used for product or device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
@@ -51,27 +53,19 @@ PagedIterable listByDeviceGroup(
* @return the response of a Deployment list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByDeviceGroup(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- String filter,
- Integer top,
- Integer skip,
- Integer maxpagesize,
- Context context);
+ PagedIterable listByDeviceGroup(String resourceGroupName, String catalogName, String productName,
+ String deviceGroupName, String filter, Integer top, Integer skip, Integer maxpagesize, Context context);
/**
* Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device
* group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -79,47 +73,38 @@ PagedIterable listByDeviceGroup(
* @return a Deployment along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- String deploymentName,
- Context context);
+ Response getWithResponse(String resourceGroupName, String catalogName, String productName,
+ String deviceGroupName, String deploymentName, Context context);
/**
* Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device
* group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Deployment.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DeploymentInner get(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
+ DeploymentInner get(String resourceGroupName, String catalogName, String productName, String deviceGroupName,
String deploymentName);
/**
* Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @param resource Resource create parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -127,24 +112,20 @@ DeploymentInner get(
* @return the {@link SyncPoller} for polling of an deployment resource belonging to a device group resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, DeploymentInner> beginCreateOrUpdate(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- String deploymentName,
+ SyncPoller, DeploymentInner> beginCreateOrUpdate(String resourceGroupName,
+ String catalogName, String productName, String deviceGroupName, String deploymentName,
DeploymentInner resource);
/**
* Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @param resource Resource create parameters.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -153,25 +134,20 @@ SyncPoller, DeploymentInner> beginCreateOrUpdate(
* @return the {@link SyncPoller} for polling of an deployment resource belonging to a device group resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, DeploymentInner> beginCreateOrUpdate(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- String deploymentName,
- DeploymentInner resource,
+ SyncPoller, DeploymentInner> beginCreateOrUpdate(String resourceGroupName,
+ String catalogName, String productName, String deviceGroupName, String deploymentName, DeploymentInner resource,
Context context);
/**
* Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @param resource Resource create parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -179,24 +155,19 @@ SyncPoller, DeploymentInner> beginCreateOrUpdate(
* @return an deployment resource belonging to a device group resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DeploymentInner createOrUpdate(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- String deploymentName,
- DeploymentInner resource);
+ DeploymentInner createOrUpdate(String resourceGroupName, String catalogName, String productName,
+ String deviceGroupName, String deploymentName, DeploymentInner resource);
/**
* Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @param resource Resource create parameters.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -205,48 +176,38 @@ DeploymentInner createOrUpdate(
* @return an deployment resource belonging to a device group resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- DeploymentInner createOrUpdate(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- String deploymentName,
- DeploymentInner resource,
- Context context);
+ DeploymentInner createOrUpdate(String resourceGroupName, String catalogName, String productName,
+ String deviceGroupName, String deploymentName, DeploymentInner resource, Context context);
/**
* Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- String deploymentName);
+ SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName,
+ String deviceGroupName, String deploymentName);
/**
* Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -254,57 +215,43 @@ SyncPoller, Void> beginDelete(
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- String deploymentName,
- Context context);
+ SyncPoller, Void> beginDelete(String resourceGroupName, String catalogName, String productName,
+ String deviceGroupName, String deploymentName, Context context);
/**
* Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
+ void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName,
String deploymentName);
/**
* Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
* @param deviceGroupName Name of device group.
* @param deploymentName Deployment name. Use .default for deployment creation and to get the current deployment for
- * the associated device group.
+ * the associated device group.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- String deploymentName,
- Context context);
+ void delete(String resourceGroupName, String catalogName, String productName, String deviceGroupName,
+ String deploymentName, Context context);
}
diff --git a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java
index 4e210133bb5c0..5de380b9aaf79 100644
--- a/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java
+++ b/sdk/sphere/azure-resourcemanager-sphere/src/main/java/com/azure/resourcemanager/sphere/fluent/DeviceGroupsClient.java
@@ -11,17 +11,19 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
-import com.azure.resourcemanager.sphere.fluent.models.CountDeviceResponseInner;
+import com.azure.resourcemanager.sphere.fluent.models.CountDevicesResponseInner;
import com.azure.resourcemanager.sphere.fluent.models.DeviceGroupInner;
import com.azure.resourcemanager.sphere.models.ClaimDevicesRequest;
import com.azure.resourcemanager.sphere.models.DeviceGroupUpdate;
-/** An instance of this class provides access to all the operations defined in DeviceGroupsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in DeviceGroupsClient.
+ */
public interface DeviceGroupsClient {
/**
* List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used
* for product name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
@@ -36,7 +38,7 @@ public interface DeviceGroupsClient {
/**
* List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used
* for product name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
@@ -51,20 +53,13 @@ public interface DeviceGroupsClient {
* @return the response of a DeviceGroup list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByProduct(
- String resourceGroupName,
- String catalogName,
- String productName,
- String filter,
- Integer top,
- Integer skip,
- Integer maxpagesize,
- Context context);
+ PagedIterable listByProduct(String resourceGroupName, String catalogName, String productName,
+ String filter, Integer top, Integer skip, Integer maxpagesize, Context context);
/**
* Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
@@ -76,13 +71,13 @@ PagedIterable listByProduct(
* @return a DeviceGroup along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String catalogName, String productName, String deviceGroupName, Context context);
+ Response getWithResponse(String resourceGroupName, String catalogName, String productName,
+ String deviceGroupName, Context context);
/**
* Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
@@ -98,7 +93,7 @@ Response getWithResponse(
/**
* Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
@@ -110,17 +105,13 @@ Response getWithResponse(
* @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, DeviceGroupInner> beginCreateOrUpdate(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- DeviceGroupInner resource);
+ SyncPoller, DeviceGroupInner> beginCreateOrUpdate(String resourceGroupName,
+ String catalogName, String productName, String deviceGroupName, DeviceGroupInner resource);
/**
* Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
@@ -133,18 +124,13 @@ SyncPoller, DeviceGroupInner> beginCreateOrUpdate(
* @return the {@link SyncPoller} for polling of an device group resource belonging to a product resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, DeviceGroupInner> beginCreateOrUpdate(
- String resourceGroupName,
- String catalogName,
- String productName,
- String deviceGroupName,
- DeviceGroupInner resource,
- Context context);
+ SyncPoller, DeviceGroupInner> beginCreateOrUpdate(String resourceGroupName,
+ String catalogName, String productName, String deviceGroupName, DeviceGroupInner resource, Context context);
/**
* Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or
* device group name.
- *
+ *
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param catalogName Name of catalog.
* @param productName Name of product.
@@ -156,17 +142,13 @@ SyncPoller