New-​Azure​Rm​Api​Management​Context

Creates an instance of PsAzureApiManagementContext.

Syntax

New-AzureRmApiManagementContext
   -ResourceGroupName <String>
   -ServiceName <String>
   [<CommonParameters>]

Description

The New-AzureRmApiManagementContext cmdlet creates an instance of PsAzureApiManagementContext. The context is used for all of the API Management service cmdlets.

Examples

Example 1: Create a PsApiManagementContext instance

PS C:\>$ApiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName "ContosoResources" -ServiceName "Contoso"

This command creates an instance of PsApiManagementContext.

Required Parameters

-ResourceGroupName

Specifies the name of the resource group under which an API Management service is deployed.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServiceName

Specifies the name of the deployed API Management service.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsAzureApiManagementContext