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

Creates an instance of PsAzureApiManagementContext.

Syntax

New-AzureRmApiManagementContext
   -ResourceGroupName <String>
   -ServiceName <String>
   [-InformationAction <ActionPreference>]
   [-InformationVariable <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

Optional Parameters

-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

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