From 829eda6e71e0687c1123f6e62fe2fbc002e7a7c4 Mon Sep 17 00:00:00 2001 From: Yabo Hu Date: Fri, 10 Nov 2023 18:37:47 +0800 Subject: [PATCH] sync main with release-2023-11-14 (#23346) * Sync resourceManagement.yml (#23294) * Changed default selection to prevent inaccuracies (#23313) Co-authored-by: Mike F. Robbins * update TestLiveScenarios.ps1 (#23304) * Display cmdlet, parameter set and parameter level coverage data for a module (#23327) * General Availability of Az.Tools.Installer (#23323) * Migration Guide of Az 11.0.0 (#23328) * Try to Generate Migration Guide * Update documentation/migration-guides/Az.11.0.0-migration-guide.md Co-authored-by: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> --------- Co-authored-by: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> * [DataFacotry]Added support copyComputeScale And pipelineExternalComputeScale in Set-AzDataFactoryV2IntegrationRuntime Command (#23321) * [DataFacotry]Added support copyComputeScale And pipelineExternalComputeScale in Set-AzDataFactoryV2IntegrationRuntime Command * fix * change * fix * Update ChangeLog.md --------- Co-authored-by: Yabo Hu * Update Instance Pool API version to Preview 2023-05-01 (#23336) Co-authored-by: Milan Adamovic --------- Co-authored-by: Azure PowerShell <65331932+azure-powershell-bot@users.noreply.github.com> Co-authored-by: Mike F. Robbins Co-authored-by: Mike F. Robbins Co-authored-by: lijinpei2008 <31384087+lijinpei2008@users.noreply.github.com> Co-authored-by: Vincent Dai <23257217+vidai-msft@users.noreply.github.com> Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com> Co-authored-by: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> Co-authored-by: Jingshu918 <138486531+Jingshu918@users.noreply.github.com> Co-authored-by: Milan Adamovic Co-authored-by: Milan Adamovic --- .github/ISSUE_TEMPLATE/4-AZ-DOC-BUG.yml | 4 +- .../Az.11.0.0-migration-guide.md | 425 ++++++++++++++++++ src/App/Livetests/TestLiveScenarios.ps1 | 35 +- src/DataFactory/DataFactoryV2/ChangeLog.md | 1 + src/DataFactory/DataFactoryV2/Constants.cs | 12 + ...ureDataFactoryIntegrationRuntimeCommand.cs | 132 +++++- .../Models/PSManagedIntegrationRuntime.cs | 10 + .../Models/PSSelfHostedIntegrationRuntime.cs | 2 + .../Set-AzDataFactoryV2IntegrationRuntime.md | 90 ++++ .../Generated/IInstancePoolsOperations.cs | 82 ++-- .../Generated/InstancePoolsOperations.cs | 232 +++++----- .../InstancePoolsOperationsExtensions.cs | 144 +++--- .../Generated/Models/InstancePool.cs | 25 +- .../Models/InstancePoolProperties.cs | 25 +- .../Generated/Models/InstancePoolUpdate.cs | 84 +++- src/Sql/Sql.Management.Sdk/README.md | 2 +- src/Sql/Sql/ChangeLog.md | 1 + .../Cmdlet/NewAzureSqlInstancePool.cs | 8 + .../Cmdlet/SetAzureSqlInstancePool.cs | 63 ++- .../Model/AzureSqlInstancePoolModel.cs | 10 + .../Services/AzureSqlInstancePoolAdapter.cs | 4 +- src/Sql/Sql/help/Get-AzSqlInstancePool.md | 130 +++--- src/Sql/Sql/help/New-AzSqlInstancePool.md | 28 +- src/Sql/Sql/help/Set-AzSqlInstancePool.md | 35 +- .../Az.Tools.Installer.psd1 | 4 +- tools/Az.Tools.Installer/ChangeLog.md | 3 + .../help/Az.Tools.Installer.md | 21 + .../GenerateMigrationGuide.ps1 | 3 +- .../TestFx/Coverage/ValidateTestCoverage.ps1 | 9 +- 29 files changed, 1272 insertions(+), 352 deletions(-) create mode 100644 documentation/migration-guides/Az.11.0.0-migration-guide.md create mode 100644 tools/Az.Tools.Installer/help/Az.Tools.Installer.md diff --git a/.github/ISSUE_TEMPLATE/4-AZ-DOC-BUG.yml b/.github/ISSUE_TEMPLATE/4-AZ-DOC-BUG.yml index 43272bc3b7e4..3f6d53aef408 100644 --- a/.github/ISSUE_TEMPLATE/4-AZ-DOC-BUG.yml +++ b/.github/ISSUE_TEMPLATE/4-AZ-DOC-BUG.yml @@ -22,11 +22,11 @@ body: attributes: label: Type of issue options: - - Typo + - Other (describe below) - Code doesn't work - Missing information - Outdated article - - Other (describe below) + - Typo validations: required: true - type: textarea diff --git a/documentation/migration-guides/Az.11.0.0-migration-guide.md b/documentation/migration-guides/Az.11.0.0-migration-guide.md new file mode 100644 index 000000000000..6c46c156093f --- /dev/null +++ b/documentation/migration-guides/Az.11.0.0-migration-guide.md @@ -0,0 +1,425 @@ +# Migration Guide for Az 11.0.0 + +## Az.Aks + +### `New-AzAksCluster` +The parameter 'DockerBridgeCidr' is removed from the cmdlet 'New-AzAksCluster', and there is no replacement for it. + +## Az.CloudService + +### `Get-AzCloudServiceNetworkInterface` +The api version is downgraded to `2021-03-01`. Some properties are removed. +- 'ProtectionMode' and 'DdosProtectionPlanId' of type 'IDdosSettings' have been removed. +- 'InboundNatRulesPortMapping' and 'AdminState' of type 'ILoadBalancerBackendAddress' have been removed. +- 'InboundNatRule' and 'DrainPeriodInSecond' of type 'IBackendAddressPool' have been removed. +- 'FlushConnection' of type 'ISubnet' has been removed. +- 'AuxiliaryMode', 'VnetEncryptionSupported', and 'DisableTcpStateTracking' of type 'INetworkInterface' have been removed. + + +## Az.Compute + +### `New-AzDisk` +Creation of Disk without any Image or SecurityType values provided will default to turn Trusted Launch on. + +#### Before +```powershell +$diskconfig = New-AzDiskConfig -DiskSizeGB 127 -AccountType Premium_LRS -OsType Windows -CreateOption FromImage -Location $loc; +``` +#### After +```powershell +$diskconfig = New-AzDiskConfig -DiskSizeGB 127 -AccountType Premium_LRS -OsType Windows -CreateOption FromImage -Location $loc -SecurityType "Standard"; +``` + + +### `New-AzVM` +Linux image aliases CentOS, Debian, RHEL, and UbuntuLTS are removed. Instead use the aliases CentOS85Gen2, Debian11, RHELRaw8LVMGen2, Ubuntu2204. + +#### Before +```powershell +New-AzVM -ResourceGroupName MyResourceGroup -Name mytestvm -Location $loc -Credential $cred -DomainNameLabel $domainNameLabel -Image UbuntuLTS; +``` +#### After +```powershell +New-AzVM -ResourceGroupName MyResourceGroup -Name mytestvm -Location $loc -Credential $cred -DomainNameLabel $domainNameLabel -Image Ubuntu2204; +``` + + +### `New-AzVM` +Creation of VM without any Image or SecurityType values provided will default to turn Trusted Launch on. + +#### Before +```powershell +$result = New-AzVM -ResourceGroupName $rgname -Credential $vmCred -Name $vmName -DomainNameLabel $domainNameLabel ; +``` +#### After +```powershell +$result = New-AzVM-ResourceGroupName $rgname -Credential $vmCred -Name $vmName -ImageName $imageName -DomainNameLabel $domainNameLabel -SecurityType "Standard"; +``` + + +### `New-AzVmss` +Linux image aliases CentOS, Debian, RHEL, and UbuntuLTS are removed. Instead use the aliases CentOS85Gen2, Debian11, RHELRaw8LVMGen2, Ubuntu2204. + +### `New-AzVmss` +Creation of Vmss using this cmdlet will now default to OrchestrationMode: Flexible. Only when explicitly stated "-OrchestrationMode Uniform", it will create a VMSS in Uniform orchestration mode. UgradePolicy and SinglePlacementGroup can also be set now when OrchestrationMode is Flexible. + +#### Before +```powershell +New-AzVmss +``` +#### After +```powershell +New-AzVmss +``` + + +### `New-AzVmss` +Creation of Vmss without any Image or SecurityType values provided will default to turn Trusted Launch on. + +#### Before +```powershell +$result = New-AzVmss -ResourceGroupName $rgname -Credential $vmCred -VMScaleSetName $vmssName1 -DomainNameLabel $domainNameLabel ; +``` +#### After +```powershell +$result = New-AzVmss -ResourceGroupName $rgname -Credential $vmCred -VMScaleSetName $vmssName1 -ImageName $imageName -DomainNameLabel $domainNameLabel -SecurityType "Standard"; +``` + + +## Az.ContainerInstance + +### `Get-AzContainerGroup` +Fixed typos in these output properties: 'PreviouState' 'PreviouStateDetailStatus' 'PreviouStateExitCode' 'PreviouStateFinishTime' 'PreviouStateStartTime'. +The impacted cmdlets are: 'Get-AzContainerGroup', 'Remove-AzContainerGroup', 'Restart-AzContainerGroup', 'Start-AzContainerGroup', 'Stop-AzContainerGroup', 'Update-AzContainerGroup', 'New-AzContainerInstanceObject', 'New-AzContainerInstanceInitDefinitionObject' + +#### Before +```powershell +$aci = Get-AzContainerGroup -ResourceGroupName 'rg name' -Name 'aci name' +$previousState = $aci.Property.Container.PreviouState + +``` +#### After +```powershell +$aci = Get-AzContainerGroup -ResourceGroupName 'rg name' -Name 'aci name' +$previousState = $aci.Property.Container.PreviousState + +``` + + +## Az.DesktopVirtualization + +### `New-AzWvdScalingPlan` +The allowed value of this parameter changed from 'BYODesktop, Personal, Pooled' to 'Pooled' + +## Az.Functions + +### `Get-AzFunctionApp` +This cmdlet will redact the application settings of the returned function apps and only the keys will be shown while previously it returned both keys and values. + +#### Before +```powershell +Get-AzFunctionApp -Name -ResourceGroupName +```output +Name Value +---- ----- +FUNCTIONS_EXTENSION_VERSION ~4 +WEBSITE_CONTENTAZUREFILECONNE… +AzureWebJobsStorage +APPLICATIONINSIGHTS_CONNECTIO… +APPINSIGHTS_INSTRUMENTATIONKEY +FUNCTIONS_WORKER_RUNTIME powershell +WEBSITE_CONTENTSHARE +``` +``` +#### After +```powershell +Get-AzFunctionApp -Name -ResourceGroupName +```output +WARNING: App settings have been redacted. Use the Get-AzFunctionAppSetting cmdlet to view them. +Name Value +---- ----- +FUNCTIONS_EXTENSION_VERSION +WEBSITE_CONTENTAZUREFILECONNE… +AzureWebJobsStorage +APPLICATIONINSIGHTS_CONNECTIO… +APPINSIGHTS_INSTRUMENTATIONKEY +FUNCTIONS_WORKER_RUNTIME +WEBSITE_CONTENTSHARE +``` +``` + + +### `Update-AzFunctionAppSetting` +This cmdlet will only return the updated application settings while previously all of them returned. + +#### Before +```powershell +Update-AzFunctionAppSetting -Name -ResourceGroupName -AppSetting @{"foo3"="bar3"} +```output +Name Value +---- ----- +FUNCTIONS_EXTENSION_VERSION ~4 +WEBSITE_CONTENTAZUREFILECONNE… +foo3 bar3 +AzureWebJobsStorage +APPLICATIONINSIGHTS_CONNECTIO… +APPINSIGHTS_INSTRUMENTATIONKEY +FUNCTIONS_WORKER_RUNTIME powershell +WEBSITE_CONTENTSHARE +``` +``` +#### After +```powershell +Update-AzFunctionAppSetting -Name -ResourceGroupName -AppSetting @{"foo3"="bar3"} +```output +Name Value +---- ----- +foo3 bar3 +``` +``` + + +## Az.Network + +### `New-AzApplicationGatewayFirewallCustomRuleGroupByVariable` +Geo is no longwe a valid input for parameter `VariableName` in `NewAzureApplicationGatewayFirewallCustomRuleGroupByVariable` + +## Az.Resources + +### `Get-AzPolicyAssignment` +Output type no longer contains a property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +Get-AzPolicyAssignment +``` +#### After +```powershell +Get-AzPolicyAssignment -BackwardCompatible +``` + + +### `Get-AzPolicyDefinition` +Output type no longer contains a property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +Get-AzPolicyDefinition +``` +#### After +```powershell +Get-AzPolicyDefinition -BackwardCompatible +``` + + +### `Get-AzPolicyExemption` +Output type no longer contains a property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +Get-AzPolicyExemption +``` +#### After +```powershell +Get-AzPolicyExemption -BackwardCompatible +``` + + +### `Get-AzPolicySetDefinition` +Output type no longer contains a property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +Get-AzPolicySetDefinition +``` +#### After +```powershell +Get-AzPolicySetDefinition -BackwardCompatible +``` + + +### `New-AzPolicyAssignment` +Output type no longer contains a property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +New-AzPolicyAssignment +``` +#### After +```powershell +New-AzPolicyAssignment -BackwardCompatible +``` + + +### `New-AzPolicyDefinition` +Output type no longer contains a property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +New-AzPolicyDefinition +``` +#### After +```powershell +New-AzPolicyDefinition -BackwardCompatible +``` + + +### `New-AzPolicyExemption` +Output type no longer contains a property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +New-AzPolicyExemption +``` +#### After +```powershell +New-AzPolicyExemption -BackwardCompatible +``` + + +### `New-AzPolicySetDefinition` +Output type no longer contains a property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +New-AzPolicySetDefinition +``` +#### After +```powershell +New-AzPolicySetDefinition -BackwardCompatible +``` + + +### `Remove-AzPolicyAssignment` +A boolean value is no longer returned. Previous behavior of returning True if the object is successfully deleted (or is nonexistent) can be restored by including the -PassThru or -BackwardCompatible switch. + +#### Before +```powershell +Remove-AzPolicyAssignment +``` +#### After +```powershell +Remove-AzPolicyAssignment -BackwardCompatible +``` + + +### `Remove-AzPolicyDefinition` +A boolean value is no longer returned. Previous behavior of returning True if the object is successfully deleted (or is nonexistent) can be restored by including the -PassThru or -BackwardCompatible switch. + +#### Before +```powershell +Remove-AzPolicyDefinition +``` +#### After +```powershell +Remove-AzPolicyDefinition -BackwardCompatible +``` + + +### `Remove-AzPolicyExemption` +A boolean value is no longer returned. Previous behavior of returning True if the object is successfully deleted (or is nonexistent) can be restored by including the -PassThru or -BackwardCompatible switch. + +#### Before +```powershell +Remove-AzPolicyExemption +``` +#### After +```powershell +Remove-AzPolicyExemption -BackwardCompatible +``` + + +### `Remove-AzPolicySetDefinition` +A boolean value is no longer returned. Previous behavior of returning True if the object is successfully deleted (or is nonexistent) can be restored by including the -PassThru or -BackwardCompatible switch. + +#### Before +```powershell +Remove-AzPolicySetDefinition +``` +#### After +```powershell +Remove-AzPolicySetDefinition -BackwardCompatible +``` + + +### `Set-AzPolicyAssignment` +Cmdlet is replaced by a similar Update-AzPolicyAssignment cmdlet aliased to Set-AzPolicyAssignment. Output type of Set-AzPolicyAssignment (Update-AzPolicyAssignment) no longer includes the property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +Set-AzPolicyAssignment +``` +#### After +```powershell +Update-AzPolicyAssignment -BackwardCompatible +``` + + +### `Set-AzPolicyDefinition` +Cmdlet is replaced by a similar Update-AzPolicyDefinition cmdlet aliased to Set-AzPolicyDefinition. Output type of Set-AzPolicyDefinition (Update-AzPolicyDefinition) no longer includes the property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +Set-AzPolicyDefinition +``` +#### After +```powershell +Update-AzPolicyDefinition -BackwardCompatible +``` + + +### `Set-AzPolicyExemption` +Cmdlet is replaced by a similar Update-AzPolicyExemption cmdlet aliased to Set-AzPolicyExemption. Output type of Set-AzPolicyExemption (Update-AzPolicyExemption) no longer includes the property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +Set-AzPolicyExemption +``` +#### After +```powershell +Update-AzPolicyExemption -BackwardCompatible +``` + + +### `Set-AzPolicySetDefinition` +Cmdlet is replaced by a similar Update-AzPolicySetDefinition cmdlet aliased to Set-AzPolicySetDefinition. Output type of Set-AzPolicySetDefinition (Update-AzPolicySetDefinition) no longer includes the property bag object (Properties property). New top-level properties are provided for all properties previously returned in the property bag object If the -BackwardCompatible switch is provided, the property bag object will be added back to the output. + +#### Before +```powershell +Set-AzPolicySetDefinition +``` +#### After +```powershell +Update-AzPolicySetDefinition -BackwardCompatible +``` + + +## AZ.Storage + +### `Get-AzStorageQueueStoredAcessPolicy` +Permissions in the ouput access policy is changed to a string like "raup" + +### `New-AzStorageAccountSasToken` +The leading question mark '?' of the created SAS token is removed + +### `New-AzStorageBlobSasToken` +The leading question mark '?' of the created SAS token is removed + +### `New-AzStorageContainerSasToken` +The leading question mark '?' of the created SAS token is removed + +### `New-AzStorageFileSasToken` +The leading question mark '?' of the created SAS token is removed + +### `New-AzStorageQueueSasToken` +The leading question mark '?' of the created SAS token is removed + +### `New-AzStorageShareSasToken` +The leading question mark '?' of the created SAS token is removed + +### `New-AzStorageTableSasToken` +The leading question mark '?' of the created SAS token is removed + +### `Set-AzStorageQueueStoredAccessPolicy` +Permissions in the ouput access policy is changed to a string like "raup" + diff --git a/src/App/Livetests/TestLiveScenarios.ps1 b/src/App/Livetests/TestLiveScenarios.ps1 index 1e30244d4e04..45c6d2f05ef9 100644 --- a/src/App/Livetests/TestLiveScenarios.ps1 +++ b/src/App/Livetests/TestLiveScenarios.ps1 @@ -5,39 +5,40 @@ Invoke-LiveTestScenario -Name "List ContainerApp" -Description "Test listing Con $appName = New-LiveTestResourceName $workspaceName = New-LiveTestResourceName $envName = New-LiveTestResourceName - $headerName = New-LiveTestResourceName - $secretName = New-LiveTestResourceName $appLocation = "westus" + $null = New-AzOperationalInsightsWorkspace -ResourceGroupName $rgName -Name $workspaceName -Sku PerGB2018 -Location $appLocation -PublicNetworkAccessForIngestion "Enabled" -PublicNetworkAccessForQuery "Enabled" $CustomId = (Get-AzOperationalInsightsWorkspace -ResourceGroupName $rgName -Name $workspaceName).CustomerId $SharedKey = (Get-AzOperationalInsightsWorkspaceSharedKey -ResourceGroupName $rgName -Name $workspaceName).PrimarySharedKey - $null = New-AzContainerAppManagedEnv -EnvName $envName -ResourceGroupName $rgName -Location $appLocation -AppLogConfigurationDestination "log-analytics" -LogAnalyticConfigurationCustomerId $CustomId -LogAnalyticConfigurationSharedKey $SharedKey -VnetConfigurationInternal:$false - $trafficWeight = New-AzContainerAppTrafficWeightObject -Label production -LatestRevision $True -Weight 100 - $secretObject = New-AzContainerAppSecretObject -Name $secretName -Value "facebook-password" - $containerAppHttpHeader = New-AzContainerAppProbeHeaderObject -Name $headerName -Value Awesome - $probe = New-AzContainerAppProbeObject -HttpGetPath "/health" -HttpGetPort 8080 -InitialDelaySecond 3 -PeriodSecond 3 -Type Liveness -HttpGetHttpHeader $containerAppHttpHeader - $image = New-AzContainerAppTemplateObject -Name $appName -Image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest -Probe $probe -ResourceCpu 2.0 -ResourceMemory 4.0Gi + $workloadProfile = New-AzContainerAppWorkloadProfileObject -Name "Consumption" -Type "Consumption" + $null = New-AzContainerAppManagedEnv -EnvName $envName -ResourceGroupName $rgName -Location $appLocation -AppLogConfigurationDestination "log-analytics" -LogAnalyticConfigurationCustomerId $CustomId -LogAnalyticConfigurationSharedKey $SharedKey -VnetConfigurationInternal:$false -WorkloadProfile $workloadProfile $EnvId = (Get-AzContainerAppManagedEnv -ResourceGroupName $rgName -EnvName $envName).Id - $scaleRule = @() + $secretObject = New-AzContainerAppSecretObject -Name "redis-config" -Value "redis-password" + $probeHttpGetHttpHeader = New-AzContainerAppProbeHeaderObject -Name "Custom-Header" -Value "Awesome" + $probe = New-AzContainerAppProbeObject -HttpGetPath "/health" -HttpGetPort 8080 -InitialDelaySecond 3 -PeriodSecond 3 -Type Liveness -HttpGetHttpHeader $probeHttpGetHttpHeader + $temp = New-AzContainerAppTemplateObject -Name $appName -Image "mcr.microsoft.com/k8se/quickstart-jobs:latest" -Probe $probe -ResourceCpu 0.25 -ResourceMemory "0.5Gi" + $configuration = New-AzContainerAppConfigurationObject -DaprEnabled:$True -DaprAppPort 3000 -DaprAppProtocol "http" -DaprHttpReadBufferSize 30 -DaprHttpMaxRequestSize 10 -DaprLogLevel "debug" -DaprEnableApiLogging:$True -MaxInactiveRevision 10 -ServiceType "redis" -Secret $secretObject + # Test creating AzContainerApp - $actual = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -ConfigurationActiveRevisionsMode 'Single' -ManagedEnvironmentId $EnvId -IngressExternal -IngressTransport 'auto' -IngressTargetPort 80 -TemplateContainer $image -ConfigurationSecret $secretObject -IngressTraffic $trafficWeight -DaprEnabled -DaprAppProtocol 'http' -DaprAppId "container-app-1" -DaprAppPort 8080 -ScaleRule $scaleRule + $actual = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -Configuration $configuration -TemplateContainer $temp -EnvironmentId $EnvId Assert-AreEqual $appName $actual.Name - Assert-AreEqual 8080 $actual.DaprAppPort + Assert-AreEqual $actual.ProvisioningState "Succeeded" # Test listing ContainerApp - $null = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -ConfigurationActiveRevisionsMode 'Single' -ManagedEnvironmentId $EnvId -IngressExternal -IngressTransport 'auto' -IngressTargetPort 80 -TemplateContainer $image -ConfigurationSecret $secretObject -IngressTraffic $trafficWeight -DaprEnabled -DaprAppProtocol 'http' -DaprAppId "container-app-1" -DaprAppPort 8080 -ScaleRule $scaleRule + $null = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -Configuration $configuration -TemplateContainer $temp -EnvironmentId $EnvId $actual = Get-AzContainerApp -ResourceGroupName $rgName Assert-True { $actual.Count -ge 1 } # Test getting one ContainerApp - $null = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -ConfigurationActiveRevisionsMode 'Single' -ManagedEnvironmentId $EnvId -IngressExternal -IngressTransport 'auto' -IngressTargetPort 80 -TemplateContainer $image -ConfigurationSecret $secretObject -IngressTraffic $trafficWeight -DaprEnabled -DaprAppProtocol 'http' -DaprAppId "container-app-1" -DaprAppPort 8080 -ScaleRule $scaleRule + $null = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -Configuration $configuration -TemplateContainer $temp -EnvironmentId $EnvId $actual = Get-AzContainerApp -ResourceGroupName $rgName -Name $appName Assert-AreEqual $appName $actual.Name # Test Updating one specific ContainerApp - $null = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -ConfigurationActiveRevisionsMode 'Single' -ManagedEnvironmentId $EnvId -IngressExternal -IngressTransport 'auto' -IngressTargetPort 80 -TemplateContainer $image -ConfigurationSecret $secretObject -IngressTraffic $trafficWeight -DaprEnabled -DaprAppProtocol 'http' -DaprAppId "container-app-1" -DaprAppPort 8080 -ScaleRule $scaleRule - $null = Update-AzContainerApp -Name $appName -ResourceGroupName $rgName -DaprAppPort 8888 -Location $appLocation + $null = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -Configuration $configuration -TemplateContainer $temp -EnvironmentId $EnvId + $null = Update-AzContainerApp -Name $appName -ResourceGroupName $rgName -Configuration $configuration -Tag @{"123"="abc"} $actual = Get-AzContainerApp -ResourceGroupName $rgName -Name $appName - Assert-AreEqual $actual.DaprAppPort 8888 + Assert-AreEqual $actual.Tag.Count 1 + Assert-AreEqual $actual.Tag["123"] "abc" # Test Removing ContainerApp - $null = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -ConfigurationActiveRevisionsMode 'Single' -ManagedEnvironmentId $EnvId -IngressExternal -IngressTransport 'auto' -IngressTargetPort 80 -TemplateContainer $image -ConfigurationSecret $secretObject -IngressTraffic $trafficWeight -DaprEnabled -DaprAppProtocol 'http' -DaprAppId "container-app-1" -DaprAppPort 8080 -ScaleRule $scaleRule + $null = New-AzContainerApp -Name $appName -ResourceGroupName $rgName -Location $appLocation -Configuration $configuration -TemplateContainer $temp -EnvironmentId $EnvId $null = Remove-AzContainerApp -ResourceGroupName $rgName -Name $appName $GetServiceList = Get-AzContainerApp -ResourceGroupName $rgName Assert-False { $GetServiceList.Name -contains $appName} diff --git a/src/DataFactory/DataFactoryV2/ChangeLog.md b/src/DataFactory/DataFactoryV2/ChangeLog.md index e5526543deb3..f016e33844b5 100644 --- a/src/DataFactory/DataFactoryV2/ChangeLog.md +++ b/src/DataFactory/DataFactoryV2/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Added support copyComputeScale And pipelineExternalComputeScale in `Set-AzDataFactoryV2IntegrationRuntime` Command ## Version 1.17.1 * Added ParquetReadSettings in ADF diff --git a/src/DataFactory/DataFactoryV2/Constants.cs b/src/DataFactory/DataFactoryV2/Constants.cs index c6ba7e003688..4ce9fb3a86bf 100644 --- a/src/DataFactory/DataFactoryV2/Constants.cs +++ b/src/DataFactory/DataFactoryV2/Constants.cs @@ -156,6 +156,18 @@ internal static class Constants public const string HelpIntegrationRuntimeDataFlowTimeToLive = "Time to live (in minutes) setting of the data flow cluster which will execute data flow job."; + public const string HelpIntegrationRuntimeManagedVNetCopyComputeScaleDataIntegrationUnit = "DIU number setting reserved for copy activity execution."; + + public const string HelpIntegrationRuntimeManagedVNetCopyComputeScaleTimeToLive = "Time to live (in minutes) setting of integration runtime which will execute copy activity."; + + public const string HelpIntegrationRuntimeManagedVNetPipelineExternalComputeScaleTimeToLive = "Time to live (in minutes) setting of integration runtime which will execute pipeline and external activity."; + + public const string HelpIntegrationRuntimeManagedVNetNumberOfPipelineNodes = "Number of the pipeline nodes, which should be greater than 0 and less than 11."; + + public const string HelpIntegrationRuntimeManagedVNetNumberOfExternalNodes = "Number of the the external nodes, which should be greater than 0 and less than 11."; + + public const string HelpIntegrationRuntimeSelfContainedInteractiveAuthoringEnabled = "An alternative option to ensure interactive authoring function when your self-hosted integration runtime is unable to establish a connection with Azure Relay."; + public const string HelpIntegrationRuntimeSetupScriptContainerSasUri = "The SAS URI of the Azure blob container that contains the custom setup script."; public const string HelpIntegrationRuntimeEdition = "The edition for SSIS integration runtime which could be Standard or Enterprise, default is Standard if it is not specified."; diff --git a/src/DataFactory/DataFactoryV2/IntegrationRuntimes/SetAzureDataFactoryIntegrationRuntimeCommand.cs b/src/DataFactory/DataFactoryV2/IntegrationRuntimes/SetAzureDataFactoryIntegrationRuntimeCommand.cs index bec140b9f38a..ba7b3be8f5bd 100644 --- a/src/DataFactory/DataFactoryV2/IntegrationRuntimes/SetAzureDataFactoryIntegrationRuntimeCommand.cs +++ b/src/DataFactory/DataFactoryV2/IntegrationRuntimes/SetAzureDataFactoryIntegrationRuntimeCommand.cs @@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.DataFactoryV2 { - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "DataFactoryV2IntegrationRuntime",DefaultParameterSetName = ParameterSetNames.ByIntegrationRuntimeName,SupportsShouldProcess = true),OutputType(typeof(PSIntegrationRuntime))] + [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "DataFactoryV2IntegrationRuntime", DefaultParameterSetName = ParameterSetNames.ByIntegrationRuntimeName, SupportsShouldProcess = true), OutputType(typeof(PSIntegrationRuntime))] public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCmdlet { [Parameter( @@ -286,8 +286,8 @@ public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCm ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject, Mandatory = false, HelpMessage = Constants.HelpIntegrationRuntimeDataFlowComputeType)] - [PSArgumentCompleter(Management.DataFactory.Models.DataFlowComputeType.General, - Management.DataFactory.Models.DataFlowComputeType.MemoryOptimized, + [PSArgumentCompleter(Management.DataFactory.Models.DataFlowComputeType.General, + Management.DataFactory.Models.DataFlowComputeType.MemoryOptimized, Management.DataFactory.Models.DataFlowComputeType.ComputeOptimized)] [ValidateNotNullOrEmpty] public string DataFlowComputeType { get; set; } @@ -334,6 +334,90 @@ public class SetAzureDataFactoryIntegrationRuntimeCommand : IntegrationRuntimeCm HelpMessage = Constants.HelpIntegrationRuntimeDataFlowTimeToLive)] public int? DataFlowTimeToLive { get; set; } + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleDataIntegrationUnit)] + [Parameter( + ParameterSetName = ParameterSetNames.ByResourceId, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleDataIntegrationUnit)] + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleDataIntegrationUnit)] + public int? ManagedVNetCopyComputeScaleDataIntegrationUnit { get; set; } + + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleTimeToLive)] + [Parameter( + ParameterSetName = ParameterSetNames.ByResourceId, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleTimeToLive)] + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetCopyComputeScaleTimeToLive)] + public int? ManagedVNetCopyComputeScaleTimeToLive { get; set; } + + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetPipelineExternalComputeScaleTimeToLive)] + [Parameter( + ParameterSetName = ParameterSetNames.ByResourceId, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetPipelineExternalComputeScaleTimeToLive)] + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetPipelineExternalComputeScaleTimeToLive)] + public int? ManagedVNetPipelineExternalComputeScaleTimeToLive { get; set; } + + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfPipelineNodes)] + [Parameter( + ParameterSetName = ParameterSetNames.ByResourceId, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfPipelineNodes)] + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfPipelineNodes)] + public int? ManagedVNetNumberOfPipelineNodeCount { get; set; } + + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfExternalNodes)] + [Parameter( + ParameterSetName = ParameterSetNames.ByResourceId, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfExternalNodes)] + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeManagedVNetNumberOfExternalNodes)] + public int? ManagedVNetNumberOfExternalNodeCount { get; set; } + + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeSelfContainedInteractiveAuthoringEnabled)] + [Parameter( + ParameterSetName = ParameterSetNames.ByResourceId, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeSelfContainedInteractiveAuthoringEnabled)] + [Parameter( + ParameterSetName = ParameterSetNames.ByIntegrationRuntimeObject, + Mandatory = false, + HelpMessage = Constants.HelpIntegrationRuntimeSelfContainedInteractiveAuthoringEnabled)] + public SwitchParameter SelfContainedInteractiveAuthoringEnabled { get; set; } + [Parameter( ParameterSetName = ParameterSetNames.ByIntegrationRuntimeName, Mandatory = false, @@ -613,7 +697,10 @@ public override void ExecuteCmdlet() var authKey = ConvertToUnsecureString(AuthKey); selfHosted.LinkedInfo = new LinkedIntegrationRuntimeKeyAuthorization(new SecureString(authKey)); } - + if (SelfContainedInteractiveAuthoringEnabled.IsPresent) + { + selfHosted.SelfContainedInteractiveAuthoringEnabled = true; + } resource.Properties = selfHosted; } } @@ -629,6 +716,10 @@ public override void ExecuteCmdlet() if (selfHostedIr != null) { selfHostedIr.LinkedInfo = new LinkedIntegrationRuntimeRbacAuthorization(SharedIntegrationRuntimeResourceId); + if (SelfContainedInteractiveAuthoringEnabled.IsPresent) + { + selfHostedIr.SelfContainedInteractiveAuthoringEnabled = true; + } } else { @@ -790,7 +881,7 @@ private void HandleManagedIntegrationRuntime(ManagedIntegrationRuntime integrati if (DataFlowEnableQuickReuse.IsPresent) { integrationRuntime.ComputeProperties.DataFlowProperties.Cleanup = false; - } + } else { // setting it as null as the default value for the cleanup variable is false, and the backend endpoint treats null value as true. @@ -799,6 +890,37 @@ private void HandleManagedIntegrationRuntime(ManagedIntegrationRuntime integrati } + if (ManagedVNetCopyComputeScaleDataIntegrationUnit != null || ManagedVNetCopyComputeScaleTimeToLive != null) + { + if (integrationRuntime.ComputeProperties == null) + { + integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties(); + } + if (integrationRuntime.ComputeProperties.CopyComputeScaleProperties == null) + { + integrationRuntime.ComputeProperties.CopyComputeScaleProperties = new CopyComputeScaleProperties(); + } + + integrationRuntime.ComputeProperties.CopyComputeScaleProperties.DataIntegrationUnit = ManagedVNetCopyComputeScaleDataIntegrationUnit ?? integrationRuntime.ComputeProperties.CopyComputeScaleProperties.DataIntegrationUnit; + integrationRuntime.ComputeProperties.CopyComputeScaleProperties.TimeToLive = ManagedVNetCopyComputeScaleTimeToLive ?? integrationRuntime.ComputeProperties.CopyComputeScaleProperties.TimeToLive; + } + + if (ManagedVNetPipelineExternalComputeScaleTimeToLive != null || ManagedVNetNumberOfPipelineNodeCount != null || ManagedVNetNumberOfExternalNodeCount != null) + { + if (integrationRuntime.ComputeProperties == null) + { + integrationRuntime.ComputeProperties = new IntegrationRuntimeComputeProperties(); + } + if (integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties == null) + { + integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties = new PipelineExternalComputeScaleProperties(); + } + + integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.TimeToLive = ManagedVNetPipelineExternalComputeScaleTimeToLive ?? integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.TimeToLive; + integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.NumberOfPipelineNodes = ManagedVNetNumberOfPipelineNodeCount ?? integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.NumberOfPipelineNodes; + integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.NumberOfExternalNodes = ManagedVNetNumberOfExternalNodeCount ?? integrationRuntime.ComputeProperties.PipelineExternalComputeScaleProperties.NumberOfExternalNodes; + } + if (PublicIPs != null) { if (string.IsNullOrWhiteSpace(VNetId) && string.IsNullOrWhiteSpace(SubnetId)) diff --git a/src/DataFactory/DataFactoryV2/Models/PSManagedIntegrationRuntime.cs b/src/DataFactory/DataFactoryV2/Models/PSManagedIntegrationRuntime.cs index 7676ca04976c..d03c988efb9e 100644 --- a/src/DataFactory/DataFactoryV2/Models/PSManagedIntegrationRuntime.cs +++ b/src/DataFactory/DataFactoryV2/Models/PSManagedIntegrationRuntime.cs @@ -74,6 +74,16 @@ public PSManagedIntegrationRuntime( public bool? DataFlowEnableCleanUp => ManagedIntegrationRuntime.ComputeProperties?.DataFlowProperties.Cleanup; + public int? CopyComputeScaleDataIntegrationUnit => ManagedIntegrationRuntime.ComputeProperties?.CopyComputeScaleProperties?.DataIntegrationUnit; + + public int? CopyComputeScaleTimeToLive => ManagedIntegrationRuntime.ComputeProperties?.CopyComputeScaleProperties?.TimeToLive; + + public int? PipelineExternalComputeScaleTimeToLive => ManagedIntegrationRuntime.ComputeProperties?.PipelineExternalComputeScaleProperties?.TimeToLive; + + public int? PipelineExternalComputeScaleNumberOfPipelineNodes => ManagedIntegrationRuntime.ComputeProperties?.PipelineExternalComputeScaleProperties?.NumberOfPipelineNodes; + + public int? PipelineExternalComputeScaleNumberOfExternalNodes => ManagedIntegrationRuntime.ComputeProperties?.PipelineExternalComputeScaleProperties?.NumberOfExternalNodes; + public string State => ManagedIntegrationRuntime.State; public string LicenseType => ManagedIntegrationRuntime.SsisProperties?.LicenseType; diff --git a/src/DataFactory/DataFactoryV2/Models/PSSelfHostedIntegrationRuntime.cs b/src/DataFactory/DataFactoryV2/Models/PSSelfHostedIntegrationRuntime.cs index 24f8a17ae50e..3654bef8c864 100644 --- a/src/DataFactory/DataFactoryV2/Models/PSSelfHostedIntegrationRuntime.cs +++ b/src/DataFactory/DataFactoryV2/Models/PSSelfHostedIntegrationRuntime.cs @@ -36,6 +36,8 @@ public PSSelfHostedIntegrationRuntime( } } + public bool? SelfContainedInteractiveAuthoringEnabled => SelfHostedIntegrationRuntime.SelfContainedInteractiveAuthoringEnabled; + protected SelfHostedIntegrationRuntime SelfHostedIntegrationRuntime => IntegrationRuntime.Properties as SelfHostedIntegrationRuntime; } } diff --git a/src/DataFactory/DataFactoryV2/help/Set-AzDataFactoryV2IntegrationRuntime.md b/src/DataFactory/DataFactoryV2/help/Set-AzDataFactoryV2IntegrationRuntime.md index 97356c5b804f..95819eb4da1e 100644 --- a/src/DataFactory/DataFactoryV2/help/Set-AzDataFactoryV2IntegrationRuntime.md +++ b/src/DataFactory/DataFactoryV2/help/Set-AzDataFactoryV2IntegrationRuntime.md @@ -289,6 +289,96 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ManagedVNetCopyComputeScaleDataIntegrationUnit +DIU number setting reserved for copy activity execution. + +```yaml +Type: System.Nullable`1[System.Int32] +Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedVNetCopyComputeScaleTimeToLive +Time to live (in minutes) setting of integration runtime which will execute copy activity. + +```yaml +Type: System.Nullable`1[System.Int32] +Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedVNetPipelineExternalComputeScaleTimeToLive +Time to live (in minutes) setting of integration runtime which will execute pipeline and external activity. + +```yaml +Type: System.Nullable`1[System.Int32] +Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedVNetNumberOfPipelineNodeCount +Number of the pipeline nodes, which should be greater than 0 and less than 11. + +```yaml +Type: System.Nullable`1[System.Int32] +Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedVNetNumberOfExternalNodeCount +Number of the the external nodes, which should be greater than 0 and less than 11. + +```yaml +Type: System.Nullable`1[System.Int32] +Parameter Sets: ByIntegrationRuntimeName, ByResourceId, ByIntegrationRuntimeObject +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SelfContainedInteractiveAuthoringEnabled +An alternative option to ensure interactive authoring function when your self-hosted integration runtime is unable to establish a connection with Azure Relay. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DataProxyIntegrationRuntimeName The Self-Hosted Integration Runtime name which is used as a proxy diff --git a/src/Sql/Sql.Management.Sdk/Generated/IInstancePoolsOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/IInstancePoolsOperations.cs index e464d03fbe6f..314bc1bb82d1 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/IInstancePoolsOperations.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/IInstancePoolsOperations.cs @@ -14,17 +14,11 @@ namespace Microsoft.Azure.Management.Sql public partial interface IInstancePoolsOperations { /// - /// Gets an instance pool. + /// Gets a list of all instance pools in the subscription. /// /// - /// Gets an instance pool. + /// Gets a list of all instance pools in the subscription. /// - /// - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the instance pool to be retrieved. - /// /// /// The headers that will be added to request. /// @@ -37,23 +31,17 @@ public partial interface IInstancePoolsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Creates or updates an instance pool. + /// Gets a list of instance pools in the resource group /// /// - /// Creates or updates an instance pool. + /// Gets a list of instance pools in the resource group /// /// /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// - /// - /// The name of the instance pool to be created or updated. - /// - /// - /// The requested instance pool resource state. - /// /// /// The headers that will be added to request. /// @@ -66,19 +54,19 @@ public partial interface IInstancePoolsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, InstancePool parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Deletes an instance pool + /// Gets an instance pool. /// /// - /// Deletes an instance pool + /// Gets an instance pool. /// /// /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// /// - /// The name of the instance pool to be deleted + /// The name of the instance pool to be retrieved. /// /// /// The headers that will be added to request. @@ -89,19 +77,22 @@ public partial interface IInstancePoolsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Updates an instance pool. + /// Creates or updates an instance pool. /// /// - /// Updates an instance pool. + /// Creates or updates an instance pool. /// /// /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// /// - /// The name of the instance pool to be updated. + /// The name of the instance pool to be created or updated. /// /// /// The requested instance pool resource state. @@ -118,17 +109,20 @@ public partial interface IInstancePoolsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, InstancePoolUpdate parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, InstancePool parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a list of instance pools in the resource group + /// Deletes an instance pool /// /// - /// Gets a list of instance pools in the resource group + /// Deletes an instance pool /// /// /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// + /// + /// The name of the instance pool to be deleted + /// /// /// The headers that will be added to request. /// @@ -138,17 +132,23 @@ public partial interface IInstancePoolsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a list of all instance pools in the subscription. + /// Updates an instance pool. /// /// - /// Gets a list of all instance pools in the subscription. + /// Updates an instance pool. /// + /// + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the instance pool to be updated. + /// + /// + /// The requested instance pool resource state. + /// /// /// The headers that will be added to request. /// @@ -161,7 +161,7 @@ public partial interface IInstancePoolsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, InstancePoolUpdate parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates or updates an instance pool. @@ -245,10 +245,10 @@ public partial interface IInstancePoolsOperations System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, InstancePoolUpdate parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a list of instance pools in the resource group + /// Gets a list of all instance pools in the subscription. /// /// - /// Gets a list of instance pools in the resource group + /// Gets a list of all instance pools in the subscription. /// /// /// The NextLink from the previous successful call to List operation. @@ -265,13 +265,13 @@ public partial interface IInstancePoolsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a list of all instance pools in the subscription. + /// Gets a list of instance pools in the resource group /// /// - /// Gets a list of all instance pools in the subscription. + /// Gets a list of instance pools in the resource group /// /// /// The NextLink from the previous successful call to List operation. @@ -288,7 +288,7 @@ public partial interface IInstancePoolsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } } \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/InstancePoolsOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/InstancePoolsOperations.cs index 9af32247cd79..078e79f506dc 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/InstancePoolsOperations.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/InstancePoolsOperations.cs @@ -39,14 +39,8 @@ internal InstancePoolsOperations (SqlManagementClient client) public SqlManagementClient Client { get; private set; } /// - /// Gets an instance pool. + /// Gets a list of all instance pools in the subscription. /// - /// - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the instance pool to be retrieved. - /// /// /// Headers that will be added to request. /// @@ -68,28 +62,18 @@ internal InstancePoolsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (resourceGroupName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); - } - - if (instancePoolName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instancePoolName"); - } - if (this.Client.SubscriptionId == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2023-05-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -97,20 +81,16 @@ internal InstancePoolsOperations (SqlManagementClient client) { _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("instancePoolName", instancePoolName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{instancePoolName}", System.Uri.EscapeDataString(instancePoolName)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); @@ -211,7 +191,7 @@ internal InstancePoolsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -225,7 +205,7 @@ internal InstancePoolsOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -248,78 +228,6 @@ internal InstancePoolsOperations (SqlManagementClient client) } - /// - /// Creates or updates an instance pool. - /// - /// - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the instance pool to be created or updated. - /// - /// - /// The requested instance pool resource state. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, InstancePool parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, instancePoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes an instance pool - /// - /// - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the instance pool to be deleted - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, instancePoolName, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates an instance pool. - /// - /// - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the instance pool to be updated. - /// - /// - /// The requested instance pool resource state. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, InstancePoolUpdate parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, instancePoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - /// /// Gets a list of instance pools in the resource group /// @@ -363,7 +271,7 @@ internal InstancePoolsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2023-05-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -521,8 +429,14 @@ internal InstancePoolsOperations (SqlManagementClient client) } /// - /// Gets a list of all instance pools in the subscription. + /// Gets an instance pool. /// + /// + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the instance pool to be retrieved. + /// /// /// Headers that will be added to request. /// @@ -544,18 +458,28 @@ internal InstancePoolsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (instancePoolName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instancePoolName"); + } + if (this.Client.SubscriptionId == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2023-05-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -563,16 +487,20 @@ internal InstancePoolsOperations (SqlManagementClient client) { _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("instancePoolName", instancePoolName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{instancePoolName}", System.Uri.EscapeDataString(instancePoolName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); @@ -673,7 +601,7 @@ internal InstancePoolsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -687,7 +615,7 @@ internal InstancePoolsOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -710,6 +638,78 @@ internal InstancePoolsOperations (SqlManagementClient client) } + /// + /// Creates or updates an instance pool. + /// + /// + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the instance pool to be created or updated. + /// + /// + /// The requested instance pool resource state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, InstancePool parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, instancePoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes an instance pool + /// + /// + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the instance pool to be deleted + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, instancePoolName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates an instance pool. + /// + /// + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the instance pool to be updated. + /// + /// + /// The requested instance pool resource state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string instancePoolName, InstancePoolUpdate parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, instancePoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Creates or updates an instance pool. /// @@ -772,7 +772,7 @@ internal InstancePoolsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2023-05-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1004,7 +1004,7 @@ internal InstancePoolsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2023-05-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1203,7 +1203,7 @@ internal InstancePoolsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2023-05-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1370,7 +1370,7 @@ internal InstancePoolsOperations (SqlManagementClient client) } /// - /// Gets a list of instance pools in the resource group + /// Gets a list of all instance pools in the subscription. /// /// /// The NextLink from the previous successful call to List operation. @@ -1396,7 +1396,7 @@ internal InstancePoolsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { if (nextPageLink == null) @@ -1414,7 +1414,7 @@ internal InstancePoolsOperations (SqlManagementClient client) tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -1552,7 +1552,7 @@ internal InstancePoolsOperations (SqlManagementClient client) } /// - /// Gets a list of all instance pools in the subscription. + /// Gets a list of instance pools in the resource group /// /// /// The NextLink from the previous successful call to List operation. @@ -1578,7 +1578,7 @@ internal InstancePoolsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { if (nextPageLink == null) @@ -1596,7 +1596,7 @@ internal InstancePoolsOperations (SqlManagementClient client) tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; diff --git a/src/Sql/Sql.Management.Sdk/Generated/InstancePoolsOperationsExtensions.cs b/src/Sql/Sql.Management.Sdk/Generated/InstancePoolsOperationsExtensions.cs index 329289714eb3..3319aa24a8a8 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/InstancePoolsOperationsExtensions.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/InstancePoolsOperationsExtensions.cs @@ -12,6 +12,66 @@ namespace Microsoft.Azure.Management.Sql /// public static partial class InstancePoolsOperationsExtensions { + /// + /// Gets a list of all instance pools in the subscription. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IInstancePoolsOperations operations) + { + return ((IInstancePoolsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets a list of all instance pools in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IInstancePoolsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of instance pools in the resource group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IInstancePoolsOperations operations, string resourceGroupName) + { + return ((IInstancePoolsOperations)operations).ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of instance pools in the resource group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IInstancePoolsOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } /// /// Gets an instance pool. /// @@ -166,66 +226,6 @@ public static InstancePool Update(this IInstancePoolsOperations operations, stri } } /// - /// Gets a list of instance pools in the resource group - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// - public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IInstancePoolsOperations operations, string resourceGroupName) - { - return ((IInstancePoolsOperations)operations).ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of instance pools in the resource group - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// - /// - /// The cancellation token. - /// - public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IInstancePoolsOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// - /// Gets a list of all instance pools in the subscription. - /// - /// - /// The operations group for this extension method. - /// - public static Microsoft.Rest.Azure.IPage List(this IInstancePoolsOperations operations) - { - return ((IInstancePoolsOperations)operations).ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets a list of all instance pools in the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async System.Threading.Tasks.Task> ListAsync(this IInstancePoolsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// Creates or updates an instance pool. /// /// @@ -340,7 +340,7 @@ public static InstancePool BeginUpdate(this IInstancePoolsOperations operations, } } /// - /// Gets a list of instance pools in the resource group + /// Gets a list of all instance pools in the subscription. /// /// /// The operations group for this extension method. @@ -348,13 +348,13 @@ public static InstancePool BeginUpdate(this IInstancePoolsOperations operations, /// /// The NextLink from the previous successful call to List operation. /// - public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this IInstancePoolsOperations operations, string nextPageLink) + public static Microsoft.Rest.Azure.IPage ListNext(this IInstancePoolsOperations operations, string nextPageLink) { - return ((IInstancePoolsOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + return ((IInstancePoolsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// Gets a list of instance pools in the resource group + /// Gets a list of all instance pools in the subscription. /// /// /// The operations group for this extension method. @@ -365,15 +365,15 @@ public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(t /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this IInstancePoolsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListNextAsync(this IInstancePoolsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets a list of all instance pools in the subscription. + /// Gets a list of instance pools in the resource group /// /// /// The operations group for this extension method. @@ -381,13 +381,13 @@ public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(t /// /// The NextLink from the previous successful call to List operation. /// - public static Microsoft.Rest.Azure.IPage ListNext(this IInstancePoolsOperations operations, string nextPageLink) + public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this IInstancePoolsOperations operations, string nextPageLink) { - return ((IInstancePoolsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + return ((IInstancePoolsOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// Gets a list of all instance pools in the subscription. + /// Gets a list of instance pools in the resource group /// /// /// The operations group for this extension method. @@ -398,9 +398,9 @@ public static Microsoft.Rest.Azure.IPage ListNext(this IInstancePo /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListNextAsync(this IInstancePoolsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this IInstancePoolsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePool.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePool.cs index f9130ce46740..07aa28e19c5d 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePool.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePool.cs @@ -52,7 +52,13 @@ public InstancePool() /// The license type. Possible values are 'LicenseIncluded' (price for SQL /// license is included) and 'BasePrice' (without SQL license price). /// Possible values include: 'LicenseIncluded', 'BasePrice' - public InstancePool(string location, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), Sku sku = default(Sku), string subnetId = default(string), int? vCores = default(int?), string licenseType = default(string)) + + /// The Dns Zone that the managed instance pool is in. + /// + + /// Specifies maintenance configuration id to apply to this managed instance. + /// + public InstancePool(string location, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), Sku sku = default(Sku), string subnetId = default(string), int? vCores = default(int?), string licenseType = default(string), string dnsZone = default(string), string maintenanceConfigurationId = default(string)) : base(location, id, name, type, tags) { @@ -60,6 +66,8 @@ public InstancePool() this.SubnetId = subnetId; this.VCores = vCores; this.LicenseType = licenseType; + this.DnsZone = dnsZone; + this.MaintenanceConfigurationId = maintenanceConfigurationId; CustomInit(); } @@ -93,6 +101,19 @@ public InstancePool() /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.licenseType")] public string LicenseType {get; set; } + + /// + /// Gets the Dns Zone that the managed instance pool is in. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.dnsZone")] + public string DnsZone {get; private set; } + + /// + /// Gets or sets specifies maintenance configuration id to apply to this + /// managed instance. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.maintenanceConfigurationId")] + public string MaintenanceConfigurationId {get; set; } /// /// Validate the object. /// @@ -108,6 +129,8 @@ public override void Validate() } + + } } } \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePoolProperties.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePoolProperties.cs index 8440713ea809..66d65dad0503 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePoolProperties.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePoolProperties.cs @@ -33,12 +33,20 @@ public InstancePoolProperties() /// The license type. Possible values are 'LicenseIncluded' (price for SQL /// license is included) and 'BasePrice' (without SQL license price). /// Possible values include: 'LicenseIncluded', 'BasePrice' - public InstancePoolProperties(string subnetId, int vCores, string licenseType) + + /// The Dns Zone that the managed instance pool is in. + /// + + /// Specifies maintenance configuration id to apply to this managed instance. + /// + public InstancePoolProperties(string subnetId, int vCores, string licenseType, string dnsZone = default(string), string maintenanceConfigurationId = default(string)) { this.SubnetId = subnetId; this.VCores = vCores; this.LicenseType = licenseType; + this.DnsZone = dnsZone; + this.MaintenanceConfigurationId = maintenanceConfigurationId; CustomInit(); } @@ -66,6 +74,19 @@ public InstancePoolProperties(string subnetId, int vCores, string licenseType) /// [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] public string LicenseType {get; set; } + + /// + /// Gets the Dns Zone that the managed instance pool is in. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dnsZone")] + public string DnsZone {get; private set; } + + /// + /// Gets or sets specifies maintenance configuration id to apply to this + /// managed instance. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "maintenanceConfigurationId")] + public string MaintenanceConfigurationId {get; set; } /// /// Validate the object. /// @@ -84,6 +105,8 @@ public virtual void Validate() } + + } } } \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePoolUpdate.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePoolUpdate.cs index 0146595ecbe6..7b5891d8ec99 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePoolUpdate.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/InstancePoolUpdate.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.Sql.Models /// /// An update to an Instance pool. /// + [Microsoft.Rest.Serialization.JsonTransformation] public partial class InstancePoolUpdate { /// @@ -24,12 +25,37 @@ public InstancePoolUpdate() /// Initializes a new instance of the InstancePoolUpdate class. /// + /// The name and tier of the SKU. + /// + /// Resource tags. /// - public InstancePoolUpdate(System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + /// Resource ID of the subnet to place this instance pool in. + /// + + /// Count of vCores belonging to this instance pool. + /// + + /// The license type. Possible values are 'LicenseIncluded' (price for SQL + /// license is included) and 'BasePrice' (without SQL license price). + /// Possible values include: 'LicenseIncluded', 'BasePrice' + + /// The Dns Zone that the managed instance pool is in. + /// + + /// Specifies maintenance configuration id to apply to this managed instance. + /// + public InstancePoolUpdate(Sku sku = default(Sku), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string subnetId = default(string), int? vCores = default(int?), string licenseType = default(string), string dnsZone = default(string), string maintenanceConfigurationId = default(string)) { + this.Sku = sku; this.Tags = tags; + this.SubnetId = subnetId; + this.VCores = vCores; + this.LicenseType = licenseType; + this.DnsZone = dnsZone; + this.MaintenanceConfigurationId = maintenanceConfigurationId; CustomInit(); } @@ -39,10 +65,66 @@ public InstancePoolUpdate() partial void CustomInit(); + /// + /// Gets or sets the name and tier of the SKU. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sku")] + public Sku Sku {get; set; } + /// /// Gets or sets resource tags. /// [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] public System.Collections.Generic.IDictionary Tags {get; set; } + + /// + /// Gets or sets resource ID of the subnet to place this instance pool in. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.subnetId")] + public string SubnetId {get; set; } + + /// + /// Gets or sets count of vCores belonging to this instance pool. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.vCores")] + public int? VCores {get; set; } + + /// + /// Gets or sets the license type. Possible values are 'LicenseIncluded' (price + /// for SQL license is included) and 'BasePrice' (without SQL license price). Possible values include: 'LicenseIncluded', 'BasePrice' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.licenseType")] + public string LicenseType {get; set; } + + /// + /// Gets the Dns Zone that the managed instance pool is in. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.dnsZone")] + public string DnsZone {get; private set; } + + /// + /// Gets or sets specifies maintenance configuration id to apply to this + /// managed instance. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.maintenanceConfigurationId")] + public string MaintenanceConfigurationId {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Sku != null) + { + this.Sku.Validate(); + } + + + + + + } } } \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/README.md b/src/Sql/Sql.Management.Sdk/README.md index e0244c7f56e6..d29d87db75f9 100644 --- a/src/Sql/Sql.Management.Sdk/README.md +++ b/src/Sql/Sql.Management.Sdk/README.md @@ -39,7 +39,7 @@ input-file: - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/DatabaseVulnerabilityAssessmentScans.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/ElasticPoolOperations.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/EncryptionProtectors.json - - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/InstancePools.json + - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/InstancePools.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobAgents.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobCredentials.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobExecutions.json diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md index 6d13731ab21b..ee7a298c87d3 100644 --- a/src/Sql/Sql/ChangeLog.md +++ b/src/Sql/Sql/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Added new parameters `MaintenanceConfigurationId`, `DnsZone` to `AzSqlInstancePool` cmdlets ## Version 4.11.0 * Added new parameters to `New-AzSqlDatabaseFailoverGroup`, `Set-AzSqlDatabaseFailoverGroup` diff --git a/src/Sql/Sql/Instance Pools/Cmdlet/NewAzureSqlInstancePool.cs b/src/Sql/Sql/Instance Pools/Cmdlet/NewAzureSqlInstancePool.cs index 51015fcc5abb..d47cc480c79a 100644 --- a/src/Sql/Sql/Instance Pools/Cmdlet/NewAzureSqlInstancePool.cs +++ b/src/Sql/Sql/Instance Pools/Cmdlet/NewAzureSqlInstancePool.cs @@ -120,6 +120,13 @@ public class NewAzureSqlInstancePool : InstancePoolCmdletBase [Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")] public SwitchParameter AsJob { get; set; } + /// + /// Gets or sets the maintenance configuration id. + /// + [Parameter(Mandatory = false, + HelpMessage = "The maintenance configuration id to associate with the instance")] + public string MaintenanceConfigurationId { get; set; } + /// /// Overriding to add warning message /// @@ -182,6 +189,7 @@ protected override IEnumerable ApplyUserInputToModel SubnetId = SubnetId, VCores = VCore, LicenseType = LicenseType, + MaintenanceConfigurationId = this.MaintenanceConfigurationId, }; return new List { newEntity }; diff --git a/src/Sql/Sql/Instance Pools/Cmdlet/SetAzureSqlInstancePool.cs b/src/Sql/Sql/Instance Pools/Cmdlet/SetAzureSqlInstancePool.cs index 50d97136e3d9..4c1ca09d4415 100644 --- a/src/Sql/Sql/Instance Pools/Cmdlet/SetAzureSqlInstancePool.cs +++ b/src/Sql/Sql/Instance Pools/Cmdlet/SetAzureSqlInstancePool.cs @@ -21,6 +21,7 @@ using Microsoft.Azure.Commands.ResourceManager.Common.Tags; using Microsoft.Azure.Commands.Sql.Common; using Microsoft.Azure.Commands.Sql.Instance_Pools.Model; +using Microsoft.Azure.Management.Sql.Models; using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; using Microsoft.WindowsAzure.Commands.Utilities.Common; @@ -106,6 +107,41 @@ public class SetAzureSqlInstancePool : InstancePoolCmdletBase [Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")] public SwitchParameter AsJob { get; set; } + /// + /// Gets or sets the maintenance configuration id. + /// + [Parameter(Mandatory = false, + HelpMessage = "The maintenance configuration id to associate with the instance")] + public string MaintenanceConfigurationId { get; set; } + + /// + /// Gets or sets the VCore for instance + /// + [Parameter(Mandatory = false, + HelpMessage = "Determines how much VCore to associate with instance.")] + [ValidateNotNullOrEmpty] + [Alias("VCores")] + [PSArgumentCompleter("8", "16", "24", "32", "40", "64", "80")] + public int? VCore { get; set; } + + /// + /// Gets or sets the instance compute generation + /// + [Parameter(Mandatory = false, + HelpMessage = "The compute generation for the instance pool.")] + [ValidateNotNullOrEmpty] + [PSArgumentCompleter(Constants.ComputeGenerationGen5)] + public string ComputeGeneration { get; set; } + + /// + /// Gets or sets the instance edition + /// + [Parameter(Mandatory = false, + HelpMessage = "The edition for the instance pool.")] + [ValidateNotNullOrEmpty] + [PSArgumentCompleter(Constants.GeneralPurposeEdition)] + public string Edition { get; set; } + /// /// Overriding to add warning message /// @@ -161,16 +197,37 @@ protected override IEnumerable ApplyUserInputToModel( { var existingEntity = model.FirstOrDefault(); + string miEdition = !string.IsNullOrWhiteSpace(this.Edition) ? this.Edition : existingEntity.Sku.Tier; + + string skuName; + if (!string.IsNullOrWhiteSpace(this.ComputeGeneration)) + { + string editionShort = miEdition.Equals(Constants.GeneralPurposeEdition) ? "GP" : + miEdition.Equals(Constants.BusinessCriticalEdition) ? "BC" : "Unknown"; + skuName = editionShort + "_" + this.ComputeGeneration; + } + else + { + skuName = existingEntity.Sku.Name; + } + AzureSqlInstancePoolModel newEntity = new AzureSqlInstancePoolModel { Location = existingEntity.Location, ResourceGroupName = this.ResourceGroupName, InstancePoolName = this.Name, Tags = TagsConversionHelper.CreateTagDictionary(this.Tag, validate: true), - Sku = existingEntity.Sku, + Sku = new Sku() + { + Name = skuName, + Tier = miEdition, + Family = !string.IsNullOrWhiteSpace(this.ComputeGeneration) ? this.ComputeGeneration : existingEntity.Sku.Family + }, SubnetId = existingEntity.SubnetId, - VCores = existingEntity.VCores, - LicenseType = LicenseType != null ? this.LicenseType : existingEntity.LicenseType, + VCores = this.VCore?? existingEntity.VCores, + LicenseType = this.LicenseType != null ? this.LicenseType : existingEntity.LicenseType, + MaintenanceConfigurationId = !string.IsNullOrWhiteSpace(this.MaintenanceConfigurationId) + ? this.MaintenanceConfigurationId : existingEntity.MaintenanceConfigurationId, }; return new List { newEntity }; diff --git a/src/Sql/Sql/Instance Pools/Model/AzureSqlInstancePoolModel.cs b/src/Sql/Sql/Instance Pools/Model/AzureSqlInstancePoolModel.cs index be1e23ce4ffa..0ff7e72371f2 100644 --- a/src/Sql/Sql/Instance Pools/Model/AzureSqlInstancePoolModel.cs +++ b/src/Sql/Sql/Instance Pools/Model/AzureSqlInstancePoolModel.cs @@ -78,5 +78,15 @@ public class AzureSqlInstancePoolModel /// Gets or sets the license type /// public string LicenseType { get; set; } + + /// + /// Gets or sets the Maintenance Configuration Id. + /// + public string MaintenanceConfigurationId { get; set; } + + /// + /// Gets or sets the DNS Zone. + /// + public string DnsZone { get; set; } } } diff --git a/src/Sql/Sql/Instance Pools/Services/AzureSqlInstancePoolAdapter.cs b/src/Sql/Sql/Instance Pools/Services/AzureSqlInstancePoolAdapter.cs index 87996b947a72..e130b663de88 100644 --- a/src/Sql/Sql/Instance Pools/Services/AzureSqlInstancePoolAdapter.cs +++ b/src/Sql/Sql/Instance Pools/Services/AzureSqlInstancePoolAdapter.cs @@ -63,7 +63,8 @@ public AzureSqlInstancePoolModel UpsertInstancePool(AzureSqlInstancePoolModel mo Location = model.Location, SubnetId = model.SubnetId, Tags = model.Tags, - VCores = model.VCores + VCores = model.VCores, + MaintenanceConfigurationId = model.MaintenanceConfigurationId, }); return CreateInstancePoolModelFromResponse(result); } @@ -124,6 +125,7 @@ public AzureSqlInstancePoolModel CreateInstancePoolModelFromResponse( VCores = instancePoolResp.VCores.Value, LicenseType = instancePoolResp.LicenseType, Sku = instancePoolResp.Sku, + MaintenanceConfigurationId = instancePoolResp.MaintenanceConfigurationId, }; } diff --git a/src/Sql/Sql/help/Get-AzSqlInstancePool.md b/src/Sql/Sql/help/Get-AzSqlInstancePool.md index eec4d10954e3..7a9ffd1364cd 100644 --- a/src/Sql/Sql/help/Get-AzSqlInstancePool.md +++ b/src/Sql/Sql/help/Get-AzSqlInstancePool.md @@ -41,31 +41,33 @@ Get-AzSqlInstancePool ``` ```output -ResourceGroupName : resourcegroup01 -Type : Microsoft.Sql/instancePools -Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 -InstancePoolName : instancePool0 -SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name -VCores : 8 -ComputeGeneration : Gen5 -Edition : GeneralPurpose -Tags : -Sku : Microsoft.Azure.Management.Sql.Models.Sku -Location : canadacentral -LicenseType : LicenseIncluded - -ResourceGroupName : resourcegroup02 -Type : Microsoft.Sql/instancePools -Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup02/providers/Microsoft.Sql/instancePools/ps-instancepool-1 -InstancePoolName : instancePool0 -SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup02/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name -VCores : 8 -ComputeGeneration : Gen5 -Edition : GeneralPurpose -Tags : -Sku : Microsoft.Azure.Management.Sql.Models.Sku -Location : canadacentral -LicenseType : LicenseIncluded +ResourceGroupName : resourcegroup01 +Type : Microsoft.Sql/instancePools +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 +InstancePoolName : instancePool0 +SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name +VCores : 8 +ComputeGeneration : Gen5 +Edition : GeneralPurpose +Tags : +Sku : Microsoft.Azure.Management.Sql.Models.Sku +Location : canadacentral +LicenseType : LicenseIncluded +MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_canadacentral_MI_1 + +ResourceGroupName : resourcegroup02 +Type : Microsoft.Sql/instancePools +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup02/providers/Microsoft.Sql/instancePools/ps-instancepool-1 +InstancePoolName : instancePool0 +SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup02/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name +VCores : 8 +ComputeGeneration : Gen5 +Edition : GeneralPurpose +Tags : +Sku : Microsoft.Azure.Management.Sql.Models.Sku +Location : canadacentral +LicenseType : LicenseIncluded +MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_canadacentral_MI_1 ``` This command gets information about all instance pools within the customer subscription. @@ -76,18 +78,20 @@ Get-AzSqlInstancePool -ResourceGroupName resourcegroup01 ``` ```output -ResourceGroupName : resourcegroup01 -Type : Microsoft.Sql/instancePools -Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 -InstancePoolName : instancePool0 -SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name -VCores : 8 -ComputeGeneration : Gen5 -Edition : GeneralPurpose -Tags : -Sku : Microsoft.Azure.Management.Sql.Models.Sku -Location : canadacentral -LicenseType : LicenseIncluded +ResourceGroupName : resourcegroup01 +Type : Microsoft.Sql/instancePools +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 +InstancePoolName : instancePool0 +SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name +VCores : 8 +ComputeGeneration : Gen5 +Edition : GeneralPurpose +Tags : +Sku : Microsoft.Azure.Management.Sql.Models.Sku +Location : canadacentral +LicenseType : LicenseIncluded +DnsZone : 1234567890 +MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_canadacentral_MI_1 ``` This command gets information about all instance pools within the resource group resourcegroup01. @@ -98,18 +102,20 @@ Get-AzSqlInstancePool -ResourceGroupName resourcegroup01 -Name instancePool0 ``` ```output -ResourceGroupName : resourcegroup01 -Type : Microsoft.Sql/instancePools -Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 -InstancePoolName : instancePool0 -SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name -VCores : 8 -ComputeGeneration : Gen5 -Edition : GeneralPurpose -Tags : -Sku : Microsoft.Azure.Management.Sql.Models.Sku -Location : canadacentral -LicenseType : LicenseIncluded +ResourceGroupName : resourcegroup01 +Type : Microsoft.Sql/instancePools +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 +InstancePoolName : instancePool0 +SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name +VCores : 8 +ComputeGeneration : Gen5 +Edition : GeneralPurpose +Tags : +Sku : Microsoft.Azure.Management.Sql.Models.Sku +Location : canadacentral +LicenseType : LicenseIncluded +DnsZone : 1234567890 +MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_canadacentral_MI_1 ``` This command gets information about the instance pool instancePool0. @@ -120,18 +126,20 @@ Get-AzSqlInstancePool -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxx ``` ```output -ResourceGroupName : resourcegroup01 -Type : Microsoft.Sql/instancePools -Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 -InstancePoolName : instancePool0 -SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name -VCores : 8 -ComputeGeneration : Gen5 -Edition : GeneralPurpose -Tags : -Sku : Microsoft.Azure.Management.Sql.Models.Sku -Location : canadacentral -LicenseType : LicenseIncluded +ResourceGroupName : resourcegroup01 +Type : Microsoft.Sql/instancePools +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 +InstancePoolName : instancePool0 +SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name +VCores : 8 +ComputeGeneration : Gen5 +Edition : GeneralPurpose +Tags : +Sku : Microsoft.Azure.Management.Sql.Models.Sku +Location : canadacentral +LicenseType : LicenseIncluded +DnsZone : 1234567890 +MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_canadacentral_MI_1 ``` This command gets information about the instance pool with its resource identifier. diff --git a/src/Sql/Sql/help/New-AzSqlInstancePool.md b/src/Sql/Sql/help/New-AzSqlInstancePool.md index 5060a935473f..252fd6150c68 100644 --- a/src/Sql/Sql/help/New-AzSqlInstancePool.md +++ b/src/Sql/Sql/help/New-AzSqlInstancePool.md @@ -14,7 +14,7 @@ Creates an Azure SQL Instance pool. ``` New-AzSqlInstancePool [-ResourceGroupName] [-Name] -Location -SubnetId - -VCore -Edition -ComputeGeneration -LicenseType [-Tag ] [-AsJob] + -VCore -Edition -ComputeGeneration -LicenseType [-Tag ] -MaintenanceConfigurationId [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -29,18 +29,20 @@ New-AzSqlInstancePool -ResourceGroupName resourcegroup01 -Name instancepool0 -Lo ``` ```output -ResourceGroupName : resourcegroup01 -Type : Microsoft.Sql/instancePools -Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 -InstancePoolName : instancePool0 -SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name -VCores : 8 -ComputeGeneration : Gen5 -Edition : GeneralPurpose -Tags : -Sku : Microsoft.Azure.Management.Sql.Models.Sku -Location : canadacentral -LicenseType : LicenseIncluded +ResourceGroupName : resourcegroup01 +Type : Microsoft.Sql/instancePools +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 +InstancePoolName : instancePool0 +SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name +VCores : 8 +ComputeGeneration : Gen5 +Edition : GeneralPurpose +Tags : +Sku : Microsoft.Azure.Management.Sql.Models.Sku +Location : canadacentral +LicenseType : LicenseIncluded +DnsZone : 1234567890 +MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_canadacentral_MI_1 ``` This command creates a new Azure SQL Instance pool. diff --git a/src/Sql/Sql/help/Set-AzSqlInstancePool.md b/src/Sql/Sql/help/Set-AzSqlInstancePool.md index f48ca5480eaa..261be4fe6740 100644 --- a/src/Sql/Sql/help/Set-AzSqlInstancePool.md +++ b/src/Sql/Sql/help/Set-AzSqlInstancePool.md @@ -15,18 +15,21 @@ Sets properties for an Azure SQL Instance pool. ### DefaultSetInstancePoolParameterSet (Default) ``` Set-AzSqlInstancePool [-ResourceGroupName] [-Name] [-LicenseType ] [-Tag ] + -VCore -Edition -ComputeGeneration -MaintenanceConfigurationId [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### InputObjectSetInstancePoolParameterSet ``` Set-AzSqlInstancePool [-InputObject] [-LicenseType ] [-Tag ] + -VCore -Edition -ComputeGeneration -MaintenanceConfigurationId [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ### ResourceIdSetInstancePoolParameterSet ``` -Set-AzSqlInstancePool [-ResourceId] [-LicenseType ] [-Tag ] [-AsJob] +Set-AzSqlInstancePool [-ResourceId] [-LicenseType ] [-Tag ] + -VCore -Edition -ComputeGeneration -MaintenanceConfigurationId [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -41,18 +44,20 @@ Set-AzSqlInstancePool -ResourceGroupName resourcegroup01 -Name instancePool0 -Li ``` ```output -ResourceGroupName : resourcegroup01 -Type : Microsoft.Sql/instancePools -Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 -InstancePoolName : instancePool0 -SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name -VCores : 8 -ComputeGeneration : Gen5 -Edition : GeneralPurpose -Tags : -Sku : Microsoft.Azure.Management.Sql.Models.Sku -Location : canadacentral -LicenseType : LicenseIncluded +ResourceGroupName : resourcegroup01 +Type : Microsoft.Sql/instancePools +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/instancePools/instancePool0 +InstancePoolName : instancePool0 +SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name +VCores : 8 +ComputeGeneration : Gen5 +Edition : GeneralPurpose +Tags : +Sku : Microsoft.Azure.Management.Sql.Models.Sku +Location : canadacentral +LicenseType : LicenseIncluded +DnsZone : 1234567890 +MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_canadacentral_MI_1 ``` This command sets the license type and/or tags for an instance pool named instancePool0. @@ -76,6 +81,8 @@ Tags : Sku : Microsoft.Azure.Management.Sql.Models.Sku Location : canadacentral LicenseType : LicenseIncluded +DnsZone : 1234567890 +MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_canadacentral_MI_1 ``` This command sets the license type and/or tags for an instance pool using an instance pool object. @@ -98,6 +105,8 @@ Tags : Sku : Microsoft.Azure.Management.Sql.Models.Sku Location : canadacentral LicenseType : LicenseIncluded +DnsZone : 1234567890 +MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_canadacentral_MI_1 ``` This command sets the license type and/or tags for an instance pool named instancePool0. diff --git a/tools/Az.Tools.Installer/Az.Tools.Installer.psd1 b/tools/Az.Tools.Installer/Az.Tools.Installer.psd1 index 858c4191fcb9..6a233d36c656 100644 --- a/tools/Az.Tools.Installer/Az.Tools.Installer.psd1 +++ b/tools/Az.Tools.Installer/Az.Tools.Installer.psd1 @@ -12,7 +12,7 @@ RootModule = 'Az.Tools.Installer.psm1' # Version number of this module. - ModuleVersion = '0.2.3' + ModuleVersion = '1.0.0' # Supported PSEditions CompatiblePSEditions = 'Core', 'Desktop' @@ -109,7 +109,7 @@ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = '* Fix Update-Module errors when Az modules are installed using Az.Tools.Installer [#21262]' + ReleaseNotes = '* General Availability of Az.Tools.Installer.' # Prerelease string of this module # Prerelease = '' diff --git a/tools/Az.Tools.Installer/ChangeLog.md b/tools/Az.Tools.Installer/ChangeLog.md index f08af91ad830..e8f5f02a2563 100644 --- a/tools/Az.Tools.Installer/ChangeLog.md +++ b/tools/Az.Tools.Installer/ChangeLog.md @@ -1,4 +1,7 @@ ## Upcoming Release +## 1.0.0 +General Availability of Az.Tools.Installer. + ## 0.2.3 * Fix Update-Module errors when Az modules are installed using Az.Tools.Installer [#21262] diff --git a/tools/Az.Tools.Installer/help/Az.Tools.Installer.md b/tools/Az.Tools.Installer/help/Az.Tools.Installer.md new file mode 100644 index 000000000000..94eabed6d680 --- /dev/null +++ b/tools/Az.Tools.Installer/help/Az.Tools.Installer.md @@ -0,0 +1,21 @@ +--- +Module Name: Az.Tools.Installer +Module Guid: 8c7c6fcd-a96f-460b-89e2-ff822a3246c8 +Download Help Link: https://learn.microsoft.com/powershell/module/az.tools.installer +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.Tools.Installer Module +## Description +Az.Tools.Installer handles the installation, uninstallation and update of the Azure PowerShell Modules. + +## Az.Tools.Installer Cmdlets +### [Install-AzModule](Install-AzModule.md) +Install Azure PowerShell modules. + +### [Uninstall-AzModule](Uninstall-AzModule.md) +Uninstall Azure PowerShell modules. + +### [Update-AzModule](Update-AzModule.md) +Update Azure PowerShell modules. \ No newline at end of file diff --git a/tools/BreakingChanges/GenerateMigrationGuide.ps1 b/tools/BreakingChanges/GenerateMigrationGuide.ps1 index ac34bcd586bf..bada43309a1d 100644 --- a/tools/BreakingChanges/GenerateMigrationGuide.ps1 +++ b/tools/BreakingChanges/GenerateMigrationGuide.ps1 @@ -32,8 +32,9 @@ foreach ($BreakingChangeItem in $BreakingChangeItems) { $Null = $TotalTable[$ModuleName].Add($BreakingChangeItem) } -$MigrationGuidePath = [System.IO.Path]::Combine($PSScriptRoot, '..', '..', 'documentation', 'migration-guides', "Az.$TargetAzVersion.0-migration-guide.md") +$MigrationGuidePath = [System.IO.Path]::Combine($PSScriptRoot, '..', '..', 'documentation', 'migration-guides') $MigrationGuidePath = Resolve-Path -Path $MigrationGuidePath +$MigrationGuidePath = [System.IO.Path]::Combine($MigrationGuidePath, "Az.$TargetAzVersion.0-migration-guide.md") Set-Content -Path $MigrationGuidePath -Value "# Migration Guide for Az $TargetAzVersion.0`n" foreach ($Module in ($TotalTable.Keys | Sort-Object)) { diff --git a/tools/TestFx/Coverage/ValidateTestCoverage.ps1 b/tools/TestFx/Coverage/ValidateTestCoverage.ps1 index 1b744d10f274..10761bdbaf60 100644 --- a/tools/TestFx/Coverage/ValidateTestCoverage.ps1 +++ b/tools/TestFx/Coverage/ValidateTestCoverage.ps1 @@ -41,7 +41,14 @@ $rptData | Where-Object Module -in $testedModules | ForEach-Object { $cmdCvg = $_.CommandCoverage $cmdCvgD = [decimal]$cmdCvg.TrimEnd("%") / 100 - Write-Host "Test coverage for module $module is $cmdCvg." + $psetCvg = $_.ParameterSetCoverage + $pCvg = $_.ParameterCoverage + + Write-Host "Test coverage for Module: $module" + Write-Host "- Cmdlet-Level Coverage: $cmdCvg." + Write-Host "- Parameter Set-Level Coverage: $psetCvg." + Write-Host "- Parameter-Level Coverage: $pCvg." + if ($cmdCvgD -lt 0.5) { Write-Warning "Test coverage for module $module is less than 50% !" $cvgMessageBody50 = "|⚠️|Test Coverage Less Than 50%|$cmdCvg|Test coverage for the module cannot be lower than 50%.|`n"