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

com.pulumi.azure.datafactory.kotlin.IntegrationRuntimeManaged.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.datafactory.kotlin

import com.pulumi.azure.datafactory.kotlin.outputs.IntegrationRuntimeManagedCatalogInfo
import com.pulumi.azure.datafactory.kotlin.outputs.IntegrationRuntimeManagedCustomSetupScript
import com.pulumi.azure.datafactory.kotlin.outputs.IntegrationRuntimeManagedVnetIntegration
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.datafactory.kotlin.outputs.IntegrationRuntimeManagedCatalogInfo.Companion.toKotlin as integrationRuntimeManagedCatalogInfoToKotlin
import com.pulumi.azure.datafactory.kotlin.outputs.IntegrationRuntimeManagedCustomSetupScript.Companion.toKotlin as integrationRuntimeManagedCustomSetupScriptToKotlin
import com.pulumi.azure.datafactory.kotlin.outputs.IntegrationRuntimeManagedVnetIntegration.Companion.toKotlin as integrationRuntimeManagedVnetIntegrationToKotlin

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

    public var args: IntegrationRuntimeManagedArgs = IntegrationRuntimeManagedArgs()

    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 IntegrationRuntimeManagedArgsBuilder.() -> Unit) {
        val builder = IntegrationRuntimeManagedArgsBuilder()
        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(): IntegrationRuntimeManaged {
        val builtJavaResource =
            com.pulumi.azure.datafactory.IntegrationRuntimeManaged(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return IntegrationRuntimeManaged(builtJavaResource)
    }
}

/**
 * Manages an Azure Data Factory Managed Integration Runtime.
 * > **NOTE:** The `azure.datafactory.IntegrationRuntimeManaged` resource has been superseded by the `azure.datafactory.IntegrationRuntimeSsis` resource. We recommend using the `azure.datafactory.IntegrationRuntimeSsis` resource for new deployments.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleFactory = new azure.datafactory.Factory("example", {
 *     name: "example",
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleIntegrationRuntimeManaged = new azure.datafactory.IntegrationRuntimeManaged("example", {
 *     name: "example",
 *     dataFactoryId: exampleFactory.id,
 *     location: example.location,
 *     nodeSize: "Standard_D8_v3",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_factory = azure.datafactory.Factory("example",
 *     name="example",
 *     location=example.location,
 *     resource_group_name=example.name)
 * example_integration_runtime_managed = azure.datafactory.IntegrationRuntimeManaged("example",
 *     name="example",
 *     data_factory_id=example_factory.id,
 *     location=example.location,
 *     node_size="Standard_D8_v3")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleFactory = new Azure.DataFactory.Factory("example", new()
 *     {
 *         Name = "example",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 *     var exampleIntegrationRuntimeManaged = new Azure.DataFactory.IntegrationRuntimeManaged("example", new()
 *     {
 *         Name = "example",
 *         DataFactoryId = exampleFactory.Id,
 *         Location = example.Location,
 *         NodeSize = "Standard_D8_v3",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/datafactory"
 * 	"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
 * 		}
 * 		exampleFactory, err := datafactory.NewFactory(ctx, "example", &datafactory.FactoryArgs{
 * 			Name:              pulumi.String("example"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = datafactory.NewIntegrationRuntimeManaged(ctx, "example", &datafactory.IntegrationRuntimeManagedArgs{
 * 			Name:          pulumi.String("example"),
 * 			DataFactoryId: exampleFactory.ID(),
 * 			Location:      example.Location,
 * 			NodeSize:      pulumi.String("Standard_D8_v3"),
 * 		})
 * 		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.datafactory.Factory;
 * import com.pulumi.azure.datafactory.FactoryArgs;
 * import com.pulumi.azure.datafactory.IntegrationRuntimeManaged;
 * import com.pulumi.azure.datafactory.IntegrationRuntimeManagedArgs;
 * 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 exampleFactory = new Factory("exampleFactory", FactoryArgs.builder()
 *             .name("example")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 *         var exampleIntegrationRuntimeManaged = new IntegrationRuntimeManaged("exampleIntegrationRuntimeManaged", IntegrationRuntimeManagedArgs.builder()
 *             .name("example")
 *             .dataFactoryId(exampleFactory.id())
 *             .location(example.location())
 *             .nodeSize("Standard_D8_v3")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleFactory:
 *     type: azure:datafactory:Factory
 *     name: example
 *     properties:
 *       name: example
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *   exampleIntegrationRuntimeManaged:
 *     type: azure:datafactory:IntegrationRuntimeManaged
 *     name: example
 *     properties:
 *       name: example
 *       dataFactoryId: ${exampleFactory.id}
 *       location: ${example.location}
 *       nodeSize: Standard_D8_v3
 * ```
 * 
 * ## Import
 * Data Factory Integration Managed Runtimes can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:datafactory/integrationRuntimeManaged:IntegrationRuntimeManaged example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/integrationruntimes/example
 * ```
 */
public class IntegrationRuntimeManaged internal constructor(
    override val javaResource: com.pulumi.azure.datafactory.IntegrationRuntimeManaged,
) : KotlinCustomResource(javaResource, IntegrationRuntimeManagedMapper) {
    /**
     * A `catalog_info` block as defined below.
     */
    public val catalogInfo: Output?
        get() = javaResource.catalogInfo().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    integrationRuntimeManagedCatalogInfoToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The name of the credential to use for the Managed Integration Runtime.
     */
    public val credentialName: Output?
        get() = javaResource.credentialName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A `custom_setup_script` block as defined below.
     */
    public val customSetupScript: Output?
        get() = javaResource.customSetupScript().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    integrationRuntimeManagedCustomSetupScriptToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.
     */
    public val dataFactoryId: Output
        get() = javaResource.dataFactoryId().applyValue({ args0 -> args0 })

    /**
     * Integration runtime description.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Managed Integration Runtime edition. Valid values are `Standard` and `Enterprise`. Defaults to `Standard`.
     */
    public val edition: Output?
        get() = javaResource.edition().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The type of the license that is used. Valid values are `LicenseIncluded` and `BasePrice`. Defaults to `LicenseIncluded`.
     */
    public val licenseType: Output?
        get() = javaResource.licenseType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * Defines the maximum parallel executions per node. Defaults to `1`. Max is `1`.
     */
    public val maxParallelExecutionsPerNode: Output?
        get() = javaResource.maxParallelExecutionsPerNode().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies the name of the Managed Integration Runtime. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The size of the nodes on which the Managed Integration Runtime runs. Valid values are: `Standard_D2_v3`, `Standard_D4_v3`, `Standard_D8_v3`, `Standard_D16_v3`, `Standard_D32_v3`, `Standard_D64_v3`, `Standard_E2_v3`, `Standard_E4_v3`, `Standard_E8_v3`, `Standard_E16_v3`, `Standard_E32_v3`, `Standard_E64_v3`, `Standard_D1_v2`, `Standard_D2_v2`, `Standard_D3_v2`, `Standard_D4_v2`, `Standard_A4_v2` and `Standard_A8_v2`
     */
    public val nodeSize: Output
        get() = javaResource.nodeSize().applyValue({ args0 -> args0 })

    /**
     * Number of nodes for the Managed Integration Runtime. Max is `10`. Defaults to `1`.
     */
    public val numberOfNodes: Output?
        get() = javaResource.numberOfNodes().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A `vnet_integration` block as defined below.
     */
    public val vnetIntegration: Output?
        get() = javaResource.vnetIntegration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    integrationRuntimeManagedVnetIntegrationToKotlin(args0)
                })
            }).orElse(null)
        })
}

public object IntegrationRuntimeManagedMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.datafactory.IntegrationRuntimeManaged::class == javaResource::class

    override fun map(javaResource: Resource): IntegrationRuntimeManaged =
        IntegrationRuntimeManaged(
            javaResource as
                com.pulumi.azure.datafactory.IntegrationRuntimeManaged,
        )
}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy