ApiOperation

class ApiOperation : KotlinCustomResource

Manages an API Operation within an API Management Service.

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.GetApiArgs;
import com.pulumi.azure.apimanagement.ApiOperation;
import com.pulumi.azure.apimanagement.ApiOperationArgs;
import com.pulumi.azure.apimanagement.inputs.ApiOperationResponseArgs;
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 exampleApi = ApimanagementFunctions.getApi(GetApiArgs.builder()
.name("search-api")
.apiManagementName("search-api-management")
.resourceGroupName("search-service")
.revision("2")
.build());
var exampleApiOperation = new ApiOperation("exampleApiOperation", ApiOperationArgs.builder()
.operationId("user-delete")
.apiName(exampleApi.applyValue(getApiResult -> getApiResult.name()))
.apiManagementName(exampleApi.applyValue(getApiResult -> getApiResult.apiManagementName()))
.resourceGroupName(exampleApi.applyValue(getApiResult -> getApiResult.resourceGroupName()))
.displayName("Delete User Operation")
.method("DELETE")
.urlTemplate("/users/{id}/delete")
.description("This can only be done by the logged in user.")
.responses(ApiOperationResponseArgs.builder()
.statusCode(200)
.build())
.build());
}
}

Import

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

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

Properties

Link copied to clipboard

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

Link copied to clipboard
val apiName: Output<String>

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

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

A description for this API Operation, which may include HTML formatting tags.

Link copied to clipboard
val displayName: Output<String>

The Display Name for this API Management Operation.

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

The HTTP Method used for this API Management Operation, like GET, DELETE, PUT or POST - but not limited to these values.

Link copied to clipboard
val operationId: Output<String>

A unique identifier for this API Operation. 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

A request block as defined below.

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

One or more response blocks as defined below.

Link copied to clipboard

One or more template_parameter blocks as defined below.

Link copied to clipboard
val urlTemplate: Output<String>

The relative URL Template identifying the target resource for this operation, which may include parameters.

Link copied to clipboard
val urn: Output<String>