import * as pulumi from "@pulumi/pulumi"; /** * Manages an API Schema within an API Management Service. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as std from "@pulumi/std"; * * const example = azure.apimanagement.getApi({ * name: "search-api", * apiManagementName: "search-api-management", * resourceGroupName: "search-service", * revision: "2", * }); * const exampleApiSchema = new azure.apimanagement.ApiSchema("example", { * apiName: example.then(example => example.name), * apiManagementName: example.then(example => example.apiManagementName), * resourceGroupName: example.then(example => example.resourceGroupName), * schemaId: "example-schema", * contentType: "application/vnd.ms-azure-apim.xsd+xml", * value: std.file({ * input: "api_management_api_schema.xml", * }).then(invoke => invoke.result), * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.ApiManagement` - 2022-08-01 * * ## Import * * API Management API Schema's can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:apimanagement/apiSchema:ApiSchema example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/apis/api1/schemas/schema1 * ``` */ export declare class ApiSchema extends pulumi.CustomResource { /** * Get an existing ApiSchema resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ApiSchemaState, opts?: pulumi.CustomResourceOptions): ApiSchema; /** * Returns true if the given object is an instance of ApiSchema. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ApiSchema; /** * The Name of the API Management Service where the API exists. Changing this forces a new resource to be created. */ readonly apiManagementName: pulumi.Output; /** * 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. */ readonly apiName: pulumi.Output; /** * Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only. */ readonly components: pulumi.Output; /** * The content type of the API Schema. */ readonly contentType: pulumi.Output; /** * Types definitions. Used for Swagger/OpenAPI v1 schemas only. */ readonly definitions: pulumi.Output; /** * The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * A unique identifier for this API Schema. Changing this forces a new resource to be created. */ readonly schemaId: pulumi.Output; /** * The JSON escaped string defining the document representing the Schema. */ readonly value: pulumi.Output; /** * Create a ApiSchema resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ApiSchemaArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ApiSchema resources. */ export interface ApiSchemaState { /** * The Name of the API Management Service where the API exists. Changing this forces a new resource to be created. */ apiManagementName?: pulumi.Input; /** * 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. */ apiName?: pulumi.Input; /** * Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only. */ components?: pulumi.Input; /** * The content type of the API Schema. */ contentType?: pulumi.Input; /** * Types definitions. Used for Swagger/OpenAPI v1 schemas only. */ definitions?: pulumi.Input; /** * The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * A unique identifier for this API Schema. Changing this forces a new resource to be created. */ schemaId?: pulumi.Input; /** * The JSON escaped string defining the document representing the Schema. */ value?: pulumi.Input; } /** * The set of arguments for constructing a ApiSchema resource. */ export interface ApiSchemaArgs { /** * The Name of the API Management Service where the API exists. Changing this forces a new resource to be created. */ apiManagementName: pulumi.Input; /** * 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. */ apiName: pulumi.Input; /** * Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only. */ components?: pulumi.Input; /** * The content type of the API Schema. */ contentType: pulumi.Input; /** * Types definitions. Used for Swagger/OpenAPI v1 schemas only. */ definitions?: pulumi.Input; /** * The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * A unique identifier for this API Schema. Changing this forces a new resource to be created. */ schemaId: pulumi.Input; /** * The JSON escaped string defining the document representing the Schema. */ value?: pulumi.Input; }