![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.sns.kotlin.Subscription.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.sns.kotlin
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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [Subscription].
*/
@PulumiTagMarker
public class SubscriptionResourceBuilder internal constructor() {
public var name: String? = null
public var args: SubscriptionArgs = SubscriptionArgs()
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 SubscriptionArgsBuilder.() -> Unit) {
val builder = SubscriptionArgsBuilder()
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(): Subscription {
val builtJavaResource = com.pulumi.awsnative.sns.Subscription(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Subscription(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::SNS::Subscription
*/
public class Subscription internal constructor(
override val javaResource: com.pulumi.awsnative.sns.Subscription,
) : KotlinCustomResource(javaResource, SubscriptionMapper) {
/**
* Arn of the subscription
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The delivery policy JSON assigned to the subscription. Enables the subscriber to define the message delivery retry strategy in the case of an HTTP/S endpoint subscribed to the topic.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SNS::Subscription` for more information about the expected schema for this property.
*/
public val deliveryPolicy: Output?
get() = javaResource.deliveryPolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The subscription's endpoint. The endpoint value depends on the protocol that you specify.
*/
public val endpoint: Output?
get() = javaResource.endpoint().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The filter policy JSON assigned to the subscription. Enables the subscriber to filter out unwanted messages.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SNS::Subscription` for more information about the expected schema for this property.
*/
public val filterPolicy: Output?
get() = javaResource.filterPolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* This attribute lets you choose the filtering scope by using one of the following string value types: MessageAttributes (default) and MessageBody.
*/
public val filterPolicyScope: Output?
get() = javaResource.filterPolicyScope().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The subscription's protocol.
*/
public val protocol: Output
get() = javaResource.protocol().applyValue({ args0 -> args0 })
/**
* When set to true, enables raw message delivery. Raw messages don't contain any JSON formatting and can be sent to Amazon SQS and HTTP/S endpoints.
*/
public val rawMessageDelivery: Output?
get() = javaResource.rawMessageDelivery().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors are held in the dead-letter queue for further analysis or reprocessing.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SNS::Subscription` for more information about the expected schema for this property.
*/
public val redrivePolicy: Output?
get() = javaResource.redrivePolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* For cross-region subscriptions, the region in which the topic resides.If no region is specified, AWS CloudFormation uses the region of the caller as the default.
*/
public val region: Output?
get() = javaResource.region().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SNS::Subscription` for more information about the expected schema for this property.
*/
public val replayPolicy: Output?
get() = javaResource.replayPolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* This property applies only to Amazon Data Firehose delivery stream subscriptions.
*/
public val subscriptionRoleArn: Output?
get() = javaResource.subscriptionRoleArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ARN of the topic to subscribe to.
*/
public val topicArn: Output
get() = javaResource.topicArn().applyValue({ args0 -> args0 })
}
public object SubscriptionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.sns.Subscription::class == javaResource::class
override fun map(javaResource: Resource): Subscription = Subscription(
javaResource as
com.pulumi.awsnative.sns.Subscription,
)
}
/**
* @see [Subscription].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Subscription].
*/
public suspend fun subscription(
name: String,
block: suspend SubscriptionResourceBuilder.() -> Unit,
): Subscription {
val builder = SubscriptionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Subscription].
* @param name The _unique_ name of the resulting resource.
*/
public fun subscription(name: String): Subscription {
val builder = SubscriptionResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy