com.pulumi.aws.sesv2.kotlin.EmailIdentityFeedbackAttributes.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-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.aws.sesv2.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [EmailIdentityFeedbackAttributes].
*/
@PulumiTagMarker
public class EmailIdentityFeedbackAttributesResourceBuilder internal constructor() {
public var name: String? = null
public var args: EmailIdentityFeedbackAttributesArgs = EmailIdentityFeedbackAttributesArgs()
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 EmailIdentityFeedbackAttributesArgsBuilder.() -> Unit) {
val builder = EmailIdentityFeedbackAttributesArgsBuilder()
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(): EmailIdentityFeedbackAttributes {
val builtJavaResource =
com.pulumi.aws.sesv2.EmailIdentityFeedbackAttributes(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return EmailIdentityFeedbackAttributes(builtJavaResource)
}
}
/**
* Resource for managing an AWS SESv2 (Simple Email V2) Email Identity Feedback Attributes.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.sesv2.EmailIdentity("example", {emailIdentity: "example.com"});
* const exampleEmailIdentityFeedbackAttributes = new aws.sesv2.EmailIdentityFeedbackAttributes("example", {
* emailIdentity: example.emailIdentity,
* emailForwardingEnabled: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.sesv2.EmailIdentity("example", email_identity="example.com")
* example_email_identity_feedback_attributes = aws.sesv2.EmailIdentityFeedbackAttributes("example",
* email_identity=example.email_identity,
* email_forwarding_enabled=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.SesV2.EmailIdentity("example", new()
* {
* EmailIdentityDetails = "example.com",
* });
* var exampleEmailIdentityFeedbackAttributes = new Aws.SesV2.EmailIdentityFeedbackAttributes("example", new()
* {
* EmailIdentity = example.EmailIdentityDetails,
* EmailForwardingEnabled = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sesv2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := sesv2.NewEmailIdentity(ctx, "example", &sesv2.EmailIdentityArgs{
* EmailIdentity: pulumi.String("example.com"),
* })
* if err != nil {
* return err
* }
* _, err = sesv2.NewEmailIdentityFeedbackAttributes(ctx, "example", &sesv2.EmailIdentityFeedbackAttributesArgs{
* EmailIdentity: example.EmailIdentity,
* EmailForwardingEnabled: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.sesv2.EmailIdentity;
* import com.pulumi.aws.sesv2.EmailIdentityArgs;
* import com.pulumi.aws.sesv2.EmailIdentityFeedbackAttributes;
* import com.pulumi.aws.sesv2.EmailIdentityFeedbackAttributesArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var example = new EmailIdentity("example", EmailIdentityArgs.builder()
* .emailIdentity("example.com")
* .build());
* var exampleEmailIdentityFeedbackAttributes = new EmailIdentityFeedbackAttributes("exampleEmailIdentityFeedbackAttributes", EmailIdentityFeedbackAttributesArgs.builder()
* .emailIdentity(example.emailIdentity())
* .emailForwardingEnabled(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:sesv2:EmailIdentity
* properties:
* emailIdentity: example.com
* exampleEmailIdentityFeedbackAttributes:
* type: aws:sesv2:EmailIdentityFeedbackAttributes
* name: example
* properties:
* emailIdentity: ${example.emailIdentity}
* emailForwardingEnabled: true
* ```
*
* ## Import
* Using `pulumi import`, import SESv2 (Simple Email V2) Email Identity Feedback Attributes using the `email_identity`. For example:
* ```sh
* $ pulumi import aws:sesv2/emailIdentityFeedbackAttributes:EmailIdentityFeedbackAttributes example example.com
* ```
*/
public class EmailIdentityFeedbackAttributes internal constructor(
override val javaResource: com.pulumi.aws.sesv2.EmailIdentityFeedbackAttributes,
) : KotlinCustomResource(javaResource, EmailIdentityFeedbackAttributesMapper) {
/**
* Sets the feedback forwarding configuration for the identity.
*/
public val emailForwardingEnabled: Output?
get() = javaResource.emailForwardingEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The email identity.
*/
public val emailIdentity: Output
get() = javaResource.emailIdentity().applyValue({ args0 -> args0 })
}
public object EmailIdentityFeedbackAttributesMapper :
ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.sesv2.EmailIdentityFeedbackAttributes::class == javaResource::class
override fun map(javaResource: Resource): EmailIdentityFeedbackAttributes =
EmailIdentityFeedbackAttributes(
javaResource as
com.pulumi.aws.sesv2.EmailIdentityFeedbackAttributes,
)
}
/**
* @see [EmailIdentityFeedbackAttributes].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [EmailIdentityFeedbackAttributes].
*/
public suspend fun emailIdentityFeedbackAttributes(
name: String,
block: suspend EmailIdentityFeedbackAttributesResourceBuilder.() -> Unit,
): EmailIdentityFeedbackAttributes {
val builder = EmailIdentityFeedbackAttributesResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [EmailIdentityFeedbackAttributes].
* @param name The _unique_ name of the resulting resource.
*/
public fun emailIdentityFeedbackAttributes(name: String): EmailIdentityFeedbackAttributes {
val builder = EmailIdentityFeedbackAttributesResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy