Add-AzureRmApiManagementApiToProduct

Adds an API to a product.

Syntax

Add-AzureRmApiManagementApiToProduct
   -Context <PsApiManagementContext>
   -ProductId <String>
   -ApiId <String>
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Add-AzureRmApiManagementApiToProduct cmdlet adds an Azure API Management API to a product.

Examples

Example 1: Add an API to a product

PS C:\>$ApiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Add-AzureRmApiManagementApiToProduct -Context $ApiMgmtContext -ProductId "0123456789" -ApiId "0001"

This command adds the specified API to the specified product.

Required Parameters

-ApiId

Specifies the ID of an API to add to a product.

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

Specifies a PsApiManagementContext object.

Type:Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementContext
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ProductId

Specifies the ID of the product to which to add the API.

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

Optional Parameters

-DefaultProfile

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

passthru

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

Boolean