New-​Azure​Rm​Api​Management​Product

Creates an API Management product.

Syntax

New-AzureRmApiManagementProduct
   -Context <PsApiManagementContext>
   [-ProductId <String>]
   -Title <String>
   [-Description <String>]
   [-LegalTerms <String>]
   [-SubscriptionRequired <Boolean>]
   [-ApprovalRequired <Boolean>]
   [-SubscriptionsLimit <Int32>]
   [-State <PsApiManagementProductState>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

The New-AzureRmApiManagementProduct cmdlet creates an API Management product.

Examples

Example 1: Create a product that does not require a subscription

PS C:\>New-AzureRmApiManagementProduct -Context $APImContext -ProductId "0123456789" -Title "Starter" -Description "Starter Product" -LegalTerms "Free for all" -SubscriptionRequired $False -State "Published"

This command creates an API Management product. No subscription is required.

Example 2: Create a product that requires a subscription and approval

PS C:\>New-AzureRmApiManagementProduct -Context $APImContext -ProductId "9876543210" -Title "Unlimited" -Description "Subscribers have completely unlimited access to the API. Administrator approval is required." -LegalTerms "Free for all" -ApprovalRequired $True -State "Published" -NotificationPeriod "D10" -SubscriptionPeriod "Y1"

This command creates a product. A subscription and approval are required. This command sets the notification period to 10 days. The subscription duration is set to one year.

Required Parameters

-Context

Specifies an instance of a PsApiManagementContext object.

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

Specifies the product title.

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

Optional Parameters

-ApprovalRequired

Indicates whether the subscription to the product requires approval or not. By default, this parameter is $False.

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

Specifies the product description.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-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
-LegalTerms

Specifies the legal terms of use of the product.

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

Specifies the identifier of new product. If you do not specify this parameter, a new product is generated.

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

Specifies the product state. The acceptable values for this parameter are:- NotPublished

  • Published

    The default value is NotPublished.
Type:PsApiManagementProductState
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SubscriptionRequired

Indicates whether the product requires a subscription. The default value is $True.

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

Specifies the maximum number of simultaneous subscriptions. The default value is 1.

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

Outputs

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProduct