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=[{
"defaultSubscriptionStatus": "string",
"displayName": "string",
"topicName": "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:
- Contact
List 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Topics
List<Contact
List Topic> - Configuration block(s) with topic for the contact list. Detailed below.
- Contact
List 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Topics
[]Contact
List Topic Args - Configuration block(s) with topic for the contact list. Detailed below.
- contact
List 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - topics
List<Contact
List Topic> - Configuration block(s) with topic for the contact list. Detailed below.
- contact
List 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - topics
Contact
List 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - topics
Sequence[Contact
List Topic Args] - Configuration block(s) with topic for the contact list. Detailed below.
- contact
List 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_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
- Created
Timestamp string - Timestamp noting when the contact list was created in ISO 8601 format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringTimestamp - Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Dictionary<string, string>
- Arn string
- Created
Timestamp string - Timestamp noting when the contact list was created in ISO 8601 format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringTimestamp - Timestamp noting the last time the contact list was updated in ISO 8601 format.
- map[string]string
- arn String
- created
Timestamp String - Timestamp noting when the contact list was created in ISO 8601 format.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated StringTimestamp - Timestamp noting the last time the contact list was updated in ISO 8601 format.
- Map<String,String>
- arn string
- created
Timestamp string - Timestamp noting when the contact list was created in ISO 8601 format.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated 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
- created
Timestamp String - Timestamp noting when the contact list was created in ISO 8601 format.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated 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) -> 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.
- Arn string
- Contact
List stringName Name of the contact list.
The following arguments are optional:
- Created
Timestamp string - Timestamp noting when the contact list was created in ISO 8601 format.
- Description string
- Description of what the contact list is about.
- Last
Updated 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- Topics
List<Contact
List Topic> - Configuration block(s) with topic for the contact list. Detailed below.
- Arn string
- Contact
List stringName Name of the contact list.
The following arguments are optional:
- Created
Timestamp string - Timestamp noting when the contact list was created in ISO 8601 format.
- Description string
- Description of what the contact list is about.
- Last
Updated 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- Topics
[]Contact
List Topic Args - Configuration block(s) with topic for the contact list. Detailed below.
- arn String
- contact
List StringName Name of the contact list.
The following arguments are optional:
- created
Timestamp String - Timestamp noting when the contact list was created in ISO 8601 format.
- description String
- Description of what the contact list is about.
- last
Updated 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- topics
List<Contact
List Topic> - Configuration block(s) with topic for the contact list. Detailed below.
- arn string
- contact
List stringName Name of the contact list.
The following arguments are optional:
- created
Timestamp string - Timestamp noting when the contact list was created in ISO 8601 format.
- description string
- Description of what the contact list is about.
- last
Updated 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- topics
Contact
List 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_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- topics
Sequence[Contact
List Topic Args] - Configuration block(s) with topic for the contact list. Detailed below.
- arn String
- contact
List StringName Name of the contact list.
The following arguments are optional:
- created
Timestamp String - Timestamp noting when the contact list was created in ISO 8601 format.
- description String
- Description of what the contact list is about.
- last
Updated 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_tags
configuration 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
- Default
Subscription stringStatus - Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
- Display
Name string - Name of the topic the contact will see.
- Topic
Name 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 stringStatus - Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
- Display
Name string - Name of the topic the contact will see.
- Topic
Name 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 StringStatus - Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
- display
Name String - Name of the topic the contact will see.
- topic
Name 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 stringStatus - Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
- display
Name string - Name of the topic the contact will see.
- topic
Name 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.
- default
Subscription StringStatus - Default subscription status to be applied to a contact if the contact has not noted their preference for subscribing to a topic.
- display
Name String - Name of the topic the contact will see.
- topic
Name 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.