az apim product

Manage Azure API Management Product's.

Commands

Name Description Type Status
az apim product api

Manage Azure API Management Product's APIs.

Core GA
az apim product api add

Add an API to the specified product.

Core GA
az apim product api check

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

Core GA
az apim product api delete

Deletes the specified API from the specified product.

Core GA
az apim product api list

Lists a collection of the APIs associated with a product.

Core GA
az apim product create

Creates a product.

Core GA
az apim product delete

Delete product.

Core GA
az apim product list

Lists a collection of products in the specified service instance.

Core GA
az apim product show

Gets the details of the product specified by its identifier.

Core GA
az apim product update

Update existing product details.

Core GA
az apim product wait

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

Core GA

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 use 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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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 use 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 <indexToRemove> OR --remove propertyToRemove.

Default value: []
--set

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

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.