com.pulumi.awsnative.sns.kotlin.outputs.GetTopicResult.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.sns.kotlin.outputs
import com.pulumi.awsnative.kotlin.outputs.Tag
import kotlin.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @property archivePolicy The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SNS::Topic` for more information about the expected schema for this property.
* @property contentBasedDeduplication Enables content-based deduplication for FIFO topics.
* + By default, ``ContentBasedDeduplication`` is set to ``false``. If you create a FIFO topic and this attribute is ``false``, you must specify a value for the ``MessageDeduplicationId`` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action.
* + When you set ``ContentBasedDeduplication`` to ``true``, SNS uses a SHA-256 hash to generate the ``MessageDeduplicationId`` using the body of the message (but not the attributes of the message).
* (Optional) To override the generated value, you can specify a value for the the ``MessageDeduplicationId`` parameter for the ``Publish`` action.
* @property dataProtectionPolicy The body of the policy document you want to use for this topic.
* You can only add one policy per topic.
* The policy must be in JSON string format.
* Length Constraints: Maximum length of 30,720.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SNS::Topic` for more information about the expected schema for this property.
* @property deliveryStatusLogging The `DeliveryStatusLogging` configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:
* - HTTP
* - Amazon Kinesis Data Firehose
* - AWS Lambda
* - Platform application endpoint
* - Amazon Simple Queue Service
* Once configured, log entries are sent to Amazon CloudWatch Logs.
* @property displayName The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
* @property kmsMasterKeyId The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). For more examples, see ``KeyId`` in the *API Reference*.
* This property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html).
* @property signatureVersion The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, ``SignatureVersion`` is set to ``1``.
* @property subscription The SNS subscriptions (endpoints) for this topic.
* If you specify the ``Subscription`` property in the ``AWS::SNS::Topic`` resource and it creates an associated subscription resource, the associated subscription is not deleted when the ``AWS::SNS::Topic`` resource is deleted.
* @property tags The list of tags to add to a new topic.
* To be able to tag a topic on creation, you must have the ``sns:CreateTopic`` and ``sns:TagResource`` permissions.
* @property topicArn Returns the ARN of an Amazon SNS topic.
* @property tracingConfig Tracing mode of an SNS topic. By default ``TracingConfig`` is set to ``PassThrough``, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to ``Active``, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
*/
public data class GetTopicResult(
public val archivePolicy: Any? = null,
public val contentBasedDeduplication: Boolean? = null,
public val dataProtectionPolicy: Any? = null,
public val deliveryStatusLogging: List? = null,
public val displayName: String? = null,
public val kmsMasterKeyId: String? = null,
public val signatureVersion: String? = null,
public val subscription: List? = null,
public val tags: List? = null,
public val topicArn: String? = null,
public val tracingConfig: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.sns.outputs.GetTopicResult): GetTopicResult =
GetTopicResult(
archivePolicy = javaType.archivePolicy().map({ args0 -> args0 }).orElse(null),
contentBasedDeduplication = javaType.contentBasedDeduplication().map({ args0 ->
args0
}).orElse(null),
dataProtectionPolicy = javaType.dataProtectionPolicy().map({ args0 -> args0 }).orElse(null),
deliveryStatusLogging = javaType.deliveryStatusLogging().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.sns.kotlin.outputs.TopicLoggingConfig.Companion.toKotlin(args0)
})
}),
displayName = javaType.displayName().map({ args0 -> args0 }).orElse(null),
kmsMasterKeyId = javaType.kmsMasterKeyId().map({ args0 -> args0 }).orElse(null),
signatureVersion = javaType.signatureVersion().map({ args0 -> args0 }).orElse(null),
subscription = javaType.subscription().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.sns.kotlin.outputs.TopicSubscription.Companion.toKotlin(args0)
})
}),
tags = javaType.tags().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin(args0)
})
}),
topicArn = javaType.topicArn().map({ args0 -> args0 }).orElse(null),
tracingConfig = javaType.tracingConfig().map({ args0 -> args0 }).orElse(null),
)
}
}