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 wait

Place the CLI in a waiting state until a condition of an apim product is met.

az apim product create

Creates a product.

az apim product create --product-name
                       --resource-group
                       --service-name
                       [--approval-required {false, true}]
                       [--description]
                       [--legal-terms]
                       [--no-wait]
                       [--product-id]
                       [--state {notPublished, published}]
                       [--subscription-required {false, true}]
                       [--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.

accepted values: false, true
--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.

default value: False
--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. Possible values include: 'notPublished', 'published'.

accepted values: notPublished, published
--subscription-required -s

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

accepted values: false, true
--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]
                       [--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.

default value: False
--yes -y

Do not prompt for confirmation.

default value: False

az apim product list

Lists a collection of products in the specified service instance.

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

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.

az apim product show

Gets the details of the product specified by its identifier.

az apim product show --product-id
                     --resource-group
                     --service-name

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.

az apim product update

Update existing product details.

az apim product update --product-id
                       --resource-group
                       --service-name
                       [--add]
                       [--approval-required {false, true}]
                       [--description]
                       [--force-string]
                       [--if-match]
                       [--legal-terms]
                       [--no-wait]
                       [--product-name]
                       [--remove]
                       [--set]
                       [--state {notPublished, published}]
                       [--subscription-required {false, true}]
                       [--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>.

default value: []
--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.

accepted values: false, true
--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.

default value: False
--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.

default value: False
--product-name

Product name.

--remove

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

default value: []
--set

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

default value: []
--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. Possible values include: 'notPublished', 'published'.

accepted values: notPublished, published
--subscription-required -s

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

accepted values: false, true
--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 wait

Place the CLI in a waiting state until a condition of an apim product is met.

az apim product wait --product-id
                     --resource-group
                     --service-name
                     [--created]
                     [--custom]
                     [--deleted]
                     [--exists]
                     [--interval]
                     [--timeout]
                     [--updated]

Examples

Place the CLI in a waiting state until a condition of a apim is met. (autogenerated)

az apim product wait --created --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

--created

Wait until created with 'provisioningState' at 'Succeeded'.

default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

default value: False
--exists

Wait until the resource exists.

default value: False
--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

default value: False