Class EmailChannel


  • public class EmailChannel
    extends com.pulumi.resources.CustomResource
    > **NOTE:** This resource is deprecated. AWS End User Messaging email features are being discontinued on October 30, 2026. Migrate to Amazon SES using `aws.ses.DomainIdentity`, `aws.sesv2.EmailIdentity`, and related SES/SESv2 resources. See the [AWS End User Messaging migration guide](https://docs.aws.amazon.com/pinpoint/latest/userguide/migrate.html) for details. Provides an End User Messaging Email Channel resource. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.pinpoint.App;
     import com.pulumi.aws.iam.IamFunctions;
     import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementArgs;
     import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementPrincipalArgs;
     import com.pulumi.aws.iam.Role;
     import com.pulumi.aws.iam.RoleArgs;
     import com.pulumi.aws.pinpoint.EmailChannel;
     import com.pulumi.aws.pinpoint.EmailChannelArgs;
     import com.pulumi.aws.ses.DomainIdentity;
     import com.pulumi.aws.ses.DomainIdentityArgs;
     import com.pulumi.aws.iam.RolePolicy;
     import com.pulumi.aws.iam.RolePolicyArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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 app = new App("app");
     
             final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                 .statements(GetPolicyDocumentStatementArgs.builder()
                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                         .type("Service")
                         .identifiers("pinpoint.amazonaws.com")
                         .build())
                     .effect("Allow")
                     .actions("sts:AssumeRole")
                     .build())
                 .build());
     
             var role = new Role("role", RoleArgs.builder()
                 .assumeRolePolicy(assumeRole.json())
                 .build());
     
             var email = new EmailChannel("email", EmailChannelArgs.builder()
                 .applicationId(app.applicationId())
                 .fromAddress("user@example.com")
                 .roleArn(role.arn())
                 .build());
     
             var identity = new DomainIdentity("identity", DomainIdentityArgs.builder()
                 .domain("example.com")
                 .build());
     
             final var rolePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                 .statements(GetPolicyDocumentStatementArgs.builder()
                     .effect("Allow")
                     .actions(                
                         "mobileanalytics:PutEvents",
                         "mobileanalytics:PutItems")
                     .resources("*")
                     .build())
                 .build());
     
             var rolePolicyRolePolicy = new RolePolicy("rolePolicyRolePolicy", RolePolicyArgs.builder()
                 .name("role_policy")
                 .role(role.id())
                 .policy(rolePolicy.json())
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import End User Messaging Email Channel using the `application-id`. For example: ```sh $ pulumi import aws:pinpoint/emailChannel:EmailChannel email application-id ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> applicationId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> configurationSet()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()  
      com.pulumi.core.Output<java.lang.String> fromAddress()  
      static EmailChannel get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, EmailChannelState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> identity()  
      com.pulumi.core.Output<java.lang.Integer> messagesPerSecond()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> orchestrationSendingRoleArn()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> roleArn()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmailChannel

        public EmailChannel​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • EmailChannel

        public EmailChannel​(java.lang.String name,
                            EmailChannelArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • EmailChannel

        public EmailChannel​(java.lang.String name,
                            EmailChannelArgs args,
                            @Nullable
                            com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • applicationId

        public com.pulumi.core.Output<java.lang.String> applicationId()
        Returns:
        Application ID.
      • configurationSet

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> configurationSet()
        Returns:
        ARN of the Amazon SES configuration set that you want to apply to messages that you send through the channel.
      • enabled

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()
        Returns:
        Whether the channel is enabled or disabled. Defaults to `true`.
      • fromAddress

        public com.pulumi.core.Output<java.lang.String> fromAddress()
        Returns:
        Email address used to send emails from. You can use email only (`user@example.com`) or friendly address (`User <user@example.com>`). This field comply with [RFC 5322](https://www.ietf.org/rfc/rfc5322.txt).
      • identity

        public com.pulumi.core.Output<java.lang.String> identity()
        Returns:
        ARN of an identity verified with SES.
      • messagesPerSecond

        public com.pulumi.core.Output<java.lang.Integer> messagesPerSecond()
        Returns:
        (**Deprecated**) Messages per second that can be sent.
      • orchestrationSendingRoleArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> orchestrationSendingRoleArn()
        Returns:
        ARN of an IAM role for AWS End User Messaging to use to send email from your campaigns or journeys through Amazon SES.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • roleArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> roleArn()
        Returns:
        ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service.
      • get

        public static EmailChannel get​(java.lang.String name,
                                       com.pulumi.core.Output<java.lang.String> id,
                                       @Nullable
                                       EmailChannelState state,
                                       @Nullable
                                       com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.