aws.sesv2.ContactList
Explore with Pulumi AI
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=[{
        "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.
Constructor 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=[{
        "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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ContactList resource accepts the following input properties:
- ContactList stringName 
- Name of the contact list. - The following arguments are optional: 
- Description string
- Description of what the contact list is about.
- Dictionary<string, string>
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Topics
List<ContactList Topic> 
- Configuration block(s) with topic for the contact list. Detailed below.
- ContactList stringName 
- Name of the contact list. - The following arguments are optional: 
- Description string
- Description of what the contact list is about.
- map[string]string
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Topics
[]ContactList Topic Args 
- Configuration block(s) with topic for the contact list. Detailed below.
- contactList StringName 
- Name of the contact list. - The following arguments are optional: 
- description String
- Description of what the contact list is about.
- Map<String,String>
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- topics
List<ContactList Topic> 
- Configuration block(s) with topic for the contact list. Detailed below.
- contactList stringName 
- Name of the contact list. - The following arguments are optional: 
- description string
- Description of what the contact list is about.
- {[key: string]: string}
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- topics
ContactList Topic[] 
- Configuration block(s) with topic for the contact list. Detailed below.
- contact_list_ strname 
- Name of the contact list. - The following arguments are optional: 
- description str
- Description of what the contact list is about.
- Mapping[str, str]
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- topics
Sequence[ContactList Topic Args] 
- Configuration block(s) with topic for the contact list. Detailed below.
- contactList StringName 
- Name of the contact list. - The following arguments are optional: 
- description String
- Description of what the contact list is about.
- Map<String>
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration 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.
- LastUpdated stringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Dictionary<string, string>
- 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.
- LastUpdated stringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- map[string]string
- 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.
- lastUpdated StringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Map<String,String>
- 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.
- lastUpdated stringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- {[key: string]: string}
- 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_ strtimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Mapping[str, str]
- 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.
- lastUpdated StringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Map<String>
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) -> ContactListfunc 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)resources:  _:    type: aws:sesv2:ContactList    get:      id: ${id}- 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.
- Arn string
- ContactList stringName 
- 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.
- LastUpdated stringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Dictionary<string, string>
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- Topics
List<ContactList Topic> 
- Configuration block(s) with topic for the contact list. Detailed below.
- Arn string
- ContactList stringName 
- 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.
- LastUpdated stringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- map[string]string
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- Topics
[]ContactList Topic Args 
- Configuration block(s) with topic for the contact list. Detailed below.
- arn String
- contactList StringName 
- 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.
- lastUpdated StringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Map<String,String>
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- topics
List<ContactList Topic> 
- Configuration block(s) with topic for the contact list. Detailed below.
- arn string
- contactList stringName 
- 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.
- lastUpdated stringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- {[key: string]: string}
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- topics
ContactList Topic[] 
- Configuration block(s) with topic for the contact list. Detailed below.
- arn str
- contact_list_ strname 
- 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_ strtimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Mapping[str, str]
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- topics
Sequence[ContactList Topic Args] 
- Configuration block(s) with topic for the contact list. Detailed below.
- arn String
- contactList StringName 
- 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.
- lastUpdated StringTimestamp 
- Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Map<String>
- Key-value map of resource tags for the contact list. If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- topics List<Property Map>
- Configuration block(s) with topic for the contact list. Detailed below.
Supporting Types
ContactListTopic, ContactListTopicArgs      
- DefaultSubscription stringStatus 
- 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.
- DefaultSubscription stringStatus 
- 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.
- defaultSubscription StringStatus 
- 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.
- defaultSubscription stringStatus 
- 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_ strstatus 
- 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.
- defaultSubscription StringStatus 
- 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 awsTerraform Provider.