New-AzureRmApiManagementApiRelease
Creates an API Release of an API Revision
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-AzureRmApiManagementApiRelease
-Context <PsApiManagementContext>
-ApiId <String>
-ApiRevision <String>
[-ReleaseId <String>]
[-Note <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzureRmApiManagementApiRelease cmdlet creates an API Release for an API Revision in API Management context.
Examples
Example 1: Create an API Release for an API Revision
PS C:\>$ApiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>New-AzureRmApiManagementApiRelease -Context $context -ApiId 5adf6fbf0faadf3ad8558065 -ApiRevision 6 -Note "Releasing version 6"
ReleaseId : 7e4d3fbb43c146c4bf406499ef9411f4
ApiId : 5adf6fbf0faadf3ad8558065
CreatedDateTime : 5/17/2018 1:16:29 AM
UpdatedDateTime : 5/17/2018 1:16:29 AM
Notes : Releasing version 6
Id : /subscriptions/subid/resourceGroups/Api-Default-WestUS/providers/Mi
crosoft.ApiManagement/service/contoso/apis/5adf6fbf0faadf3ad8558065/releases/7e4d3fbb43c146c4bf40649
9ef9411f4
ResourceGroupName : Api-Default-WestUS
ServiceName : contoso
This command creates an API Release of Revision 2
of the echo-api
.
Parameters
-ApiId
Identifier for new API.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ApiRevision
Identifier for the Api Revision.
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 |
-Note
Api Release Notes. This parameter is optional
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ReleaseId
Identifier for the Api Release. This parameter is optional. If not specified identifier will be generated.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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)