Skip to content

azurermApiManagementApiOperationTag

Manages a API Management API Operation Tag.

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.*/
const dataAzurermApiManagementApiExample =
  new azurerm.dataAzurermApiManagementApi.DataAzurermApiManagementApi(
    this,
    "example",
    {
      api_management_name: "search-api-management",
      name: "search-api",
      resource_group_name: "search-service",
      revision: "2",
    }
  );
const azurermApiManagementApiOperationExample =
  new azurerm.apiManagementApiOperation.ApiManagementApiOperation(
    this,
    "example_1",
    {
      api_management_name: dataAzurermApiManagementApiExample.apiManagementName,
      api_name: dataAzurermApiManagementApiExample.name,
      description: "This can only be done by the logged in user.",
      display_name: "Delete User Operation",
      method: "DELETE",
      operation_id: "user-delete",
      resource_group_name: dataAzurermApiManagementApiExample.resourceGroupName,
      response: [
        {
          status_code: 200,
        },
      ],
      url_template: "/users/{id}/delete",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementApiOperationExample.overrideLogicalId("example");
const azurermApiManagementApiOperationTagExample =
  new azurerm.apiManagementApiOperationTag.ApiManagementApiOperationTag(
    this,
    "example_2",
    {
      api_operation_id: azurermApiManagementApiOperationExample.id,
      display_name: "example-Tag",
      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.*/
azurermApiManagementApiOperationTagExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

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

  • name - (Required) The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.


  • displayName - (Required) The display name of the API Management API Operation Tag.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the API Management API Operation Tag.

Timeouts

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

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

Import

API Management API Operation Tags can be imported using the resourceId, e.g.

terraform import azurerm_api_management_api_operation_tag.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/apis/api1/operations/operation1/tags/tag1