Skip to content

azurermApiManagementApiTagDescription

Manages an API Tag Description within an API Management Service.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermApiManagementExample = new azurerm.apiManagement.ApiManagement(
  this,
  "example_2",
  {
    location: azurermResourceGroupExample.location,
    name: "example-apim",
    publisher_email: "company@terraform.io",
    publisher_name: "My Company",
    resource_group_name: azurermResourceGroupExample.name,
    sku_name: "Developer_1",
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementExample.overrideLogicalId("example");
const azurermApiManagementApiExample =
  new azurerm.apiManagementApi.ApiManagementApi(this, "example_3", {
    api_management_name: azurermApiManagementExample.name,
    display_name: "Example API",
    import: [
      {
        content_format: "swagger-link-json",
        content_value: "http://conferenceapi.azurewebsites.net/?format=json",
      },
    ],
    name: "example-api",
    path: "example",
    protocols: ["https"],
    resource_group_name: azurermResourceGroupExample.name,
    revision: "1",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementApiExample.overrideLogicalId("example");
const azurermApiManagementTagExample =
  new azurerm.apiManagementTag.ApiManagementTag(this, "example_4", {
    api_management_id: azurermApiManagementExample.id,
    name: "example-Tag",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementTagExample.overrideLogicalId("example");
const azurermApiManagementApiTagDescriptionExample =
  new azurerm.apiManagementApiTagDescription.ApiManagementApiTagDescription(
    this,
    "example_5",
    {
      api_tag_id: azurermApiManagementTagExample.id,
      description: "This is an example description",
      external_docs_description: "This is an example external docs description",
      external_docs_url:
        "https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementApiTagDescriptionExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • apiTagId - (Required) The The ID of the API Management API Tag. Changing this forces a new API Management API Tag Description to be created.

  • description - (Optional) The description of the Tag.

  • externalDocumentationUrl - (Optional) The URL of external documentation resources describing the tag.

  • externalDocumentationDescription - (Optional) The description of the external documentation resources describing the tag.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The ID of the API Management API Schema.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the API Management API Schema.
  • update - (Defaults to 30 minutes) Used when updating the API Management API Schema.
  • read - (Defaults to 5 minutes) Used when retrieving the API Management API Schema.
  • delete - (Defaults to 30 minutes) Used when deleting the API Management API Schema.

Import

API Management API Schema's can be imported using the resourceId, e.g.

terraform import azurerm_api_management_api_tag_description.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/tagDescriptions/tagDescriptionId1