ProviderHub.Autorest/exports/ProxyCmdletDefinitions.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- <# .Synopsis Gets the custom rollout details. .Description Gets the custom rollout details. .Example Get-AzProviderHubCustomRollout -ProviderNamespace "Microsft.Contoso" -RolloutName "customRollout1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRollout .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/get-azproviderhubcustomrollout #> function Get-AzProviderHubCustomRollout { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRollout])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The rollout name. ${RolloutName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Get = 'Az.ProviderHub.private\Get-AzProviderHubCustomRollout_Get'; GetViaIdentity = 'Az.ProviderHub.private\Get-AzProviderHubCustomRollout_GetViaIdentity'; GetViaIdentityProviderRegistration = 'Az.ProviderHub.private\Get-AzProviderHubCustomRollout_GetViaIdentityProviderRegistration'; List = 'Az.ProviderHub.private\Get-AzProviderHubCustomRollout_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Gets the default rollout details. .Description Gets the default rollout details. .Example Get-AzProviderHubDefaultRollout -ProviderNamespace "Microsoft.Contoso" .Example Get-AzProviderHubDefaultRollout -ProviderNamespace "Microsoft.Contoso" -RolloutName "defaultRollout2021w10" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRollout .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/get-azproviderhubdefaultrollout #> function Get-AzProviderHubDefaultRollout { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRollout])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The rollout name. ${RolloutName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Get = 'Az.ProviderHub.private\Get-AzProviderHubDefaultRollout_Get'; GetViaIdentity = 'Az.ProviderHub.private\Get-AzProviderHubDefaultRollout_GetViaIdentity'; GetViaIdentityProviderRegistration = 'Az.ProviderHub.private\Get-AzProviderHubDefaultRollout_GetViaIdentityProviderRegistration'; List = 'Az.ProviderHub.private\Get-AzProviderHubDefaultRollout_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Gets the notification registration details. .Description Gets the notification registration details. .Example Get-AzProviderHubNotificationRegistration -ProviderNamespace "Microsoft.Contoso" .Example Get-AzProviderHubNotificationRegistration -ProviderNamespace "Microsoft.Contoso" -Name "notificationRegistrationTest" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.INotificationRegistration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/get-azproviderhubnotificationregistration #> function Get-AzProviderHubNotificationRegistration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.INotificationRegistration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory)] [Alias('NotificationRegistrationName')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The notification registration. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Get = 'Az.ProviderHub.private\Get-AzProviderHubNotificationRegistration_Get'; GetViaIdentity = 'Az.ProviderHub.private\Get-AzProviderHubNotificationRegistration_GetViaIdentity'; GetViaIdentityProviderRegistration = 'Az.ProviderHub.private\Get-AzProviderHubNotificationRegistration_GetViaIdentityProviderRegistration'; List = 'Az.ProviderHub.private\Get-AzProviderHubNotificationRegistration_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Gets the provider registration details. .Description Gets the provider registration details. .Example Get-AzProviderHubProviderRegistration -ProviderNamespace "Microsoft.Contoso" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderRegistration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/get-azproviderhubproviderregistration #> function Get-AzProviderHubProviderRegistration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderRegistration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Get = 'Az.ProviderHub.private\Get-AzProviderHubProviderRegistration_Get'; GetViaIdentity = 'Az.ProviderHub.private\Get-AzProviderHubProviderRegistration_GetViaIdentity'; List = 'Az.ProviderHub.private\Get-AzProviderHubProviderRegistration_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Checkin the manifest. .Description Checkin the manifest. .Example Invoke-AzProviderHubManifestCheckin -ProviderNamespace "Microsoft.Contoso" -BaselineArmManifestLocation "NorthEurope" -Environment "Canary" .Example Invoke-AzProviderHubManifestCheckin -ProviderNamespace "Microsoft.Contoso" -BaselineArmManifestLocation "EastUS2EUAP" -Environment "Prod" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICheckinManifestInfo .Link https://learn.microsoft.com/powershell/module/az.providerhub/invoke-azproviderhubmanifestcheckin #> function Invoke-AzProviderHubManifestCheckin { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICheckinManifestInfo])] [CmdletBinding(DefaultParameterSetName='ManifestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='ManifestExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # The baseline ARM manifest location supplied to the checkin manifest operation. ${BaselineArmManifestLocation}, [Parameter(ParameterSetName='ManifestExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # The environment supplied to the checkin manifest operation. ${Environment}, [Parameter(ParameterSetName='ManifestViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Path of Json file supplied to the Manifest operation ${JsonFilePath}, [Parameter(ParameterSetName='ManifestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Json string supplied to the Manifest operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ ManifestExpanded = 'Az.ProviderHub.private\Invoke-AzProviderHubManifestCheckin_ManifestExpanded'; ManifestViaJsonFilePath = 'Az.ProviderHub.private\Invoke-AzProviderHubManifestCheckin_ManifestViaJsonFilePath'; ManifestViaJsonString = 'Az.ProviderHub.private\Invoke-AzProviderHubManifestCheckin_ManifestViaJsonString'; } if (('ManifestExpanded', 'ManifestViaJsonFilePath', 'ManifestViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Create the rollout details. .Description Create the rollout details. .Example New-AzProviderHubCustomRollout -ProviderNamespace "Microsoft.Contoso" -RolloutName "customRollout1" -SpecificationCanaryRegion "Eastus2EUAP" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRollout .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. SPECIFICATIONPROVIDERREGISTRATION <ICustomRolloutSpecificationProviderRegistration>: . [Capability <List<IResourceProviderCapabilities>>]: Effect <String>: QuotaId <String>: [RequiredFeature <List<String>>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [ManagementIncidentContactEmail <String>]: [ManagementIncidentRoutingService <String>]: [ManagementIncidentRoutingTeam <String>]: [ManagementManifestOwner <List<String>>]: [ManagementResourceAccessPolicy <String>]: [ManagementResourceAccessRole <List<IAny>>]: [ManagementSchemaOwner <List<String>>]: [ManagementServiceTreeInfo <List<IServiceTreeInfo>>]: [ComponentId <String>]: [ServiceId <String>]: [Metadata <IAny>]: Anything [Namespace <String>]: [ProviderAuthenticationAllowedAudience <List<String>>]: [ProviderAuthorization <List<IResourceProviderAuthorization>>]: [ApplicationId <String>]: [ManagedByRoleDefinitionId <String>]: [RoleDefinitionId <String>]: [ProviderHubMetadataProviderAuthenticationAllowedAudience <List<String>>]: [ProviderHubMetadataProviderAuthorization <List<IResourceProviderAuthorization>>]: [ProviderHubMetadataThirdPartyProviderAuthorizationAuthorizations <List<ILightHouseAuthorization>>]: PrincipalId <String>: RoleDefinitionId <String>: [ProviderHubMetadataThirdPartyProviderAuthorizationManagedByTenantId <String>]: [ProviderType <String>]: [ProviderVersion <String>]: [ProvisioningState <String>]: [RequestHeaderOptionOptInHeader <String>]: [RequiredFeature <List<String>>]: [SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl <TimeSpan?>]: [SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction <List<ISubscriptionStateOverrideAction>>]: Action <String>: State <String>: [TemplateDeploymentOptionPreflightOption <List<String>>]: [TemplateDeploymentOptionPreflightSupported <Boolean?>]: SPECIFICATIONRESOURCETYPEREGISTRATION <IResourceTypeRegistration[]>: . [AllowedUnauthorizedAction <List<String>>]: [AuthorizationActionMapping <List<IAuthorizationActionMapping>>]: [Desired <String>]: [Original <String>]: [CheckNameAvailabilitySpecificationEnableDefaultValidation <Boolean?>]: [CheckNameAvailabilitySpecificationResourceTypesWithCustomValidation <List<String>>]: [DefaultApiVersion <String>]: [DisallowedActionVerb <List<String>>]: [EnableAsyncOperation <Boolean?>]: [EnableThirdPartyS2S <Boolean?>]: [Endpoint <List<IResourceTypeEndpoint>>]: [ApiVersion <List<String>>]: [Enabled <Boolean?>]: [Extension <List<IResourceTypeExtension>>]: [EndpointUri <String>]: [ExtensionCategory <List<String>>]: [Timeout <TimeSpan?>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [Location <List<String>>]: [RequiredFeature <List<String>>]: [Timeout <TimeSpan?>]: [ExtendedLocation <List<IExtendedLocationOptions>>]: [SupportedPolicy <String>]: [Type <String>]: [ExtensionOptionResourceCreationBeginRequest <List<String>>]: [ExtensionOptionResourceCreationBeginResponse <List<String>>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [IdentityManagementApplicationId <String>]: [IdentityManagementType <String>]: [IsPureProxy <Boolean?>]: [LinkedAccessCheck <List<ILinkedAccessCheck>>]: [ActionName <String>]: [LinkedAction <String>]: [LinkedActionVerb <String>]: [LinkedProperty <String>]: [LinkedType <String>]: [LoggingRule <List<ILoggingRule>>]: Action <String>: DetailLevel <String>: Direction <String>: [HiddenPropertyPathHiddenPathsOnRequest <List<String>>]: [HiddenPropertyPathHiddenPathsOnResponse <List<String>>]: [MarketplaceType <String>]: [ProvisioningState <String>]: [Regionality <String>]: [RequestHeaderOptionOptInHeader <String>]: [RequiredFeature <List<String>>]: [ResourceDeletionPolicy <String>]: [ResourceMovePolicyCrossResourceGroupMoveEnabled <Boolean?>]: [ResourceMovePolicyCrossSubscriptionMoveEnabled <Boolean?>]: [ResourceMovePolicyValidationRequired <Boolean?>]: [RoutingType <String>]: [ServiceTreeInfo <List<IServiceTreeInfo>>]: [ComponentId <String>]: [ServiceId <String>]: [SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl <TimeSpan?>]: [SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction <List<ISubscriptionStateOverrideAction>>]: Action <String>: State <String>: [SubscriptionStateRule <List<ISubscriptionStateRule>>]: [AllowedAction <List<String>>]: [State <String>]: [SwaggerSpecification <List<ISwaggerSpecification>>]: [ApiVersion <List<String>>]: [SwaggerSpecFolderUri <String>]: [TemplateDeploymentOptionPreflightOption <List<String>>]: [TemplateDeploymentOptionPreflightSupported <Boolean?>]: [ThrottlingRule <List<IThrottlingRule>>]: Action <String>: Metric <List<IThrottlingMetric>>: Limit <Int64>: Type <String>: [Interval <TimeSpan?>]: [RequiredFeature <List<String>>]: .Link https://learn.microsoft.com/powershell/module/az.providerhub/new-azproviderhubcustomrollout #> function New-AzProviderHubCustomRollout { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRollout])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The rollout name. ${RolloutName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationCanaryRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRolloutSpecificationProviderRegistration] # . ${SpecificationProviderRegistration}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration[]] # . ${SpecificationResourceTypeRegistration}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${StatusCompletedRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRolloutStatusFailedOrSkippedRegions]))] [System.Collections.Hashtable] # Dictionary of <ExtendedErrorInfo> ${StatusFailedOrSkippedRegion}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ CreateExpanded = 'Az.ProviderHub.private\New-AzProviderHubCustomRollout_CreateExpanded'; CreateViaIdentityProviderRegistrationExpanded = 'Az.ProviderHub.private\New-AzProviderHubCustomRollout_CreateViaIdentityProviderRegistrationExpanded'; CreateViaJsonFilePath = 'Az.ProviderHub.private\New-AzProviderHubCustomRollout_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.ProviderHub.private\New-AzProviderHubCustomRollout_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Create the rollout details. .Description Create the rollout details. .Example New-AzProviderHubDefaultRollout -ProviderNamespace "Microsoft.Contoso" -RolloutName "defaultRollout2021w10" -SpecificationCanarySkipRegion "brazilus" -NoWait .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRollout .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. SPECIFICATIONPROVIDERREGISTRATION <IDefaultRolloutSpecificationProviderRegistration>: . [Capability <List<IResourceProviderCapabilities>>]: Effect <String>: QuotaId <String>: [RequiredFeature <List<String>>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [ManagementIncidentContactEmail <String>]: [ManagementIncidentRoutingService <String>]: [ManagementIncidentRoutingTeam <String>]: [ManagementManifestOwner <List<String>>]: [ManagementResourceAccessPolicy <String>]: [ManagementResourceAccessRole <List<IAny>>]: [ManagementSchemaOwner <List<String>>]: [ManagementServiceTreeInfo <List<IServiceTreeInfo>>]: [ComponentId <String>]: [ServiceId <String>]: [Metadata <IAny>]: Anything [Namespace <String>]: [ProviderAuthenticationAllowedAudience <List<String>>]: [ProviderAuthorization <List<IResourceProviderAuthorization>>]: [ApplicationId <String>]: [ManagedByRoleDefinitionId <String>]: [RoleDefinitionId <String>]: [ProviderHubMetadataProviderAuthenticationAllowedAudience <List<String>>]: [ProviderHubMetadataProviderAuthorization <List<IResourceProviderAuthorization>>]: [ProviderHubMetadataThirdPartyProviderAuthorizationAuthorizations <List<ILightHouseAuthorization>>]: PrincipalId <String>: RoleDefinitionId <String>: [ProviderHubMetadataThirdPartyProviderAuthorizationManagedByTenantId <String>]: [ProviderType <String>]: [ProviderVersion <String>]: [ProvisioningState <String>]: [RequestHeaderOptionOptInHeader <String>]: [RequiredFeature <List<String>>]: [SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl <TimeSpan?>]: [SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction <List<ISubscriptionStateOverrideAction>>]: Action <String>: State <String>: [TemplateDeploymentOptionPreflightOption <List<String>>]: [TemplateDeploymentOptionPreflightSupported <Boolean?>]: SPECIFICATIONRESOURCETYPEREGISTRATION <IResourceTypeRegistration[]>: . [AllowedUnauthorizedAction <List<String>>]: [AuthorizationActionMapping <List<IAuthorizationActionMapping>>]: [Desired <String>]: [Original <String>]: [CheckNameAvailabilitySpecificationEnableDefaultValidation <Boolean?>]: [CheckNameAvailabilitySpecificationResourceTypesWithCustomValidation <List<String>>]: [DefaultApiVersion <String>]: [DisallowedActionVerb <List<String>>]: [EnableAsyncOperation <Boolean?>]: [EnableThirdPartyS2S <Boolean?>]: [Endpoint <List<IResourceTypeEndpoint>>]: [ApiVersion <List<String>>]: [Enabled <Boolean?>]: [Extension <List<IResourceTypeExtension>>]: [EndpointUri <String>]: [ExtensionCategory <List<String>>]: [Timeout <TimeSpan?>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [Location <List<String>>]: [RequiredFeature <List<String>>]: [Timeout <TimeSpan?>]: [ExtendedLocation <List<IExtendedLocationOptions>>]: [SupportedPolicy <String>]: [Type <String>]: [ExtensionOptionResourceCreationBeginRequest <List<String>>]: [ExtensionOptionResourceCreationBeginResponse <List<String>>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [IdentityManagementApplicationId <String>]: [IdentityManagementType <String>]: [IsPureProxy <Boolean?>]: [LinkedAccessCheck <List<ILinkedAccessCheck>>]: [ActionName <String>]: [LinkedAction <String>]: [LinkedActionVerb <String>]: [LinkedProperty <String>]: [LinkedType <String>]: [LoggingRule <List<ILoggingRule>>]: Action <String>: DetailLevel <String>: Direction <String>: [HiddenPropertyPathHiddenPathsOnRequest <List<String>>]: [HiddenPropertyPathHiddenPathsOnResponse <List<String>>]: [MarketplaceType <String>]: [ProvisioningState <String>]: [Regionality <String>]: [RequestHeaderOptionOptInHeader <String>]: [RequiredFeature <List<String>>]: [ResourceDeletionPolicy <String>]: [ResourceMovePolicyCrossResourceGroupMoveEnabled <Boolean?>]: [ResourceMovePolicyCrossSubscriptionMoveEnabled <Boolean?>]: [ResourceMovePolicyValidationRequired <Boolean?>]: [RoutingType <String>]: [ServiceTreeInfo <List<IServiceTreeInfo>>]: [ComponentId <String>]: [ServiceId <String>]: [SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl <TimeSpan?>]: [SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction <List<ISubscriptionStateOverrideAction>>]: Action <String>: State <String>: [SubscriptionStateRule <List<ISubscriptionStateRule>>]: [AllowedAction <List<String>>]: [State <String>]: [SwaggerSpecification <List<ISwaggerSpecification>>]: [ApiVersion <List<String>>]: [SwaggerSpecFolderUri <String>]: [TemplateDeploymentOptionPreflightOption <List<String>>]: [TemplateDeploymentOptionPreflightSupported <Boolean?>]: [ThrottlingRule <List<IThrottlingRule>>]: Action <String>: Metric <List<IThrottlingMetric>>: Limit <Int64>: Type <String>: [Interval <TimeSpan?>]: [RequiredFeature <List<String>>]: .Link https://learn.microsoft.com/powershell/module/az.providerhub/new-azproviderhubdefaultrollout #> function New-AzProviderHubDefaultRollout { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRollout])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The rollout name. ${RolloutName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationCanaryRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationCanarySkipRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationHighTrafficRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationHighTrafficWaitDuration}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationLowTrafficRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationLowTrafficWaitDuration}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationMediumTrafficRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationMediumTrafficWaitDuration}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRolloutSpecificationProviderRegistration] # . ${SpecificationProviderRegistration}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration[]] # . ${SpecificationResourceTypeRegistration}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationRestOfTheWorldGroupOneRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationRestOfTheWorldGroupOneWaitDuration}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationRestOfTheWorldGroupTwoRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationRestOfTheWorldGroupTwoWaitDuration}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${StatusCompletedRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IRolloutStatusBaseFailedOrSkippedRegions]))] [System.Collections.Hashtable] # Dictionary of <ExtendedErrorInfo> ${StatusFailedOrSkippedRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Canary", "LowTraffic", "MediumTraffic", "HighTraffic", "None", "RestOfTheWorldGroupOne", "RestOfTheWorldGroupTwo")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${StatusNextTrafficRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.DateTime] # . ${StatusNextTrafficRegionScheduledTime}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotApplicable", "ConditionalUpdate", "ForcedUpdate", "Failed")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${StatusSubscriptionReregistrationResult}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ CreateExpanded = 'Az.ProviderHub.private\New-AzProviderHubDefaultRollout_CreateExpanded'; CreateViaIdentityProviderRegistrationExpanded = 'Az.ProviderHub.private\New-AzProviderHubDefaultRollout_CreateViaIdentityProviderRegistrationExpanded'; CreateViaJsonFilePath = 'Az.ProviderHub.private\New-AzProviderHubDefaultRollout_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.ProviderHub.private\New-AzProviderHubDefaultRollout_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Generates the manifest for the given provider. .Description Generates the manifest for the given provider. .Example New-AzProviderHubManifest -ProviderNamespace "Microsoft.Contoso" .Example New-AzProviderHubManifest -ProviderNamespace "Microsoft.Contoso" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceProviderManifest .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/new-azproviderhubmanifest #> function New-AzProviderHubManifest { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceProviderManifest])] [CmdletBinding(DefaultParameterSetName='Generate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Generate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Generate')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GenerateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Generate = 'Az.ProviderHub.private\New-AzProviderHubManifest_Generate'; GenerateViaIdentity = 'Az.ProviderHub.private\New-AzProviderHubManifest_GenerateViaIdentity'; } if (('Generate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Create a notification registration. .Description Create a notification registration. .Example New-AzProviderHubNotificationRegistration -ProviderNamespace "Microsoft.Contoso" -Name "notificationRegistrationTest" -NotificationMode "EventHub" -MessageScope "RegisteredSubscriptions" -IncludedEvent "*/write", "Microsoft.Contoso/testResourceType/delete" -NotificationEndpoint @{Location = "", "East US"; NotificationDestination = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications"} .Example New-AzProviderHubNotificationRegistration -ProviderNamespace "Microsoft.Contoso" -Name "notificationRegistrationTest" -NotificationMode "EventHub" -MessageScope "RegisteredSubscriptions" -IncludedEvent "*/write", "Microsoft.Contoso/testResourceType/delete" -NotificationEndpoint @{Location = "", "East US"; NotificationDestination = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications"} .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.INotificationRegistration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. NOTIFICATIONENDPOINT <INotificationEndpoint[]>: . [Location <List<String>>]: [NotificationDestination <String>]: PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/new-azproviderhubnotificationregistration #> function New-AzProviderHubNotificationRegistration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.INotificationRegistration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('NotificationRegistrationName')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The notification registration. ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${IncludedEvent}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "RegisteredSubscriptions")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${MessageScope}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.INotificationEndpoint[]] # . ${NotificationEndpoint}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "EventHub", "WebHook")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${NotificationMode}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ CreateExpanded = 'Az.ProviderHub.private\New-AzProviderHubNotificationRegistration_CreateExpanded'; CreateViaIdentityProviderRegistrationExpanded = 'Az.ProviderHub.private\New-AzProviderHubNotificationRegistration_CreateViaIdentityProviderRegistrationExpanded'; CreateViaJsonFilePath = 'Az.ProviderHub.private\New-AzProviderHubNotificationRegistration_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.ProviderHub.private\New-AzProviderHubNotificationRegistration_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Create the provider registration. .Description Create the provider registration. .Example New-AzProviderHubProviderRegistration -ProviderNamespace "Microsoft.Contoso" -ProviderHubMetadataProviderAuthenticationAllowedAudience "https://management.core.windows.net/" -ProviderHubMetadataProviderAuthorization @{ApplicationId = "00000000-0000-0000-0000-000000000000"; RoleDefinitionId = "00000000-0000-0000-0000-000000000000"} -Namespace "Microsoft.Contoso" -ProviderVersion "2.0" -ProviderType "Internal" -ManagementManifestOwner "SPARTA-PlatformServiceAdministrator" -ManagementIncidentContactEmail "help@microsoft.com" -ManagementIncidentRoutingService "Contoso Service" -ManagementIncidentRoutingTeam "Contoso Team" -ManagementServiceTreeInfo @{ComponentId = "00000000-0000-0000-0000-000000000000"; ServiceId = "00000000-0000-0000-0000-000000000000"} -Capability @{QuotaId = "CSP_2015-05-01"; Effect = "Allow"}, @{QuotaId = "CSP_MG_2017-12-01"; Effect = "Allow"} .Example New-AzProviderHubProviderRegistration -ProviderNamespace "Microsoft.Contoso" -ProviderHubMetadataProviderAuthenticationAllowedAudience "https://management.core.windows.net/" -ProviderHubMetadataProviderAuthorization @{ApplicationId = "00000000-0000-0000-0000-000000000000"; RoleDefinitionId = "00000000-0000-0000-0000-000000000000"} -Namespace "Microsoft.Contoso" -ProviderVersion "2.0" -ProviderType "Hidden" -ManagementManifestOwner "SPARTA-PlatformServiceAdministrator" -ManagementIncidentContactEmail "help@microsoft.com" -ManagementIncidentRoutingService "Contoso Service" -ManagementIncidentRoutingTeam "Contoso Team" -ManagementServiceTreeInfo @{ComponentId = "00000000-0000-0000-0000-000000000000"; ServiceId = "00000000-0000-0000-0000-000000000000"} -Capability @{QuotaId = "CSP_2015-05-01"; Effect = "Allow"}, @{QuotaId = "CSP_MG_2017-12-01"; Effect = "Allow"} .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderRegistration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. CAPABILITY <IResourceProviderCapabilities[]>: . Effect <String>: QuotaId <String>: [RequiredFeature <List<String>>]: MANAGEMENTSERVICETREEINFO <IServiceTreeInfo[]>: . [ComponentId <String>]: [ServiceId <String>]: PROVIDERAUTHORIZATION <IResourceProviderAuthorization[]>: . [ApplicationId <String>]: [ManagedByRoleDefinitionId <String>]: [RoleDefinitionId <String>]: PROVIDERHUBMETADATAPROVIDERAUTHORIZATION <IResourceProviderAuthorization[]>: . [ApplicationId <String>]: [ManagedByRoleDefinitionId <String>]: [RoleDefinitionId <String>]: PROVIDERHUBMETADATATHIRDPARTYPROVIDERAUTHORIZATION <ILightHouseAuthorization[]>: . PrincipalId <String>: RoleDefinitionId <String>: SUBSCRIPTIONLIFECYCLENOTIFICATIONSPECIFICATIONSUBSCRIPTIONSTATEOVERRIDEACTION <ISubscriptionStateOverrideAction[]>: . Action <String>: State <String>: .Link https://learn.microsoft.com/powershell/module/az.providerhub/new-azproviderhubproviderregistration #> function New-AzProviderHubProviderRegistration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderRegistration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceProviderCapabilities[]] # . ${Capability}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${FeatureRuleRequiredFeaturesPolicy}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ManagementIncidentContactEmail}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ManagementIncidentRoutingService}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ManagementIncidentRoutingTeam}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ManagementManifestOwner}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "AcisReadAllowed", "AcisActionAllowed")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ManagementResourceAccessPolicy}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IAny[]] # . ${ManagementResourceAccessRole}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ManagementSchemaOwner}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IServiceTreeInfo[]] # . ${ManagementServiceTreeInfo}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IAny] # Anything ${Metadata}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${Namespace}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ProviderAuthenticationAllowedAudience}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceProviderAuthorization[]] # . ${ProviderAuthorization}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ProviderHubMetadataProviderAuthenticationAllowedAudience}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceProviderAuthorization[]] # . ${ProviderHubMetadataProviderAuthorization}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ILightHouseAuthorization[]] # . ${ProviderHubMetadataThirdPartyProviderAuthorization}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProviderHubMetadataThirdPartyProviderAuthorizationManagedByTenantId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Internal", "External", "Hidden", "RegistrationFree", "LegacyRegistrationRequired", "TenantOnly", "AuthorizationFree")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProviderType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProviderVersion}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "SignedUserToken", "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${RequestHeaderOptionOptInHeader}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${RequiredFeature}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISubscriptionStateOverrideAction[]] # . ${SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("None", "ContinueDeploymentOnFailure", "DefaultValidationOnly")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${TemplateDeploymentOptionPreflightOption}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${TemplateDeploymentOptionPreflightSupported}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ CreateExpanded = 'Az.ProviderHub.private\New-AzProviderHubProviderRegistration_CreateExpanded'; CreateViaJsonFilePath = 'Az.ProviderHub.private\New-AzProviderHubProviderRegistration_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.ProviderHub.private\New-AzProviderHubProviderRegistration_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Deletes the rollout resource. Rollout must be in terminal state. .Description Deletes the rollout resource. Rollout must be in terminal state. .Example Remove-AzProviderHubDefaultRollout -ProviderNamespace "Microsoft.Contoso" -RolloutName "defaultRollout2021w10" .Example Remove-AzProviderHubDefaultRollout -ProviderNamespace "Microsoft.Contoso" -RolloutName "defaultRollout2021w10" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/remove-azproviderhubdefaultrollout #> function Remove-AzProviderHubDefaultRollout { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityProviderRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The rollout name. ${RolloutName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Delete = 'Az.ProviderHub.private\Remove-AzProviderHubDefaultRollout_Delete'; DeleteViaIdentity = 'Az.ProviderHub.private\Remove-AzProviderHubDefaultRollout_DeleteViaIdentity'; DeleteViaIdentityProviderRegistration = 'Az.ProviderHub.private\Remove-AzProviderHubDefaultRollout_DeleteViaIdentityProviderRegistration'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Deletes a notification registration. .Description Deletes a notification registration. .Example Remove-AzProviderHubNotificationRegistration -ProviderNamespace "Microsoft.Contoso" -Name "notificationRegistrationTest" .Example Remove-AzProviderHubNotificationRegistration -ProviderNamespace "Microsoft.Contoso" -Name "notificationRegistrationTest" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/remove-azproviderhubnotificationregistration #> function Remove-AzProviderHubNotificationRegistration { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityProviderRegistration', Mandatory)] [Alias('NotificationRegistrationName')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The notification registration. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Delete = 'Az.ProviderHub.private\Remove-AzProviderHubNotificationRegistration_Delete'; DeleteViaIdentity = 'Az.ProviderHub.private\Remove-AzProviderHubNotificationRegistration_DeleteViaIdentity'; DeleteViaIdentityProviderRegistration = 'Az.ProviderHub.private\Remove-AzProviderHubNotificationRegistration_DeleteViaIdentityProviderRegistration'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Deletes a provider registration. .Description Deletes a provider registration. .Example Remove-AzProviderHubProviderRegistration -ProviderNamespace "Microsoft.Contoso" .Example Remove-AzProviderHubProviderRegistration -ProviderNamespace "Microsoft.Contoso" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/remove-azproviderhubproviderregistration #> function Remove-AzProviderHubProviderRegistration { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Delete = 'Az.ProviderHub.private\Remove-AzProviderHubProviderRegistration_Delete'; DeleteViaIdentity = 'Az.ProviderHub.private\Remove-AzProviderHubProviderRegistration_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Stops or cancels the rollout, if in progress. .Description Stops or cancels the rollout, if in progress. .Example Stop-AzProviderHubDefaultRollout -ProviderNamespace "Microsoft.Contoso" -RolloutName "defaultRollout2021w10" .Example Stop-AzProviderHubDefaultRollout -ProviderNamespace "Microsoft.Contoso" -RolloutName "defaultRollout2021w10" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/stop-azproviderhubdefaultrollout #> function Stop-AzProviderHubDefaultRollout { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Stop', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Stop', Mandatory)] [Parameter(ParameterSetName='StopViaIdentityProviderRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The rollout name. ${RolloutName}, [Parameter(ParameterSetName='Stop')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='StopViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Stop = 'Az.ProviderHub.private\Stop-AzProviderHubDefaultRollout_Stop'; StopViaIdentity = 'Az.ProviderHub.private\Stop-AzProviderHubDefaultRollout_StopViaIdentity'; StopViaIdentityProviderRegistration = 'Az.ProviderHub.private\Stop-AzProviderHubDefaultRollout_StopViaIdentityProviderRegistration'; } if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Update the rollout details. .Description Update the rollout details. .Example Update-AzProviderHubCustomRollout -ProviderNamespace "Microsoft.Contoso" -RolloutName "customRollout1" -SpecificationCanaryRegion "Eastus2EUAP" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRollout .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. SPECIFICATIONPROVIDERREGISTRATION <ICustomRolloutSpecificationProviderRegistration>: . [Capability <List<IResourceProviderCapabilities>>]: Effect <String>: QuotaId <String>: [RequiredFeature <List<String>>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [ManagementIncidentContactEmail <String>]: [ManagementIncidentRoutingService <String>]: [ManagementIncidentRoutingTeam <String>]: [ManagementManifestOwner <List<String>>]: [ManagementResourceAccessPolicy <String>]: [ManagementResourceAccessRole <List<IAny>>]: [ManagementSchemaOwner <List<String>>]: [ManagementServiceTreeInfo <List<IServiceTreeInfo>>]: [ComponentId <String>]: [ServiceId <String>]: [Metadata <IAny>]: Anything [Namespace <String>]: [ProviderAuthenticationAllowedAudience <List<String>>]: [ProviderAuthorization <List<IResourceProviderAuthorization>>]: [ApplicationId <String>]: [ManagedByRoleDefinitionId <String>]: [RoleDefinitionId <String>]: [ProviderHubMetadataProviderAuthenticationAllowedAudience <List<String>>]: [ProviderHubMetadataProviderAuthorization <List<IResourceProviderAuthorization>>]: [ProviderHubMetadataThirdPartyProviderAuthorizationAuthorizations <List<ILightHouseAuthorization>>]: PrincipalId <String>: RoleDefinitionId <String>: [ProviderHubMetadataThirdPartyProviderAuthorizationManagedByTenantId <String>]: [ProviderType <String>]: [ProviderVersion <String>]: [ProvisioningState <String>]: [RequestHeaderOptionOptInHeader <String>]: [RequiredFeature <List<String>>]: [SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl <TimeSpan?>]: [SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction <List<ISubscriptionStateOverrideAction>>]: Action <String>: State <String>: [TemplateDeploymentOptionPreflightOption <List<String>>]: [TemplateDeploymentOptionPreflightSupported <Boolean?>]: SPECIFICATIONRESOURCETYPEREGISTRATION <IResourceTypeRegistration[]>: . [AllowedUnauthorizedAction <List<String>>]: [AuthorizationActionMapping <List<IAuthorizationActionMapping>>]: [Desired <String>]: [Original <String>]: [CheckNameAvailabilitySpecificationEnableDefaultValidation <Boolean?>]: [CheckNameAvailabilitySpecificationResourceTypesWithCustomValidation <List<String>>]: [DefaultApiVersion <String>]: [DisallowedActionVerb <List<String>>]: [EnableAsyncOperation <Boolean?>]: [EnableThirdPartyS2S <Boolean?>]: [Endpoint <List<IResourceTypeEndpoint>>]: [ApiVersion <List<String>>]: [Enabled <Boolean?>]: [Extension <List<IResourceTypeExtension>>]: [EndpointUri <String>]: [ExtensionCategory <List<String>>]: [Timeout <TimeSpan?>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [Location <List<String>>]: [RequiredFeature <List<String>>]: [Timeout <TimeSpan?>]: [ExtendedLocation <List<IExtendedLocationOptions>>]: [SupportedPolicy <String>]: [Type <String>]: [ExtensionOptionResourceCreationBeginRequest <List<String>>]: [ExtensionOptionResourceCreationBeginResponse <List<String>>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [IdentityManagementApplicationId <String>]: [IdentityManagementType <String>]: [IsPureProxy <Boolean?>]: [LinkedAccessCheck <List<ILinkedAccessCheck>>]: [ActionName <String>]: [LinkedAction <String>]: [LinkedActionVerb <String>]: [LinkedProperty <String>]: [LinkedType <String>]: [LoggingRule <List<ILoggingRule>>]: Action <String>: DetailLevel <String>: Direction <String>: [HiddenPropertyPathHiddenPathsOnRequest <List<String>>]: [HiddenPropertyPathHiddenPathsOnResponse <List<String>>]: [MarketplaceType <String>]: [ProvisioningState <String>]: [Regionality <String>]: [RequestHeaderOptionOptInHeader <String>]: [RequiredFeature <List<String>>]: [ResourceDeletionPolicy <String>]: [ResourceMovePolicyCrossResourceGroupMoveEnabled <Boolean?>]: [ResourceMovePolicyCrossSubscriptionMoveEnabled <Boolean?>]: [ResourceMovePolicyValidationRequired <Boolean?>]: [RoutingType <String>]: [ServiceTreeInfo <List<IServiceTreeInfo>>]: [ComponentId <String>]: [ServiceId <String>]: [SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl <TimeSpan?>]: [SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction <List<ISubscriptionStateOverrideAction>>]: Action <String>: State <String>: [SubscriptionStateRule <List<ISubscriptionStateRule>>]: [AllowedAction <List<String>>]: [State <String>]: [SwaggerSpecification <List<ISwaggerSpecification>>]: [ApiVersion <List<String>>]: [SwaggerSpecFolderUri <String>]: [TemplateDeploymentOptionPreflightOption <List<String>>]: [TemplateDeploymentOptionPreflightSupported <Boolean?>]: [ThrottlingRule <List<IThrottlingRule>>]: Action <String>: Metric <List<IThrottlingMetric>>: Limit <Int64>: Type <String>: [Interval <TimeSpan?>]: [RequiredFeature <List<String>>]: .Link https://learn.microsoft.com/powershell/module/az.providerhub/update-azproviderhubcustomrollout #> function Update-AzProviderHubCustomRollout { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRollout])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityProviderRegistrationExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The rollout name. ${RolloutName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityProviderRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationCanaryRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRolloutSpecificationProviderRegistration] # . ${SpecificationProviderRegistration}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration[]] # . ${SpecificationResourceTypeRegistration}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${StatusCompletedRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ICustomRolloutStatusFailedOrSkippedRegions]))] [System.Collections.Hashtable] # Dictionary of <ExtendedErrorInfo> ${StatusFailedOrSkippedRegion}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ UpdateExpanded = 'Az.ProviderHub.private\Update-AzProviderHubCustomRollout_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ProviderHub.private\Update-AzProviderHubCustomRollout_UpdateViaIdentityExpanded'; UpdateViaIdentityProviderRegistrationExpanded = 'Az.ProviderHub.private\Update-AzProviderHubCustomRollout_UpdateViaIdentityProviderRegistrationExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Update the rollout details. .Description Update the rollout details. .Example Update-AzProviderHubDefaultRollout -ProviderNamespace "Microsoft.Contoso" -RolloutName "defaultRollout2021w10" -SpecificationCanarySkipRegion "brazilus" -NoWait .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRollout .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. SPECIFICATIONPROVIDERREGISTRATION <IDefaultRolloutSpecificationProviderRegistration>: . [Capability <List<IResourceProviderCapabilities>>]: Effect <String>: QuotaId <String>: [RequiredFeature <List<String>>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [ManagementIncidentContactEmail <String>]: [ManagementIncidentRoutingService <String>]: [ManagementIncidentRoutingTeam <String>]: [ManagementManifestOwner <List<String>>]: [ManagementResourceAccessPolicy <String>]: [ManagementResourceAccessRole <List<IAny>>]: [ManagementSchemaOwner <List<String>>]: [ManagementServiceTreeInfo <List<IServiceTreeInfo>>]: [ComponentId <String>]: [ServiceId <String>]: [Metadata <IAny>]: Anything [Namespace <String>]: [ProviderAuthenticationAllowedAudience <List<String>>]: [ProviderAuthorization <List<IResourceProviderAuthorization>>]: [ApplicationId <String>]: [ManagedByRoleDefinitionId <String>]: [RoleDefinitionId <String>]: [ProviderHubMetadataProviderAuthenticationAllowedAudience <List<String>>]: [ProviderHubMetadataProviderAuthorization <List<IResourceProviderAuthorization>>]: [ProviderHubMetadataThirdPartyProviderAuthorizationAuthorizations <List<ILightHouseAuthorization>>]: PrincipalId <String>: RoleDefinitionId <String>: [ProviderHubMetadataThirdPartyProviderAuthorizationManagedByTenantId <String>]: [ProviderType <String>]: [ProviderVersion <String>]: [ProvisioningState <String>]: [RequestHeaderOptionOptInHeader <String>]: [RequiredFeature <List<String>>]: [SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl <TimeSpan?>]: [SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction <List<ISubscriptionStateOverrideAction>>]: Action <String>: State <String>: [TemplateDeploymentOptionPreflightOption <List<String>>]: [TemplateDeploymentOptionPreflightSupported <Boolean?>]: SPECIFICATIONRESOURCETYPEREGISTRATION <IResourceTypeRegistration[]>: . [AllowedUnauthorizedAction <List<String>>]: [AuthorizationActionMapping <List<IAuthorizationActionMapping>>]: [Desired <String>]: [Original <String>]: [CheckNameAvailabilitySpecificationEnableDefaultValidation <Boolean?>]: [CheckNameAvailabilitySpecificationResourceTypesWithCustomValidation <List<String>>]: [DefaultApiVersion <String>]: [DisallowedActionVerb <List<String>>]: [EnableAsyncOperation <Boolean?>]: [EnableThirdPartyS2S <Boolean?>]: [Endpoint <List<IResourceTypeEndpoint>>]: [ApiVersion <List<String>>]: [Enabled <Boolean?>]: [Extension <List<IResourceTypeExtension>>]: [EndpointUri <String>]: [ExtensionCategory <List<String>>]: [Timeout <TimeSpan?>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [Location <List<String>>]: [RequiredFeature <List<String>>]: [Timeout <TimeSpan?>]: [ExtendedLocation <List<IExtendedLocationOptions>>]: [SupportedPolicy <String>]: [Type <String>]: [ExtensionOptionResourceCreationBeginRequest <List<String>>]: [ExtensionOptionResourceCreationBeginResponse <List<String>>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [IdentityManagementApplicationId <String>]: [IdentityManagementType <String>]: [IsPureProxy <Boolean?>]: [LinkedAccessCheck <List<ILinkedAccessCheck>>]: [ActionName <String>]: [LinkedAction <String>]: [LinkedActionVerb <String>]: [LinkedProperty <String>]: [LinkedType <String>]: [LoggingRule <List<ILoggingRule>>]: Action <String>: DetailLevel <String>: Direction <String>: [HiddenPropertyPathHiddenPathsOnRequest <List<String>>]: [HiddenPropertyPathHiddenPathsOnResponse <List<String>>]: [MarketplaceType <String>]: [ProvisioningState <String>]: [Regionality <String>]: [RequestHeaderOptionOptInHeader <String>]: [RequiredFeature <List<String>>]: [ResourceDeletionPolicy <String>]: [ResourceMovePolicyCrossResourceGroupMoveEnabled <Boolean?>]: [ResourceMovePolicyCrossSubscriptionMoveEnabled <Boolean?>]: [ResourceMovePolicyValidationRequired <Boolean?>]: [RoutingType <String>]: [ServiceTreeInfo <List<IServiceTreeInfo>>]: [ComponentId <String>]: [ServiceId <String>]: [SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl <TimeSpan?>]: [SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction <List<ISubscriptionStateOverrideAction>>]: Action <String>: State <String>: [SubscriptionStateRule <List<ISubscriptionStateRule>>]: [AllowedAction <List<String>>]: [State <String>]: [SwaggerSpecification <List<ISwaggerSpecification>>]: [ApiVersion <List<String>>]: [SwaggerSpecFolderUri <String>]: [TemplateDeploymentOptionPreflightOption <List<String>>]: [TemplateDeploymentOptionPreflightSupported <Boolean?>]: [ThrottlingRule <List<IThrottlingRule>>]: Action <String>: Metric <List<IThrottlingMetric>>: Limit <Int64>: Type <String>: [Interval <TimeSpan?>]: [RequiredFeature <List<String>>]: .Link https://learn.microsoft.com/powershell/module/az.providerhub/update-azproviderhubdefaultrollout #> function Update-AzProviderHubDefaultRollout { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRollout])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityProviderRegistrationExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The rollout name. ${RolloutName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityProviderRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationCanaryRegion}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationCanarySkipRegion}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationHighTrafficRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationHighTrafficWaitDuration}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationLowTrafficRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationLowTrafficWaitDuration}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationMediumTrafficRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationMediumTrafficWaitDuration}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IDefaultRolloutSpecificationProviderRegistration] # . ${SpecificationProviderRegistration}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration[]] # . ${SpecificationResourceTypeRegistration}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationRestOfTheWorldGroupOneRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationRestOfTheWorldGroupOneWaitDuration}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${SpecificationRestOfTheWorldGroupTwoRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SpecificationRestOfTheWorldGroupTwoWaitDuration}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${StatusCompletedRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IRolloutStatusBaseFailedOrSkippedRegions]))] [System.Collections.Hashtable] # Dictionary of <ExtendedErrorInfo> ${StatusFailedOrSkippedRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Canary", "LowTraffic", "MediumTraffic", "HighTraffic", "None", "RestOfTheWorldGroupOne", "RestOfTheWorldGroupTwo")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${StatusNextTrafficRegion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.DateTime] # . ${StatusNextTrafficRegionScheduledTime}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotApplicable", "ConditionalUpdate", "ForcedUpdate", "Failed")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${StatusSubscriptionReregistrationResult}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ UpdateExpanded = 'Az.ProviderHub.private\Update-AzProviderHubDefaultRollout_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ProviderHub.private\Update-AzProviderHubDefaultRollout_UpdateViaIdentityExpanded'; UpdateViaIdentityProviderRegistrationExpanded = 'Az.ProviderHub.private\Update-AzProviderHubDefaultRollout_UpdateViaIdentityProviderRegistrationExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Update a notification registration. .Description Update a notification registration. .Example Update-AzProviderHubNotificationRegistration -ProviderNamespace "Microsoft.Contoso" -Name "notificationRegistrationTest" -NotificationMode "EventHub" -MessageScope "RegisteredSubscriptions" -IncludedEvent "*/write", "Microsoft.Contoso/testResourceType/delete" -NotificationEndpoint @{Location = "", "East US"; NotificationDestination = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications"} .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.INotificationRegistration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. NOTIFICATIONENDPOINT <INotificationEndpoint[]>: . [Location <List<String>>]: [NotificationDestination <String>]: PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/update-azproviderhubnotificationregistration #> function Update-AzProviderHubNotificationRegistration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.INotificationRegistration])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityProviderRegistrationExpanded', Mandatory)] [Alias('NotificationRegistrationName')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The notification registration. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityProviderRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${IncludedEvent}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "RegisteredSubscriptions")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${MessageScope}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.INotificationEndpoint[]] # . ${NotificationEndpoint}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "EventHub", "WebHook")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${NotificationMode}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ UpdateExpanded = 'Az.ProviderHub.private\Update-AzProviderHubNotificationRegistration_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ProviderHub.private\Update-AzProviderHubNotificationRegistration_UpdateViaIdentityExpanded'; UpdateViaIdentityProviderRegistrationExpanded = 'Az.ProviderHub.private\Update-AzProviderHubNotificationRegistration_UpdateViaIdentityProviderRegistrationExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Update the provider registration. .Description Update the provider registration. .Example Update-AzProviderHubProviderRegistration -ProviderNamespace "Microsoft.Contoso" -ProviderHubMetadataProviderAuthenticationAllowedAudience "https://management.core.windows.net/" -ProviderHubMetadataProviderAuthorization @{ApplicationId = "00000000-0000-0000-0000-000000000000"; RoleDefinitionId = "00000000-0000-0000-0000-000000000000"} -Namespace "Microsoft.Contoso" -ProviderVersion "2.0" -ProviderType "Internal" -ManagementManifestOwner "SPARTA-PlatformServiceAdministrator" -ManagementIncidentContactEmail "help@microsoft.com" -ManagementIncidentRoutingService "Contoso Service" -ManagementIncidentRoutingTeam "Contoso Team" -ManagementServiceTreeInfo @{ComponentId = "00000000-0000-0000-0000-000000000000"; ServiceId = "00000000-0000-0000-0000-000000000000"} -Capability @{QuotaId = "CSP_2015-05-01"; Effect = "Allow"}, @{QuotaId = "CSP_MG_2017-12-01"; Effect = "Allow"} .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderRegistration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. CAPABILITY <IResourceProviderCapabilities[]>: . Effect <String>: QuotaId <String>: [RequiredFeature <List<String>>]: INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. MANAGEMENTSERVICETREEINFO <IServiceTreeInfo[]>: . [ComponentId <String>]: [ServiceId <String>]: PROVIDERAUTHORIZATION <IResourceProviderAuthorization[]>: . [ApplicationId <String>]: [ManagedByRoleDefinitionId <String>]: [RoleDefinitionId <String>]: PROVIDERHUBMETADATAPROVIDERAUTHORIZATION <IResourceProviderAuthorization[]>: . [ApplicationId <String>]: [ManagedByRoleDefinitionId <String>]: [RoleDefinitionId <String>]: PROVIDERHUBMETADATATHIRDPARTYPROVIDERAUTHORIZATION <ILightHouseAuthorization[]>: . PrincipalId <String>: RoleDefinitionId <String>: SUBSCRIPTIONLIFECYCLENOTIFICATIONSPECIFICATIONSUBSCRIPTIONSTATEOVERRIDEACTION <ISubscriptionStateOverrideAction[]>: . Action <String>: State <String>: .Link https://learn.microsoft.com/powershell/module/az.providerhub/update-azproviderhubproviderregistration #> function Update-AzProviderHubProviderRegistration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderRegistration])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceProviderCapabilities[]] # . ${Capability}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${FeatureRuleRequiredFeaturesPolicy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ManagementIncidentContactEmail}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ManagementIncidentRoutingService}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ManagementIncidentRoutingTeam}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ManagementManifestOwner}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "AcisReadAllowed", "AcisActionAllowed")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ManagementResourceAccessPolicy}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IAny[]] # . ${ManagementResourceAccessRole}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ManagementSchemaOwner}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IServiceTreeInfo[]] # . ${ManagementServiceTreeInfo}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IAny] # Anything ${Metadata}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${Namespace}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ProviderAuthenticationAllowedAudience}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceProviderAuthorization[]] # . ${ProviderAuthorization}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ProviderHubMetadataProviderAuthenticationAllowedAudience}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceProviderAuthorization[]] # . ${ProviderHubMetadataProviderAuthorization}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ILightHouseAuthorization[]] # . ${ProviderHubMetadataThirdPartyProviderAuthorization}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProviderHubMetadataThirdPartyProviderAuthorizationManagedByTenantId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Internal", "External", "Hidden", "RegistrationFree", "LegacyRegistrationRequired", "TenantOnly", "AuthorizationFree")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProviderType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProviderVersion}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "SignedUserToken", "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${RequestHeaderOptionOptInHeader}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${RequiredFeature}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISubscriptionStateOverrideAction[]] # . ${SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("None", "ContinueDeploymentOnFailure", "DefaultValidationOnly")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${TemplateDeploymentOptionPreflightOption}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${TemplateDeploymentOptionPreflightSupported}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ UpdateExpanded = 'Az.ProviderHub.private\Update-AzProviderHubProviderRegistration_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ProviderHub.private\Update-AzProviderHubProviderRegistration_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Update a resource type. .Description Update a resource type. .Example Update-AzProviderHubResourceTypeRegistration -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType" -RoutingType "Default" -Regionality "Regional" -Endpoint @{ApiVersion = "2021-01-01-preview"; Location = "West US 2", "East US 2 EUAP"; RequiredFeature = "Microsoft.Contoso/SampleApp" } -SwaggerSpecification @{ApiVersion = "2021-01-01-preview"; SwaggerSpecFolderUri = "https://github.com/Azure/azure-rest-api-specs-pr/blob/RPSaaSMaster/specification/rpsaas/resource-manager/Microsoft.Contoso/" } .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. AUTHORIZATIONACTIONMAPPING <IAuthorizationActionMapping[]>: . [Desired <String>]: [Original <String>]: ENDPOINT <IResourceTypeEndpoint[]>: . [ApiVersion <List<String>>]: [Enabled <Boolean?>]: [Extension <List<IResourceTypeExtension>>]: [EndpointUri <String>]: [ExtensionCategory <List<String>>]: [Timeout <TimeSpan?>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [Location <List<String>>]: [RequiredFeature <List<String>>]: [Timeout <TimeSpan?>]: EXTENDEDLOCATION <IExtendedLocationOptions[]>: . [SupportedPolicy <String>]: [Type <String>]: INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. LINKEDACCESSCHECK <ILinkedAccessCheck[]>: . [ActionName <String>]: [LinkedAction <String>]: [LinkedActionVerb <String>]: [LinkedProperty <String>]: [LinkedType <String>]: LOGGINGRULE <ILoggingRule[]>: . Action <String>: DetailLevel <String>: Direction <String>: [HiddenPropertyPathHiddenPathsOnRequest <List<String>>]: [HiddenPropertyPathHiddenPathsOnResponse <List<String>>]: PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. SERVICETREEINFO <IServiceTreeInfo[]>: . [ComponentId <String>]: [ServiceId <String>]: SUBSCRIPTIONLIFECYCLENOTIFICATIONSPECIFICATIONSUBSCRIPTIONSTATEOVERRIDEACTION <ISubscriptionStateOverrideAction[]>: . Action <String>: State <String>: SUBSCRIPTIONSTATERULE <ISubscriptionStateRule[]>: . [AllowedAction <List<String>>]: [State <String>]: SWAGGERSPECIFICATION <ISwaggerSpecification[]>: . [ApiVersion <List<String>>]: [SwaggerSpecFolderUri <String>]: THROTTLINGRULE <IThrottlingRule[]>: . Action <String>: Metric <List<IThrottlingMetric>>: Limit <Int64>: Type <String>: [Interval <TimeSpan?>]: [RequiredFeature <List<String>>]: .Link https://learn.microsoft.com/powershell/module/az.providerhub/update-azproviderhubresourcetyperegistration #> function Update-AzProviderHubResourceTypeRegistration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityProviderRegistrationExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The resource type. ${ResourceType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityProviderRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${AllowedUnauthorizedAction}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IAuthorizationActionMapping[]] # . ${AuthorizationActionMapping}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${CheckNameAvailabilitySpecificationEnableDefaultValidation}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${CheckNameAvailabilitySpecificationResourceTypesWithCustomValidation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${DefaultApiVersion}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${DisallowedActionVerb}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${EnableAsyncOperation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${EnableThirdPartyS2S}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeEndpoint[]] # . ${Endpoint}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IExtendedLocationOptions[]] # . ${ExtendedLocation}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "DoNotMergeExistingReadOnlyAndSecretProperties", "IncludeInternalMetadata")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ExtensionOptionResourceCreationBeginRequest}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "DoNotMergeExistingReadOnlyAndSecretProperties", "IncludeInternalMetadata")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ExtensionOptionResourceCreationBeginResponse}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${FeatureRuleRequiredFeaturesPolicy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${IdentityManagementApplicationId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "SystemAssigned", "UserAssigned", "Actor", "DelegatedResourceIdentity")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${IdentityManagementType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${IsPureProxy}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ILinkedAccessCheck[]] # . ${LinkedAccessCheck}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ILoggingRule[]] # . ${LoggingRule}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "AddOn", "Bypass", "Store")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${MarketplaceType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Global", "Regional")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${Regionality}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "SignedUserToken", "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${RequestHeaderOptionOptInHeader}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${RequiredFeature}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "CascadeDeleteAll", "CascadeDeleteProxyOnlyChildren")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ResourceDeletionPolicy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${ResourceMovePolicyCrossResourceGroupMoveEnabled}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${ResourceMovePolicyCrossSubscriptionMoveEnabled}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${ResourceMovePolicyValidationRequired}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("Default", "ProxyOnly", "HostBased", "Extension", "Tenant", "Fanout", "LocationBased", "Failover", "CascadeExtension")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${RoutingType}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IServiceTreeInfo[]] # . ${ServiceTreeInfo}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISubscriptionStateOverrideAction[]] # . ${SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISubscriptionStateRule[]] # . ${SubscriptionStateRule}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISwaggerSpecification[]] # . ${SwaggerSpecification}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("None", "ContinueDeploymentOnFailure", "DefaultValidationOnly")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${TemplateDeploymentOptionPreflightOption}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${TemplateDeploymentOptionPreflightSupported}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IThrottlingRule[]] # . ${ThrottlingRule}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ UpdateExpanded = 'Az.ProviderHub.private\Update-AzProviderHubResourceTypeRegistration_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ProviderHub.private\Update-AzProviderHubResourceTypeRegistration_UpdateViaIdentityExpanded'; UpdateViaIdentityProviderRegistrationExpanded = 'Az.ProviderHub.private\Update-AzProviderHubResourceTypeRegistration_UpdateViaIdentityProviderRegistrationExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Gets a resource type details in the given subscription and provider. .Description Gets a resource type details in the given subscription and provider. .Example Get-AzProviderHubResourceTypeRegistration -ProviderNamespace "Microsoft.Contoso" .Example Get-AzProviderHubResourceTypeRegistration -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType1" .Example Get-AzProviderHubResourceTypeRegistration -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType1/nestedResourceType" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/get-azproviderhubresourcetyperegistration #> function Get-AzProviderHubResourceTypeRegistration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The resource type. ${ResourceType}, [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ List = 'Az.ProviderHub.custom\Get-AzProviderHubResourceTypeRegistration'; Get = 'Az.ProviderHub.custom\Get-AzProviderHubResourceTypeRegistration'; GetViaIdentityProviderRegistration = 'Az.ProviderHub.custom\Get-AzProviderHubResourceTypeRegistration'; GetViaIdentity = 'Az.ProviderHub.custom\Get-AzProviderHubResourceTypeRegistration'; } if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Gets the sku details for the given resource type and sku name. .Description Gets the sku details for the given resource type and sku name. .Example Get-AzProviderHubSku -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType" -Sku "default" .Example Get-AzProviderHubSku -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType/nestedResourceType" -Sku "default" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISkuResource .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. RESOURCETYPEREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/get-azproviderhubsku #> function Get-AzProviderHubSku { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISkuResource])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='List3', Mandatory)] [Parameter(ParameterSetName='List2', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='List3', Mandatory)] [Parameter(ParameterSetName='List2', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The resource type. ${ResourceType}, [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List3')] [Parameter(ParameterSetName='List2')] [Parameter(ParameterSetName='List1')] [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='List3', Mandatory)] [Parameter(ParameterSetName='List2', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The first child resource type. ${NestedResourceTypeFirst}, [Parameter(ParameterSetName='List3', Mandatory)] [Parameter(ParameterSetName='List2', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The second child resource type. ${NestedResourceTypeSecond}, [Parameter(ParameterSetName='List3', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The third child resource type. ${NestedResourceTypeThird}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityResourcetypeRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The SKU. ${Sku}, [Parameter(ParameterSetName='GetViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter(ParameterSetName='GetViaIdentityResourcetypeRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ResourcetypeRegistrationInputObject}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ List = 'Az.ProviderHub.custom\Get-AzProviderHubSku'; List3 = 'Az.ProviderHub.custom\Get-AzProviderHubSku'; List2 = 'Az.ProviderHub.custom\Get-AzProviderHubSku'; List1 = 'Az.ProviderHub.custom\Get-AzProviderHubSku'; Get = 'Az.ProviderHub.custom\Get-AzProviderHubSku'; GetViaIdentityProviderRegistration = 'Az.ProviderHub.custom\Get-AzProviderHubSku'; GetViaIdentityResourcetypeRegistration = 'Az.ProviderHub.custom\Get-AzProviderHubSku'; GetViaIdentity = 'Az.ProviderHub.custom\Get-AzProviderHubSku'; } if (('List', 'List3', 'List2', 'List1', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Creates or updates a resource type. .Description Creates or updates a resource type. .Example New-AzProviderHubResourceTypeRegistration -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType" -RoutingType "Default" -Regionality "Regional" -Endpoint @{ApiVersion = "2021-01-01-preview"; Location = "West US 2", "East US 2 EUAP"; RequiredFeature = "Microsoft.Contoso/SampleApp" } -SwaggerSpecification @{ApiVersion = "2021-01-01-preview"; SwaggerSpecFolderUri = "https://github.com/Azure/azure-rest-api-specs-pr/blob/RPSaaSMaster/specification/rpsaas/resource-manager/Microsoft.Contoso/" } -EnableAsyncOperation .Example New-AzProviderHubResourceTypeRegistration -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType/nestedResourceType" -RoutingType "Default" -Regionality "Global" -Endpoint @{ApiVersion = "2021-01-01-preview"; Location = ""; RequiredFeature = "Microsoft.Contoso/SampleApp" } -SwaggerSpecification @{ApiVersion = "2021-01-01-preview"; SwaggerSpecFolderUri = "https://github.com/Azure/azure-rest-api-specs-pr/blob/RPSaaSMaster/specification/rpsaas/resource-manager/Microsoft.Contoso/" } .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. AUTHORIZATIONACTIONMAPPING <IAuthorizationActionMapping[]>: . To construct, see NOTES section for AUTHORIZATIONACTIONMAPPING properties and create a hash table. [Desired <String>]: [Original <String>]: ENDPOINT <IResourceTypeEndpoint[]>: . To construct, see NOTES section for ENDPOINT properties and create a hash table. [ApiVersion <List<String>>]: [Enabled <Boolean?>]: [Extension <List<IResourceTypeExtension>>]: [EndpointUri <String>]: [ExtensionCategory <List<String>>]: [Timeout <TimeSpan?>]: [FeatureRuleRequiredFeaturesPolicy <String>]: [Location <List<String>>]: [RequiredFeature <List<String>>]: [Timeout <TimeSpan?>]: EXTENDEDLOCATION <IExtendedLocationOptions[]>: . To construct, see NOTES section for EXTENDEDLOCATION properties and create a hash table. [SupportedPolicy <String>]: [Type <String>]: LINKEDACCESSCHECK <ILinkedAccessCheck[]>: . To construct, see NOTES section for LINKEDACCESSCHECK properties and create a hash table. [ActionName <String>]: [LinkedAction <String>]: [LinkedActionVerb <String>]: [LinkedProperty <String>]: [LinkedType <String>]: LOGGINGRULE <ILoggingRule[]>: . To construct, see NOTES section for LOGGINGRULE properties and create a hash table. Action <String>: DetailLevel <String>: Direction <String>: [HiddenPropertyPathHiddenPathsOnRequest <List<String>>]: [HiddenPropertyPathHiddenPathsOnResponse <List<String>>]: PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. SERVICETREEINFO <IServiceTreeInfo[]>: . To construct, see NOTES section for SERVICETREEINFO properties and create a hash table. [ComponentId <String>]: [ServiceId <String>]: SUBSCRIPTIONLIFECYCLENOTIFICATIONSPECIFICATIONSUBSCRIPTIONSTATEOVERRIDEACTION <ISubscriptionStateOverrideAction[]>: . To construct, see NOTES section for SUBSCRIPTIONLIFECYCLENOTIFICATIONSPECIFICATIONSUBSCRIPTIONSTATEOVERRIDEACTION properties and create a hash table. Action <String>: State <String>: SUBSCRIPTIONSTATERULE <ISubscriptionStateRule[]>: . To construct, see NOTES section for SUBSCRIPTIONSTATERULE properties and create a hash table. [AllowedAction <List<String>>]: [State <String>]: SWAGGERSPECIFICATION <ISwaggerSpecification[]>: . To construct, see NOTES section for SWAGGERSPECIFICATION properties and create a hash table. [ApiVersion <List<String>>]: [SwaggerSpecFolderUri <String>]: THROTTLINGRULE <IThrottlingRule[]>: . To construct, see NOTES section for THROTTLINGRULE properties and create a hash table. Action <String>: Metric <List<IThrottlingMetric>>: Limit <Int64>: Type <String>: [Interval <TimeSpan?>]: [RequiredFeature <List<String>>]: .Link https://learn.microsoft.com/powershell/module/az.providerhub/new-azproviderhubresourcetyperegistration #> function New-AzProviderHubResourceTypeRegistration { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeRegistration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The resource type. ${ResourceType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${AllowedUnauthorizedAction}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IAuthorizationActionMapping[]] # . # To construct, see NOTES section for AUTHORIZATIONACTIONMAPPING properties and create a hash table. ${AuthorizationActionMapping}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${CheckNameAvailabilitySpecificationEnableDefaultValidation}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${CheckNameAvailabilitySpecificationResourceTypesWithCustomValidation}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${DefaultApiVersion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${DisallowedActionVerb}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${EnableAsyncOperation}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${EnableThirdPartyS2S}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IResourceTypeEndpoint[]] # . # To construct, see NOTES section for ENDPOINT properties and create a hash table. ${Endpoint}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IExtendedLocationOptions[]] # . # To construct, see NOTES section for EXTENDEDLOCATION properties and create a hash table. ${ExtendedLocation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${FeatureRuleRequiredFeaturesPolicy}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${IdentityManagementApplicationId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "SystemAssigned", "UserAssigned", "Actor", "DelegatedResourceIdentity")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${IdentityManagementType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${IsPureProxy}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ILinkedAccessCheck[]] # . # To construct, see NOTES section for LINKEDACCESSCHECK properties and create a hash table. ${LinkedAccessCheck}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ILoggingRule[]] # . # To construct, see NOTES section for LOGGINGRULE properties and create a hash table. ${LoggingRule}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "AddOn", "Bypass", "Store")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${MarketplaceType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", "RolloutInProgress")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "Global", "Regional")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${Regionality}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "SignedUserToken", "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${RequestHeaderOptionOptInHeader}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${RequiredFeature}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "DoNotMergeExistingReadOnlyAndSecretProperties", "IncludeInternalMetadata")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ResourceCreationBeginRequest}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "DoNotMergeExistingReadOnlyAndSecretProperties", "IncludeInternalMetadata")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${ResourceCreationBeginResponse}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("NotSpecified", "CascadeDeleteAll", "CascadeDeleteProxyOnlyChildren")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ResourceDeletionPolicy}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${ResourceMovePolicyCrossResourceGroupMoveEnabled}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${ResourceMovePolicyCrossSubscriptionMoveEnabled}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${ResourceMovePolicyValidationRequired}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("Default", "ProxyOnly", "HostBased", "Extension", "Tenant", "Fanout", "LocationBased", "Failover", "CascadeExtension")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${RoutingType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IServiceTreeInfo[]] # . # To construct, see NOTES section for SERVICETREEINFO properties and create a hash table. ${ServiceTreeInfo}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.TimeSpan] # . ${SubscriptionLifecycleNotificationSpecificationSoftDeleteTtl}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISubscriptionStateOverrideAction[]] # . # To construct, see NOTES section for SUBSCRIPTIONLIFECYCLENOTIFICATIONSPECIFICATIONSUBSCRIPTIONSTATEOVERRIDEACTION properties and create a hash table. ${SubscriptionLifecycleNotificationSpecificationSubscriptionStateOverrideAction}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISubscriptionStateRule[]] # . # To construct, see NOTES section for SUBSCRIPTIONSTATERULE properties and create a hash table. ${SubscriptionStateRule}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISwaggerSpecification[]] # . # To construct, see NOTES section for SWAGGERSPECIFICATION properties and create a hash table. ${SwaggerSpecification}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.PSArgumentCompleterAttribute("None", "ContinueDeploymentOnFailure", "DefaultValidationOnly")] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String[]] # . ${TemplateDeploymentOptionPreflightOption}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.Management.Automation.SwitchParameter] # . ${TemplateDeploymentOptionPreflightSupported}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IThrottlingRule[]] # . # To construct, see NOTES section for THROTTLINGRULE properties and create a hash table. ${ThrottlingRule}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ CreateExpanded = 'Az.ProviderHub.custom\New-AzProviderHubResourceTypeRegistration'; CreateViaIdentityProviderRegistrationExpanded = 'Az.ProviderHub.custom\New-AzProviderHubResourceTypeRegistration'; CreateViaJsonFilePath = 'Az.ProviderHub.custom\New-AzProviderHubResourceTypeRegistration'; CreateViaJsonString = 'Az.ProviderHub.custom\New-AzProviderHubResourceTypeRegistration'; } if (('CreateExpanded', 'CreateViaIdentityProviderRegistrationExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Create the resource type skus in the given resource type. .Description Create the resource type skus in the given resource type. .Example $skuSetting1 = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.SkuSetting" -Property @{Name = "freeSku"; Tier = "Tier1"; Kind = "Standard"} $skuSetting2 = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.SkuSetting" -Property @{Name = "freeSku2"; Tier = "Tier1"; Kind = "Standard"} New-AzProviderHubSku -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType" -Sku "default" -SkuSetting $skuSetting1, $skuSetting2 .Example $skuSetting1 = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.SkuSetting" -Property @{Name = "freeSku"; Tier = "Tier1"; Kind = "Standard"} New-AzProviderHubSku -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType/nestedResourceType" -Sku "default" -SkuSetting $skuSetting1 .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISkuResource .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. RESOURCETYPEREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. SKUSETTING <ISkuSetting[]>: . To construct, see NOTES section for SKUSETTING properties and create a hash table. Name <String>: [Capability <List<ISkuCapability>>]: Name <String>: Value <String>: [CapacityDefault <Int32?>]: [CapacityMaximum <Int32?>]: [CapacityMinimum <Int32?>]: [CapacityScaleType <String>]: [Cost <List<ISkuCost>>]: MeterId <String>: [ExtendedUnit <String>]: [Quantity <Int32?>]: [Family <String>]: [Kind <String>]: [Location <List<String>>]: [LocationInfo <List<ISkuLocationInfo>>]: Location <String>: [ExtendedLocation <List<String>>]: [Type <String>]: [Zone <List<String>>]: [ZoneDetail <List<ISkuZoneDetail>>]: [Capability <List<ISkuCapability>>]: [Name <List<String>>]: [RequiredFeature <List<String>>]: [RequiredQuotaId <List<String>>]: [Size <String>]: [Tier <String>]: .Link https://learn.microsoft.com/powershell/module/az.providerhub/new-azproviderhubsku #> function New-AzProviderHubSku { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISkuResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The SKU. ${Sku}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The resource type. ${ResourceType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonString')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter(ParameterSetName='CreateViaIdentityResourcetypeRegistrationExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ResourcetypeRegistrationInputObject}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Parameter(ParameterSetName='CreateViaIdentityResourcetypeRegistrationExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.ISkuSetting[]] # . # To construct, see NOTES section for SKUSETTING properties and create a hash table. ${SkuSetting}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProviderRegistrationExpanded')] [Parameter(ParameterSetName='CreateViaIdentityResourcetypeRegistrationExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # . ${ProvisioningState}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ CreateExpanded = 'Az.ProviderHub.custom\New-AzProviderHubSku'; CreateViaJsonString = 'Az.ProviderHub.custom\New-AzProviderHubSku'; CreateViaJsonFilePath = 'Az.ProviderHub.custom\New-AzProviderHubSku'; CreateViaIdentityProviderRegistrationExpanded = 'Az.ProviderHub.custom\New-AzProviderHubSku'; CreateViaIdentityResourcetypeRegistrationExpanded = 'Az.ProviderHub.custom\New-AzProviderHubSku'; } if (('CreateExpanded', 'CreateViaJsonString', 'CreateViaJsonFilePath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Deletes a resource type .Description Deletes a resource type .Example Remove-AzProviderHubResourceTypeRegistration -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType" .Example Remove-AzProviderHubResourceTypeRegistration -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType/nestedResourceType" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/remove-azproviderhubresourcetyperegistration #> function Remove-AzProviderHubResourceTypeRegistration { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityProviderRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The resource type. ${ResourceType}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Delete = 'Az.ProviderHub.custom\Remove-AzProviderHubResourceTypeRegistration'; DeleteViaIdentityProviderRegistration = 'Az.ProviderHub.custom\Remove-AzProviderHubResourceTypeRegistration'; DeleteViaIdentity = 'Az.ProviderHub.custom\Remove-AzProviderHubResourceTypeRegistration'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } <# .Synopsis Deletes a resource type sku. .Description Deletes a resource type sku. .Example Remove-AzProviderHubSku -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType" -Sku "default" .Example Remove-AzProviderHubSku -ProviderNamespace "Microsoft.Contoso" -ResourceType "testResourceType/nestedResourceType" -Sku "default" .Inputs Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <IProviderHubIdentity>: Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. PROVIDERREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. RESOURCETYPEREGISTRATIONINPUTOBJECT <IProviderHubIdentity>: Identity Parameter [Id <String>]: Resource identity path [NestedResourceTypeFirst <String>]: The first child resource type. [NestedResourceTypeSecond <String>]: The second child resource type. [NestedResourceTypeThird <String>]: The third child resource type. [NotificationRegistrationName <String>]: The notification registration. [ProviderNamespace <String>]: The name of the resource provider hosted within ProviderHub. [ResourceType <String>]: The resource type. [RolloutName <String>]: The rollout name. [Sku <String>]: The SKU. [SubscriptionId <String>]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.providerhub/remove-azproviderhubsku #> function Remove-AzProviderHubSku { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The name of the resource provider hosted within ProviderHub. ${ProviderNamespace}, [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityProviderRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The resource type. ${ResourceType}, [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityProviderRegistration', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityResourceTypeRegistration', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [System.String] # The SKU. ${Sku}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentityProviderRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ProviderRegistrationInputObject}, [Parameter(ParameterSetName='DeleteViaIdentityResourceTypeRegistration', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter ${ResourceTypeRegistrationInputObject}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Models.IProviderHubIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $context = Get-AzContext if (-not $context -and -not $testPlayback) { Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." exit } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) } else { $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets if ($internalCalledCmdlets -eq '') { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name } else { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' } $mapping = @{ Delete = 'Az.ProviderHub.custom\Remove-AzProviderHubSku'; DeleteViaIdentityProviderRegistration = 'Az.ProviderHub.custom\Remove-AzProviderHubSku'; DeleteViaIdentityResourceTypeRegistration = 'Az.ProviderHub.custom\Remove-AzProviderHubSku'; DeleteViaIdentity = 'Az.ProviderHub.custom\Remove-AzProviderHubSku'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) if ($wrappedCmd -eq $null) { $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } process { try { $steppablePipeline.Process($_) } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } finally { $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } } end { try { $steppablePipeline.End() [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets if ($preTelemetryId -eq '') { [Microsoft.Azure.PowerShell.Cmdlets.ProviderHub.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() } [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId } catch { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } } # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBeh5Pq214WchXs # rgdJ6j1dThs1RSWB5oYfd++5RKsPhqCCDXYwggX0MIID3KADAgECAhMzAAAEBGx0 # Bv9XKydyAAAAAAQEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjQwOTEyMjAxMTE0WhcNMjUwOTExMjAxMTE0WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQC0KDfaY50MDqsEGdlIzDHBd6CqIMRQWW9Af1LHDDTuFjfDsvna0nEuDSYJmNyz # NB10jpbg0lhvkT1AzfX2TLITSXwS8D+mBzGCWMM/wTpciWBV/pbjSazbzoKvRrNo # DV/u9omOM2Eawyo5JJJdNkM2d8qzkQ0bRuRd4HarmGunSouyb9NY7egWN5E5lUc3 # a2AROzAdHdYpObpCOdeAY2P5XqtJkk79aROpzw16wCjdSn8qMzCBzR7rvH2WVkvF # HLIxZQET1yhPb6lRmpgBQNnzidHV2Ocxjc8wNiIDzgbDkmlx54QPfw7RwQi8p1fy # 4byhBrTjv568x8NGv3gwb0RbAgMBAAGjggFzMIIBbzAfBgNVHSUEGDAWBgorBgEE # AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQU8huhNbETDU+ZWllL4DNMPCijEU4w # RQYDVR0RBD4wPKQ6MDgxHjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEW # MBQGA1UEBRMNMjMwMDEyKzUwMjkyMzAfBgNVHSMEGDAWgBRIbmTlUAXTgqoXNzci # tW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3JsMGEG # CCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDovL3d3dy5taWNyb3NvZnQu # Y29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3J0 # MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIBAIjmD9IpQVvfB1QehvpC # Ge7QeTQkKQ7j3bmDMjwSqFL4ri6ae9IFTdpywn5smmtSIyKYDn3/nHtaEn0X1NBj # L5oP0BjAy1sqxD+uy35B+V8wv5GrxhMDJP8l2QjLtH/UglSTIhLqyt8bUAqVfyfp # h4COMRvwwjTvChtCnUXXACuCXYHWalOoc0OU2oGN+mPJIJJxaNQc1sjBsMbGIWv3 # cmgSHkCEmrMv7yaidpePt6V+yPMik+eXw3IfZ5eNOiNgL1rZzgSJfTnvUqiaEQ0X # dG1HbkDv9fv6CTq6m4Ty3IzLiwGSXYxRIXTxT4TYs5VxHy2uFjFXWVSL0J2ARTYL # E4Oyl1wXDF1PX4bxg1yDMfKPHcE1Ijic5lx1KdK1SkaEJdto4hd++05J9Bf9TAmi # u6EK6C9Oe5vRadroJCK26uCUI4zIjL/qG7mswW+qT0CW0gnR9JHkXCWNbo8ccMk1 # sJatmRoSAifbgzaYbUz8+lv+IXy5GFuAmLnNbGjacB3IMGpa+lbFgih57/fIhamq # 5VhxgaEmn/UjWyr+cPiAFWuTVIpfsOjbEAww75wURNM1Imp9NJKye1O24EspEHmb # DmqCUcq7NqkOKIG4PVm3hDDED/WQpzJDkvu4FrIbvyTGVU01vKsg4UfcdiZ0fQ+/ # V0hf8yrtq9CkB8iIuk5bBxuPMIIHejCCBWKgAwIBAgIKYQ6Q0gAAAAAAAzANBgkq # hkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 # IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEwOTA5WjB+MQswCQYDVQQG # EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG # A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQg # Q29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC # CgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4BjgaBEm6f8MMHt03 # a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc6Whe0t+bU7IKLMOv2akr # rnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpcoRb0Rrrg # OGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+lD3v++MrWhAfTVYoonpy # 4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLTswM9 # sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6A4aN91/w0FK/jJSHvMAh # dCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8k # A/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL5zmhD+kjSbwYuER8ReTB # w3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmn # Eyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8HhhUSJxAlMxdSlQy90 # lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0w # ggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXTgqoXNzcitW2o # ynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYD # VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBa # BgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny # bC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsG # AQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29t # L3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNV # HSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEFBQcCARYzaHR0cDovL3d3 # dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsG # AQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5AF8AcwB0AGEAdABl # AG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKb # C5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np22O/IjWll11l # hJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6 # I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWluWpiW5IP0 # wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvyCInWH8MyGOLwxS3OW560 # STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNABQam # ASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJihsMdYzaXht/a8/jyFqGa # J+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ah # XJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbSoqKfenoi+kiVH6v7RyOA # 9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33Vt # Y5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZOSEXAQsmbdlsKgEhr # /Xmfwb1tbWrJUnMTDXpQzTGCGgowghoGAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMw # EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN # aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp # Z25pbmcgUENBIDIwMTECEzMAAAQEbHQG/1crJ3IAAAAABAQwDQYJYIZIAWUDBAIB # BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO # MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIEodkiyuY3wPmMaLxe03GelD # LY+ME2XWpXdWHHotw6YyMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A # cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB # BQAEggEAXxUbYlXPDKnpTn53D77h1HIk9ETZNiTN8BTm8tunEieXYafZzpcXRoxd # WSf++QMVl67rKJBayFtZFbvmXuMAE2BxuRMSfh3Xjb39iNNqHFKG3gscYJDyGDi2 # ibdbQYXnDZgZCZPm+U55nZ0+Cew1eX0WuQvepc2JqpWs3KYoUQbPqN24cxaemg/q # AOBTp71h5o6Q1ttlGj1Mnjhqgv3658tTm1856o17BNY554kPvaI9Vx9z/I3v3jql # 9gXExC5xWkmJ18c/bOVI5u+WaZdgarLEmfFR28h6IU0SC22PFrpbf4H9anAbw9Bq # 6Kg0ot3b+4ulNlu0ilaEeGYhsndggaGCF5QwgheQBgorBgEEAYI3AwMBMYIXgDCC # F3wGCSqGSIb3DQEHAqCCF20wghdpAgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFSBgsq # hkiG9w0BCRABBKCCAUEEggE9MIIBOQIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl # AwQCAQUABCCy2YxJILhMoi5/7Mirk6yOYBVCALHiX64SyZ3kShpvSgIGaEtLG0to # GBMyMDI1MDYyNTA3MzIyOC41NTNaMASAAgH0oIHRpIHOMIHLMQswCQYDVQQGEwJV # UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE # ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1l # cmljYSBPcGVyYXRpb25zMScwJQYDVQQLEx5uU2hpZWxkIFRTUyBFU046RTAwMi0w # NUUwLUQ5NDcxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2Wg # ghHqMIIHIDCCBQigAwIBAgITMwAAAgsRnVYpkvm/hQABAAACCzANBgkqhkiG9w0B # AQsFADB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE # BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYD # VQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDAeFw0yNTAxMzAxOTQy # NThaFw0yNjA0MjIxOTQyNThaMIHLMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz # aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENv # cnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25z # MScwJQYDVQQLEx5uU2hpZWxkIFRTUyBFU046RTAwMi0wNUUwLUQ5NDcxJTAjBgNV # BAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2UwggIiMA0GCSqGSIb3DQEB # AQUAA4ICDwAwggIKAoICAQCqrPitRjAXqFh2IHzQYD3uykDPyJF+79e5CkY4aYsb # 93QVun4fZ3Ju/0WHrtAF3JswSiAVl7p1H2zFKrvyhaVuRYcSc7YuyP0GHEVq7YVS # 5uF3YLlLeoyGOPKSXGs6agW60CqVBhPQ+2n49e6YD9wGv6Y0HmBKmnQqY/AKJijg # UiRulb1ovNEcTZmTNRu1mY+0JjiEus+eF66VNoBv1a2MW0JPYbFBhPzFHlddFXcj # f2qIkb5BYWsFL7QlBjXApf2HmNrPzG36g1ybo/KnRjSgIRpHeYXxBIaCEGtR1Emp # J90OSFHxUu7eIjVfenqnVtag0yAQY7zEWSXMN6+CHjv3SBNtm5ZIRyyCsUZG8454 # K+865bw7FwuH8vk5Q+07K5lFY02eBDw3UKzWjWvqTp2pK8MTa4kozvlKgrSGp5sh # 57GnkjlvNvt78NXbZTVIrwS7xcIGjbvS/2r5lRDT+Q3P2tT+g6KDPdLntlcbFdHu # uzyJyx0WfCr8zHv8wGCB3qPObRXK4opAInSQ4j5iS28KATJGwQabRueZvhvd9Od0 # wcFYOb4orUv1dD5XwFyKlGDPMcTPOQr0gxmEQVrLiJEoLyyW8EV/aDFUXToxyhfz # WZ6Dc0l9eeth1Et2NQ3A/qBR5x33pjKdHJVJ5xpp2AI3ZzNYLDCqO1lthz1GaSz+ # PQIDAQABo4IBSTCCAUUwHQYDVR0OBBYEFGZcLIjfr+l6WeMuhE9gsxe98j/+MB8G # A1UdIwQYMBaAFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMF8GA1UdHwRYMFYwVKBSoFCG # Tmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01pY3Jvc29mdCUy # MFRpbWUtU3RhbXAlMjBQQ0ElMjAyMDEwKDEpLmNybDBsBggrBgEFBQcBAQRgMF4w # XAYIKwYBBQUHMAKGUGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY2Vy # dHMvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAoMSkuY3J0MAwG # A1UdEwEB/wQCMAAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwgwDgYDVR0PAQH/BAQD # AgeAMA0GCSqGSIb3DQEBCwUAA4ICAQCaKPVn6GLcnkbPEdM0R9q4Zm0+7JfG05+p # mqP6nA4SwT26k9HlJQjqw/+WkiQLD4owJxooIr9MDZbiZX6ypPhF+g1P5u8BOEXP # YYkOWpzFGLRLtlZHvfxpqAIa7mjLGHDzKr/102AXaD4mGydEwaLGhUn9DBGdMm5d # hiisWAqb/LN4lm4OuX4YLqKcW/0yScHKgprGgLY+6pqv0zPU74j7eCr+PDTNYM8t # FJ/btUnBNLyOE4WZwBIq4tnvXjd2cCOtgUnoQjFU1ZY7ZWdny3BJbf3hBrb3NB2I # U4nu622tVrb1fNkwdvT501WRUBMd9oFf4xifj2j2Clbv1XGljXmd6yJjvt+bBuvJ # LUuc9m+vMKOWyRwUdvOl/E5a8zV3MrjCnY6fIrLQNzBOZ6klICPCi+2GqbViM0CI # 6CbZypei5Rr9hJbH8rZEzjaYWLnr/XPsU0wr2Tn6L9dJx2q/LAoK+oviAInj0aP4 # iRrMyUSO6KL2KwY6zJc6SDxbHkwYHdQRrPNP3SutMg6LgBSvtmfqwgaXIHkCoiUF # EAz9cGIqvgjGpGppKTcTuoo3EEgp/zRd0wxW0QqmV3ygYGicen30KAWHrKFC8Sbw # c6qC4podVZYJZmirHBP/uo7sQne5H0xtdvDmXDUfy5gNjLljQIUsJhQSyyXbSjSb # 2a5jhOUfxzCCB3EwggVZoAMCAQICEzMAAAAVxedrngKbSZkAAAAAABUwDQYJKoZI # hvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw # DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24x # MjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAy # MDEwMB4XDTIxMDkzMDE4MjIyNVoXDTMwMDkzMDE4MzIyNVowfDELMAkGA1UEBhMC # VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNV # BAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRp # bWUtU3RhbXAgUENBIDIwMTAwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC # AQDk4aZM57RyIQt5osvXJHm9DtWC0/3unAcH0qlsTnXIyjVX9gF/bErg4r25Phdg # M/9cT8dm95VTcVrifkpa/rg2Z4VGIwy1jRPPdzLAEBjoYH1qUoNEt6aORmsHFPPF # dvWGUNzBRMhxXFExN6AKOG6N7dcP2CZTfDlhAnrEqv1yaa8dq6z2Nr41JmTamDu6 # GnszrYBbfowQHJ1S/rboYiXcag/PXfT+jlPP1uyFVk3v3byNpOORj7I5LFGc6XBp # Dco2LXCOMcg1KL3jtIckw+DJj361VI/c+gVVmG1oO5pGve2krnopN6zL64NF50Zu # yjLVwIYwXE8s4mKyzbnijYjklqwBSru+cakXW2dg3viSkR4dPf0gz3N9QZpGdc3E # XzTdEonW/aUgfX782Z5F37ZyL9t9X4C626p+Nuw2TPYrbqgSUei/BQOj0XOmTTd0 # lBw0gg/wEPK3Rxjtp+iZfD9M269ewvPV2HM9Q07BMzlMjgK8QmguEOqEUUbi0b1q # GFphAXPKZ6Je1yh2AuIzGHLXpyDwwvoSCtdjbwzJNmSLW6CmgyFdXzB0kZSU2LlQ # +QuJYfM2BjUYhEfb3BvR/bLUHMVr9lxSUV0S2yW6r1AFemzFER1y7435UsSFF5PA # PBXbGjfHCBUYP3irRbb1Hode2o+eFnJpxq57t7c+auIurQIDAQABo4IB3TCCAdkw # EgYJKwYBBAGCNxUBBAUCAwEAATAjBgkrBgEEAYI3FQIEFgQUKqdS/mTEmr6CkTxG # NSnPEP8vBO4wHQYDVR0OBBYEFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMFwGA1UdIARV # MFMwUQYMKwYBBAGCN0yDfQEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly93d3cubWlj # cm9zb2Z0LmNvbS9wa2lvcHMvRG9jcy9SZXBvc2l0b3J5Lmh0bTATBgNVHSUEDDAK # BggrBgEFBQcDCDAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMC # AYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBTV9lbLj+iiXGJo0T2UkFvX # zpoYxDBWBgNVHR8ETzBNMEugSaBHhkVodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20v # cGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcmwwWgYI # KwYBBQUHAQEETjBMMEoGCCsGAQUFBzAChj5odHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20vcGtpL2NlcnRzL01pY1Jvb0NlckF1dF8yMDEwLTA2LTIzLmNydDANBgkqhkiG # 9w0BAQsFAAOCAgEAnVV9/Cqt4SwfZwExJFvhnnJL/Klv6lwUtj5OR2R4sQaTlz0x # M7U518JxNj/aZGx80HU5bbsPMeTCj/ts0aGUGCLu6WZnOlNN3Zi6th542DYunKmC # VgADsAW+iehp4LoJ7nvfam++Kctu2D9IdQHZGN5tggz1bSNU5HhTdSRXud2f8449 # xvNo32X2pFaq95W2KFUn0CS9QKC/GbYSEhFdPSfgQJY4rPf5KYnDvBewVIVCs/wM # nosZiefwC2qBwoEZQhlSdYo2wh3DYXMuLGt7bj8sCXgU6ZGyqVvfSaN0DLzskYDS # PeZKPmY7T7uG+jIa2Zb0j/aRAfbOxnT99kxybxCrdTDFNLB62FD+CljdQDzHVG2d # Y3RILLFORy3BFARxv2T5JL5zbcqOCb2zAVdJVGTZc9d/HltEAY5aGZFrDZ+kKNxn # GSgkujhLmm77IVRrakURR6nxt67I6IleT53S0Ex2tVdUCbFpAUR+fKFhbHP+Crvs # QWY9af3LwUFJfn6Tvsv4O+S3Fb+0zj6lMVGEvL8CwYKiexcdFYmNcP7ntdAoGokL # jzbaukz5m/8K6TT4JDVnK+ANuOaMmdbhIurwJ0I9JZTmdHRbatGePu1+oDEzfbzL # 6Xu/OHBE0ZDxyKs6ijoIYn/ZcGNTTY3ugm2lBRDBcQZqELQdVTNYs6FwZvKhggNN # MIICNQIBATCB+aGB0aSBzjCByzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hp # bmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw # b3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2EgT3BlcmF0aW9uczEn # MCUGA1UECxMeblNoaWVsZCBUU1MgRVNOOkUwMDItMDVFMC1EOTQ3MSUwIwYDVQQD # ExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNloiMKAQEwBwYFKw4DAhoDFQCo # QndUJN3Ppq2xh8RhtsR35NCZwaCBgzCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1w # IFBDQSAyMDEwMA0GCSqGSIb3DQEBCwUAAgUA7AWajTAiGA8yMDI1MDYyNDIxNDM0 # MVoYDzIwMjUwNjI1MjE0MzQxWjB0MDoGCisGAQQBhFkKBAExLDAqMAoCBQDsBZqN # AgEAMAcCAQACAmQLMAcCAQACAhNhMAoCBQDsBuwNAgEAMDYGCisGAQQBhFkKBAIx # KDAmMAwGCisGAQQBhFkKAwKgCjAIAgEAAgMHoSChCjAIAgEAAgMBhqAwDQYJKoZI # hvcNAQELBQADggEBAK8W6BXXl3BKmBmvUnWN2LXArDErCsgBJWonTo1YUFnnBlkY # NNqPR22wAgTCki5VtW66KonNxAoOiit9GqOjdC9eQO1lixwjv3uO8BGZ75n1DE6C # ncy/p5ueb/+6ypsd095bLUxD9Y6uGEjm9lUZRojFIl2DA71Xl2KBvEz+u697QX6t # XohTaYBdCDRV+0sINhuaqIdfULa1V8LcwfdJu49i7pfBhoPyQc2pVqXrWca8RLOe # JH/MCLnCS+dOjihQgzkjCrZTmoYO5dsgWnA6dsOFwyMjbo/OZr6+GPmyFWIOFWNI # n+xJ8iSyVNBZjjAs70KJUfJiTqQ6xrY2MVUiLGQxggQNMIIECQIBATCBkzB8MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNy # b3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMAITMwAAAgsRnVYpkvm/hQABAAACCzAN # BglghkgBZQMEAgEFAKCCAUowGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJEAEEMC8G # CSqGSIb3DQEJBDEiBCC2/ZTt+rqP6AW1EqMqZLlSbvkBZI5RJJx8WniD5r7lbTCB # +gYLKoZIhvcNAQkQAi8xgeowgecwgeQwgb0EIDTVdKu6N77bh0wdOyF+ogRN8vKJ # cw5jnf2/EussYkozMIGYMIGApH4wfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldh # c2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD # b3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIw # MTACEzMAAAILEZ1WKZL5v4UAAQAAAgswIgQgl/jwNt+yFVkcPOXHJdJiFYMM7mRv # GGmXQiXQTxGyNiowDQYJKoZIhvcNAQELBQAEggIAHesKlLetdDyQxGcTQpkhWJbW # UMPovb6IZym6OxqhUKqj8mK+sG6fri5d3hUXzGggtsQOaoZnOxTu6BFwgwXzGgoW # N0jd2I7SMbVn8yY8vRB4TovJZCtRXKOjkGkli0eK4xDHaV2a1l/kfgHv4Sn0AiiI # ulxtaSDgvhY0VAssU0Hq5SLx6kID7IB543yeE/uoXJp/Vy4V4zZbcrjpfPoup5Am # GjbQmZR8JdMKIh/SvWQ5OxRfhG5zvMfRPf7IAhj+bm8ntsszlP2jcGgIzPnhGld4 # G3PUGnYKul29DZG7/Lk05iSsrYxnIeLTDPDipND0nI8x7fQzAFim9cIceSRMnGhc # J3aJkTp9EO7+W1qftB9BGxlWQTFTLHDUJYe6gySHfM7N/uFWe/CM0ZbaffpqzDrx # pgNoqG14xEHFfLtat/sJSUGAyEFJnj2ph+ZtqdfPnrTgoWJn2gXdEpFCjfDi18dQ # Gf1R39QepvyqoG8ZMAR+IWNN54DZbN4tIrzR/VroUMWnXOdnxxhxEn7ibpEJ2ynR # 1d2mtl12wGzBI28ne4TaC8yyvoJgd+imWojgciFqmmyc87HNhuttT6Q1+a1Fw72G # 2oTfc/qadGPkIDS1YxJL1xVR4liSbIlCl4hD9BGglxVtDOea6yIqBr3j+c0O30NM # JyN1esI54E2QiO6sCfg= # SIG # End signature block |