Class ReceiptRule


  • public class ReceiptRule
    extends com.pulumi.resources.CustomResource
    Provides an SES receipt rule resource ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ses.ReceiptRule;
     import com.pulumi.aws.ses.ReceiptRuleArgs;
     import com.pulumi.aws.ses.inputs.ReceiptRuleAddHeaderActionArgs;
     import com.pulumi.aws.ses.inputs.ReceiptRuleS3ActionArgs;
     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) {
             // Add a header to the email and store it in S3
             var store = new ReceiptRule("store", ReceiptRuleArgs.builder()
                 .addHeaderActions(ReceiptRuleAddHeaderActionArgs.builder()
                     .headerName("Custom-Header")
                     .headerValue("Added by SES")
                     .position(1)
                     .build())
                 .s3Actions(ReceiptRuleS3ActionArgs.builder()
                     .bucketName("emails")
                     .position(2)
                     .build())
                 .name("store")
                 .ruleSetName("default-rule-set")
                 .recipients("karen@example.com")
                 .enabled(true)
                 .scanEnabled(true)
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import SES receipt rules using the ruleset name and rule name separated by `:`. For example: ```sh $ pulumi import aws:ses/receiptRule:ReceiptRule my_rule my_rule_set:my_rule ```
    • 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.util.Optional<java.util.List<ReceiptRuleAddHeaderAction>>> addHeaderActions()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> after()  
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleBounceAction>>> bounceActions()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()  
      static ReceiptRule get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ReceiptRuleState 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.util.Optional<java.util.List<ReceiptRuleLambdaAction>>> lambdaActions()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> recipients()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> ruleSetName()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleS3Action>>> s3Actions()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> scanEnabled()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleSnsAction>>> snsActions()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleStopAction>>> stopActions()  
      com.pulumi.core.Output<java.lang.String> tlsPolicy()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleWorkmailAction>>> workmailActions()  
      • 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

      • ReceiptRule

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

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

        public ReceiptRule​(java.lang.String name,
                           ReceiptRuleArgs 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

      • addHeaderActions

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleAddHeaderAction>>> addHeaderActions()
        Returns:
        Configuration block for adding a header to received emails. Detailed below.
      • after

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> after()
        Returns:
        Name of the rule to place this rule after.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        SES receipt rule ARN.
      • bounceActions

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleBounceAction>>> bounceActions()
        Returns:
        Configuration block for rejecting received emails. Detailed below.
      • enabled

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()
        Returns:
        If true, the rule will be enabled.
      • lambdaActions

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleLambdaAction>>> lambdaActions()
        Returns:
        Configuration block for calling an AWS Lambda function. Detailed below.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name of the rule.
      • recipients

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> recipients()
        Returns:
        List of email addresses.
      • 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.
      • ruleSetName

        public com.pulumi.core.Output<java.lang.String> ruleSetName()
        Returns:
        Name of the rule set. The following arguments are optional:
      • s3Actions

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleS3Action>>> s3Actions()
        Returns:
        Configuration block for storing received emails in an S3 bucket. Detailed below.
      • scanEnabled

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> scanEnabled()
        Returns:
        If true, incoming emails will be scanned for spam and viruses.
      • snsActions

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleSnsAction>>> snsActions()
        Returns:
        Configuration block for publishing to an SNS topic. Detailed below.
      • stopActions

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleStopAction>>> stopActions()
        Returns:
        Configuration block for terminating the evaluation of the receipt rule set. Detailed below.
      • tlsPolicy

        public com.pulumi.core.Output<java.lang.String> tlsPolicy()
        Returns:
        `Require` or `Optional`.
      • workmailActions

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ReceiptRuleWorkmailAction>>> workmailActions()
        Returns:
        Configuration block for calling Amazon WorkMail. Detailed below.
      • get

        public static ReceiptRule get​(java.lang.String name,
                                      com.pulumi.core.Output<java.lang.String> id,
                                      @Nullable
                                      ReceiptRuleState 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.