![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.apimanagement.kotlin.GlobalSchemaArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.apimanagement.kotlin
import com.pulumi.azure.apimanagement.GlobalSchemaArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages a Global 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 = new azure.core.ResourceGroup("example", {
* name: "example-rg",
* location: "West Europe",
* });
* const exampleService = new azure.apimanagement.Service("example", {
* name: "example-apim",
* location: example.location,
* resourceGroupName: example.name,
* publisherName: "pub1",
* publisherEmail: "[email protected]",
* skuName: "Consumption_0",
* });
* const exampleGlobalSchema = new azure.apimanagement.GlobalSchema("example", {
* schemaId: "example-schema1",
* apiManagementName: exampleService.name,
* resourceGroupName: example.name,
* type: "xml",
* value: std.file({
* input: "api_management_api_schema.xml",
* }).then(invoke => invoke.result),
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* import pulumi_std as std
* example = azure.core.ResourceGroup("example",
* name="example-rg",
* location="West Europe")
* example_service = azure.apimanagement.Service("example",
* name="example-apim",
* location=example.location,
* resource_group_name=example.name,
* publisher_name="pub1",
* publisher_email="[email protected]",
* sku_name="Consumption_0")
* example_global_schema = azure.apimanagement.GlobalSchema("example",
* schema_id="example-schema1",
* api_management_name=example_service.name,
* resource_group_name=example.name,
* type="xml",
* value=std.file(input="api_management_api_schema.xml").result)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* using Std = Pulumi.Std;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-rg",
* Location = "West Europe",
* });
* var exampleService = new Azure.ApiManagement.Service("example", new()
* {
* Name = "example-apim",
* Location = example.Location,
* ResourceGroupName = example.Name,
* PublisherName = "pub1",
* PublisherEmail = "[email protected]",
* SkuName = "Consumption_0",
* });
* var exampleGlobalSchema = new Azure.ApiManagement.GlobalSchema("example", new()
* {
* SchemaId = "example-schema1",
* ApiManagementName = exampleService.Name,
* ResourceGroupName = example.Name,
* Type = "xml",
* Value = Std.File.Invoke(new()
* {
* Input = "api_management_api_schema.xml",
* }).Apply(invoke => invoke.Result),
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-std/sdk/go/std"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-rg"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleService, err := apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
* Name: pulumi.String("example-apim"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* PublisherName: pulumi.String("pub1"),
* PublisherEmail: pulumi.String("[email protected]"),
* SkuName: pulumi.String("Consumption_0"),
* })
* if err != nil {
* return err
* }
* invokeFile, err := std.File(ctx, &std.FileArgs{
* Input: "api_management_api_schema.xml",
* }, nil)
* if err != nil {
* return err
* }
* _, err = apimanagement.NewGlobalSchema(ctx, "example", &apimanagement.GlobalSchemaArgs{
* SchemaId: pulumi.String("example-schema1"),
* ApiManagementName: exampleService.Name,
* ResourceGroupName: example.Name,
* Type: pulumi.String("xml"),
* Value: pulumi.String(invokeFile.Result),
* })
* 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.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.GlobalSchema;
* import com.pulumi.azure.apimanagement.GlobalSchemaArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-rg")
* .location("West Europe")
* .build());
* var exampleService = new Service("exampleService", ServiceArgs.builder()
* .name("example-apim")
* .location(example.location())
* .resourceGroupName(example.name())
* .publisherName("pub1")
* .publisherEmail("[email protected]")
* .skuName("Consumption_0")
* .build());
* var exampleGlobalSchema = new GlobalSchema("exampleGlobalSchema", GlobalSchemaArgs.builder()
* .schemaId("example-schema1")
* .apiManagementName(exampleService.name())
* .resourceGroupName(example.name())
* .type("xml")
* .value(StdFunctions.file(FileArgs.builder()
* .input("api_management_api_schema.xml")
* .build()).result())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-rg
* location: West Europe
* exampleService:
* type: azure:apimanagement:Service
* name: example
* properties:
* name: example-apim
* location: ${example.location}
* resourceGroupName: ${example.name}
* publisherName: pub1
* publisherEmail: [email protected]
* skuName: Consumption_0
* exampleGlobalSchema:
* type: azure:apimanagement:GlobalSchema
* name: example
* properties:
* schemaId: example-schema1
* apiManagementName: ${exampleService.name}
* resourceGroupName: ${example.name}
* type: xml
* value:
* fn::invoke:
* Function: std:file
* Arguments:
* input: api_management_api_schema.xml
* Return: result
* ```
*
* ## Import
* API Management API Schema's can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:apimanagement/globalSchema:GlobalSchema example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/schemas/schema1
* ```
* @property apiManagementName The Name of the API Management Service where the API exists. Changing this forces a new resource to be created.
* @property description The description of the schema.
* @property resourceGroupName The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
* @property schemaId A unique identifier for this Schema. Changing this forces a new resource to be created.
* @property type The content type of the Schema. Possible values are `xml` and `json`.
* @property value The string defining the document representing the Schema.
*/
public data class GlobalSchemaArgs(
public val apiManagementName: Output? = null,
public val description: Output? = null,
public val resourceGroupName: Output? = null,
public val schemaId: Output? = null,
public val type: Output? = null,
public val `value`: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.apimanagement.GlobalSchemaArgs =
com.pulumi.azure.apimanagement.GlobalSchemaArgs.builder()
.apiManagementName(apiManagementName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.schemaId(schemaId?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 }))
.`value`(`value`?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [GlobalSchemaArgs].
*/
@PulumiTagMarker
public class GlobalSchemaArgsBuilder internal constructor() {
private var apiManagementName: Output? = null
private var description: Output? = null
private var resourceGroupName: Output? = null
private var schemaId: Output? = null
private var type: Output? = null
private var `value`: Output? = null
/**
* @param value The Name of the API Management Service where the API exists. Changing this forces a new resource to be created.
*/
@JvmName("spyovfbddoiqcejx")
public suspend fun apiManagementName(`value`: Output) {
this.apiManagementName = value
}
/**
* @param value The description of the schema.
*/
@JvmName("cwodwqmoriihqefu")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
*/
@JvmName("wyunwfbniobwwldf")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A unique identifier for this Schema. Changing this forces a new resource to be created.
*/
@JvmName("xlwvlxeapymhesfj")
public suspend fun schemaId(`value`: Output) {
this.schemaId = value
}
/**
* @param value The content type of the Schema. Possible values are `xml` and `json`.
*/
@JvmName("icuvshjjfleaxetr")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value The string defining the document representing the Schema.
*/
@JvmName("ybosjdsyldmveadb")
public suspend fun `value`(`value`: Output) {
this.`value` = value
}
/**
* @param value The Name of the API Management Service where the API exists. Changing this forces a new resource to be created.
*/
@JvmName("tkyyrvarfxhpoohy")
public suspend fun apiManagementName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiManagementName = mapped
}
/**
* @param value The description of the schema.
*/
@JvmName("wutdwlektbgtamas")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The Name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.
*/
@JvmName("fdvicmtceisqxawk")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value A unique identifier for this Schema. Changing this forces a new resource to be created.
*/
@JvmName("kgsoowsstpsrmcmg")
public suspend fun schemaId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.schemaId = mapped
}
/**
* @param value The content type of the Schema. Possible values are `xml` and `json`.
*/
@JvmName("bjbptccounjxuxrd")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
/**
* @param value The string defining the document representing the Schema.
*/
@JvmName("luttolbnwelkyluk")
public suspend fun `value`(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.`value` = mapped
}
internal fun build(): GlobalSchemaArgs = GlobalSchemaArgs(
apiManagementName = apiManagementName,
description = description,
resourceGroupName = resourceGroupName,
schemaId = schemaId,
type = type,
`value` = `value`,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy