Azure API Management API Schema

This page shows how to write Terraform and Azure Resource Manager for API Management API Schema and write them securely.

azurerm_api_management_api_schema (Terraform)

The API Schema in API Management can be configured in Terraform with the resource name azurerm_api_management_api_schema. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L1
resource "azurerm_api_management_api_schema" "api_schema" {
  count               = length(var.api_schema)
  api_management_name = element(var.api_management_name, lookup(var.api_schema[count.index], "api_management_id"))
  api_name            = element(var.api_name, lookup(var.api_schema[count.index], "api_management_id"))
  content_type        = lookup(var.api_schema[count.index], "content_type")
  resource_group_name = var.resource_group_name
main.tf#L7
resource "azurerm_api_management_api_schema" "this" {
  api_management_name = var.api_management_name
  api_name            = var.api_name
  content_type        = var.content_type
  resource_group_name = var.resource_group_name
  schema_id           = var.schema_id

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages an API Schema within an API Management Service.

Microsoft.ApiManagement/service/schemas (Azure Resource Manager)

The service/schemas in Microsoft.ApiManagement can be configured in Azure Resource Manager with the resource name Microsoft.ApiManagement/service/schemas. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • apiVersion required - string
  • name required - string

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

  • properties required
      • description optional - string

        Free-form schema entity description.

      • document optional - object

        Global Schema Document Properties.

      • schemaType required - string

        Schema Type. Immutable.

      • value optional - object

        Json-encoded string for non json-based schema.

  • type required - string

Frequently asked questions

What is Azure API Management API Schema?

Azure API Management API Schema is a resource for API Management of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure API Management API Schema?

For Terraform, the mikamakusa/terraform and kevinhead/azurerm source code examples are useful. See the Terraform Example section for further details.