New-AzureRmApiManagementApiRevision
Creates a new Revision of an Existing API.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
New-AzureRmApiManagementApiRevision
-Context <PsApiManagementContext>
-ApiId <String>
-ApiRevision <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzureRmApiManagementApiRevision cmdlet creates an API Revision for an existing an API in API Management context.
Examples
Example 1: Create an API Revision for an API
PS C:\>$ApiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>New-AzureRmApiManagementApiRevision -Context $ApiMgmtContext -ApiId 5adf6fbf0faadf3ad8558065 -ApiRevision 6
ApiId : 5adf6fbf0faadf3ad8558065;rev=6
Name : httpbin.org
Description : API Management facade for a very handy and free online HTTP tool.
ServiceUrl : https://httpbin.org/
Path : httpbin
ApiType : http
Protocols : {Http, Https}
AuthorizationServerId : contoso-oauth
AuthorizationScope : contoso-oauth
SubscriptionKeyHeaderName : Ocp-Apim-Subscription-Key
SubscriptionKeyQueryParamName : subscription-key
ApiRevision : 6
ApiVersion : v1
IsCurrent : False
IsOnline : False
Id : /subscriptions/subid/resourceGroups/Api-Default-WestUS/providers/Microsoft.ApiManagement/service/contoso/apis/5adf6fbf0faadf3ad8558065;rev=6
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso
This command creates an API Revision 2
of the echo-api
API.
Parameters
-ApiId
Identifier for API whose Revision is to be created.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ApiRevision
Revision Identifier of the Api.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Context
Instance of PsApiManagementContext. This parameter is required.
Type: | PsApiManagementContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Parameters: Context (ByValue)