1. Packages
  2. AWS Classic
  3. API Docs
  4. sesv2
  5. ContactList

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.sesv2.ContactList

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Resource for managing an AWS SESv2 (Simple Email V2) Contact List.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.sesv2.ContactList("example", {contactListName: "example"});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.sesv2.ContactList("example", contact_list_name="example")
    
    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 {
    		_, err := sesv2.NewContactList(ctx, "example", &sesv2.ContactListArgs{
    			ContactListName: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.SesV2.ContactList("example", new()
        {
            ContactListName = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sesv2.ContactList;
    import com.pulumi.aws.sesv2.ContactListArgs;
    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 ContactList("example", ContactListArgs.builder()        
                .contactListName("example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:sesv2:ContactList
        properties:
          contactListName: example
    

    Extended Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.sesv2.ContactList("example", {
        contactListName: "example",
        description: "description",
        topics: [{
            defaultSubscriptionStatus: "OPT_IN",
            description: "topic description",
            displayName: "Example Topic",
            topicName: "example-topic",
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.sesv2.ContactList("example",
        contact_list_name="example",
        description="description",
        topics=[aws.sesv2.ContactListTopicArgs(
            default_subscription_status="OPT_IN",
            description="topic description",
            display_name="Example Topic",
            topic_name="example-topic",
        )])
    
    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 {
    		_, err := sesv2.NewContactList(ctx, "example", &sesv2.ContactListArgs{
    			ContactListName: pulumi.String("example"),
    			Description:     pulumi.String("description"),
    			Topics: sesv2.ContactListTopicArray{
    				&sesv2.ContactListTopicArgs{
    					DefaultSubscriptionStatus: pulumi.String("OPT_IN"),
    					Description:               pulumi.String("topic description"),
    					DisplayName:               pulumi.String("Example Topic"),
    					TopicName:                 pulumi.String("example-topic"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.SesV2.ContactList("example", new()
        {
            ContactListName = "example",
            Description = "description",
            Topics = new[]
            {
                new Aws.SesV2.Inputs.ContactListTopicArgs
                {
                    DefaultSubscriptionStatus = "OPT_IN",
                    Description = "topic description",
                    DisplayName = "Example Topic",
                    TopicName = "example-topic",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sesv2.ContactList;
    import com.pulumi.aws.sesv2.ContactListArgs;
    import com.pulumi.aws.sesv2.inputs.ContactListTopicArgs;
    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 ContactList("example", ContactListArgs.builder()        
                .contactListName("example")
                .description("description")
                .topics(ContactListTopicArgs.builder()
                    .defaultSubscriptionStatus("OPT_IN")
                    .description("topic description")
                    .displayName("Example Topic")
                    .topicName("example-topic")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:sesv2:ContactList
        properties:
          contactListName: example
          description: description
          topics:
            - defaultSubscriptionStatus: OPT_IN
              description: topic description
              displayName: Example Topic
              topicName: example-topic
    

    Create ContactList Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ContactList(name: string, args: ContactListArgs, opts?: CustomResourceOptions);
    @overload
    def ContactList(resource_name: str,
                    args: ContactListArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ContactList(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    contact_list_name: Optional[str] = None,
                    description: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    topics: Optional[Sequence[ContactListTopicArgs]] = None)
    func NewContactList(ctx *Context, name string, args ContactListArgs, opts ...ResourceOption) (*ContactList, error)
    public ContactList(string name, ContactListArgs args, CustomResourceOptions? opts = null)
    public ContactList(String name, ContactListArgs args)
    public ContactList(String name, ContactListArgs args, CustomResourceOptions options)
    
    type: aws:sesv2:ContactList
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ContactListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ContactListArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ContactListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContactListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ContactListArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var contactListResource = new Aws.SesV2.ContactList("contactListResource", new()
    {
        ContactListName = "string",
        Description = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Topics = new[]
        {
            new Aws.SesV2.Inputs.ContactListTopicArgs
            {
                DefaultSubscriptionStatus = "string",
                DisplayName = "string",
                TopicName = "string",
                Description = "string",
            },
        },
    });
    
    example, err := sesv2.NewContactList(ctx, "contactListResource", &sesv2.ContactListArgs{
    	ContactListName: pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Topics: sesv2.ContactListTopicArray{
    		&sesv2.ContactListTopicArgs{
    			DefaultSubscriptionStatus: pulumi.String("string"),
    			DisplayName:               pulumi.String("string"),
    			TopicName:                 pulumi.String("string"),
    			Description:               pulumi.String("string"),
    		},
    	},
    })
    
    var contactListResource = new ContactList("contactListResource", ContactListArgs.builder()        
        .contactListName("string")
        .description("string")
        .tags(Map.of("string", "string"))
        .topics(ContactListTopicArgs.builder()
            .defaultSubscriptionStatus("string")
            .displayName("string")
            .topicName("string")
            .description("string")
            .build())
        .build());
    
    contact_list_resource = aws.sesv2.ContactList("contactListResource",
        contact_list_name="string",
        description="string",
        tags={
            "string": "string",
        },
        topics=[aws.sesv2.ContactListTopicArgs(
            default_subscription_status="string",
            display_name="string",
            topic_name="string",
            description="string",
        )])
    
    const contactListResource = new aws.sesv2.ContactList("contactListResource", {
        contactListName: "string",
        description: "string",
        tags: {
            string: "string",
        },
        topics: [{
            defaultSubscriptionStatus: "string",
            displayName: "string",
            topicName: "string",
            description: "string",
        }],
    });
    
    type: aws:sesv2:ContactList
    properties:
        contactListName: string
        description: string
        tags:
            string: string
        topics:
            - defaultSubscriptionStatus: string
              description: string
              displayName: string
              topicName: string
    

    ContactList Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ContactList resource accepts the following input properties:

    ContactListName string

    Name of the contact list.

    The following arguments are optional:

    Description string
    Description of what the contact list is about.
    Tags Dictionary<string, string>
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Topics List<ContactListTopic>
    Configuration block(s) with topic for the contact list. Detailed below.
    ContactListName string

    Name of the contact list.

    The following arguments are optional:

    Description string
    Description of what the contact list is about.
    Tags map[string]string
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Topics []ContactListTopicArgs
    Configuration block(s) with topic for the contact list. Detailed below.
    contactListName String

    Name of the contact list.

    The following arguments are optional:

    description String
    Description of what the contact list is about.
    tags Map<String,String>
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    topics List<ContactListTopic>
    Configuration block(s) with topic for the contact list. Detailed below.
    contactListName string

    Name of the contact list.

    The following arguments are optional:

    description string
    Description of what the contact list is about.
    tags {[key: string]: string}
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    topics ContactListTopic[]
    Configuration block(s) with topic for the contact list. Detailed below.
    contact_list_name str

    Name of the contact list.

    The following arguments are optional:

    description str
    Description of what the contact list is about.
    tags Mapping[str, str]
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    topics Sequence[ContactListTopicArgs]
    Configuration block(s) with topic for the contact list. Detailed below.
    contactListName String

    Name of the contact list.

    The following arguments are optional:

    description String
    Description of what the contact list is about.
    tags Map<String>
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    topics List<Property Map>
    Configuration block(s) with topic for the contact list. Detailed below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ContactList resource produces the following output properties:

    Arn string
    CreatedTimestamp string
    Timestamp noting when the contact list was created in ISO 8601 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedTimestamp string
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    CreatedTimestamp string
    Timestamp noting when the contact list was created in ISO 8601 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedTimestamp string
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    createdTimestamp String
    Timestamp noting when the contact list was created in ISO 8601 format.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedTimestamp String
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    createdTimestamp string
    Timestamp noting when the contact list was created in ISO 8601 format.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdatedTimestamp string
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    created_timestamp str
    Timestamp noting when the contact list was created in ISO 8601 format.
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated_timestamp str
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    createdTimestamp String
    Timestamp noting when the contact list was created in ISO 8601 format.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedTimestamp String
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    Look up Existing ContactList Resource

    Get an existing ContactList resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ContactListState, opts?: CustomResourceOptions): ContactList
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            contact_list_name: Optional[str] = None,
            created_timestamp: Optional[str] = None,
            description: Optional[str] = None,
            last_updated_timestamp: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            topics: Optional[Sequence[ContactListTopicArgs]] = None) -> ContactList
    func GetContactList(ctx *Context, name string, id IDInput, state *ContactListState, opts ...ResourceOption) (*ContactList, error)
    public static ContactList Get(string name, Input<string> id, ContactListState? state, CustomResourceOptions? opts = null)
    public static ContactList get(String name, Output<String> id, ContactListState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    ContactListName string

    Name of the contact list.

    The following arguments are optional:

    CreatedTimestamp string
    Timestamp noting when the contact list was created in ISO 8601 format.
    Description string
    Description of what the contact list is about.
    LastUpdatedTimestamp string
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    Tags Dictionary<string, string>
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Topics List<ContactListTopic>
    Configuration block(s) with topic for the contact list. Detailed below.
    Arn string
    ContactListName string

    Name of the contact list.

    The following arguments are optional:

    CreatedTimestamp string
    Timestamp noting when the contact list was created in ISO 8601 format.
    Description string
    Description of what the contact list is about.
    LastUpdatedTimestamp string
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    Tags map[string]string
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    Topics []ContactListTopicArgs
    Configuration block(s) with topic for the contact list. Detailed below.
    arn String
    contactListName String

    Name of the contact list.

    The following arguments are optional:

    createdTimestamp String
    Timestamp noting when the contact list was created in ISO 8601 format.
    description String
    Description of what the contact list is about.
    lastUpdatedTimestamp String
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    tags Map<String,String>
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    topics List<ContactListTopic>
    Configuration block(s) with topic for the contact list. Detailed below.
    arn string
    contactListName string

    Name of the contact list.

    The following arguments are optional:

    createdTimestamp string
    Timestamp noting when the contact list was created in ISO 8601 format.
    description string
    Description of what the contact list is about.
    lastUpdatedTimestamp string
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    tags {[key: string]: string}
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    topics ContactListTopic[]
    Configuration block(s) with topic for the contact list. Detailed below.
    arn str
    contact_list_name str

    Name of the contact list.

    The following arguments are optional:

    created_timestamp str
    Timestamp noting when the contact list was created in ISO 8601 format.
    description str
    Description of what the contact list is about.
    last_updated_timestamp str
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    tags Mapping[str, str]
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    topics Sequence[ContactListTopicArgs]
    Configuration block(s) with topic for the contact list. Detailed below.
    arn String
    contactListName String

    Name of the contact list.

    The following arguments are optional:

    createdTimestamp String
    Timestamp noting when the contact list was created in ISO 8601 format.
    description String
    Description of what the contact list is about.
    lastUpdatedTimestamp String
    Timestamp noting the last time the contact list was updated in ISO 8601 format.
    tags Map<String>
    Key-value map of resource tags for the contact list. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    topics List<Property Map>
    Configuration block(s) with topic for the contact list. Detailed below.

    Supporting Types

    ContactListTopic, ContactListTopicArgs

    DefaultSubscriptionStatus string
    Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
    DisplayName string
    Name of the topic the contact will see.
    TopicName string

    Name of the topic.

    The following arguments are optional:

    Description string
    Description of what the topic is about, which the contact will see.
    DefaultSubscriptionStatus string
    Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
    DisplayName string
    Name of the topic the contact will see.
    TopicName string

    Name of the topic.

    The following arguments are optional:

    Description string
    Description of what the topic is about, which the contact will see.
    defaultSubscriptionStatus String
    Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
    displayName String
    Name of the topic the contact will see.
    topicName String

    Name of the topic.

    The following arguments are optional:

    description String
    Description of what the topic is about, which the contact will see.
    defaultSubscriptionStatus string
    Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
    displayName string
    Name of the topic the contact will see.
    topicName string

    Name of the topic.

    The following arguments are optional:

    description string
    Description of what the topic is about, which the contact will see.
    default_subscription_status str
    Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
    display_name str
    Name of the topic the contact will see.
    topic_name str

    Name of the topic.

    The following arguments are optional:

    description str
    Description of what the topic is about, which the contact will see.
    defaultSubscriptionStatus String
    Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
    displayName String
    Name of the topic the contact will see.
    topicName String

    Name of the topic.

    The following arguments are optional:

    description String
    Description of what the topic is about, which the contact will see.

    Import

    Using pulumi import, import SESv2 (Simple Email V2) Contact List using the id. For example:

    $ pulumi import aws:sesv2/contactList:ContactList example example
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi