commonMain.aws.sdk.kotlin.services.firehose.model.CreateDeliveryStreamRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of firehose-jvm Show documentation
Show all versions of firehose-jvm Show documentation
The AWS SDK for Kotlin client for Firehose
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.firehose.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateDeliveryStreamRequest private constructor(builder: Builder) {
/**
* The destination in the Serverless offering for Amazon OpenSearch Service. You can specify only one destination.
*/
public val amazonOpenSearchServerlessDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationConfiguration? = builder.amazonOpenSearchServerlessDestinationConfiguration
/**
* The destination in Amazon OpenSearch Service. You can specify only one destination.
*/
public val amazonopensearchserviceDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationConfiguration? = builder.amazonopensearchserviceDestinationConfiguration
/**
* Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).
*/
public val deliveryStreamEncryptionConfigurationInput: aws.sdk.kotlin.services.firehose.model.DeliveryStreamEncryptionConfigurationInput? = builder.deliveryStreamEncryptionConfigurationInput
/**
* The name of the delivery stream. This name must be unique per Amazon Web Services account in the same Amazon Web Services Region. If the delivery streams are in different accounts or different Regions, you can have multiple delivery streams with the same name.
*/
public val deliveryStreamName: kotlin.String? = builder.deliveryStreamName
/**
* The delivery stream type. This parameter 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: aws.sdk.kotlin.services.firehose.model.DeliveryStreamType? = builder.deliveryStreamType
/**
* The destination in Amazon ES. You can specify only one destination.
*/
public val elasticsearchDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationConfiguration? = builder.elasticsearchDestinationConfiguration
/**
* The destination in Amazon S3. You can specify only one destination.
*/
public val extendedS3DestinationConfiguration: aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationConfiguration? = builder.extendedS3DestinationConfiguration
/**
* Enables configuring Kinesis Firehose to deliver data to any HTTP endpoint destination. You can specify only one destination.
*/
public val httpEndpointDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationConfiguration? = builder.httpEndpointDestinationConfiguration
/**
* Configure Apache Iceberg Tables destination.
*
* Amazon Data Firehose is in preview release and is subject to change.
*/
public val icebergDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.IcebergDestinationConfiguration? = builder.icebergDestinationConfiguration
/**
* When a Kinesis data stream is used as the source for the delivery stream, a KinesisStreamSourceConfiguration containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN for the source stream.
*/
public val kinesisStreamSourceConfiguration: aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceConfiguration? = builder.kinesisStreamSourceConfiguration
/**
* The configuration for the Amazon MSK cluster to be used as the source for a delivery stream.
*/
public val mskSourceConfiguration: aws.sdk.kotlin.services.firehose.model.MskSourceConfiguration? = builder.mskSourceConfiguration
/**
* The destination in Amazon Redshift. You can specify only one destination.
*/
public val redshiftDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.RedshiftDestinationConfiguration? = builder.redshiftDestinationConfiguration
/**
* [Deprecated] The destination in Amazon S3. You can specify only one destination.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public val s3DestinationConfiguration: aws.sdk.kotlin.services.firehose.model.S3DestinationConfiguration? = builder.s3DestinationConfiguration
/**
* Configure Snowflake destination
*/
public val snowflakeDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationConfiguration? = builder.snowflakeDestinationConfiguration
/**
* The destination in Splunk. You can specify only one destination.
*/
public val splunkDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.SplunkDestinationConfiguration? = builder.splunkDestinationConfiguration
/**
* A set of tags to assign to the delivery stream. A tag is a key-value pair that you can define and assign to Amazon Web Services 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 Amazon Web Services 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: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.firehose.model.CreateDeliveryStreamRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateDeliveryStreamRequest(")
append("amazonOpenSearchServerlessDestinationConfiguration=$amazonOpenSearchServerlessDestinationConfiguration,")
append("amazonopensearchserviceDestinationConfiguration=$amazonopensearchserviceDestinationConfiguration,")
append("deliveryStreamEncryptionConfigurationInput=$deliveryStreamEncryptionConfigurationInput,")
append("deliveryStreamName=$deliveryStreamName,")
append("deliveryStreamType=$deliveryStreamType,")
append("elasticsearchDestinationConfiguration=$elasticsearchDestinationConfiguration,")
append("extendedS3DestinationConfiguration=$extendedS3DestinationConfiguration,")
append("httpEndpointDestinationConfiguration=$httpEndpointDestinationConfiguration,")
append("icebergDestinationConfiguration=$icebergDestinationConfiguration,")
append("kinesisStreamSourceConfiguration=$kinesisStreamSourceConfiguration,")
append("mskSourceConfiguration=$mskSourceConfiguration,")
append("redshiftDestinationConfiguration=$redshiftDestinationConfiguration,")
append("s3DestinationConfiguration=$s3DestinationConfiguration,")
append("snowflakeDestinationConfiguration=$snowflakeDestinationConfiguration,")
append("splunkDestinationConfiguration=$splunkDestinationConfiguration,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = amazonOpenSearchServerlessDestinationConfiguration?.hashCode() ?: 0
result = 31 * result + (amazonopensearchserviceDestinationConfiguration?.hashCode() ?: 0)
result = 31 * result + (deliveryStreamEncryptionConfigurationInput?.hashCode() ?: 0)
result = 31 * result + (deliveryStreamName?.hashCode() ?: 0)
result = 31 * result + (deliveryStreamType?.hashCode() ?: 0)
result = 31 * result + (elasticsearchDestinationConfiguration?.hashCode() ?: 0)
result = 31 * result + (extendedS3DestinationConfiguration?.hashCode() ?: 0)
result = 31 * result + (httpEndpointDestinationConfiguration?.hashCode() ?: 0)
result = 31 * result + (icebergDestinationConfiguration?.hashCode() ?: 0)
result = 31 * result + (kinesisStreamSourceConfiguration?.hashCode() ?: 0)
result = 31 * result + (mskSourceConfiguration?.hashCode() ?: 0)
result = 31 * result + (redshiftDestinationConfiguration?.hashCode() ?: 0)
result = 31 * result + (s3DestinationConfiguration?.hashCode() ?: 0)
result = 31 * result + (snowflakeDestinationConfiguration?.hashCode() ?: 0)
result = 31 * result + (splunkDestinationConfiguration?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as CreateDeliveryStreamRequest
if (amazonOpenSearchServerlessDestinationConfiguration != other.amazonOpenSearchServerlessDestinationConfiguration) return false
if (amazonopensearchserviceDestinationConfiguration != other.amazonopensearchserviceDestinationConfiguration) return false
if (deliveryStreamEncryptionConfigurationInput != other.deliveryStreamEncryptionConfigurationInput) return false
if (deliveryStreamName != other.deliveryStreamName) return false
if (deliveryStreamType != other.deliveryStreamType) return false
if (elasticsearchDestinationConfiguration != other.elasticsearchDestinationConfiguration) return false
if (extendedS3DestinationConfiguration != other.extendedS3DestinationConfiguration) return false
if (httpEndpointDestinationConfiguration != other.httpEndpointDestinationConfiguration) return false
if (icebergDestinationConfiguration != other.icebergDestinationConfiguration) return false
if (kinesisStreamSourceConfiguration != other.kinesisStreamSourceConfiguration) return false
if (mskSourceConfiguration != other.mskSourceConfiguration) return false
if (redshiftDestinationConfiguration != other.redshiftDestinationConfiguration) return false
if (s3DestinationConfiguration != other.s3DestinationConfiguration) return false
if (snowflakeDestinationConfiguration != other.snowflakeDestinationConfiguration) return false
if (splunkDestinationConfiguration != other.splunkDestinationConfiguration) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.firehose.model.CreateDeliveryStreamRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The destination in the Serverless offering for Amazon OpenSearch Service. You can specify only one destination.
*/
public var amazonOpenSearchServerlessDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationConfiguration? = null
/**
* The destination in Amazon OpenSearch Service. You can specify only one destination.
*/
public var amazonopensearchserviceDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationConfiguration? = null
/**
* Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).
*/
public var deliveryStreamEncryptionConfigurationInput: aws.sdk.kotlin.services.firehose.model.DeliveryStreamEncryptionConfigurationInput? = null
/**
* The name of the delivery stream. This name must be unique per Amazon Web Services account in the same Amazon Web Services Region. If the delivery streams are in different accounts or different Regions, you can have multiple delivery streams with the same name.
*/
public var deliveryStreamName: kotlin.String? = null
/**
* The delivery stream type. This parameter 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 var deliveryStreamType: aws.sdk.kotlin.services.firehose.model.DeliveryStreamType? = null
/**
* The destination in Amazon ES. You can specify only one destination.
*/
public var elasticsearchDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationConfiguration? = null
/**
* The destination in Amazon S3. You can specify only one destination.
*/
public var extendedS3DestinationConfiguration: aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationConfiguration? = null
/**
* Enables configuring Kinesis Firehose to deliver data to any HTTP endpoint destination. You can specify only one destination.
*/
public var httpEndpointDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationConfiguration? = null
/**
* Configure Apache Iceberg Tables destination.
*
* Amazon Data Firehose is in preview release and is subject to change.
*/
public var icebergDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.IcebergDestinationConfiguration? = null
/**
* When a Kinesis data stream is used as the source for the delivery stream, a KinesisStreamSourceConfiguration containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN for the source stream.
*/
public var kinesisStreamSourceConfiguration: aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceConfiguration? = null
/**
* The configuration for the Amazon MSK cluster to be used as the source for a delivery stream.
*/
public var mskSourceConfiguration: aws.sdk.kotlin.services.firehose.model.MskSourceConfiguration? = null
/**
* The destination in Amazon Redshift. You can specify only one destination.
*/
public var redshiftDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.RedshiftDestinationConfiguration? = null
/**
* [Deprecated] The destination in Amazon S3. You can specify only one destination.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public var s3DestinationConfiguration: aws.sdk.kotlin.services.firehose.model.S3DestinationConfiguration? = null
/**
* Configure Snowflake destination
*/
public var snowflakeDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationConfiguration? = null
/**
* The destination in Splunk. You can specify only one destination.
*/
public var splunkDestinationConfiguration: aws.sdk.kotlin.services.firehose.model.SplunkDestinationConfiguration? = 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 Amazon Web Services 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 Amazon Web Services 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 var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.firehose.model.CreateDeliveryStreamRequest) : this() {
this.amazonOpenSearchServerlessDestinationConfiguration = x.amazonOpenSearchServerlessDestinationConfiguration
this.amazonopensearchserviceDestinationConfiguration = x.amazonopensearchserviceDestinationConfiguration
this.deliveryStreamEncryptionConfigurationInput = x.deliveryStreamEncryptionConfigurationInput
this.deliveryStreamName = x.deliveryStreamName
this.deliveryStreamType = x.deliveryStreamType
this.elasticsearchDestinationConfiguration = x.elasticsearchDestinationConfiguration
this.extendedS3DestinationConfiguration = x.extendedS3DestinationConfiguration
this.httpEndpointDestinationConfiguration = x.httpEndpointDestinationConfiguration
this.icebergDestinationConfiguration = x.icebergDestinationConfiguration
this.kinesisStreamSourceConfiguration = x.kinesisStreamSourceConfiguration
this.mskSourceConfiguration = x.mskSourceConfiguration
this.redshiftDestinationConfiguration = x.redshiftDestinationConfiguration
this.s3DestinationConfiguration = x.s3DestinationConfiguration
this.snowflakeDestinationConfiguration = x.snowflakeDestinationConfiguration
this.splunkDestinationConfiguration = x.splunkDestinationConfiguration
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.firehose.model.CreateDeliveryStreamRequest = CreateDeliveryStreamRequest(this)
/**
* construct an [aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationConfiguration] inside the given [block]
*/
public fun amazonOpenSearchServerlessDestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationConfiguration.Builder.() -> kotlin.Unit) {
this.amazonOpenSearchServerlessDestinationConfiguration = aws.sdk.kotlin.services.firehose.model.AmazonOpenSearchServerlessDestinationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationConfiguration] inside the given [block]
*/
public fun amazonopensearchserviceDestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationConfiguration.Builder.() -> kotlin.Unit) {
this.amazonopensearchserviceDestinationConfiguration = aws.sdk.kotlin.services.firehose.model.AmazonopensearchserviceDestinationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.DeliveryStreamEncryptionConfigurationInput] inside the given [block]
*/
public fun deliveryStreamEncryptionConfigurationInput(block: aws.sdk.kotlin.services.firehose.model.DeliveryStreamEncryptionConfigurationInput.Builder.() -> kotlin.Unit) {
this.deliveryStreamEncryptionConfigurationInput = aws.sdk.kotlin.services.firehose.model.DeliveryStreamEncryptionConfigurationInput.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationConfiguration] inside the given [block]
*/
public fun elasticsearchDestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationConfiguration.Builder.() -> kotlin.Unit) {
this.elasticsearchDestinationConfiguration = aws.sdk.kotlin.services.firehose.model.ElasticsearchDestinationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationConfiguration] inside the given [block]
*/
public fun extendedS3DestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationConfiguration.Builder.() -> kotlin.Unit) {
this.extendedS3DestinationConfiguration = aws.sdk.kotlin.services.firehose.model.ExtendedS3DestinationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationConfiguration] inside the given [block]
*/
public fun httpEndpointDestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationConfiguration.Builder.() -> kotlin.Unit) {
this.httpEndpointDestinationConfiguration = aws.sdk.kotlin.services.firehose.model.HttpEndpointDestinationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.IcebergDestinationConfiguration] inside the given [block]
*/
public fun icebergDestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.IcebergDestinationConfiguration.Builder.() -> kotlin.Unit) {
this.icebergDestinationConfiguration = aws.sdk.kotlin.services.firehose.model.IcebergDestinationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceConfiguration] inside the given [block]
*/
public fun kinesisStreamSourceConfiguration(block: aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceConfiguration.Builder.() -> kotlin.Unit) {
this.kinesisStreamSourceConfiguration = aws.sdk.kotlin.services.firehose.model.KinesisStreamSourceConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.MskSourceConfiguration] inside the given [block]
*/
public fun mskSourceConfiguration(block: aws.sdk.kotlin.services.firehose.model.MskSourceConfiguration.Builder.() -> kotlin.Unit) {
this.mskSourceConfiguration = aws.sdk.kotlin.services.firehose.model.MskSourceConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.RedshiftDestinationConfiguration] inside the given [block]
*/
public fun redshiftDestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.RedshiftDestinationConfiguration.Builder.() -> kotlin.Unit) {
this.redshiftDestinationConfiguration = aws.sdk.kotlin.services.firehose.model.RedshiftDestinationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.S3DestinationConfiguration] inside the given [block]
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public fun s3DestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.S3DestinationConfiguration.Builder.() -> kotlin.Unit) {
this.s3DestinationConfiguration = aws.sdk.kotlin.services.firehose.model.S3DestinationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationConfiguration] inside the given [block]
*/
public fun snowflakeDestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationConfiguration.Builder.() -> kotlin.Unit) {
this.snowflakeDestinationConfiguration = aws.sdk.kotlin.services.firehose.model.SnowflakeDestinationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.firehose.model.SplunkDestinationConfiguration] inside the given [block]
*/
public fun splunkDestinationConfiguration(block: aws.sdk.kotlin.services.firehose.model.SplunkDestinationConfiguration.Builder.() -> kotlin.Unit) {
this.splunkDestinationConfiguration = aws.sdk.kotlin.services.firehose.model.SplunkDestinationConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}