ApiOperationPolicyArgs

data class ApiOperationPolicyArgs(val apiManagementName: Output<String>? = null, val apiName: Output<String>? = null, val operationId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val xmlContent: Output<String>? = null, val xmlLink: Output<String>? = null) : ConvertibleToJava<ApiOperationPolicyArgs>

Manages an API Management API Operation Policy

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.apimanagement.Service;
import com.pulumi.azure.apimanagement.ServiceArgs;
import com.pulumi.azure.apimanagement.Api;
import com.pulumi.azure.apimanagement.ApiArgs;
import com.pulumi.azure.apimanagement.ApiOperation;
import com.pulumi.azure.apimanagement.ApiOperationArgs;
import com.pulumi.azure.apimanagement.ApiOperationPolicy;
import com.pulumi.azure.apimanagement.ApiOperationPolicyArgs;
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) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.publisherName("My Company")
.publisherEmail("company@terraform.io")
.skuName("Developer_1")
.build());
var exampleApi = new Api("exampleApi", ApiArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.apiManagementName(exampleService.name())
.revision("1")
.build());
var exampleApiOperation = new ApiOperation("exampleApiOperation", ApiOperationArgs.builder()
.operationId("acctest-operation")
.apiName(exampleApi.name())
.apiManagementName(exampleService.name())
.resourceGroupName(exampleResourceGroup.name())
.displayName("DELETE Resource")
.method("DELETE")
.urlTemplate("/resource")
.build());
var exampleApiOperationPolicy = new ApiOperationPolicy("exampleApiOperationPolicy", ApiOperationPolicyArgs.builder()
.apiName(exampleApiOperation.apiName())
.apiManagementName(exampleApiOperation.apiManagementName())
.resourceGroupName(exampleApiOperation.resourceGroupName())
.operationId(exampleApiOperation.operationId())
.xmlContent("""
<policies>
<inbound>
<find-and-replace from="xyz" to="abc" />
</inbound>
</policies>
""")
.build());
}
}

Import

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

$ pulumi import azure:apimanagement/apiOperationPolicy:ApiOperationPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/operations/operation1

Constructors

Link copied to clipboard
fun ApiOperationPolicyArgs(apiManagementName: Output<String>? = null, apiName: Output<String>? = null, operationId: Output<String>? = null, resourceGroupName: Output<String>? = null, xmlContent: Output<String>? = null, xmlLink: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ApiOperationPolicyArgs

Properties

Link copied to clipboard
val apiManagementName: Output<String>? = null

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

Link copied to clipboard
val apiName: Output<String>? = null

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

Link copied to clipboard
val operationId: Output<String>? = null

The operation identifier within an API. Must be unique in the current API Management service instance. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

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 xmlContent: Output<String>? = null

The XML Content for this Policy.

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

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