published on Thursday, May 14, 2026 by Pulumi
published on Thursday, May 14, 2026 by Pulumi
Manages an AWS WorkMail Group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.workmail.Organization("example", {
organizationAlias: "example-workmail-org",
deleteDirectory: true,
});
const exampleGroup = new aws.workmail.Group("example", {
organizationId: example.organizationId,
email: pulumi.interpolate`engineering@${example.defaultMailDomain}`,
name: "engineering",
});
import pulumi
import pulumi_aws as aws
example = aws.workmail.Organization("example",
organization_alias="example-workmail-org",
delete_directory=True)
example_group = aws.workmail.Group("example",
organization_id=example.organization_id,
email=example.default_mail_domain.apply(lambda default_mail_domain: f"engineering@{default_mail_domain}"),
name="engineering")
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/workmail"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := workmail.NewOrganization(ctx, "example", &workmail.OrganizationArgs{
OrganizationAlias: pulumi.String("example-workmail-org"),
DeleteDirectory: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = workmail.NewGroup(ctx, "example", &workmail.GroupArgs{
OrganizationId: example.OrganizationId,
Email: example.DefaultMailDomain.ApplyT(func(defaultMailDomain string) (string, error) {
return fmt.Sprintf("engineering@%v", defaultMailDomain), nil
}).(pulumi.StringOutput),
Name: pulumi.String("engineering"),
})
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.WorkMail.Organization("example", new()
{
OrganizationAlias = "example-workmail-org",
DeleteDirectory = true,
});
var exampleGroup = new Aws.WorkMail.Group("example", new()
{
OrganizationId = example.OrganizationId,
Email = example.DefaultMailDomain.Apply(defaultMailDomain => $"engineering@{defaultMailDomain}"),
Name = "engineering",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.workmail.Organization;
import com.pulumi.aws.workmail.OrganizationArgs;
import com.pulumi.aws.workmail.Group;
import com.pulumi.aws.workmail.GroupArgs;
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 example = new Organization("example", OrganizationArgs.builder()
.organizationAlias("example-workmail-org")
.deleteDirectory(true)
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.organizationId(example.organizationId())
.email(example.defaultMailDomain().applyValue(_defaultMailDomain -> String.format("engineering@%s", _defaultMailDomain)))
.name("engineering")
.build());
}
}
resources:
example:
type: aws:workmail:Organization
properties:
organizationAlias: example-workmail-org
deleteDirectory: true
exampleGroup:
type: aws:workmail:Group
name: example
properties:
organizationId: ${example.organizationId}
email: engineering@${example.defaultMailDomain}
name: engineering
Example coming soon!
Create Group Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);@overload
def Group(resource_name: str,
args: GroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Group(resource_name: str,
opts: Optional[ResourceOptions] = None,
email: Optional[str] = None,
organization_id: Optional[str] = None,
hidden_from_global_address_list: Optional[bool] = None,
name: Optional[str] = None,
region: Optional[str] = None)func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)type: aws:workmail:Group
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws_workmail_group" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args GroupArgs
- 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 GroupArgs
- 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 GroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GroupArgs
- 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 examplegroupResourceResourceFromWorkmailgroup = new Aws.WorkMail.Group("examplegroupResourceResourceFromWorkmailgroup", new()
{
Email = "string",
OrganizationId = "string",
HiddenFromGlobalAddressList = false,
Name = "string",
Region = "string",
});
example, err := workmail.NewGroup(ctx, "examplegroupResourceResourceFromWorkmailgroup", &workmail.GroupArgs{
Email: pulumi.String("string"),
OrganizationId: pulumi.String("string"),
HiddenFromGlobalAddressList: pulumi.Bool(false),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
resource "aws_workmail_group" "examplegroupResourceResourceFromWorkmailgroup" {
email = "string"
organization_id = "string"
hidden_from_global_address_list = false
name = "string"
region = "string"
}
var examplegroupResourceResourceFromWorkmailgroup = new com.pulumi.aws.workmail.Group("examplegroupResourceResourceFromWorkmailgroup", com.pulumi.aws.workmail.GroupArgs.builder()
.email("string")
.organizationId("string")
.hiddenFromGlobalAddressList(false)
.name("string")
.region("string")
.build());
examplegroup_resource_resource_from_workmailgroup = aws.workmail.Group("examplegroupResourceResourceFromWorkmailgroup",
email="string",
organization_id="string",
hidden_from_global_address_list=False,
name="string",
region="string")
const examplegroupResourceResourceFromWorkmailgroup = new aws.workmail.Group("examplegroupResourceResourceFromWorkmailgroup", {
email: "string",
organizationId: "string",
hiddenFromGlobalAddressList: false,
name: "string",
region: "string",
});
type: aws:workmail:Group
properties:
email: string
hiddenFromGlobalAddressList: false
name: string
organizationId: string
region: string
Group 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 Group resource accepts the following input properties:
- Email string
- Primary email address used to register the group with WorkMail.
- Organization
Id string Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- bool
- Whether to hide the group from the global address list.
- Name string
- Name of the group.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Email string
- Primary email address used to register the group with WorkMail.
- Organization
Id string Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- bool
- Whether to hide the group from the global address list.
- Name string
- Name of the group.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- email string
- Primary email address used to register the group with WorkMail.
- organization_
id string Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- bool
- Whether to hide the group from the global address list.
- name string
- Name of the group.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- email String
- Primary email address used to register the group with WorkMail.
- organization
Id String Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- Boolean
- Whether to hide the group from the global address list.
- name String
- Name of the group.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- email string
- Primary email address used to register the group with WorkMail.
- organization
Id string Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- boolean
- Whether to hide the group from the global address list.
- name string
- Name of the group.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- email str
- Primary email address used to register the group with WorkMail.
- organization_
id str Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- bool
- Whether to hide the group from the global address list.
- name str
- Name of the group.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- email String
- Primary email address used to register the group with WorkMail.
- organization
Id String Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- Boolean
- Whether to hide the group from the global address list.
- name String
- Name of the group.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Outputs
All input properties are implicitly available as output properties. Additionally, the Group resource produces the following output properties:
- Disabled
Date string - Timestamp when the group was disabled from WorkMail use.
- Enabled
Date string - Timestamp when the group was enabled for WorkMail use.
- Group
Id string - Identifier of the group.
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- Current WorkMail state of the group.
- Disabled
Date string - Timestamp when the group was disabled from WorkMail use.
- Enabled
Date string - Timestamp when the group was enabled for WorkMail use.
- Group
Id string - Identifier of the group.
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- Current WorkMail state of the group.
- disabled_
date string - Timestamp when the group was disabled from WorkMail use.
- enabled_
date string - Timestamp when the group was enabled for WorkMail use.
- group_
id string - Identifier of the group.
- id string
- The provider-assigned unique ID for this managed resource.
- state string
- Current WorkMail state of the group.
- disabled
Date String - Timestamp when the group was disabled from WorkMail use.
- enabled
Date String - Timestamp when the group was enabled for WorkMail use.
- group
Id String - Identifier of the group.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- Current WorkMail state of the group.
- disabled
Date string - Timestamp when the group was disabled from WorkMail use.
- enabled
Date string - Timestamp when the group was enabled for WorkMail use.
- group
Id string - Identifier of the group.
- id string
- The provider-assigned unique ID for this managed resource.
- state string
- Current WorkMail state of the group.
- disabled_
date str - Timestamp when the group was disabled from WorkMail use.
- enabled_
date str - Timestamp when the group was enabled for WorkMail use.
- group_
id str - Identifier of the group.
- id str
- The provider-assigned unique ID for this managed resource.
- state str
- Current WorkMail state of the group.
- disabled
Date String - Timestamp when the group was disabled from WorkMail use.
- enabled
Date String - Timestamp when the group was enabled for WorkMail use.
- group
Id String - Identifier of the group.
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- Current WorkMail state of the group.
Look up Existing Group Resource
Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
disabled_date: Optional[str] = None,
email: Optional[str] = None,
enabled_date: Optional[str] = None,
group_id: Optional[str] = None,
hidden_from_global_address_list: Optional[bool] = None,
name: Optional[str] = None,
organization_id: Optional[str] = None,
region: Optional[str] = None,
state: Optional[str] = None) -> Groupfunc GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)resources: _: type: aws:workmail:Group get: id: ${id}import {
to = aws_workmail_group.example
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.
- Disabled
Date string - Timestamp when the group was disabled from WorkMail use.
- Email string
- Primary email address used to register the group with WorkMail.
- Enabled
Date string - Timestamp when the group was enabled for WorkMail use.
- Group
Id string - Identifier of the group.
- bool
- Whether to hide the group from the global address list.
- Name string
- Name of the group.
- Organization
Id string Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- State string
- Current WorkMail state of the group.
- Disabled
Date string - Timestamp when the group was disabled from WorkMail use.
- Email string
- Primary email address used to register the group with WorkMail.
- Enabled
Date string - Timestamp when the group was enabled for WorkMail use.
- Group
Id string - Identifier of the group.
- bool
- Whether to hide the group from the global address list.
- Name string
- Name of the group.
- Organization
Id string Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- State string
- Current WorkMail state of the group.
- disabled_
date string - Timestamp when the group was disabled from WorkMail use.
- email string
- Primary email address used to register the group with WorkMail.
- enabled_
date string - Timestamp when the group was enabled for WorkMail use.
- group_
id string - Identifier of the group.
- bool
- Whether to hide the group from the global address list.
- name string
- Name of the group.
- organization_
id string Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- state string
- Current WorkMail state of the group.
- disabled
Date String - Timestamp when the group was disabled from WorkMail use.
- email String
- Primary email address used to register the group with WorkMail.
- enabled
Date String - Timestamp when the group was enabled for WorkMail use.
- group
Id String - Identifier of the group.
- Boolean
- Whether to hide the group from the global address list.
- name String
- Name of the group.
- organization
Id String Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- state String
- Current WorkMail state of the group.
- disabled
Date string - Timestamp when the group was disabled from WorkMail use.
- email string
- Primary email address used to register the group with WorkMail.
- enabled
Date string - Timestamp when the group was enabled for WorkMail use.
- group
Id string - Identifier of the group.
- boolean
- Whether to hide the group from the global address list.
- name string
- Name of the group.
- organization
Id string Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- state string
- Current WorkMail state of the group.
- disabled_
date str - Timestamp when the group was disabled from WorkMail use.
- email str
- Primary email address used to register the group with WorkMail.
- enabled_
date str - Timestamp when the group was enabled for WorkMail use.
- group_
id str - Identifier of the group.
- bool
- Whether to hide the group from the global address list.
- name str
- Name of the group.
- organization_
id str Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- state str
- Current WorkMail state of the group.
- disabled
Date String - Timestamp when the group was disabled from WorkMail use.
- email String
- Primary email address used to register the group with WorkMail.
- enabled
Date String - Timestamp when the group was enabled for WorkMail use.
- group
Id String - Identifier of the group.
- Boolean
- Whether to hide the group from the global address list.
- name String
- Name of the group.
- organization
Id String Identifier of the WorkMail organization where the group is managed.
The following arguments are optional:
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- state String
- Current WorkMail state of the group.
Import
Identity Schema
Required
groupId- Identifier of the group.organizationId- Identifier of the WorkMail organization where the group is managed.
Optional
accountId(String) AWS account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import WorkMail Group using organization_id,group_id. For example:
$ pulumi import aws:workmail/group:Group example m-1234567890abcdef,S-1-1-12-1234567890-123456789-123456789-1234
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.
published on Thursday, May 14, 2026 by Pulumi
