ProductPolicy

class ProductPolicy : KotlinCustomResource

Manages an API Management Product Policy

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.apimanagement.ApimanagementFunctions;
import com.pulumi.azure.apimanagement.inputs.GetProductArgs;
import com.pulumi.azure.apimanagement.ProductPolicy;
import com.pulumi.azure.apimanagement.ProductPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleProduct = ApimanagementFunctions.getProduct(GetProductArgs.builder()
.productId("my-product")
.apiManagementName("example-apim")
.resourceGroupName("search-service")
.build());
var exampleProductPolicy = new ProductPolicy("exampleProductPolicy", ProductPolicyArgs.builder()
.productId(exampleProduct.applyValue(getProductResult -> getProductResult.productId()))
.apiManagementName(exampleProduct.applyValue(getProductResult -> getProductResult.apiManagementName()))
.resourceGroupName(exampleProduct.applyValue(getProductResult -> getProductResult.resourceGroupName()))
.xmlContent("""
<policies>
<inbound>
<find-and-replace from="xyz" to="abc" />
</inbound>
</policies>
""")
.build());
}
}

Import

API Management Product Policy can be imported using the resource id, e.g.

$ pulumi import azure:apimanagement/productPolicy:ProductPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/products/product1

Properties

Link copied to clipboard

The name of the API Management Service. Changing this forces a new resource to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val productId: Output<String>

The ID of the API Management Product within the API Management Service. Changing this forces a new resource to be created.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val xmlContent: Output<String>

The XML Content for this Policy.

Link copied to clipboard
val xmlLink: Output<String>?

A link to a Policy XML Document, which must be publicly available.