az apim api schema

Manage Azure API Management API Schema's.

Commands

az apim api schema create

Create an API Management API Schema.

az apim api schema delete

Delete an API Management API Schema.

az apim api schema get-etag

Get etag of an API Management API schema.

az apim api schema list

List API Management API schema's.

az apim api schema show

Show details of an API Management API Schema.

az apim api schema wait

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

az apim api schema create

Create an API Management API Schema.

az apim api schema create --api-id
                          --resource-group
                          --schema-id
                          --schema-type
                          --service-name
                          [--no-wait]
                          [--resource-type]
                          [--schema-content]
                          [--schema-name]
                          [--schema-path]

Examples

Create a API Schema.

az apim api schema create --service-name MyApim -g MyResourceGroup --api-id MyApi --schema-id schemaId --schema-type schemaType --schema-path schemaFilePath

Required Parameters

--api-id

Unique name of the api for which schema needs to be created.

--resource-group -g

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

--schema-id

Unique name of the api schema to be created.

--schema-type

Schema type (e.g. application/json, application/vnd.ms-azure-apim.graphql.schema).

--service-name -n

The name of the API Management service instance.

Optional Parameters

--no-wait

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

default value: False
--resource-type

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

--schema-content

Json escaped string defining the document representing the Schema.

--schema-name

The name of the schema resource.

--schema-path

File path specified to import schema of the API.

az apim api schema delete

Delete an API Management API Schema.

az apim api schema delete --api-id
                          --resource-group
                          --schema-id
                          --service-name
                          [--if-match]
                          [--no-wait]
                          [--yes]

Examples

delete a API Schema.

az apim api schema delete --service-name MyApim -g MyResourceGroup --api-id MyApi --schema-id schemaId

Required Parameters

--api-id

API identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--resource-group -g

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

--schema-id

Schema identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--service-name -n

The name of the API Management service instance.

Optional Parameters

--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 api schema get-etag

Get etag of an API Management API schema.

az apim api schema get-etag --api-id
                            --resource-group
                            --schema-id
                            --service-name

Examples

get a schema entity tag.

az apim api schema get-etag --service-name MyApim -g MyResourceGroup --api-id MyApi --schema-id schemaId

Required Parameters

--api-id

API identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--resource-group -g

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

--schema-id

Schema identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--service-name -n

The name of the API Management service instance.

az apim api schema list

List API Management API schema's.

az apim api schema list --api-id
                        --resource-group
                        --service-name
                        [--filter-display-name]
                        [--skip]
                        [--top]

Examples

Get list of schema's associated with an api id.

az apim api schema list --service-name MyApim -g MyResourceGroup --api-id MyApi

Required Parameters

--api-id

API identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

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

--filter-display-name

Filter of APIs by displayName.

--skip

Number of records to skip.

--top

Number of records to return.

az apim api schema show

Show details of an API Management API Schema.

az apim api schema show --api-id
                        --resource-group
                        --schema-id
                        --service-name

Examples

Get a API Schema.

az apim api schema show --service-name MyApim -g MyResourceGroup --api-id MyApi --schema-id schemaId

Required Parameters

--api-id

API identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--resource-group -g

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

--schema-id

Schema identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--service-name -n

The name of the API Management service instance.

az apim api schema wait

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

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

Examples

Place the CLI in a waiting state until a condition of a apim api schema is met.

az apim api schema wait --created --api-id MyApi --name MyApim --schema-id schemaId -g MyResourceGroup

Required Parameters

--api-id

API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

--name -n

The name of the api management service instance.

--resource-group -g

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

--schema-id

Schema id identifier. Must be unique in the current 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