az apim product

Manage Azure API Management Product's.

Commands

az apim product api

Manage Azure API Management Product's APIs.

az apim product api add

Add an API to the specified product.

az apim product api check

Checks that API entity specified by identifier is associated with the Product entity.

az apim product api delete

Deletes the specified API from the specified product.

az apim product api list

Lists a collection of the APIs associated with a product.

az apim product create

Creates a product.

az apim product delete

Delete product.

az apim product list

Lists a collection of products in the specified service instance.

az apim product show

Gets the details of the product specified by its identifier.

az apim product update

Update existing product details.

az apim product create

Creates a product.

az apim product create --product-name
                       --resource-group
                       --service-name
                       [--approval-required]
                       [--description]
                       [--legal-terms]
                       [--no-wait]
                       [--product-id]
                       [--state {notPublished, published}]
                       [--subscription]
                       [--subscription-required]
                       [--subscriptions-limit]

Examples

Creates a product.

az apim product create --resource-group MyResourceGroup  --service-name MyServiceName --product-id MyProductID --product-name MyProductName --description MyDescription --legal-terms MyTerms --subscription-required true --approval-required true --subscriptions-limit 8 --state "published"

Required Parameters

--product-name

Product name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the api management service instance.

Optional Parameters

--approval-required

Whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.

--description

Product description. May include HTML formatting tags.

--legal-terms

Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.

--no-wait

Do not wait for the long-running operation to finish.

--product-id

Product identifier. Must be unique in the current API Management service instance.

--state

Whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.

accepted values: notPublished, published
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--subscription-required -s

Whether a product subscription is required for accessing APIs included in this product.

--subscriptions-limit

Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.

az apim product delete

Delete product.

az apim product delete --product-id
                       --resource-group
                       --service-name
                       [--delete-subscriptions]
                       [--if-match]
                       [--no-wait]
                       [--subscription]
                       [--yes]

Examples

Delete product with all subscriptions to this product.

az apim product delete --resource-group MyResourceGroup  --service-name MyServiceName --product-id MyProductID --delete-subscriptions true

Required Parameters

--product-id

Product identifier. Must be unique in the current API Management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the api management service instance.

Optional Parameters

--delete-subscriptions

Delete existing subscriptions associated with the product or not.

--if-match

ETag of the Entity.

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az apim product list

Lists a collection of products in the specified service instance.

az apim product list --resource-group
                     --service-name
                     [--query-examples]
                     [--subscription]

Examples

List all products for this APIM instance.

az apim product list --resource-group MyResourceGroup --service-name MyServiceName

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the api management service instance.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az apim product show

Gets the details of the product specified by its identifier.

az apim product show --product-id
                     --resource-group
                     --service-name
                     [--query-examples]
                     [--subscription]

Examples

Gets the details of the product specified by its identifier.

az apim product show --resource-group MyResourceGroup --service-name MyServiceName  --product-id MyProductID

Required Parameters

--product-id

Product identifier. Must be unique in the current API Management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the api management service instance.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az apim product update

Update existing product details.

az apim product update --product-id
                       --resource-group
                       --service-name
                       [--add]
                       [--approval-required]
                       [--description]
                       [--force-string]
                       [--if-match]
                       [--legal-terms]
                       [--no-wait]
                       [--product-name]
                       [--remove]
                       [--set]
                       [--state {notPublished, published}]
                       [--subscription]
                       [--subscription-required]
                       [--subscriptions-limit]

Examples

Update existing product details.

az apim product update --resource-group MyResourceGroup  --service-name MyServiceName --product-id MyProductID --product-name MyNewProductName --description MyNewDescription --legal-terms MyNewTerms --subscription-required false --state "notPublished"

Required Parameters

--product-id

Product identifier. Must be unique in the current API Management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name -n

The name of the api management service instance.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--approval-required

Whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.

--description

Product description. May include HTML formatting tags.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--if-match

ETag of the Entity.

--legal-terms

Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.

--no-wait

Do not wait for the long-running operation to finish.

--product-name

Product name.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--state

Whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.

accepted values: notPublished, published
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--subscription-required -s

Whether a product subscription is required for accessing APIs included in this product.

--subscriptions-limit

Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.