com.pulumi.awsnative.ses.kotlin.MailManagerTrafficPolicy.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.ses.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.ses.kotlin.enums.MailManagerTrafficPolicyAcceptAction
import com.pulumi.awsnative.ses.kotlin.outputs.MailManagerTrafficPolicyPolicyStatement
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.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.ses.kotlin.enums.MailManagerTrafficPolicyAcceptAction.Companion.toKotlin as mailManagerTrafficPolicyAcceptActionToKotlin
import com.pulumi.awsnative.ses.kotlin.outputs.MailManagerTrafficPolicyPolicyStatement.Companion.toKotlin as mailManagerTrafficPolicyPolicyStatementToKotlin
/**
* Builder for [MailManagerTrafficPolicy].
*/
@PulumiTagMarker
public class MailManagerTrafficPolicyResourceBuilder internal constructor() {
public var name: String? = null
public var args: MailManagerTrafficPolicyArgs = MailManagerTrafficPolicyArgs()
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 MailManagerTrafficPolicyArgsBuilder.() -> Unit) {
val builder = MailManagerTrafficPolicyArgsBuilder()
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(): MailManagerTrafficPolicy {
val builtJavaResource =
com.pulumi.awsnative.ses.MailManagerTrafficPolicy(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return MailManagerTrafficPolicy(builtJavaResource)
}
}
/**
* Definition of AWS::SES::MailManagerTrafficPolicy Resource Type
*/
public class MailManagerTrafficPolicy internal constructor(
override val javaResource: com.pulumi.awsnative.ses.MailManagerTrafficPolicy,
) : KotlinCustomResource(javaResource, MailManagerTrafficPolicyMapper) {
/**
* Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements
*/
public val defaultAction: Output
get() = javaResource.defaultAction().applyValue({ args0 ->
args0.let({ args0 ->
mailManagerTrafficPolicyAcceptActionToKotlin(args0)
})
})
/**
* The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
*/
public val maxMessageSizeBytes: Output?
get() = javaResource.maxMessageSizeBytes().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Conditional statements for filtering email traffic.
*/
public val policyStatements: Output>
get() = javaResource.policyStatements().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> mailManagerTrafficPolicyPolicyStatementToKotlin(args0) })
})
})
/**
* The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the traffic policy resource.
*/
public val trafficPolicyArn: Output
get() = javaResource.trafficPolicyArn().applyValue({ args0 -> args0 })
/**
* The identifier of the traffic policy resource.
*/
public val trafficPolicyId: Output
get() = javaResource.trafficPolicyId().applyValue({ args0 -> args0 })
/**
* The name of the policy.
* The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.
*/
public val trafficPolicyName: Output?
get() = javaResource.trafficPolicyName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object MailManagerTrafficPolicyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ses.MailManagerTrafficPolicy::class == javaResource::class
override fun map(javaResource: Resource): MailManagerTrafficPolicy =
MailManagerTrafficPolicy(javaResource as com.pulumi.awsnative.ses.MailManagerTrafficPolicy)
}
/**
* @see [MailManagerTrafficPolicy].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [MailManagerTrafficPolicy].
*/
public suspend fun mailManagerTrafficPolicy(
name: String,
block: suspend MailManagerTrafficPolicyResourceBuilder.() -> Unit,
): MailManagerTrafficPolicy {
val builder = MailManagerTrafficPolicyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [MailManagerTrafficPolicy].
* @param name The _unique_ name of the resulting resource.
*/
public fun mailManagerTrafficPolicy(name: String): MailManagerTrafficPolicy {
val builder = MailManagerTrafficPolicyResourceBuilder()
builder.name(name)
return builder.build()
}