All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.logicapps.kotlin.IntegrationAccountSchema.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.logicapps.kotlin

import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [IntegrationAccountSchema].
 */
@PulumiTagMarker
public class IntegrationAccountSchemaResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: IntegrationAccountSchemaArgs = IntegrationAccountSchemaArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend IntegrationAccountSchemaArgsBuilder.() -> Unit) {
        val builder = IntegrationAccountSchemaArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): IntegrationAccountSchema {
        val builtJavaResource =
            com.pulumi.azure.logicapps.IntegrationAccountSchema(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return IntegrationAccountSchema(builtJavaResource)
    }
}

/**
 * Manages a Logic App Integration Account Schema.
 * ## 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-resources",
 *     location: "West Europe",
 * });
 * const exampleIntegrationAccount = new azure.logicapps.IntegrationAccount("example", {
 *     name: "example-ia",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "Basic",
 * });
 * const exampleIntegrationAccountSchema = new azure.logicapps.IntegrationAccountSchema("example", {
 *     name: "example-ias",
 *     resourceGroupName: example.name,
 *     integrationAccountName: exampleIntegrationAccount.name,
 *     content: std.file({
 *         input: "testdata/integration_account_schema_content.xsd",
 *     }).then(invoke => invoke.result),
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * import pulumi_std as std
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_integration_account = azure.logicapps.IntegrationAccount("example",
 *     name="example-ia",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku_name="Basic")
 * example_integration_account_schema = azure.logicapps.IntegrationAccountSchema("example",
 *     name="example-ias",
 *     resource_group_name=example.name,
 *     integration_account_name=example_integration_account.name,
 *     content=std.file(input="testdata/integration_account_schema_content.xsd").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-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleIntegrationAccount = new Azure.LogicApps.IntegrationAccount("example", new()
 *     {
 *         Name = "example-ia",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SkuName = "Basic",
 *     });
 *     var exampleIntegrationAccountSchema = new Azure.LogicApps.IntegrationAccountSchema("example", new()
 *     {
 *         Name = "example-ias",
 *         ResourceGroupName = example.Name,
 *         IntegrationAccountName = exampleIntegrationAccount.Name,
 *         Content = Std.File.Invoke(new()
 *         {
 *             Input = "testdata/integration_account_schema_content.xsd",
 *         }).Apply(invoke => invoke.Result),
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/logicapps"
 * 	"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-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleIntegrationAccount, err := logicapps.NewIntegrationAccount(ctx, "example", &logicapps.IntegrationAccountArgs{
 * 			Name:              pulumi.String("example-ia"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			SkuName:           pulumi.String("Basic"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		invokeFile, err := std.File(ctx, &std.FileArgs{
 * 			Input: "testdata/integration_account_schema_content.xsd",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = logicapps.NewIntegrationAccountSchema(ctx, "example", &logicapps.IntegrationAccountSchemaArgs{
 * 			Name:                   pulumi.String("example-ias"),
 * 			ResourceGroupName:      example.Name,
 * 			IntegrationAccountName: exampleIntegrationAccount.Name,
 * 			Content:                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.logicapps.IntegrationAccount;
 * import com.pulumi.azure.logicapps.IntegrationAccountArgs;
 * import com.pulumi.azure.logicapps.IntegrationAccountSchema;
 * import com.pulumi.azure.logicapps.IntegrationAccountSchemaArgs;
 * 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-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleIntegrationAccount = new IntegrationAccount("exampleIntegrationAccount", IntegrationAccountArgs.builder()
 *             .name("example-ia")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("Basic")
 *             .build());
 *         var exampleIntegrationAccountSchema = new IntegrationAccountSchema("exampleIntegrationAccountSchema", IntegrationAccountSchemaArgs.builder()
 *             .name("example-ias")
 *             .resourceGroupName(example.name())
 *             .integrationAccountName(exampleIntegrationAccount.name())
 *             .content(StdFunctions.file(FileArgs.builder()
 *                 .input("testdata/integration_account_schema_content.xsd")
 *                 .build()).result())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleIntegrationAccount:
 *     type: azure:logicapps:IntegrationAccount
 *     name: example
 *     properties:
 *       name: example-ia
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       skuName: Basic
 *   exampleIntegrationAccountSchema:
 *     type: azure:logicapps:IntegrationAccountSchema
 *     name: example
 *     properties:
 *       name: example-ias
 *       resourceGroupName: ${example.name}
 *       integrationAccountName: ${exampleIntegrationAccount.name}
 *       content:
 *         fn::invoke:
 *           Function: std:file
 *           Arguments:
 *             input: testdata/integration_account_schema_content.xsd
 *           Return: result
 * ```
 * 
 * ## Import
 * Logic App Integration Account Schemas can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:logicapps/integrationAccountSchema:IntegrationAccountSchema example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Logic/integrationAccounts/account1/schemas/schema1
 * ```
 */
public class IntegrationAccountSchema internal constructor(
    override val javaResource: com.pulumi.azure.logicapps.IntegrationAccountSchema,
) : KotlinCustomResource(javaResource, IntegrationAccountSchemaMapper) {
    /**
     * The content of the Logic App Integration Account Schema.
     */
    public val content: Output
        get() = javaResource.content().applyValue({ args0 -> args0 })

    /**
     * The file name of the Logic App Integration Account Schema.
     */
    public val fileName: Output?
        get() = javaResource.fileName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The name of the Logic App Integration Account. Changing this forces a new Logic App Integration Account Schema to be created.
     */
    public val integrationAccountName: Output
        get() = javaResource.integrationAccountName().applyValue({ args0 -> args0 })

    /**
     * The metadata of the Logic App Integration Account Schema.
     */
    public val metadata: Output?
        get() = javaResource.metadata().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The name which should be used for this Logic App Integration Account Schema. Changing this forces a new Logic App Integration Account Schema to be created.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The name of the Resource Group where the Logic App Integration Account Schema should exist. Changing this forces a new Logic App Integration Account Schema to be created.
     */
    public val resourceGroupName: Output
        get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
}

public object IntegrationAccountSchemaMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.logicapps.IntegrationAccountSchema::class == javaResource::class

    override fun map(javaResource: Resource): IntegrationAccountSchema =
        IntegrationAccountSchema(javaResource as com.pulumi.azure.logicapps.IntegrationAccountSchema)
}

/**
 * @see [IntegrationAccountSchema].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [IntegrationAccountSchema].
 */
public suspend fun integrationAccountSchema(
    name: String,
    block: suspend IntegrationAccountSchemaResourceBuilder.() -> Unit,
): IntegrationAccountSchema {
    val builder = IntegrationAccountSchemaResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [IntegrationAccountSchema].
 * @param name The _unique_ name of the resulting resource.
 */
public fun integrationAccountSchema(name: String): IntegrationAccountSchema {
    val builder = IntegrationAccountSchemaResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy