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

com.pulumi.aws.appintegrations.kotlin.DataIntegration.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.appintegrations.kotlin

import com.pulumi.aws.appintegrations.kotlin.outputs.DataIntegrationScheduleConfig
import com.pulumi.aws.appintegrations.kotlin.outputs.DataIntegrationScheduleConfig.Companion.toKotlin
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map

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

    public var args: DataIntegrationArgs = DataIntegrationArgs()

    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 DataIntegrationArgsBuilder.() -> Unit) {
        val builder = DataIntegrationArgsBuilder()
        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(): DataIntegration {
        val builtJavaResource = com.pulumi.aws.appintegrations.DataIntegration(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return DataIntegration(builtJavaResource)
    }
}

/**
 * Provides an Amazon AppIntegrations Data Integration resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.appintegrations.DataIntegration("example", {
 *     name: "example",
 *     description: "example",
 *     kmsKey: test.arn,
 *     sourceUri: "Salesforce://AppFlow/example",
 *     scheduleConfig: {
 *         firstExecutionFrom: "1439788442681",
 *         object: "Account",
 *         scheduleExpression: "rate(1 hour)",
 *     },
 *     tags: {
 *         Key1: "Value1",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.appintegrations.DataIntegration("example",
 *     name="example",
 *     description="example",
 *     kms_key=test["arn"],
 *     source_uri="Salesforce://AppFlow/example",
 *     schedule_config={
 *         "first_execution_from": "1439788442681",
 *         "object": "Account",
 *         "schedule_expression": "rate(1 hour)",
 *     },
 *     tags={
 *         "Key1": "Value1",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.AppIntegrations.DataIntegration("example", new()
 *     {
 *         Name = "example",
 *         Description = "example",
 *         KmsKey = test.Arn,
 *         SourceUri = "Salesforce://AppFlow/example",
 *         ScheduleConfig = new Aws.AppIntegrations.Inputs.DataIntegrationScheduleConfigArgs
 *         {
 *             FirstExecutionFrom = "1439788442681",
 *             Object = "Account",
 *             ScheduleExpression = "rate(1 hour)",
 *         },
 *         Tags =
 *         {
 *             { "Key1", "Value1" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appintegrations"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := appintegrations.NewDataIntegration(ctx, "example", &appintegrations.DataIntegrationArgs{
 * 			Name:        pulumi.String("example"),
 * 			Description: pulumi.String("example"),
 * 			KmsKey:      pulumi.Any(test.Arn),
 * 			SourceUri:   pulumi.String("Salesforce://AppFlow/example"),
 * 			ScheduleConfig: &appintegrations.DataIntegrationScheduleConfigArgs{
 * 				FirstExecutionFrom: pulumi.String("1439788442681"),
 * 				Object:             pulumi.String("Account"),
 * 				ScheduleExpression: pulumi.String("rate(1 hour)"),
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"Key1": pulumi.String("Value1"),
 * 			},
 * 		})
 * 		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.aws.appintegrations.DataIntegration;
 * import com.pulumi.aws.appintegrations.DataIntegrationArgs;
 * import com.pulumi.aws.appintegrations.inputs.DataIntegrationScheduleConfigArgs;
 * 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 DataIntegration("example", DataIntegrationArgs.builder()
 *             .name("example")
 *             .description("example")
 *             .kmsKey(test.arn())
 *             .sourceUri("Salesforce://AppFlow/example")
 *             .scheduleConfig(DataIntegrationScheduleConfigArgs.builder()
 *                 .firstExecutionFrom("1439788442681")
 *                 .object("Account")
 *                 .scheduleExpression("rate(1 hour)")
 *                 .build())
 *             .tags(Map.of("Key1", "Value1"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:appintegrations:DataIntegration
 *     properties:
 *       name: example
 *       description: example
 *       kmsKey: ${test.arn}
 *       sourceUri: Salesforce://AppFlow/example
 *       scheduleConfig:
 *         firstExecutionFrom: '1439788442681'
 *         object: Account
 *         scheduleExpression: rate(1 hour)
 *       tags:
 *         Key1: Value1
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Amazon AppIntegrations Data Integrations using the `id`. For example:
 * ```sh
 * $ pulumi import aws:appintegrations/dataIntegration:DataIntegration example 12345678-1234-1234-1234-123456789123
 * ```
 */
public class DataIntegration internal constructor(
    override val javaResource: com.pulumi.aws.appintegrations.DataIntegration,
) : KotlinCustomResource(javaResource, DataIntegrationMapper) {
    /**
     * The Amazon Resource Name (ARN) of the Data Integration.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

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

    /**
     * Specifies the KMS key Amazon Resource Name (ARN) for the Data Integration.
     */
    public val kmsKey: Output
        get() = javaResource.kmsKey().applyValue({ args0 -> args0 })

    /**
     * Specifies the name of the Data Integration.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * A block that defines the name of the data and how often it should be pulled from the source. The Schedule Config block is documented below.
     */
    public val scheduleConfig: Output
        get() = javaResource.scheduleConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                toKotlin(args0)
            })
        })

    /**
     * Specifies the URI of the data source. Create an AppFlow Connector Profile and reference the name of the profile in the URL. An example of this value for Salesforce is `Salesforce://AppFlow/example` where `example` is the name of the AppFlow Connector Profile.
     */
    public val sourceUri: Output
        get() = javaResource.sourceUri().applyValue({ args0 -> args0 })

    /**
     * Tags to apply to the Data Integration. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
     */
    @Deprecated(
        message = """
  Please use `tags` instead.
  """,
    )
    public val tagsAll: Output>
        get() = javaResource.tagsAll().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.key.to(args0.value)
            }).toMap()
        })
}

public object DataIntegrationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.aws.appintegrations.DataIntegration::class == javaResource::class

    override fun map(javaResource: Resource): DataIntegration = DataIntegration(
        javaResource as
            com.pulumi.aws.appintegrations.DataIntegration,
    )
}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy