Skip to content

Latest commit

 

History

History
115 lines (86 loc) · 2.95 KB

New-AzApiManagementContext.md

File metadata and controls

115 lines (86 loc) · 2.95 KB
external help file Module Name ms.assetid online version schema
Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement.dll-Help.xml
Az.ApiManagement
15634C76-6B34-4E2B-9354-86155827F200
2.0.0

New-AzApiManagementContext

SYNOPSIS

Creates an instance of PsAzureApiManagementContext.

SYNTAX

ContextParameterSet (Default)

New-AzApiManagementContext -ResourceGroupName <String> -ServiceName <String>
 [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

ResourceIdParameterSet

New-AzApiManagementContext -ResourceId <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

DESCRIPTION

The New-AzApiManagementContext 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

$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "ContosoResources" -ServiceName "Contoso"

This command creates an instance of PsApiManagementContext.

PARAMETERS

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName

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

Type: System.String
Parameter Sets: ContextParameterSet
Aliases:

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

-ResourceId

Arm Resource Identifier of a ApiManagement service. This parameter is required.

Type: System.String
Parameter Sets: ResourceIdParameterSet
Aliases:

Required: True
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: System.String
Parameter Sets: ContextParameterSet
Aliases:

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

CommonParameters

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

INPUTS

System.String

OUTPUTS

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext

NOTES

RELATED LINKS