ApiSchemaArgs

data class ApiSchemaArgs(val apiManagementName: Output<String>? = null, val apiName: Output<String>? = null, val components: Output<String>? = null, val contentType: Output<String>? = null, val definitions: Output<String>? = null, val resourceGroupName: Output<String>? = null, val schemaId: Output<String>? = null, val value: Output<String>? = null) : ConvertibleToJava<ApiSchemaArgs>

Manages an API Schema 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.ApiSchema;
import com.pulumi.azure.apimanagement.ApiSchemaArgs;
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 exampleApiSchema = new ApiSchema("exampleApiSchema", ApiSchemaArgs.builder()
.apiName(exampleApi.applyValue(getApiResult -> getApiResult.name()))
.apiManagementName(exampleApi.applyValue(getApiResult -> getApiResult.apiManagementName()))
.resourceGroupName(exampleApi.applyValue(getApiResult -> getApiResult.resourceGroupName()))
.schemaId("example-schema")
.contentType("application/vnd.ms-azure-apim.xsd+xml")
.value(Files.readString(Paths.get("api_management_api_schema.xml")))
.build());
}
}

Import

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

$ pulumi import azure:apimanagement/apiSchema:ApiSchema example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/schemas/schema1

Constructors

Link copied to clipboard
fun ApiSchemaArgs(apiManagementName: Output<String>? = null, apiName: Output<String>? = null, components: Output<String>? = null, contentType: Output<String>? = null, definitions: Output<String>? = null, resourceGroupName: Output<String>? = null, schemaId: Output<String>? = null, value: Output<String>? = null)

Functions

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

Properties

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

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>? = null

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

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

Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only.

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

The content type of the API Schema.

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

Types definitions. Used for Swagger/OpenAPI v1 schemas only.

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

A unique identifier for this API Schema. Changing this forces a new resource to be created.

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

The JSON escaped string defining the document representing the Schema.