exports/hybrid-2019-03-01/ProxyCmdletDefinitions.ps1


# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Exports the template used for specified deployment.
.Description
Exports the template used for specified deployment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/export-azdeploymenttemplate
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExportResultTemplate
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/export-azdeploymenttemplate
#>

function Export-AzDeploymentTemplate {
[Alias('Save-AzDeploymentTemplate', 'Save-AzResourceGroupDeploymentTemplate')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExportResultTemplate])]
[CmdletBinding(DefaultParameterSetName='Export', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Export', Mandatory)]
    [Parameter(ParameterSetName='Export1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment from which to get the template.
    ${DeploymentName},

    [Parameter(ParameterSetName='Export')]
    [Parameter(ParameterSetName='Export1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Export1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='ExportViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ExportViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Export = 'Az.Resources.private\Export-AzDeploymentTemplate_Export';
            Export1 = 'Az.Resources.private\Export-AzDeploymentTemplate_Export1';
            ExportViaIdentity = 'Az.Resources.private\Export-AzDeploymentTemplate_ExportViaIdentity';
            ExportViaIdentity1 = 'Az.Resources.private\Export-AzDeploymentTemplate_ExportViaIdentity1';
        }
        if (('Export', 'Export1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Captures the specified resource group as a template.
.Description
Captures the specified resource group as a template.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/export-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IExportTemplateRequest
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupExportResult
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IExportTemplateRequest>: Export resource group template request parameters.
  [Option <String>]: The export template options. A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization'
  [Resource <String[]>]: The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/export-azresourcegroup
#>

function Export-AzResourceGroup {
[Alias('Export-AzResourceGroupTemplate')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupExportResult])]
[CmdletBinding(DefaultParameterSetName='ExportExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Export', Mandatory)]
    [Parameter(ParameterSetName='ExportExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to export as a template.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Export')]
    [Parameter(ParameterSetName='ExportExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='ExportViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ExportViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Export', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ExportViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IExportTemplateRequest]
    # Export resource group template request parameters.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='ExportExpanded')]
    [Parameter(ParameterSetName='ExportViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The export template options.
    # A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization'
    ${Option},

    [Parameter(ParameterSetName='ExportExpanded')]
    [Parameter(ParameterSetName='ExportViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # The IDs of the resources to filter the export by.
    # To export all resources, supply an array with single entry '*'.
    ${Resource},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Export = 'Az.Resources.private\Export-AzResourceGroup_Export';
            ExportExpanded = 'Az.Resources.private\Export-AzResourceGroup_ExportExpanded';
            ExportViaIdentity = 'Az.Resources.private\Export-AzResourceGroup_ExportViaIdentity';
            ExportViaIdentityExpanded = 'Az.Resources.private\Export-AzResourceGroup_ExportViaIdentityExpanded';
        }
        if (('Export', 'ExportExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a deployments operation.
.Description
Gets a deployments operation.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdeploymentoperation
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentOperation
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdeploymentoperation
#>

function Get-AzDeploymentOperation {
[Alias('Get-AzResourceGroupDeploymentOperation')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentOperation])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment.
    ${DeploymentName},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the operation to get.
    ${OperationId},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='Get1')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Int32]
    # The number of results to return.
    ${Top},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Get = 'Az.Resources.private\Get-AzDeploymentOperation_Get';
            Get1 = 'Az.Resources.private\Get-AzDeploymentOperation_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzDeploymentOperation_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzDeploymentOperation_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzDeploymentOperation_List';
            List1 = 'Az.Resources.private\Get-AzDeploymentOperation_List1';
        }
        if (('Get', 'Get1', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a deployment.
.Description
Gets a deployment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdeployment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExtended
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azdeployment
#>

function Get-AzDeployment {
[Alias('Get-AzResourceGroupDeployment')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IDeploymentExtended])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Alias('DeploymentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment to get.
    ${Name},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='Get1')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    # For example, you can use $filter=provisioningState eq '{state}'.
    ${Filter},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Int32]
    # The number of results to get.
    # If null is passed, returns all deployments.
    ${Top},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Get = 'Az.Resources.private\Get-AzDeployment_Get';
            Get1 = 'Az.Resources.private\Get-AzDeployment_Get1';
            GetViaIdentity = 'Az.Resources.private\Get-AzDeployment_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzDeployment_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzDeployment_List';
            List1 = 'Az.Resources.private\Get-AzDeployment_List1';
        }
        if (('Get', 'Get1', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.
.Description
This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azlocation
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160601.ILocation
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azlocation
#>

function Get-AzLocation {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160601.ILocation])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # Subscription ID.
    ${SubscriptionId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            List = 'Az.Resources.private\Get-AzLocation_List';
        }
        if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a policy assignment.
.Description
Gets a policy assignment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicyassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicyassignment
#>

function Get-AzPolicyAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignment])]
[CmdletBinding(DefaultParameterSetName='List6', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Get2', Mandatory)]
    [Alias('PolicyAssignmentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy assignment to get.
    ${Name},

    [Parameter(ParameterSetName='Get2', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the policy assignment.
    # Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    ${Scope},

    [Parameter(ParameterSetName='GetViaIdentity2', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List4', Mandatory)]
    [Parameter(ParameterSetName='List5', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group that contains policy assignments.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='List4')]
    [Parameter(ParameterSetName='List5')]
    [Parameter(ParameterSetName='List6')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='List5', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource path.
    # Use empty string if there is none.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='List5', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource.
    ${ResourceName},

    [Parameter(ParameterSetName='List5', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    # For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines)
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='List5', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type name.
    # For example the type name of a web app is 'sites' (from Microsoft.Web/sites).
    ${ResourceType},

    [Parameter(ParameterSetName='List4')]
    [Parameter(ParameterSetName='List5')]
    [Parameter(ParameterSetName='List6')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    # Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''.
    # If $filter is not provided, no filtering is performed.
    ${Filter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Get2 = 'Az.Resources.private\Get-AzPolicyAssignment_Get2';
            GetViaIdentity2 = 'Az.Resources.private\Get-AzPolicyAssignment_GetViaIdentity2';
            List4 = 'Az.Resources.private\Get-AzPolicyAssignment_List4';
            List5 = 'Az.Resources.private\Get-AzPolicyAssignment_List5';
            List6 = 'Az.Resources.private\Get-AzPolicyAssignment_List6';
        }
        if (('List4', 'List5', 'List6') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets the policy definition.
.Description
Gets the policy definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicydefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinition
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azpolicydefinition
#>

function Get-AzPolicyDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinition])]
[CmdletBinding(DefaultParameterSetName='List2', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Get2', Mandatory)]
    [Parameter(ParameterSetName='Get3', Mandatory)]
    [Alias('PolicyDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy definition to get.
    ${Name},

    [Parameter(ParameterSetName='Get2')]
    [Parameter(ParameterSetName='List2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get3', Mandatory)]
    [Parameter(ParameterSetName='List3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='GetViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Get2 = 'Az.Resources.private\Get-AzPolicyDefinition_Get2';
            Get3 = 'Az.Resources.private\Get-AzPolicyDefinition_Get3';
            GetViaIdentity2 = 'Az.Resources.private\Get-AzPolicyDefinition_GetViaIdentity2';
            GetViaIdentity3 = 'Az.Resources.private\Get-AzPolicyDefinition_GetViaIdentity3';
            List2 = 'Az.Resources.private\Get-AzPolicyDefinition_List2';
            List3 = 'Az.Resources.private\Get-AzPolicyDefinition_List3';
        }
        if (('Get2', 'List2') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets provider operations metadata for the specified resource provider.
.Description
Gets provider operations metadata for the specified resource provider.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azprovideroperationsmetadata
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IProviderOperationsMetadata
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azprovideroperationsmetadata
#>

function Get-AzProviderOperationsMetadata {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IProviderOperationsMetadata])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # Specifies whether to expand the values.
    ${Expand},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Get = 'Az.Resources.private\Get-AzProviderOperationsMetadata_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzProviderOperationsMetadata_GetViaIdentity';
            List = 'Az.Resources.private\Get-AzProviderOperationsMetadata_List';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a resource group.
.Description
Gets a resource group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourcegroup
#>

function Get-AzResourceGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Alias('ResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to get.
    # The name is case insensitive.
    ${Name},

    [Parameter(ParameterSetName='Get')]
    [Parameter(ParameterSetName='List')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    #
    # You can filter by tag names and values.
    # For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'
    ${Filter},

    [Parameter(ParameterSetName='List')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Int32]
    # The number of results to return.
    # If null is passed, returns all resource groups.
    ${Top},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Get = 'Az.Resources.private\Get-AzResourceGroup_Get';
            GetViaIdentity = 'Az.Resources.private\Get-AzResourceGroup_GetViaIdentity';
            List = 'Az.Resources.private\Get-AzResourceGroup_List';
        }
        if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Get a management lock by scope.
.Description
Get a management lock by scope.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourcelock
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresourcelock
#>

function Get-AzResourceLock {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject])]
[CmdletBinding(DefaultParameterSetName='List2', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='Get2', Mandatory)]
    [Parameter(ParameterSetName='Get3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of lock.
    ${LockName},

    [Parameter(ParameterSetName='Get', Mandatory)]
    [Parameter(ParameterSetName='List3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope for the lock.
    ${Scope},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # An extra path parameter needed in some services, like SQL Databases.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='Get3', Mandatory)]
    [Parameter(ParameterSetName='List', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource.
    ${ResourceName},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='List1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The type of the resource.
    ${ResourceType},

    [Parameter(ParameterSetName='Get1')]
    [Parameter(ParameterSetName='Get2')]
    [Parameter(ParameterSetName='Get3')]
    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='List2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='GetViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Parameter(ParameterSetName='List2')]
    [Parameter(ParameterSetName='List3')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    ${Filter},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Get = 'Az.Resources.private\Get-AzResourceLock_Get';
            Get1 = 'Az.Resources.private\Get-AzResourceLock_Get1';
            Get2 = 'Az.Resources.private\Get-AzResourceLock_Get2';
            Get3 = 'Az.Resources.private\Get-AzResourceLock_Get3';
            GetViaIdentity = 'Az.Resources.private\Get-AzResourceLock_GetViaIdentity';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzResourceLock_GetViaIdentity1';
            GetViaIdentity2 = 'Az.Resources.private\Get-AzResourceLock_GetViaIdentity2';
            GetViaIdentity3 = 'Az.Resources.private\Get-AzResourceLock_GetViaIdentity3';
            List = 'Az.Resources.private\Get-AzResourceLock_List';
            List1 = 'Az.Resources.private\Get-AzResourceLock_List1';
            List2 = 'Az.Resources.private\Get-AzResourceLock_List2';
            List3 = 'Az.Resources.private\Get-AzResourceLock_List3';
        }
        if (('Get1', 'Get2', 'Get3', 'List', 'List1', 'List2') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets a resource by ID.
.Description
Gets a resource by ID.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-azresource
#>

function Get-AzResource {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the resource, including the resource name and resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
    ${ResourceId},

    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='List', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource group with the resources to get.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Get1', Mandatory)]
    [Parameter(ParameterSetName='GetViaIdentity1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The API version to use for the operation.
    ${ApiVersion},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The $expand query parameter.
    # You can expand createdTime and changedTime.
    # For example, to expand both properties, use $expand=changedTime,createdTime
    ${Expand},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Alias('ODataQuery')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The filter to apply on the operation.
    #
    # The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.
    #
    # For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks'
    #
    # You can use substringof(value, property) in the filter.
    # The properties you can use for substring are: name and resourceGroup.
    #
    # For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name)
    #
    # You can link more than one substringof together by adding and/or operators.
    #
    # You can filter by tag names and values.
    # For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'
    #
    # You can use some properties together when filtering.
    # The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId.
    ${Filter},

    [Parameter(ParameterSetName='List')]
    [Parameter(ParameterSetName='List1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.Int32]
    # The number of results to return.
    # If null is passed, returns all resources.
    ${Top},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Get1 = 'Az.Resources.private\Get-AzResource_Get1';
            GetViaIdentity1 = 'Az.Resources.private\Get-AzResource_GetViaIdentity1';
            List = 'Az.Resources.private\Get-AzResource_List';
            List1 = 'Az.Resources.private\Get-AzResource_List1';
        }
        if (('List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Gets the names and values of all resource tags that are defined in a subscription.
.Description
Gets the names and values of all resource tags that are defined in a subscription.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/get-aztag
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.ITagDetails
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/get-aztag
#>

function Get-AzTag {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.ITagDetails])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String[]]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            List = 'Az.Resources.private\Get-AzTag_List';
        }
        if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
The resources to move must be in the same source resource group.
The target resource group may be in a different subscription.
When moving resources, both the source group and the target group are locked for the duration of the operation.
Write and delete operations are blocked on the groups until the move completes.
.Description
The resources to move must be in the same source resource group.
The target resource group may be in a different subscription.
When moving resources, both the source group and the target group are locked for the duration of the operation.
Write and delete operations are blocked on the groups until the move completes.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/move-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourcesMoveInfo
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IResourcesMoveInfo>: Parameters of move resources.
  [Resource <String[]>]: The IDs of the resources.
  [TargetResourceGroup <String>]: The target resource group.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/move-azresource
#>

function Move-AzResource {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='MoveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Move', Mandatory)]
    [Parameter(ParameterSetName='MoveExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resources to move.
    ${SourceResourceGroupName},

    [Parameter(ParameterSetName='Move')]
    [Parameter(ParameterSetName='MoveExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='MoveViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='MoveViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Move', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='MoveViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourcesMoveInfo]
    # Parameters of move resources.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='MoveExpanded')]
    [Parameter(ParameterSetName='MoveViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # The IDs of the resources.
    ${Resource},

    [Parameter(ParameterSetName='MoveExpanded')]
    [Parameter(ParameterSetName='MoveViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The target resource group.
    ${TargetResourceGroup},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Move = 'Az.Resources.private\Move-AzResource_Move';
            MoveExpanded = 'Az.Resources.private\Move-AzResource_MoveExpanded';
            MoveViaIdentity = 'Az.Resources.private\Move-AzResource_MoveViaIdentity';
            MoveViaIdentityExpanded = 'Az.Resources.private\Move-AzResource_MoveViaIdentityExpanded';
        }
        if (('Move', 'MoveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Policy assignments are inherited by child resources.
For example, when you apply a policy to a resource group that policy is assigned to all resources in the group.
.Description
Policy assignments are inherited by child resources.
For example, when you apply a policy to a resource group that policy is assigned to all resources in the group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azpolicyassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IPolicyAssignment>: The policy assignment.
  [Description <String>]: This message will be part of response in case of policy violation.
  [DisplayName <String>]: The display name of the policy assignment.
  [Name <String>]: The name of the policy assignment.
  [Parameter <IPolicyAssignmentPropertiesParameters>]: Required if a parameter is used in policy rule.
  [PolicyDefinitionId <String>]: The ID of the policy definition or policy set definition being assigned.
  [Scope <String>]: The scope for the policy assignment.
  [Type <String>]: The type of the policy assignment.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azpolicyassignment
#>

function New-AzPolicyAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignment])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded2', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Create2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy assignment.
    ${Name},

    [Parameter(ParameterSetName='Create2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the policy assignment.
    # Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    ${Scope},

    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy assignment.
    ${PolicyAssignmentName},

    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignment]
    # The policy assignment.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignmentPropertiesParameters]
    # Required if a parameter is used in policy rule.
    ${AssignmentParameter},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # This message will be part of response in case of policy violation.
    ${Description},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the policy assignment.
    ${DisplayName},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The ID of the policy definition or policy set definition being assigned.
    ${PolicyDefinitionId},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The scope for the policy assignment.
    ${PropertiesScope},

    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The type of the policy assignment.
    ${Type},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Create2 = 'Az.Resources.private\New-AzPolicyAssignment_Create2';
            CreateExpanded2 = 'Az.Resources.private\New-AzPolicyAssignment_CreateExpanded2';
            CreateViaIdentity2 = 'Az.Resources.private\New-AzPolicyAssignment_CreateViaIdentity2';
            CreateViaIdentityExpanded2 = 'Az.Resources.private\New-AzPolicyAssignment_CreateViaIdentityExpanded2';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates or updates a resource group.
.Description
Creates or updates a resource group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IResourceGroup>: Resource group information.
  Location <String>: The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
  [ManagedBy <String>]: The ID of the resource that manages this resource group.
  [Tag <IResourceGroupTags>]: The tags attached to the resource group.
    [(Any) <String>]: This indicates any property can be added to this object.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresourcegroup
#>

function New-AzResourceGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Alias('ResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to create or update.
    # Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
    ${Name},

    [Parameter(ParameterSetName='Create')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup]
    # Resource group information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The location of the resource group.
    # It cannot be changed after the resource group has been created.
    # It must be one of the supported Azure locations.
    ${Location},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The ID of the resource that manages this resource group.
    ${ManagedBy},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupTags]))]
    [System.Collections.Hashtable]
    # The tags attached to the resource group.
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Create = 'Az.Resources.private\New-AzResourceGroup_Create';
            CreateExpanded = 'Az.Resources.private\New-AzResourceGroup_CreateExpanded';
            CreateViaIdentity = 'Az.Resources.private\New-AzResourceGroup_CreateViaIdentity';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzResourceGroup_CreateViaIdentityExpanded';
        }
        if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
When you apply a lock at a parent scope, all child resources inherit the same lock.
To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions.
Of the built-in roles, only Owner and User Access Administrator are granted those actions.
.Description
When you apply a lock at a parent scope, all child resources inherit the same lock.
To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions.
Of the built-in roles, only Owner and User Access Administrator are granted those actions.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresourcelock
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
OWNER <IManagementLockOwner[]>: The owners of the lock.
  [ApplicationId <String>]: The application ID of the lock owner.
 
PARAMETER <IManagementLockObject>: The lock information.
  Level <LockLevel>: The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
  [Note <String>]: Notes about the lock. Maximum of 512 characters.
  [Owner <IManagementLockOwner[]>]: The owners of the lock.
    [ApplicationId <String>]: The application ID of the lock owner.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresourcelock
#>

function New-AzResourceLock {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='Create1', Mandatory)]
    [Parameter(ParameterSetName='Create2', Mandatory)]
    [Parameter(ParameterSetName='Create3', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of lock.
    # The lock name can be a maximum of 260 characters.
    # It cannot contain <, > %, &, :, \, ?, /, or any control characters.
    ${LockName},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='Create2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resource to lock.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to lock.
    ${ResourceName},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource provider namespace of the resource to lock.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource to lock.
    ${ResourceType},

    [Parameter(ParameterSetName='Create')]
    [Parameter(ParameterSetName='Create1')]
    [Parameter(ParameterSetName='Create2')]
    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Create3', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope for the lock.
    # When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' for subscriptions, '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}' for resources.
    ${Scope},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity3', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Create3', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject]
    # The lock information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded3', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3', Mandatory)]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.LockLevel])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.LockLevel]
    # The level of the lock.
    # Possible values are: NotSpecified, CanNotDelete, ReadOnly.
    # CanNotDelete means authorized users are able to read and modify the resources, but not delete.
    # ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
    ${Level},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateExpanded3')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Notes about the lock.
    # Maximum of 512 characters.
    ${Note},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateExpanded2')]
    [Parameter(ParameterSetName='CreateExpanded3')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded2')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded3')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockOwner[]]
    # The owners of the lock.
    # To construct, see NOTES section for OWNER properties and create a hash table.
    ${Owner},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Create = 'Az.Resources.private\New-AzResourceLock_Create';
            Create1 = 'Az.Resources.private\New-AzResourceLock_Create1';
            Create2 = 'Az.Resources.private\New-AzResourceLock_Create2';
            Create3 = 'Az.Resources.private\New-AzResourceLock_Create3';
            CreateExpanded = 'Az.Resources.private\New-AzResourceLock_CreateExpanded';
            CreateExpanded1 = 'Az.Resources.private\New-AzResourceLock_CreateExpanded1';
            CreateExpanded2 = 'Az.Resources.private\New-AzResourceLock_CreateExpanded2';
            CreateExpanded3 = 'Az.Resources.private\New-AzResourceLock_CreateExpanded3';
            CreateViaIdentity = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentity';
            CreateViaIdentity1 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentity1';
            CreateViaIdentity2 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentity2';
            CreateViaIdentity3 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentity3';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentityExpanded';
            CreateViaIdentityExpanded1 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentityExpanded1';
            CreateViaIdentityExpanded2 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentityExpanded2';
            CreateViaIdentityExpanded3 = 'Az.Resources.private\New-AzResourceLock_CreateViaIdentityExpanded3';
        }
        if (('Create', 'Create1', 'Create2', 'CreateExpanded', 'CreateExpanded1', 'CreateExpanded2') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Create a resource by ID.
.Description
Create a resource by ID.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IGenericResource>: Resource information.
  PlanName <String>: The plan name.
  PlanProduct <String>: The product code.
  PlanPublisher <String>: The publisher ID.
  PlanVersion <String>: The plan's version.
  SkuName <String>: The SKU name.
  [Location <String>]: Resource location
  [Tag <IResourceTags>]: Resource tags
    [(Any) <String>]: This indicates any property can be added to this object.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [IdentityUserAssignedIdentity <IIdentityUserAssignedIdentities>]: The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    [(Any) <IComponentsSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties>]: This indicates any property can be added to this object.
  [Kind <String>]: The kind of the resource.
  [ManagedBy <String>]: ID of the resource that manages this resource.
  [PlanPromotionCode <String>]: The promotion code.
  [Property <IGenericResourceProperties>]: The resource properties.
  [SkuCapacity <Int32?>]: The SKU capacity.
  [SkuFamily <String>]: The SKU family.
  [SkuModel <String>]: The SKU model.
  [SkuSize <String>]: The SKU size.
  [SkuTier <String>]: The SKU tier.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azresource
#>

function New-AzResource {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Create1', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the resource, including the resource name and resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
    ${ResourceId},

    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The API version to use for the operation.
    ${ApiVersion},

    [Parameter(ParameterSetName='Create1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource]
    # Resource information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IIdentityUserAssignedIdentities]))]
    [System.Collections.Hashtable]
    # The list of user identities associated with the resource.
    # The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    ${IdentityUserAssignedIdentity},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The kind of the resource.
    ${Kind},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan name.
    ${PlanName},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The product code.
    ${PlanProduct},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The promotion code.
    ${PlanPromotionCode},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The publisher ID.
    ${PlanPublisher},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan's version.
    ${PlanVersion},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResourceProperties]
    # The resource properties.
    ${Property},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter(ParameterSetName='CreateExpanded1')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Create1 = 'Az.Resources.private\New-AzResource_Create1';
            CreateExpanded1 = 'Az.Resources.private\New-AzResource_CreateExpanded1';
            CreateViaIdentity1 = 'Az.Resources.private\New-AzResource_CreateViaIdentity1';
            CreateViaIdentityExpanded1 = 'Az.Resources.private\New-AzResource_CreateViaIdentityExpanded1';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates a role assignment.
.Description
Creates a role assignment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azroleassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleAssignmentCreateParameters
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IRoleAssignmentCreateParameters>: Role assignment create parameters.
  PrincipalId <String>: The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group.
  RoleDefinitionId <String>: The role definition ID used in the role assignment.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azroleassignment
#>

function New-AzRoleAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleAssignment])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Alias('RoleAssignmentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the role assignment to create.
    # It can be any valid GUID.
    ${Name},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role assignment to create.
    # The scope can be any REST resource instance.
    # For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
    ${Scope},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleAssignmentCreateParameters]
    # Role assignment create parameters.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The principal ID assigned to the role.
    # This maps to the ID inside the Active Directory.
    # It can point to a user, service principal, or security group.
    ${PrincipalId},

    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role definition ID used in the role assignment.
    ${RoleDefinitionId},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Create = 'Az.Resources.private\New-AzRoleAssignment_Create';
            CreateExpanded = 'Az.Resources.private\New-AzRoleAssignment_CreateExpanded';
            CreateViaIdentity = 'Az.Resources.private\New-AzRoleAssignment_CreateViaIdentity';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzRoleAssignment_CreateViaIdentityExpanded';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates or updates a role definition.
.Description
Creates or updates a role definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azroledefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PERMISSION <IPermission[]>: Role definition permissions.
  [Action <String[]>]: Allowed actions.
  [NotAction <String[]>]: Denied actions.
 
ROLEDEFINITION <IRoleDefinition>: Role definition.
  [AssignableScope <String[]>]: Role definition assignable scopes.
  [Description <String>]: The role definition description.
  [Permission <IPermission[]>]: Role definition permissions.
    [Action <String[]>]: Allowed actions.
    [NotAction <String[]>]: Denied actions.
  [RoleName <String>]: The role name.
  [RoleType <String>]: The role type.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azroledefinition
#>

function New-AzRoleDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Alias('RoleDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role definition.
    ${Id},

    [Parameter(ParameterSetName='Create', Mandatory)]
    [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role definition.
    ${Scope},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Alias('Role')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition]
    # Role definition.
    # To construct, see NOTES section for ROLEDEFINITION properties and create a hash table.
    ${RoleDefinition},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # Role definition assignable scopes.
    ${AssignableScope},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role definition description.
    ${Description},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IPermission[]]
    # Role definition permissions.
    # To construct, see NOTES section for PERMISSION properties and create a hash table.
    ${Permission},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role name.
    ${RoleName},

    [Parameter(ParameterSetName='CreateExpanded')]
    [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role type.
    ${RoleType},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Create = 'Az.Resources.private\New-AzRoleDefinition_Create';
            CreateExpanded = 'Az.Resources.private\New-AzRoleDefinition_CreateExpanded';
            CreateViaIdentity = 'Az.Resources.private\New-AzRoleDefinition_CreateViaIdentity';
            CreateViaIdentityExpanded = 'Az.Resources.private\New-AzRoleDefinition_CreateViaIdentityExpanded';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
The tag name can have a maximum of 512 characters and is case insensitive.
Tag names created by Azure have prefixes of microsoft, azure, or windows.
You cannot create tags with one of these prefixes.
.Description
The tag name can have a maximum of 512 characters and is case insensitive.
Tag names created by Azure have prefixes of microsoft, azure, or windows.
You cannot create tags with one of these prefixes.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/new-aztag
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.ITagDetails
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/new-aztag
#>

function New-AzTag {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.ITagDetails])]
[CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Create', Mandatory)]
    [Alias('TagName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the tag to create.
    ${Name},

    [Parameter(ParameterSetName='Create')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Create = 'Az.Resources.private\New-AzTag_Create';
            CreateViaIdentity = 'Az.Resources.private\New-AzTag_CreateViaIdentity';
        }
        if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Registers a subscription with a resource provider.
.Description
Registers a subscription with a resource provider.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/register-azresourceprovider
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/register-azresourceprovider
#>

function Register-AzResourceProvider {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider])]
[CmdletBinding(DefaultParameterSetName='Register', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Register', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider to register.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Register')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='RegisterViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Register = 'Az.Resources.private\Register-AzResourceProvider_Register';
            RegisterViaIdentity = 'Az.Resources.private\Register-AzResourceProvider_RegisterViaIdentity';
        }
        if (('Register') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
A template deployment that is currently running cannot be deleted.
Deleting a template deployment removes the associated deployment operations.
This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted.
The Location response header contains the URI that is used to obtain the status of the process.
While the process is running, a call to the URI in the Location header returns a status of 202.
When the process finishes, the URI in the Location header returns a status of 204 on success.
If the asynchronous request failed, the URI in the Location header returns an error-level status code.
.Description
A template deployment that is currently running cannot be deleted.
Deleting a template deployment removes the associated deployment operations.
This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted.
The Location response header contains the URI that is used to obtain the status of the process.
While the process is running, a call to the URI in the Location header returns a status of 202.
When the process finishes, the URI in the Location header returns a status of 204 on success.
If the asynchronous request failed, the URI in the Location header returns an error-level status code.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azdeployment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azdeployment
#>

function Remove-AzDeployment {
[Alias('Remove-AzResourceGroupDeployment')]
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('DeploymentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete')]
    [Parameter(ParameterSetName='Delete1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group with the deployment to delete.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Delete = 'Az.Resources.private\Remove-AzDeployment_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzDeployment_Delete1';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzDeployment_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzDeployment_DeleteViaIdentity1';
        }
        if (('Delete', 'Delete1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes a policy assignment.
.Description
Deletes a policy assignment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicyassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicyassignment
#>

function Remove-AzPolicyAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyAssignment])]
[CmdletBinding(DefaultParameterSetName='Delete2', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Delete2', Mandatory)]
    [Alias('PolicyAssignmentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy assignment to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete2', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the policy assignment.
    # Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'
    ${Scope},

    [Parameter(ParameterSetName='DeleteViaIdentity2', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Delete2 = 'Az.Resources.private\Remove-AzPolicyAssignment_Delete2';
            DeleteViaIdentity2 = 'Az.Resources.private\Remove-AzPolicyAssignment_DeleteViaIdentity2';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes a policy definition.
.Description
Deletes a policy definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicydefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicydefinition
#>

function Remove-AzPolicyDefinition {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete2', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Delete2', Mandatory)]
    [Parameter(ParameterSetName='Delete3', Mandatory)]
    [Alias('PolicyDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy definition to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete2')]
    [Parameter(ParameterSetName='DeleteById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Delete3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='DeleteViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='DeleteById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy definition.
    ${Id},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Delete2 = 'Az.Resources.private\Remove-AzPolicyDefinition_Delete2';
            Delete3 = 'Az.Resources.private\Remove-AzPolicyDefinition_Delete3';
            DeleteViaIdentity2 = 'Az.Resources.private\Remove-AzPolicyDefinition_DeleteViaIdentity2';
            DeleteViaIdentity3 = 'Az.Resources.private\Remove-AzPolicyDefinition_DeleteViaIdentity3';
            DeleteById = 'Az.Resources.custom\Remove-AzPolicyDefinition_DeleteById';
        }
        if (('Delete2', 'DeleteById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
When you delete a resource group, all of its resources are also deleted.
Deleting a resource group deletes all of its template deployments and currently stored operations.
.Description
When you delete a resource group, all of its resources are also deleted.
Deleting a resource group deletes all of its template deployments and currently stored operations.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresourcegroup
#>

function Remove-AzResourceGroup {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('ResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to delete.
    # The name is case insensitive.
    ${Name},

    [Parameter(ParameterSetName='Delete')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Delete = 'Az.Resources.private\Remove-AzResourceGroup_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzResourceGroup_DeleteViaIdentity';
        }
        if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Delete a management lock by scope.
.Description
Delete a management lock by scope.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresourcelock
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresourcelock
#>

function Remove-AzResourceLock {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete2', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Parameter(ParameterSetName='Delete2', Mandatory)]
    [Parameter(ParameterSetName='Delete3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of lock.
    ${LockName},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope for the lock.
    ${Scope},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Parameter(ParameterSetName='Delete3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resource with the lock to delete.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource with the lock to delete.
    ${ResourceName},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource provider namespace of the resource with the lock to delete.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource with the lock to delete.
    ${ResourceType},

    [Parameter(ParameterSetName='Delete1')]
    [Parameter(ParameterSetName='Delete2')]
    [Parameter(ParameterSetName='Delete3')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='DeleteViaIdentity3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Delete = 'Az.Resources.private\Remove-AzResourceLock_Delete';
            Delete1 = 'Az.Resources.private\Remove-AzResourceLock_Delete1';
            Delete2 = 'Az.Resources.private\Remove-AzResourceLock_Delete2';
            Delete3 = 'Az.Resources.private\Remove-AzResourceLock_Delete3';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzResourceLock_DeleteViaIdentity';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzResourceLock_DeleteViaIdentity1';
            DeleteViaIdentity2 = 'Az.Resources.private\Remove-AzResourceLock_DeleteViaIdentity2';
            DeleteViaIdentity3 = 'Az.Resources.private\Remove-AzResourceLock_DeleteViaIdentity3';
        }
        if (('Delete1', 'Delete2', 'Delete3') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes a resource by ID.
.Description
Deletes a resource by ID.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azresource
#>

function Remove-AzResource {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Delete1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the resource, including the resource name and resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
    ${ResourceId},

    [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The API version to use for the operation.
    ${ApiVersion},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Delete1 = 'Az.Resources.private\Remove-AzResource_Delete1';
            DeleteViaIdentity1 = 'Az.Resources.private\Remove-AzResource_DeleteViaIdentity1';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes a role assignment.
.Description
Deletes a role assignment.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azroleassignment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleAssignment
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azroleassignment
#>

function Remove-AzRoleAssignment {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleAssignment])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('RoleAssignmentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the role assignment to delete.
    ${Name},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role assignment to delete.
    ${Scope},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Delete = 'Az.Resources.private\Remove-AzRoleAssignment_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzRoleAssignment_DeleteViaIdentity';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Deletes a role definition.
.Description
Deletes a role definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azroledefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azroledefinition
#>

function Remove-AzRoleDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('RoleDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role definition to delete.
    ${Id},

    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role definition.
    ${Scope},

    [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Delete = 'Az.Resources.private\Remove-AzRoleDefinition_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzRoleDefinition_DeleteViaIdentity';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
You must remove all values from a resource tag before you can delete it.
.Description
You must remove all values from a resource tag before you can delete it.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-aztag
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-aztag
#>

function Remove-AzTag {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Delete', Mandatory)]
    [Alias('TagName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the tag.
    ${Name},

    [Parameter(ParameterSetName='Delete')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Delete = 'Az.Resources.private\Remove-AzTag_Delete';
            DeleteViaIdentity = 'Az.Resources.private\Remove-AzTag_DeleteViaIdentity';
        }
        if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates or updates a policy definition.
.Description
Creates or updates a policy definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azpolicydefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinition
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinition
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition
.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.
 
PARAMETER <IPolicyDefinition>: The policy definition.
  [Description <String>]: The policy definition description.
  [DisplayName <String>]: The display name of the policy definition.
  [Metadata <IPolicyDefinitionPropertiesMetadata>]: The policy definition metadata.
  [Mode <PolicyMode?>]: The policy definition mode. Possible values are NotSpecified, Indexed, and All.
  [Parameter <IPolicyDefinitionPropertiesParameters>]: Required if a parameter is used in policy rule.
  [PolicyRule <IPolicyDefinitionPropertiesPolicyRule>]: The policy rule.
    [(Any) <Object>]: This indicates any property can be added to this object.
  [PolicyType <PolicyType?>]: The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azpolicydefinition
#>

function Set-AzPolicyDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinition], [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IPolicyDefinition])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded2', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Update2', Mandatory)]
    [Parameter(ParameterSetName='Update3', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded3', Mandatory)]
    [Alias('PolicyDefinitionName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the policy definition to create.
    ${Name},

    [Parameter(ParameterSetName='Update2')]
    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update3', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the management group.
    ${ManagementGroupName},

    [Parameter(ParameterSetName='UpdateById', Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy definition.
    ${Id},

    [Parameter(ParameterSetName='Update2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinition]
    # The policy definition.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinitionPropertiesParameters]
    # Required if a parameter is used in policy rule.
    ${DefinitionPropertiesParameter},

    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The policy definition description.
    ${Description},

    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The display name of the policy definition.
    ${DisplayName},

    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinitionPropertiesMetadata]
    # The policy definition metadata.
    ${Metadata},

    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Parameter(ParameterSetName='UpdateById')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyMode])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyMode]
    # The policy definition mode.
    # Possible values are NotSpecified, Indexed, and All.
    ${Mode},

    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Parameter(ParameterSetName='UpdateById')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20161201.IPolicyDefinitionPropertiesPolicyRule]))]
    [System.Collections.Hashtable]
    # The policy rule.
    ${PolicyRule},

    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Parameter(ParameterSetName='UpdateById')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.PolicyType]
    # The type of policy definition.
    # Possible values are NotSpecified, BuiltIn, and Custom.
    ${PolicyType},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Update2 = 'Az.Resources.private\Set-AzPolicyDefinition_Update2';
            Update3 = 'Az.Resources.private\Set-AzPolicyDefinition_Update3';
            UpdateExpanded2 = 'Az.Resources.private\Set-AzPolicyDefinition_UpdateExpanded2';
            UpdateExpanded3 = 'Az.Resources.private\Set-AzPolicyDefinition_UpdateExpanded3';
            UpdateById = 'Az.Resources.custom\Set-AzPolicyDefinition_UpdateById';
        }
        if (('Update2', 'UpdateExpanded2', 'UpdateById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates or updates a resource group.
.Description
Creates or updates a resource group.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.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.
 
PARAMETER <IResourceGroup>: Resource group information.
  Location <String>: The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
  [ManagedBy <String>]: The ID of the resource that manages this resource group.
  [Tag <IResourceGroupTags>]: The tags attached to the resource group.
    [(Any) <String>]: This indicates any property can be added to this object.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresourcegroup
#>

function Set-AzResourceGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(Mandatory)]
    [Alias('ResourceGroupName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to create or update.
    # Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
    ${Name},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup]
    # Resource group information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The location of the resource group.
    # It cannot be changed after the resource group has been created.
    # It must be one of the supported Azure locations.
    ${Location},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The ID of the resource that manages this resource group.
    ${ManagedBy},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupTags]))]
    [System.Collections.Hashtable]
    # The tags attached to the resource group.
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Update = 'Az.Resources.private\Set-AzResourceGroup_Update';
            UpdateExpanded = 'Az.Resources.private\Set-AzResourceGroup_UpdateExpanded';
        }
        if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
When you apply a lock at a parent scope, all child resources inherit the same lock.
To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions.
Of the built-in roles, only Owner and User Access Administrator are granted those actions.
.Description
When you apply a lock at a parent scope, all child resources inherit the same lock.
To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions.
Of the built-in roles, only Owner and User Access Administrator are granted those actions.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresourcelock
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject
.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.
 
OWNER <IManagementLockOwner[]>: The owners of the lock.
  [ApplicationId <String>]: The application ID of the lock owner.
 
PARAMETER <IManagementLockObject>: The lock information.
  Level <LockLevel>: The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
  [Note <String>]: Notes about the lock. Maximum of 512 characters.
  [Owner <IManagementLockOwner[]>]: The owners of the lock.
    [ApplicationId <String>]: The application ID of the lock owner.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azresourcelock
#>

function Set-AzResourceLock {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of lock.
    # The lock name can be a maximum of 260 characters.
    # It cannot contain <, > %, &, :, \, ?, /, or any control characters.
    ${LockName},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The parent resource identity.
    ${ParentResourcePath},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='Update2', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded2', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resource to lock.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource to lock.
    ${ResourceName},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource provider namespace of the resource to lock.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The resource type of the resource to lock.
    ${ResourceType},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='Update1')]
    [Parameter(ParameterSetName='Update2')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Update3', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded3', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope for the lock.
    # When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' for subscriptions, '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}' for resources.
    ${Scope},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update2', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='Update3', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockObject]
    # The lock information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded2', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded3', Mandatory)]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.LockLevel])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.LockLevel]
    # The level of the lock.
    # Possible values are: NotSpecified, CanNotDelete, ReadOnly.
    # CanNotDelete means authorized users are able to read and modify the resources, but not delete.
    # ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
    ${Level},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Notes about the lock.
    # Maximum of 512 characters.
    ${Note},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateExpanded2')]
    [Parameter(ParameterSetName='UpdateExpanded3')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901.IManagementLockOwner[]]
    # The owners of the lock.
    # To construct, see NOTES section for OWNER properties and create a hash table.
    ${Owner},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Update = 'Az.Resources.private\Set-AzResourceLock_Update';
            Update1 = 'Az.Resources.private\Set-AzResourceLock_Update1';
            Update2 = 'Az.Resources.private\Set-AzResourceLock_Update2';
            Update3 = 'Az.Resources.private\Set-AzResourceLock_Update3';
            UpdateExpanded = 'Az.Resources.private\Set-AzResourceLock_UpdateExpanded';
            UpdateExpanded1 = 'Az.Resources.private\Set-AzResourceLock_UpdateExpanded1';
            UpdateExpanded2 = 'Az.Resources.private\Set-AzResourceLock_UpdateExpanded2';
            UpdateExpanded3 = 'Az.Resources.private\Set-AzResourceLock_UpdateExpanded3';
        }
        if (('Update', 'Update1', 'Update2', 'UpdateExpanded', 'UpdateExpanded1', 'UpdateExpanded2') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Creates or updates a role definition.
.Description
Creates or updates a role definition.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azroledefinition
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition
.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.
 
PERMISSION <IPermission[]>: Role definition permissions.
  [Action <String[]>]: Allowed actions.
  [NotAction <String[]>]: Denied actions.
 
ROLEDEFINITION <IRoleDefinition>: Role definition.
  [AssignableScope <String[]>]: Role definition assignable scopes.
  [Description <String>]: The role definition description.
  [Permission <IPermission[]>]: Role definition permissions.
    [Action <String[]>]: Allowed actions.
    [NotAction <String[]>]: Denied actions.
  [RoleName <String>]: The role name.
  [RoleType <String>]: The role type.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/set-azroledefinition
#>

function Set-AzRoleDefinition {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(Mandatory)]
    [Alias('RoleDefinitionId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the role definition.
    ${Id},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The scope of the role definition.
    ${Scope},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Alias('Role')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IRoleDefinition]
    # Role definition.
    # To construct, see NOTES section for ROLEDEFINITION properties and create a hash table.
    ${RoleDefinition},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # Role definition assignable scopes.
    ${AssignableScope},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role definition description.
    ${Description},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20150701.IPermission[]]
    # Role definition permissions.
    # To construct, see NOTES section for PERMISSION properties and create a hash table.
    ${Permission},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role name.
    ${RoleName},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The role type.
    ${RoleType},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Update = 'Az.Resources.private\Set-AzRoleDefinition_Update';
            UpdateExpanded = 'Az.Resources.private\Set-AzRoleDefinition_UpdateExpanded';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
You can cancel a deployment only if the provisioningState is Accepted or Running.
After the deployment is canceled, the provisioningState is set to Canceled.
Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
.Description
You can cancel a deployment only if the provisioningState is Accepted or Running.
After the deployment is canceled, the provisioningState is set to Canceled.
Canceling a template deployment stops the currently running template deployment and leaves the resources partially deployed.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/stop-azdeployment
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/stop-azdeployment
#>

function Stop-AzDeployment {
[Alias('Stop-AzResourceGroupDeployment')]
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Cancel', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Cancel', Mandatory)]
    [Parameter(ParameterSetName='Cancel1', Mandatory)]
    [Alias('DeploymentName')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the deployment to cancel.
    ${Name},

    [Parameter(ParameterSetName='Cancel')]
    [Parameter(ParameterSetName='Cancel1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='Cancel1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='CancelViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='CancelViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Cancel = 'Az.Resources.private\Stop-AzDeployment_Cancel';
            Cancel1 = 'Az.Resources.private\Stop-AzDeployment_Cancel1';
            CancelViaIdentity = 'Az.Resources.private\Stop-AzDeployment_CancelViaIdentity';
            CancelViaIdentity1 = 'Az.Resources.private\Stop-AzDeployment_CancelViaIdentity1';
        }
        if (('Cancel', 'Cancel1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Checks whether a resource group exists.
.Description
Checks whether a resource group exists.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azresourcegroup
#>

function Test-AzResourceGroup {
[Alias('Test-AzResourceGroupExistence')]
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='Check', PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Check', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to check.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='Check')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='CheckViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Check = 'Az.Resources.private\Test-AzResourceGroup_Check';
            CheckViaIdentity = 'Az.Resources.private\Test-AzResourceGroup_CheckViaIdentity';
        }
        if (('Check') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
This operation checks whether the specified resources can be moved to the target.
The resources to move must be in the same source resource group.
The target resource group may be in a different subscription.
If validation succeeds, it returns HTTP response code 204 (no content).
If validation fails, it returns HTTP response code 409 (Conflict) with an error message.
Retrieve the URL in the Location header value to check the result of the long-running operation.
.Description
This operation checks whether the specified resources can be moved to the target.
The resources to move must be in the same source resource group.
The target resource group may be in a different subscription.
If validation succeeds, it returns HTTP response code 204 (no content).
If validation fails, it returns HTTP response code 409 (Conflict) with an error message.
Retrieve the URL in the Location header value to check the result of the long-running operation.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azresourcemove
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourcesMoveInfo
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IResourcesMoveInfo>: Parameters of move resources.
  [Resource <String[]>]: The IDs of the resources.
  [TargetResourceGroup <String>]: The target resource group.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/test-azresourcemove
#>

function Test-AzResourceMove {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Validate', Mandatory)]
    [Parameter(ParameterSetName='ValidateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group containing the resources to validate for move.
    ${SourceResourceGroupName},

    [Parameter(ParameterSetName='Validate')]
    [Parameter(ParameterSetName='ValidateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='ValidateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ValidateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Validate', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='ValidateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourcesMoveInfo]
    # Parameters of move resources.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='ValidateExpanded')]
    [Parameter(ParameterSetName='ValidateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String[]]
    # The IDs of the resources.
    ${Resource},

    [Parameter(ParameterSetName='ValidateExpanded')]
    [Parameter(ParameterSetName='ValidateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The target resource group.
    ${TargetResourceGroup},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Returns true when the command succeeds
    ${PassThru},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Validate = 'Az.Resources.private\Test-AzResourceMove_Validate';
            ValidateExpanded = 'Az.Resources.private\Test-AzResourceMove_ValidateExpanded';
            ValidateViaIdentity = 'Az.Resources.private\Test-AzResourceMove_ValidateViaIdentity';
            ValidateViaIdentityExpanded = 'Az.Resources.private\Test-AzResourceMove_ValidateViaIdentityExpanded';
        }
        if (('Validate', 'ValidateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Unregisters a subscription from a resource provider.
.Description
Unregisters a subscription from a resource provider.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/unregister-azresourceprovider
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/unregister-azresourceprovider
#>

function Unregister-AzResourceProvider {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IProvider])]
[CmdletBinding(DefaultParameterSetName='Unregister', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Unregister', Mandatory)]
    [Alias('ProviderNamespace')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The namespace of the resource provider to unregister.
    ${ResourceProviderNamespace},

    [Parameter(ParameterSetName='Unregister')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='UnregisterViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # 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.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Unregister = 'Az.Resources.private\Unregister-AzResourceProvider_Unregister';
            UnregisterViaIdentity = 'Az.Resources.private\Unregister-AzResourceProvider_UnregisterViaIdentity';
        }
        if (('Unregister') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Resource groups can be updated through a simple PATCH operation to a group address.
The format of the request is the same as that for creating a resource group.
If a field is unspecified, the current value is retained.
.Description
Resource groups can be updated through a simple PATCH operation to a group address.
The format of the request is the same as that for creating a resource group.
If a field is unspecified, the current value is retained.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azresourcegroup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupPatchable
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IResourceGroupPatchable>: Resource group information.
  [ManagedBy <String>]: The ID of the resource that manages this resource group.
  [Name <String>]: The name of the resource group.
  [Tag <IResourceGroupPatchableTags>]: The tags attached to the resource group.
    [(Any) <String>]: This indicates any property can be added to this object.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azresourcegroup
#>

function Update-AzResourceGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroup])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Update', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to update.
    # The name is case insensitive.
    ${Name},

    [Parameter(ParameterSetName='Update')]
    [Parameter(ParameterSetName='UpdateExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The name of the resource group to update.
    # The name is case insensitive.
    ${ResourceGroupName},

    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupPatchable]
    # Resource group information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The ID of the resource that manages this resource group.
    ${ManagedBy},

    [Parameter(ParameterSetName='UpdateExpanded')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IResourceGroupPatchableTags]))]
    [System.Collections.Hashtable]
    # The tags attached to the resource group.
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Update = 'Az.Resources.private\Update-AzResourceGroup_Update';
            UpdateExpanded = 'Az.Resources.private\Update-AzResourceGroup_UpdateExpanded';
            UpdateViaIdentity = 'Az.Resources.private\Update-AzResourceGroup_UpdateViaIdentity';
            UpdateViaIdentityExpanded = 'Az.Resources.private\Update-AzResourceGroup_UpdateViaIdentityExpanded';
        }
        if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis
Updates a resource by ID.
.Description
Updates a resource by ID.
.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azresource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource
.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 <IResourcesIdentity>: Identity Parameter
  [ApplianceDefinitionId <String>]: The fully qualified ID of the appliance definition, including the appliance name and the appliance definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name}
  [ApplianceDefinitionName <String>]: The name of the appliance definition.
  [ApplianceId <String>]: The fully qualified ID of the appliance, including the appliance name and the appliance resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name}
  [ApplianceName <String>]: The name of the appliance.
  [ApplicationDefinitionId <String>]: The fully qualified ID of the managed application definition, including the managed application name and the managed application definition resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applicationDefinitions/{applicationDefinition-name}
  [ApplicationDefinitionName <String>]: The name of the managed application definition.
  [ApplicationId <String>]: The application ID.
  [ApplicationId1 <String>]: The fully qualified ID of the managed application, including the managed application name and the managed application resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
  [ApplicationName <String>]: The name of the managed application.
  [ApplicationObjectId <String>]: Application object ID.
  [DenyAssignmentId <String>]: The ID of the deny assignment to get.
  [DeploymentName <String>]: The name of the deployment.
  [DomainName <String>]: name of the domain.
  [FeatureName <String>]: The name of the feature to get.
  [GroupId <String>]: Management Group ID.
  [GroupObjectId <String>]: The object ID of the group from which to remove the member.
  [Id <String>]: Resource identity path
  [LinkId <String>]: The fully qualified ID of the resource link. Use the format, /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink
  [LockName <String>]: The name of lock.
  [ManagementGroupId <String>]: The ID of the management group.
  [MemberObjectId <String>]: Member object id
  [ObjectId <String>]: Application object ID.
  [OperationId <String>]: The ID of the operation to get.
  [OwnerObjectId <String>]: Owner object id
  [ParentResourcePath <String>]: The parent resource identity.
  [PolicyAssignmentId <String>]: The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.
  [PolicyAssignmentName <String>]: The name of the policy assignment to delete.
  [PolicyDefinitionName <String>]: The name of the policy definition to create.
  [PolicySetDefinitionName <String>]: The name of the policy set definition to create.
  [ResourceGroupName <String>]: The name of the resource group that contains the resource to delete. The name is case insensitive.
  [ResourceId <String>]: The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
  [ResourceName <String>]: The name of the resource to delete.
  [ResourceProviderNamespace <String>]: The namespace of the resource provider.
  [ResourceType <String>]: The resource type.
  [RoleAssignmentId <String>]: The ID of the role assignment to delete.
  [RoleAssignmentName <String>]: The name of the role assignment to delete.
  [RoleDefinitionId <String>]: The ID of the role definition to delete.
  [RoleId <String>]: The ID of the role assignment to delete.
  [Scope <String>]: The scope for the lock.
  [SourceResourceGroupName <String>]: The name of the resource group containing the resources to move.
  [SubscriptionId <String>]: The ID of the target subscription.
  [TagName <String>]: The name of the tag.
  [TagValue <String>]: The value of the tag to delete.
  [TenantId <String>]: The tenant ID.
  [UpnOrObjectId <String>]: The object ID or principal name of the user for which to get information.
 
PARAMETER <IGenericResource>: Resource information.
  PlanName <String>: The plan name.
  PlanProduct <String>: The product code.
  PlanPublisher <String>: The publisher ID.
  PlanVersion <String>: The plan's version.
  SkuName <String>: The SKU name.
  [Location <String>]: Resource location
  [Tag <IResourceTags>]: Resource tags
    [(Any) <String>]: This indicates any property can be added to this object.
  [IdentityType <ResourceIdentityType?>]: The identity type.
  [IdentityUserAssignedIdentity <IIdentityUserAssignedIdentities>]: The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    [(Any) <IComponentsSchemasIdentityPropertiesUserassignedidentitiesAdditionalproperties>]: This indicates any property can be added to this object.
  [Kind <String>]: The kind of the resource.
  [ManagedBy <String>]: ID of the resource that manages this resource.
  [PlanPromotionCode <String>]: The promotion code.
  [Property <IGenericResourceProperties>]: The resource properties.
  [SkuCapacity <Int32?>]: The SKU capacity.
  [SkuFamily <String>]: The SKU family.
  [SkuModel <String>]: The SKU model.
  [SkuSize <String>]: The SKU size.
  [SkuTier <String>]: The SKU tier.
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/update-azresource
#>

function Update-AzResource {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(ParameterSetName='Update1', Mandatory)]
    [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The fully qualified ID of the resource, including the resource name and resource type.
    # Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
    ${ResourceId},

    [Parameter(ParameterSetName='UpdateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.IResourcesIdentity]
    # Identity Parameter
    # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
    ${InputObject},

    [Parameter(Mandatory)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Query')]
    [System.String]
    # The API version to use for the operation.
    ${ApiVersion},

    [Parameter(ParameterSetName='Update1', Mandatory, ValueFromPipeline)]
    [Parameter(ParameterSetName='UpdateViaIdentity1', Mandatory, ValueFromPipeline)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResource]
    # Resource information.
    # To construct, see NOTES section for PARAMETER properties and create a hash table.
    ${Parameter},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType])]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Support.ResourceIdentityType]
    # The identity type.
    ${IdentityType},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IIdentityUserAssignedIdentities]))]
    [System.Collections.Hashtable]
    # The list of user identities associated with the resource.
    # The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
    ${IdentityUserAssignedIdentity},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The kind of the resource.
    ${Kind},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # Resource location
    ${Location},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # ID of the resource that manages this resource.
    ${ManagedBy},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan name.
    ${PlanName},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The product code.
    ${PlanProduct},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The promotion code.
    ${PlanPromotionCode},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The publisher ID.
    ${PlanPublisher},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The plan's version.
    ${PlanVersion},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20180501.IGenericResourceProperties]
    # The resource properties.
    ${Property},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Int32]
    # The SKU capacity.
    ${SkuCapacity},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU family.
    ${SkuFamily},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU model.
    ${SkuModel},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU name.
    ${SkuName},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU size.
    ${SkuSize},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.String]
    # The SKU tier.
    ${SkuTier},

    [Parameter(ParameterSetName='UpdateExpanded1')]
    [Parameter(ParameterSetName='UpdateViaIdentityExpanded1')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Resources.Models.Api20160901Preview.IResourceTags]))]
    [System.Collections.Hashtable]
    # Resource tags
    ${Tag},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command as a job
    ${AsJob},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Run the command asynchronously
    ${NoWait},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            Update1 = 'Az.Resources.private\Update-AzResource_Update1';
            UpdateExpanded1 = 'Az.Resources.private\Update-AzResource_UpdateExpanded1';
            UpdateViaIdentity1 = 'Az.Resources.private\Update-AzResource_UpdateViaIdentity1';
            UpdateViaIdentityExpanded1 = 'Az.Resources.private\Update-AzResource_UpdateViaIdentityExpanded1';
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# 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.
# ----------------------------------------------------------------------------------
<#
.Synopsis

.Description

.Example
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicysetdefinition
.Outputs
System.Boolean
.Link
https://docs.microsoft.com/en-us/powershell/module/az.resources/remove-azpolicysetdefinition
#>

function Remove-AzPolicySetDefinition {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='DeleteById', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.Profile('hybrid-2019-03-01')]
param(
    [Parameter(Mandatory)]
    [Alias('ResourceId')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [System.String]
    # The ID of the policy set definition.
    ${Id},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Path')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
    [System.String]
    # The ID of the target subscription.
    ${SubscriptionId},

    [Parameter()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # When specified, PassThru will force the cmdlet return a 'bool' given that there isn't a return type by default.
    ${PassThru},

    [Parameter()]
    [Alias('AzureRMContext', 'AzureCredential')]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Azure')]
    [System.Management.Automation.PSObject]
    # The credentials, account, tenant, and subscription used for communication with Azure.
    ${DefaultProfile},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.SwitchParameter]
    # Wait for .NET debugger to attach
    ${Break},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be appended to the front of the pipeline
    ${HttpPipelineAppend},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Runtime.SendAsyncStep[]]
    # SendAsync Pipeline Steps to be prepended to the front of the pipeline
    ${HttpPipelinePrepend},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Uri]
    # The URI for the proxy server to use
    ${Proxy},

    [Parameter(DontShow)]
    [ValidateNotNull()]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.Category('Runtime')]
    [System.Management.Automation.PSCredential]
    # Credentials for a proxy server to use for the remote call
    ${ProxyCredential},

    [Parameter(DontShow)]
    [Microsoft.Azure.PowerShell.Cmdlets.Resources.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
        $mapping = @{
            DeleteById = 'Az.Resources.custom\Remove-AzPolicySetDefinition_DeleteById';
        }
        if (('DeleteById') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
            $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {
        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {
        throw
    }
}

end {
    try {
        $steppablePipeline.End()
    } catch {
        throw
    }
}
}

# SIG # Begin signature block
# MIIjhgYJKoZIhvcNAQcCoIIjdzCCI3MCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB31rpjlZyaMYsT
# WYdSos0okQvpixvp5d7woeQUXmpIi6CCDYEwggX/MIID56ADAgECAhMzAAABUZ6N
# j0Bxow5BAAAAAAFRMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMTkwNTAyMjEzNzQ2WhcNMjAwNTAyMjEzNzQ2WjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
# AQCVWsaGaUcdNB7xVcNmdfZiVBhYFGcn8KMqxgNIvOZWNH9JYQLuhHhmJ5RWISy1
# oey3zTuxqLbkHAdmbeU8NFMo49Pv71MgIS9IG/EtqwOH7upan+lIq6NOcw5fO6Os
# +12R0Q28MzGn+3y7F2mKDnopVu0sEufy453gxz16M8bAw4+QXuv7+fR9WzRJ2CpU
# 62wQKYiFQMfew6Vh5fuPoXloN3k6+Qlz7zgcT4YRmxzx7jMVpP/uvK6sZcBxQ3Wg
# B/WkyXHgxaY19IAzLq2QiPiX2YryiR5EsYBq35BP7U15DlZtpSs2wIYTkkDBxhPJ
# IDJgowZu5GyhHdqrst3OjkSRAgMBAAGjggF+MIIBejAfBgNVHSUEGDAWBgorBgEE
# AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUV4Iarkq57esagu6FUBb270Zijc8w
# UAYDVR0RBEkwR6RFMEMxKTAnBgNVBAsTIE1pY3Jvc29mdCBPcGVyYXRpb25zIFB1
# ZXJ0byBSaWNvMRYwFAYDVQQFEw0yMzAwMTIrNDU0MTM1MB8GA1UdIwQYMBaAFEhu
# ZOVQBdOCqhc3NyK1bajKdQKVMFQGA1UdHwRNMEswSaBHoEWGQ2h0dHA6Ly93d3cu
# bWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01pY0NvZFNpZ1BDQTIwMTFfMjAxMS0w
# Ny0wOC5jcmwwYQYIKwYBBQUHAQEEVTBTMFEGCCsGAQUFBzAChkVodHRwOi8vd3d3
# Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NlcnRzL01pY0NvZFNpZ1BDQTIwMTFfMjAx
# MS0wNy0wOC5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAgEAWg+A
# rS4Anq7KrogslIQnoMHSXUPr/RqOIhJX+32ObuY3MFvdlRElbSsSJxrRy/OCCZdS
# se+f2AqQ+F/2aYwBDmUQbeMB8n0pYLZnOPifqe78RBH2fVZsvXxyfizbHubWWoUf
# NW/FJlZlLXwJmF3BoL8E2p09K3hagwz/otcKtQ1+Q4+DaOYXWleqJrJUsnHs9UiL
# crVF0leL/Q1V5bshob2OTlZq0qzSdrMDLWdhyrUOxnZ+ojZ7UdTY4VnCuogbZ9Zs
# 9syJbg7ZUS9SVgYkowRsWv5jV4lbqTD+tG4FzhOwcRQwdb6A8zp2Nnd+s7VdCuYF
# sGgI41ucD8oxVfcAMjF9YX5N2s4mltkqnUe3/htVrnxKKDAwSYliaux2L7gKw+bD
# 1kEZ/5ozLRnJ3jjDkomTrPctokY/KaZ1qub0NUnmOKH+3xUK/plWJK8BOQYuU7gK
# YH7Yy9WSKNlP7pKj6i417+3Na/frInjnBkKRCJ/eYTvBH+s5guezpfQWtU4bNo/j
# 8Qw2vpTQ9w7flhH78Rmwd319+YTmhv7TcxDbWlyteaj4RK2wk3pY1oSz2JPE5PNu
# Nmd9Gmf6oePZgy7Ii9JLLq8SnULV7b+IP0UXRY9q+GdRjM2AEX6msZvvPCIoG0aY
# HQu9wZsKEK2jqvWi8/xdeeeSI9FN6K1w4oVQM4Mwggd6MIIFYqADAgECAgphDpDS
# AAAAAAADMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK
# V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0
# IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0
# ZSBBdXRob3JpdHkgMjAxMTAeFw0xMTA3MDgyMDU5MDlaFw0yNjA3MDgyMTA5MDla
# MH4xCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS
# ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMT
# H01pY3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBIDIwMTEwggIiMA0GCSqGSIb3DQEB
# AQUAA4ICDwAwggIKAoICAQCr8PpyEBwurdhuqoIQTTS68rZYIZ9CGypr6VpQqrgG
# OBoESbp/wwwe3TdrxhLYC/A4wpkGsMg51QEUMULTiQ15ZId+lGAkbK+eSZzpaF7S
# 35tTsgosw6/ZqSuuegmv15ZZymAaBelmdugyUiYSL+erCFDPs0S3XdjELgN1q2jz
# y23zOlyhFvRGuuA4ZKxuZDV4pqBjDy3TQJP4494HDdVceaVJKecNvqATd76UPe/7
# 4ytaEB9NViiienLgEjq3SV7Y7e1DkYPZe7J7hhvZPrGMXeiJT4Qa8qEvWeSQOy2u
# M1jFtz7+MtOzAz2xsq+SOH7SnYAs9U5WkSE1JcM5bmR/U7qcD60ZI4TL9LoDho33
# X/DQUr+MlIe8wCF0JV8YKLbMJyg4JZg5SjbPfLGSrhwjp6lm7GEfauEoSZ1fiOIl
# XdMhSz5SxLVXPyQD8NF6Wy/VI+NwXQ9RRnez+ADhvKwCgl/bwBWzvRvUVUvnOaEP
# 6SNJvBi4RHxF5MHDcnrgcuck379GmcXvwhxX24ON7E1JMKerjt/sW5+v/N2wZuLB
# l4F77dbtS+dJKacTKKanfWeA5opieF+yL4TXV5xcv3coKPHtbcMojyyPQDdPweGF
# RInECUzF1KVDL3SV9274eCBYLBNdYJWaPk8zhNqwiBfenk70lrC8RqBsmNLg1oiM
# CwIDAQABo4IB7TCCAekwEAYJKwYBBAGCNxUBBAMCAQAwHQYDVR0OBBYEFEhuZOVQ
# BdOCqhc3NyK1bajKdQKVMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIAQwBBMAsGA1Ud
# DwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFHItOgIxkEO5FAVO
# 4eqnxzHRI4k0MFoGA1UdHwRTMFEwT6BNoEuGSWh0dHA6Ly9jcmwubWljcm9zb2Z0
# LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0NlckF1dDIwMTFfMjAxMV8wM18y
# Mi5jcmwwXgYIKwYBBQUHAQEEUjBQME4GCCsGAQUFBzAChkJodHRwOi8vd3d3Lm1p
# Y3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY1Jvb0NlckF1dDIwMTFfMjAxMV8wM18y
# Mi5jcnQwgZ8GA1UdIASBlzCBlDCBkQYJKwYBBAGCNy4DMIGDMD8GCCsGAQUFBwIB
# FjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2RvY3MvcHJpbWFyeWNw
# cy5odG0wQAYIKwYBBQUHAgIwNB4yIB0ATABlAGcAYQBsAF8AcABvAGwAaQBjAHkA
# XwBzAHQAYQB0AGUAbQBlAG4AdAAuIB0wDQYJKoZIhvcNAQELBQADggIBAGfyhqWY
# 4FR5Gi7T2HRnIpsLlhHhY5KZQpZ90nkMkMFlXy4sPvjDctFtg/6+P+gKyju/R6mj
# 82nbY78iNaWXXWWEkH2LRlBV2AySfNIaSxzzPEKLUtCw/WvjPgcuKZvmPRul1LUd
# d5Q54ulkyUQ9eHoj8xN9ppB0g430yyYCRirCihC7pKkFDJvtaPpoLpWgKj8qa1hJ
# Yx8JaW5amJbkg/TAj/NGK978O9C9Ne9uJa7lryft0N3zDq+ZKJeYTQ49C/IIidYf
# wzIY4vDFLc5bnrRJOQrGCsLGra7lstnbFYhRRVg4MnEnGn+x9Cf43iw6IGmYslmJ
# aG5vp7d0w0AFBqYBKig+gj8TTWYLwLNN9eGPfxxvFX1Fp3blQCplo8NdUmKGwx1j
# NpeG39rz+PIWoZon4c2ll9DuXWNB41sHnIc+BncG0QaxdR8UvmFhtfDcxhsEvt9B
# xw4o7t5lL+yX9qFcltgA1qFGvVnzl6UJS0gQmYAf0AApxbGbpT9Fdx41xtKiop96
# eiL6SJUfq/tHI4D1nvi/a7dLl+LrdXga7Oo3mXkYS//WsyNodeav+vyL6wuA6mk7
# r/ww7QRMjt/fdW1jkT3RnVZOT7+AVyKheBEyIXrvQQqxP/uozKRdwaGIm1dxVk5I
# RcBCyZt2WwqASGv9eZ/BvW1taslScxMNelDNMYIVWzCCFVcCAQEwgZUwfjELMAkG
# A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx
# HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEoMCYGA1UEAxMfTWljcm9z
# b2Z0IENvZGUgU2lnbmluZyBQQ0EgMjAxMQITMwAAAVGejY9AcaMOQQAAAAABUTAN
# BglghkgBZQMEAgEFAKCBrjAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIBBDAcBgor
# BgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvBgkqhkiG9w0BCQQxIgQgLiF6jMFC
# l0NAaUzfgaZrLZ+Oia2Pk5jQ6smR5F720UUwQgYKKwYBBAGCNwIBDDE0MDKgFIAS
# AE0AaQBjAHIAbwBzAG8AZgB0oRqAGGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbTAN
# BgkqhkiG9w0BAQEFAASCAQAJnKVKVegk7Bskk9Wx4UqcXNC3aE2jXnAjHQWpI1+t
# Rp6ykFz4Vw5wHVdDX6Xb6Td7lfPGbGqmB+84iJw7NJUiu64CrRm1Yzl0rQdDEU6t
# oHSXRRRj3Z0/WvgCv4c0jzFQ8eZibHxhXorh74Xu34w1/ih672dxo7iQTnf43ZCX
# Puw79375ZlGqlRpdR2cHq2PIzeRHXk3S6szyeR/FoCEhM6+ry+qdzHlWB/ww47oN
# pN3Mq0c6AJj1TDiIljzd1WgiWPsgHp7dWPkt+Qua/bI9xeIIcEX0H5s3/pHZD5+M
# tzrwSUP+aSyU7yxuk4F/y3U4orArXtddX5z+eC0JKXK0oYIS5TCCEuEGCisGAQQB
# gjcDAwExghLRMIISzQYJKoZIhvcNAQcCoIISvjCCEroCAQMxDzANBglghkgBZQME
# AgEFADCCAVEGCyqGSIb3DQEJEAEEoIIBQASCATwwggE4AgEBBgorBgEEAYRZCgMB
# MDEwDQYJYIZIAWUDBAIBBQAEIB/hVqLkCMWzoPOHY/hct0qjrBCZd4npraZKsqBZ
# k3ytAgZd+8BdG74YEzIwMTkxMjIwMDk0NDE4LjIyNlowBIACAfSggdCkgc0wgcox
# CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt
# b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJTAjBgNVBAsTHE1p
# Y3Jvc29mdCBBbWVyaWNhIE9wZXJhdGlvbnMxJjAkBgNVBAsTHVRoYWxlcyBUU1Mg
# RVNOOkFFMkMtRTMyQi0xQUZDMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFt
# cCBTZXJ2aWNloIIOPDCCBPEwggPZoAMCAQICEzMAAAEWkyLqv7stTeYAAAAAARYw
# DQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0
# b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3Jh
# dGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcN
# MTkxMTEzMjE0MDM0WhcNMjEwMjExMjE0MDM0WjCByjELMAkGA1UEBhMCVVMxEzAR
# BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p
# Y3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2Eg
# T3BlcmF0aW9uczEmMCQGA1UECxMdVGhhbGVzIFRTUyBFU046QUUyQy1FMzJCLTFB
# RkMxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2UwggEiMA0G
# CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDQ+Bvz/b3qJ78uPatar4wiUxnCRJTB
# mwgp3jva3J5U7I1wqCpIJPjNC/PaR35UPuVhY3dXRRIvmiKl2n7GnvAfsIAcLvM1
# TbU+N0dY86LaiQiU/JOKStAGjCj4w5X1eB3daoyclIoRqeTtCZIeAmKYnar9lFHn
# 7Rnm5lF6MkeRBwmZMHwar/CDYT+CO5GX+IZrh8Ym7RwdJSJfvybkUTJppzVeeSpp
# 9KphHypvuyfdlW3+W1uIZQmvzviiLZtl25S0IxHRCJZZ8EwTFwtXgDp6uYL3xxtu
# +L+lBvWnWXu9dPY1F4P7GQWrMqfRwDdWL1xzkuMOFj3UvXxG4ciBTeodAgMBAAGj
# ggEbMIIBFzAdBgNVHQ4EFgQU5b9eK7gX6BfNR+UfeTT+V8ghVQswHwYDVR0jBBgw
# FoAU1WM6XIoxkPNDe3xGG8UzaFqFbVUwVgYDVR0fBE8wTTBLoEmgR4ZFaHR0cDov
# L2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwvcHJvZHVjdHMvTWljVGltU3RhUENB
# XzIwMTAtMDctMDEuY3JsMFoGCCsGAQUFBwEBBE4wTDBKBggrBgEFBQcwAoY+aHR0
# cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNUaW1TdGFQQ0FfMjAx
# MC0wNy0wMS5jcnQwDAYDVR0TAQH/BAIwADATBgNVHSUEDDAKBggrBgEFBQcDCDAN
# BgkqhkiG9w0BAQsFAAOCAQEANoNq19qpo9sDL+lJ0rx7xd3M3q/33v01JYtSw0eg
# 0EWnKvUVMZy/B/RIoh97TKC3yzymWQBjExR+1SY6c746cZdSBM6t5cjDjO2x6mi2
# t4dwvT3j5ufs5QYs8xrnoZCKLdZSCIY8/SB81eFdypJ130eZeMyEp9GfSM4pEQlM
# +o8ctdLFwDVJVOuDwkO2QP7JZXO64CRKilMbG0mnk9ythSsxvudbVygh7u2xCJI+
# nrEVXMp9cVQn1XMAKG5wT7ympculX/FTen/W9/QOAtkykjbabACBt78TrCDINIrI
# dcjhSyIiVJgBK/4iUo61xfOtdXQhFBR1HIgLVmJZYv9iCDCCBnEwggRZoAMCAQIC
# CmEJgSoAAAAAAAIwDQYJKoZIhvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRp
# ZmljYXRlIEF1dGhvcml0eSAyMDEwMB4XDTEwMDcwMTIxMzY1NVoXDTI1MDcwMTIx
# NDY1NVowfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNV
# BAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQG
# A1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQCpHQ28dxGKOiDs/BOX9fp/aZRrdFQQ1aUKAIKF
# ++18aEssX8XD5WHCdrc+Zitb8BVTJwQxH0EbGpUdzgkTjnxhMFmxMEQP8WCIhFRD
# DNdNuDgIs0Ldk6zWczBXJoKjRQ3Q6vVHgc2/JGAyWGBG8lhHhjKEHnRhZ5FfgVSx
# z5NMksHEpl3RYRNuKMYa+YaAu99h/EbBJx0kZxJyGiGKr0tkiVBisV39dx898Fd1
# rL2KQk1AUdEPnAY+Z3/1ZsADlkR+79BL/W7lmsqxqPJ6Kgox8NpOBpG2iAg16Hgc
# sOmZzTznL0S6p/TcZL2kAcEgCZN4zfy8wMlEXV4WnAEFTyJNAgMBAAGjggHmMIIB
# 4jAQBgkrBgEEAYI3FQEEAwIBADAdBgNVHQ4EFgQU1WM6XIoxkPNDe3xGG8UzaFqF
# bVUwGQYJKwYBBAGCNxQCBAweCgBTAHUAYgBDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
# EwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU1fZWy4/oolxiaNE9lJBb186aGMQwVgYD
# VR0fBE8wTTBLoEmgR4ZFaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwv
# cHJvZHVjdHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYtMjMuY3JsMFoGCCsGAQUFBwEB
# BE4wTDBKBggrBgEFBQcwAoY+aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9j
# ZXJ0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcnQwgaAGA1UdIAEB/wSBlTCB
# kjCBjwYJKwYBBAGCNy4DMIGBMD0GCCsGAQUFBwIBFjFodHRwOi8vd3d3Lm1pY3Jv
# c29mdC5jb20vUEtJL2RvY3MvQ1BTL2RlZmF1bHQuaHRtMEAGCCsGAQUFBwICMDQe
# MiAdAEwAZQBnAGEAbABfAFAAbwBsAGkAYwB5AF8AUwB0AGEAdABlAG0AZQBuAHQA
# LiAdMA0GCSqGSIb3DQEBCwUAA4ICAQAH5ohRDeLG4Jg/gXEDPZ2joSFvs+umzPUx
# vs8F4qn++ldtGTCzwsVmyWrf9efweL3HqJ4l4/m87WtUVwgrUYJEEvu5U4zM9GAS
# inbMQEBBm9xcF/9c+V4XNZgkVkt070IQyK+/f8Z/8jd9Wj8c8pl5SpFSAK84Dxf1
# L3mBZdmptWvkx872ynoAb0swRCQiPM/tA6WWj1kpvLb9BOFwnzJKJ/1Vry/+tuWO
# M7tiX5rbV0Dp8c6ZZpCM/2pif93FSguRJuI57BlKcWOdeyFtw5yjojz6f32WapB4
# pm3S4Zz5Hfw42JT0xqUKloakvZ4argRCg7i1gJsiOCC1JeVk7Pf0v35jWSUPei45
# V3aicaoGig+JFrphpxHLmtgOR5qAxdDNp9DvfYPw4TtxCd9ddJgiCGHasFAeb73x
# 4QDf5zEHpJM692VHeOj4qEir995yfmFrb3epgcunCaw5u+zGy9iCtHLNHfS4hQEe
# gPsbiSpUObJb2sgNVZl6h3M7COaYLeqN4DMuEin1wC9UJyH3yKxO2ii4sanblrKn
# QqLJzxlBTeCG+SqaoxFmMNO7dDJL32N79ZmKLxvHIa9Zta7cRDyXUHHXodLFVeNp
# 3lfB0d4wwP3M5k37Db9dT+mdHhk4L7zPWAUu7w2gUDXa7wknHNWzfjUeCLraNtvT
# X4/edIhJEqGCAs4wggI3AgEBMIH4oYHQpIHNMIHKMQswCQYDVQQGEwJVUzETMBEG
# A1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWlj
# cm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBP
# cGVyYXRpb25zMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjpBRTJDLUUzMkItMUFG
# QzElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZaIjCgEBMAcG
# BSsOAwIaAxUAh01b3PJPoIsbWoIM1z76zOzdlkOggYMwgYCkfjB8MQswCQYDVQQG
# EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG
# A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQg
# VGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIFAOGm554wIhgPMjAx
# OTEyMjAxNDI0MzBaGA8yMDE5MTIyMTE0MjQzMFowdzA9BgorBgEEAYRZCgQBMS8w
# LTAKAgUA4abnngIBADAKAgEAAgIl5QIB/zAHAgEAAgIRhjAKAgUA4ag5HgIBADA2
# BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIBAAIDB6EgoQowCAIB
# AAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBAFYPtcfBpOXL9tcBoWR1KcW3flAIkx+j
# 2tByujpGet/PrGhu7RpxxNwdYC9nz9XBBT8Uv25093p06yGd5AO+jhi+gvcJiqHr
# zjlSf3r20IRTFQ6qzHiA++AiiRN4Sx4ehRYXZBv7mnHi6XOq0MX0UAeELJ9Dwrh9
# rzJ1nbdH5g8CMYIDDTCCAwkCAQEwgZMwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgT
# Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m
# dCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENB
# IDIwMTACEzMAAAEWkyLqv7stTeYAAAAAARYwDQYJYIZIAWUDBAIBBQCgggFKMBoG
# CSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0BCQQxIgQgzTr1k1w1
# BNrM7yOahW7A846OiKKZu+F/jwgutwjR7yEwgfoGCyqGSIb3DQEJEAIvMYHqMIHn
# MIHkMIG9BCCDIpT2pGApCJdcKZshNt20sQ2FjGogyEFoz6Je0sGQyjCBmDCBgKR+
# MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS
# ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT
# HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAABFpMi6r+7LU3mAAAA
# AAEWMCIEINNEhYtAAnDwlfK6Eky+mdkwhGN/UR/nvW8UrGokDAKJMA0GCSqGSIb3
# DQEBCwUABIIBAC/Wd60L9icRfJbZZAY6EA0Z8iASA8XdWeKC3rx5c1tmP45iBshx
# zcBUoXrFi1FUGC2/6hiLBtWCnrqRl/JKlDS/a6uHAz0d2NmeaD3ZwLZd6Y/C0iIK
# B2nTWA3dxj09fAOvEBA4ds8Dueh2kTZGUKj0VHsnMaIOeeNV7lfI9a2i2v3m6H/G
# 6i80GgMGJJ9n2szX1s/E10Z5+thtz1PTBEpi5yWEu5XnQ0svQbsbJ1Wcpozdnsaj
# 9mRNEGBii9+2f6cjLzJ/oqP9WdQ4tQg34+hZIYlW+21GSQSjd+ZtO+PuYIl9g1bm
# Y3H5cGeKAkXjqaFul7aqzpbSjPx5g/8zkXA=
# SIG # End signature block