Skip to content

azurermApiManagementGatewayApi

Manages a API Management Gateway API.

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 dataAzurermApiManagementExample =
  new azurerm.dataAzurermApiManagement.DataAzurermApiManagement(
    this,
    "example",
    {
      name: "example-api",
      resource_group_name: "example-resources",
    }
  );
const dataAzurermApiManagementApiExample =
  new azurerm.dataAzurermApiManagementApi.DataAzurermApiManagementApi(
    this,
    "example_1",
    {
      api_management_name: dataAzurermApiManagementExample.name,
      name: "search-api",
      resource_group_name: dataAzurermApiManagementExample.resourceGroupName,
      revision: "2",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAzurermApiManagementApiExample.overrideLogicalId("example");
const dataAzurermApiManagementGatewayExample =
  new azurerm.dataAzurermApiManagementGateway.DataAzurermApiManagementGateway(
    this,
    "example_2",
    {
      api_management_id: dataAzurermApiManagementExample.id,
      name: "example-gateway",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAzurermApiManagementGatewayExample.overrideLogicalId("example");
const azurermApiManagementGatewayApiExample =
  new azurerm.apiManagementGatewayApi.ApiManagementGatewayApi(
    this,
    "example_3",
    {
      api_id: dataAzurermApiManagementApiExample.id,
      gateway_id: dataAzurermApiManagementGatewayExample.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementGatewayApiExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • gatewayId - (Required) The Identifier for the API Management Gateway. Changing this forces a new API Management Gateway API to be created.

  • apiId - (Required) The Identifier of the API Management API within the API Management Service. Changing this forces a new API Management Gateway API to be created.

Attributes Reference

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

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

Timeouts

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

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

Import

API Management Gateway APIs can be imported using the resourceId, e.g.

terraform import azurerm_api_management_gateway_api.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.ApiManagement/service/service1/gateways/gateway1/apis/api1