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

com.pulumi.awsnative.kinesisfirehose.kotlin.DeliveryStream.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.kinesisfirehose.kotlin

import com.pulumi.awsnative.kinesisfirehose.kotlin.enums.DeliveryStreamType
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamAmazonOpenSearchServerlessDestinationConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamAmazonopensearchserviceDestinationConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamElasticsearchDestinationConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamEncryptionConfigurationInput
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamExtendedS3DestinationConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamHttpEndpointDestinationConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamKinesisStreamSourceConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamMskSourceConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamRedshiftDestinationConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamS3DestinationConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamSnowflakeDestinationConfiguration
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamSplunkDestinationConfiguration
import com.pulumi.awsnative.kotlin.outputs.Tag
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
import kotlin.collections.List
import com.pulumi.awsnative.kinesisfirehose.kotlin.enums.DeliveryStreamType.Companion.toKotlin as deliveryStreamTypeToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamAmazonOpenSearchServerlessDestinationConfiguration.Companion.toKotlin as deliveryStreamAmazonOpenSearchServerlessDestinationConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamAmazonopensearchserviceDestinationConfiguration.Companion.toKotlin as deliveryStreamAmazonopensearchserviceDestinationConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamElasticsearchDestinationConfiguration.Companion.toKotlin as deliveryStreamElasticsearchDestinationConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamEncryptionConfigurationInput.Companion.toKotlin as deliveryStreamEncryptionConfigurationInputToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamExtendedS3DestinationConfiguration.Companion.toKotlin as deliveryStreamExtendedS3DestinationConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamHttpEndpointDestinationConfiguration.Companion.toKotlin as deliveryStreamHttpEndpointDestinationConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamKinesisStreamSourceConfiguration.Companion.toKotlin as deliveryStreamKinesisStreamSourceConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamMskSourceConfiguration.Companion.toKotlin as deliveryStreamMskSourceConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamRedshiftDestinationConfiguration.Companion.toKotlin as deliveryStreamRedshiftDestinationConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamS3DestinationConfiguration.Companion.toKotlin as deliveryStreamS3DestinationConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamSnowflakeDestinationConfiguration.Companion.toKotlin as deliveryStreamSnowflakeDestinationConfigurationToKotlin
import com.pulumi.awsnative.kinesisfirehose.kotlin.outputs.DeliveryStreamSplunkDestinationConfiguration.Companion.toKotlin as deliveryStreamSplunkDestinationConfigurationToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: DeliveryStreamArgs = DeliveryStreamArgs()

    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 DeliveryStreamArgsBuilder.() -> Unit) {
        val builder = DeliveryStreamArgsBuilder()
        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(): DeliveryStream {
        val builtJavaResource =
            com.pulumi.awsnative.kinesisfirehose.DeliveryStream(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return DeliveryStream(builtJavaResource)
    }
}

/**
 * Resource Type definition for AWS::KinesisFirehose::DeliveryStream
 */
public class DeliveryStream internal constructor(
    override val javaResource: com.pulumi.awsnative.kinesisfirehose.DeliveryStream,
) : KotlinCustomResource(javaResource, DeliveryStreamMapper) {
    /**
     * Describes the configuration of a destination in the Serverless offering for Amazon OpenSearch Service.
     */
    public val amazonOpenSearchServerlessDestinationConfiguration:
        Output?
        get() = javaResource.amazonOpenSearchServerlessDestinationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamAmazonOpenSearchServerlessDestinationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The destination in Amazon OpenSearch Service. You can specify only one destination.
     */
    public val amazonopensearchserviceDestinationConfiguration:
        Output?
        get() = javaResource.amazonopensearchserviceDestinationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamAmazonopensearchserviceDestinationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the delivery stream, such as `arn:aws:firehose:us-east-2:123456789012:deliverystream/delivery-stream-name` .
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Specifies the type and Amazon Resource Name (ARN) of the CMK to use for Server-Side Encryption (SSE).
     */
    public val deliveryStreamEncryptionConfigurationInput:
        Output?
        get() = javaResource.deliveryStreamEncryptionConfigurationInput().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamEncryptionConfigurationInputToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The name of the delivery stream.
     */
    public val deliveryStreamName: Output?
        get() = javaResource.deliveryStreamName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The delivery stream type. This can be one of the following values:
     * - `DirectPut` : Provider applications access the delivery stream directly.
     * - `KinesisStreamAsSource` : The delivery stream uses a Kinesis data stream as a source.
     */
    public val deliveryStreamType: Output?
        get() = javaResource.deliveryStreamType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> deliveryStreamTypeToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * An Amazon ES destination for the delivery stream.
     * Conditional. You must specify only one destination configuration.
     * If you change the delivery stream destination from an Amazon ES destination to an Amazon S3 or Amazon Redshift destination, update requires [some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt) .
     */
    public val elasticsearchDestinationConfiguration:
        Output?
        get() = javaResource.elasticsearchDestinationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamElasticsearchDestinationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * An Amazon S3 destination for the delivery stream.
     * Conditional. You must specify only one destination configuration.
     * If you change the delivery stream destination from an Amazon Extended S3 destination to an Amazon ES destination, update requires [some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt) .
     */
    public val extendedS3DestinationConfiguration:
        Output?
        get() = javaResource.extendedS3DestinationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamExtendedS3DestinationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Enables configuring Kinesis Firehose to deliver data to any HTTP endpoint destination. You can specify only one destination.
     */
    public val httpEndpointDestinationConfiguration:
        Output?
        get() = javaResource.httpEndpointDestinationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamHttpEndpointDestinationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * When a Kinesis stream is used as the source for the delivery stream, a [KinesisStreamSourceConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-kinesisstreamsourceconfiguration.html) containing the Kinesis stream ARN and the role ARN for the source stream.
     */
    public val kinesisStreamSourceConfiguration:
        Output?
        get() = javaResource.kinesisStreamSourceConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamKinesisStreamSourceConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The configuration for the Amazon MSK cluster to be used as the source for a delivery stream.
     */
    public val mskSourceConfiguration: Output?
        get() = javaResource.mskSourceConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> deliveryStreamMskSourceConfigurationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * An Amazon Redshift destination for the delivery stream.
     * Conditional. You must specify only one destination configuration.
     * If you change the delivery stream destination from an Amazon Redshift destination to an Amazon ES destination, update requires [some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt) .
     */
    public val redshiftDestinationConfiguration:
        Output?
        get() = javaResource.redshiftDestinationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamRedshiftDestinationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The `S3DestinationConfiguration` property type specifies an Amazon Simple Storage Service (Amazon S3) destination to which Amazon Kinesis Data Firehose (Kinesis Data Firehose) delivers data.
     * Conditional. You must specify only one destination configuration.
     * If you change the delivery stream destination from an Amazon S3 destination to an Amazon ES destination, update requires [some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt) .
     */
    public val s3DestinationConfiguration: Output?
        get() = javaResource.s3DestinationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamS3DestinationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Configure Snowflake destination
     */
    public val snowflakeDestinationConfiguration:
        Output?
        get() = javaResource.snowflakeDestinationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamSnowflakeDestinationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The configuration of a destination in Splunk for the delivery stream.
     */
    public val splunkDestinationConfiguration: Output?
        get() = javaResource.splunkDestinationConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    deliveryStreamSplunkDestinationConfigurationToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * A set of tags to assign to the delivery stream. A tag is a key-value pair that you can define and assign to AWS resources. Tags are metadata. For example, you can add friendly names and descriptions or other types of information that can help you distinguish the delivery stream. For more information about tags, see [Using Cost Allocation Tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) in the AWS Billing and Cost Management User Guide.
     * You can specify up to 50 tags when creating a delivery stream.
     * If you specify tags in the `CreateDeliveryStream` action, Amazon Data Firehose performs an additional authorization on the `firehose:TagDeliveryStream` action to verify if users have permissions to create tags. If you do not provide this permission, requests to create new Firehose delivery streams with IAM resource tags will fail with an `AccessDeniedException` such as following.
     * *AccessDeniedException*
     * User: arn:aws:sts::x:assumed-role/x/x is not authorized to perform: firehose:TagDeliveryStream on resource: arn:aws:firehose:us-east-1:x:deliverystream/x with an explicit deny in an identity-based policy.
     * For an example IAM policy, see [Tag example.](https://docs.aws.amazon.com/firehose/latest/APIReference/API_CreateDeliveryStream.html#API_CreateDeliveryStream_Examples)
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object DeliveryStreamMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.kinesisfirehose.DeliveryStream::class == javaResource::class

    override fun map(javaResource: Resource): DeliveryStream = DeliveryStream(
        javaResource as
            com.pulumi.awsnative.kinesisfirehose.DeliveryStream,
    )
}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy