Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.apimanagement.kotlin
import com.pulumi.azurenative.apimanagement.ApiSchemaArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* API Schema Contract details.
* Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.
* Other available API versions: 2019-01-01, 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
* ## Example Usage
* ### ApiManagementCreateApiSchema
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var apiSchema = new AzureNative.ApiManagement.ApiSchema("apiSchema", new()
* {
* ApiId = "59d6bb8f1f7fab13dc67ec9b",
* ContentType = "application/vnd.ms-azure-apim.xsd+xml",
* ResourceGroupName = "rg1",
* SchemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1",
* ServiceName = "apimService1",
* Value = @"
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* ",
* });
* });
* ```
* ```go
* package main
* import (
* apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := apimanagement.NewApiSchema(ctx, "apiSchema", &apimanagement.ApiSchemaArgs{
* ApiId: pulumi.String("59d6bb8f1f7fab13dc67ec9b"),
* ContentType: pulumi.String("application/vnd.ms-azure-apim.xsd+xml"),
* ResourceGroupName: pulumi.String("rg1"),
* SchemaId: pulumi.String("ec12520d-9d48-4e7b-8f39-698ca2ac63f1"),
* ServiceName: pulumi.String("apimService1"),
* Value: pulumi.String(`
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* `),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.apimanagement.ApiSchema;
* import com.pulumi.azurenative.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) {
* var apiSchema = new ApiSchema("apiSchema", ApiSchemaArgs.builder()
* .apiId("59d6bb8f1f7fab13dc67ec9b")
* .contentType("application/vnd.ms-azure-apim.xsd+xml")
* .resourceGroupName("rg1")
* .schemaId("ec12520d-9d48-4e7b-8f39-698ca2ac63f1")
* .serviceName("apimService1")
* .value("""
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* """)
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:apimanagement:ApiSchema ec12520d-9d48-4e7b-8f39-698ca2ac63f1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}
* ```
* @property apiId API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
* @property components Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
* @property contentType Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.
* @property definitions Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property schemaId Schema id identifier. Must be unique in the current API Management service instance.
* @property serviceName The name of the API Management service.
* @property value Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
*/
public data class ApiSchemaArgs(
public val apiId: Output? = null,
public val components: Output? = null,
public val contentType: Output? = null,
public val definitions: Output? = null,
public val resourceGroupName: Output? = null,
public val schemaId: Output? = null,
public val serviceName: Output? = null,
public val `value`: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.apimanagement.ApiSchemaArgs =
com.pulumi.azurenative.apimanagement.ApiSchemaArgs.builder()
.apiId(apiId?.applyValue({ args0 -> args0 }))
.components(components?.applyValue({ args0 -> args0 }))
.contentType(contentType?.applyValue({ args0 -> args0 }))
.definitions(definitions?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.schemaId(schemaId?.applyValue({ args0 -> args0 }))
.serviceName(serviceName?.applyValue({ args0 -> args0 }))
.`value`(`value`?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ApiSchemaArgs].
*/
@PulumiTagMarker
public class ApiSchemaArgsBuilder internal constructor() {
private var apiId: Output? = null
private var components: Output? = null
private var contentType: Output? = null
private var definitions: Output? = null
private var resourceGroupName: Output? = null
private var schemaId: Output? = null
private var serviceName: Output? = null
private var `value`: Output? = null
/**
* @param value API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
*/
@JvmName("fafxhykfrrdqkeea")
public suspend fun apiId(`value`: Output) {
this.apiId = value
}
/**
* @param value Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
*/
@JvmName("wvolmswmenhpviws")
public suspend fun components(`value`: Output) {
this.components = value
}
/**
* @param value Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.
*/
@JvmName("yoacobxrbduebals")
public suspend fun contentType(`value`: Output) {
this.contentType = value
}
/**
* @param value Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
*/
@JvmName("tkskvjhplwkptjom")
public suspend fun definitions(`value`: Output) {
this.definitions = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("xhgvtwsqveelfaho")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Schema id identifier. Must be unique in the current API Management service instance.
*/
@JvmName("jhkvlexrplwjvmcw")
public suspend fun schemaId(`value`: Output) {
this.schemaId = value
}
/**
* @param value The name of the API Management service.
*/
@JvmName("tpanrfyitcedfnej")
public suspend fun serviceName(`value`: Output) {
this.serviceName = value
}
/**
* @param value Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
*/
@JvmName("glosomntvcljtqnt")
public suspend fun `value`(`value`: Output) {
this.`value` = value
}
/**
* @param value API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.
*/
@JvmName("phxnxypuvshafuag")
public suspend fun apiId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiId = mapped
}
/**
* @param value Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
*/
@JvmName("ybnyadfjamobvbey")
public suspend fun components(`value`: Any?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.components = mapped
}
/**
* @param value Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.
*/
@JvmName("irxcshxgpbsirdul")
public suspend fun contentType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.contentType = mapped
}
/**
* @param value Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
*/
@JvmName("egghuedxhiwacubu")
public suspend fun definitions(`value`: Any?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.definitions = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("dtlpqbfsmrlympgj")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Schema id identifier. Must be unique in the current API Management service instance.
*/
@JvmName("cfaublnlkgygvgtu")
public suspend fun schemaId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.schemaId = mapped
}
/**
* @param value The name of the API Management service.
*/
@JvmName("kbrgpsspeikaswxn")
public suspend fun serviceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceName = mapped
}
/**
* @param value Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.
*/
@JvmName("fimbmcxfqscwvxyd")
public suspend fun `value`(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.`value` = mapped
}
internal fun build(): ApiSchemaArgs = ApiSchemaArgs(
apiId = apiId,
components = components,
contentType = contentType,
definitions = definitions,
resourceGroupName = resourceGroupName,
schemaId = schemaId,
serviceName = serviceName,
`value` = `value`,
)
}