azurermApiManagementGlobalSchema
Manages a Global Schema 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-rg",
}
);
const azurermApiManagementExample = new azurerm.apiManagement.ApiManagement(
this,
"example_2",
{
location: azurermResourceGroupExample.location,
name: "example-apim",
publisher_email: "pub1@email.com",
publisher_name: "pub1",
resource_group_name: azurermResourceGroupExample.name,
sku_name: "Consumption_0",
}
);
/*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 azurermApiManagementGlobalSchemaExample =
new azurerm.apiManagementGlobalSchema.ApiManagementGlobalSchema(
this,
"example_3",
{
api_management_name: azurermApiManagementExample.name,
resource_group_name: azurermResourceGroupExample.name,
schema_id: "example-schema1",
type: "xml",
value: '${file("api_management_api_schema.xml")}',
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermApiManagementGlobalSchemaExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
schemaId
- (Required) A unique identifier for this Schema. Changing this forces a new resource to be created. -
apiManagementName
- (Required) The Name of the API Management Service where the API exists. Changing this forces a new resource to be created. -
resourceGroupName
- (Required) The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. -
type
- (Required) The content type of the Schema. Possible values arexml
andjson
. -
value
- (Required) The string defining the document representing the Schema. -
description
- (Optional) The description of the schema.
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.