Edit

Share via


Remove-AzApiManagementRegion

Removes an existing deployment region from PsApiManagement instance.

Syntax

Default (Default)

Remove-AzApiManagementRegion
    -ApiManagement <PsApiManagement>
    -Location <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Remove-AzApiManagementRegion cmdlet removes instance of type Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion from a collection of AdditionalRegions of provided the instance of type Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement. This cmdlet does not modify deployment by itself but updates the instance of PsApiManagement in-memory. To update a deployment of an API Management, pass the modified PsApiManagementInstance to Set-AzApiManagement.

Examples

Example 1: Remove a region from a PsApiManagement instance

Remove-AzApiManagementRegion -ApiManagement $ApiManagement -Location "East US"

This command removes the region named East US from the PsApiManagement instance.

Example 2: Remove a region from a PsApiManagement instance using a series of commands

Get-AzApiManagement -ResourceGroupName "Contoso" -Name ContosoApi | Remove-AzApiManagementRegion -Location "East US" | Set-AzApiManagement

This first command gets an instance of PsApiManagement from the resource group named Contoso named ContosoApi. The final command then removes the region named East US from that instance then updates the deployment.

Parameters

-ApiManagement

Specifies the PsApiManagement instance that this cmdlet removes the additional deployment region from.

Parameter properties

Type:PsApiManagement
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The Remove-AzApiManagementRegion cmdlet removes instance of type Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion from a collection of AdditionalRegions of provided the instance of type Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement. This cmdlet does not modify deployment by itself but updates the instance of PsApiManagement in-memory. To update a deployment of an API Management, pass the modified PsApiManagementInstance to Set-AzApiManagement.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Location

Specifies the location of the region that this cmdlet removes. Specifies the location of the new deployment region amongst the supported region for Api Management service. To obtain valid locations, use the cmdlet Get-AzResourceProvider -ProviderNamespace "Microsoft.ApiManagement" | where {$_.ResourceTypes[0].ResourceTypeName -eq "service"} | Select-Object Locations

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PsApiManagement

String

Outputs

PsApiManagement