DomainArgs

data class DomainArgs(val deadLetterQueueUrl: Output<String>? = null, val defaultEncryptionKey: Output<String>? = null, val defaultExpirationDays: Output<Int>? = null, val domainName: Output<String>? = null, val matching: Output<DomainMatchingArgs>? = null, val ruleBasedMatching: Output<DomainRuleBasedMatchingArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<DomainArgs>

Resource for managing an Amazon Customer Profiles Domain. See the Create Domain for more information.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.customerprofiles.Domain("example", {domainName: "example"});
import pulumi
import pulumi_aws as aws
example = aws.customerprofiles.Domain("example", domain_name="example")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CustomerProfiles.Domain("example", new()
{
DomainName = "example",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/customerprofiles"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := customerprofiles.NewDomain(ctx, "example", &customerprofiles.DomainArgs{
DomainName: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.customerprofiles.Domain;
import com.pulumi.aws.customerprofiles.DomainArgs;
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 Domain("example", DomainArgs.builder()
.domainName("example")
.build());
}
}
resources:
example:
type: aws:customerprofiles:Domain
properties:
domainName: example

With SQS DLQ and KMS set

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.sqs.Queue("example", {
name: "example",
policy: JSON.stringify({
Version: "2012-10-17",
Statement: [{
Sid: "Customer Profiles SQS policy",
Effect: "Allow",
Action: ["sqs:SendMessage"],
Resource: "*",
Principal: {
Service: "profile.amazonaws.com",
},
}],
}),
});
const exampleKey = new aws.kms.Key("example", {
description: "example",
deletionWindowInDays: 10,
});
const exampleBucketV2 = new aws.s3.BucketV2("example", {
bucket: "example",
forceDestroy: true,
});
const exampleBucketPolicy = new aws.s3.BucketPolicy("example", {
bucket: exampleBucketV2.id,
policy: pulumi.jsonStringify({
Version: "2012-10-17",
Statement: [{
Sid: "Customer Profiles S3 policy",
Effect: "Allow",
Action: [
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket",
],
Resource: [
exampleBucketV2.arn,
pulumi.interpolate`${exampleBucketV2.arn}/*`,
],
Principal: {
Service: "profile.amazonaws.com",
},
}],
}),
});
const test = new aws.customerprofiles.Domain("test", {
domainName: example,
deadLetterQueueUrl: example.id,
defaultEncryptionKey: exampleKey.arn,
defaultExpirationDays: 365,
});
import pulumi
import json
import pulumi_aws as aws
example = aws.sqs.Queue("example",
name="example",
policy=json.dumps({
"Version": "2012-10-17",
"Statement": [{
"Sid": "Customer Profiles SQS policy",
"Effect": "Allow",
"Action": ["sqs:SendMessage"],
"Resource": "*",
"Principal": {
"Service": "profile.amazonaws.com",
},
}],
}))
example_key = aws.kms.Key("example",
description="example",
deletion_window_in_days=10)
example_bucket_v2 = aws.s3.BucketV2("example",
bucket="example",
force_destroy=True)
example_bucket_policy = aws.s3.BucketPolicy("example",
bucket=example_bucket_v2.id,
policy=pulumi.Output.json_dumps({
"Version": "2012-10-17",
"Statement": [{
"Sid": "Customer Profiles S3 policy",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket",
],
"Resource": [
example_bucket_v2.arn,
example_bucket_v2.arn.apply(lambda arn: f"{arn}/*"),
],
"Principal": {
"Service": "profile.amazonaws.com",
},
}],
}))
test = aws.customerprofiles.Domain("test",
domain_name=example,
dead_letter_queue_url=example.id,
default_encryption_key=example_key.arn,
default_expiration_days=365)
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Sqs.Queue("example", new()
{
Name = "example",
Policy = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Statement"] = new[]
{
new Dictionary<string, object?>
{
["Sid"] = "Customer Profiles SQS policy",
["Effect"] = "Allow",
["Action"] = new[]
{
"sqs:SendMessage",
},
["Resource"] = "*",
["Principal"] = new Dictionary<string, object?>
{
["Service"] = "profile.amazonaws.com",
},
},
},
}),
});
var exampleKey = new Aws.Kms.Key("example", new()
{
Description = "example",
DeletionWindowInDays = 10,
});
var exampleBucketV2 = new Aws.S3.BucketV2("example", new()
{
Bucket = "example",
ForceDestroy = true,
});
var exampleBucketPolicy = new Aws.S3.BucketPolicy("example", new()
{
Bucket = exampleBucketV2.Id,
Policy = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Statement"] = new[]
{
new Dictionary<string, object?>
{
["Sid"] = "Customer Profiles S3 policy",
["Effect"] = "Allow",
["Action"] = new[]
{
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket",
},
["Resource"] = new[]
{
exampleBucketV2.Arn,
exampleBucketV2.Arn.Apply(arn => $"{arn}/*"),
},
["Principal"] = new Dictionary<string, object?>
{
["Service"] = "profile.amazonaws.com",
},
},
},
})),
});
var test = new Aws.CustomerProfiles.Domain("test", new()
{
DomainName = example,
DeadLetterQueueUrl = example.Id,
DefaultEncryptionKey = exampleKey.Arn,
DefaultExpirationDays = 365,
});
});
package main
import (
"encoding/json"
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/customerprofiles"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sqs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"Version": "2012-10-17",
"Statement": []map[string]interface{}{
map[string]interface{}{
"Sid": "Customer Profiles SQS policy",
"Effect": "Allow",
"Action": []string{
"sqs:SendMessage",
},
"Resource": "*",
"Principal": map[string]interface{}{
"Service": "profile.amazonaws.com",
},
},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
example, err := sqs.NewQueue(ctx, "example", &sqs.QueueArgs{
Name: pulumi.String("example"),
Policy: pulumi.String(json0),
})
if err != nil {
return err
}
exampleKey, err := kms.NewKey(ctx, "example", &kms.KeyArgs{
Description: pulumi.String("example"),
DeletionWindowInDays: pulumi.Int(10),
})
if err != nil {
return err
}
exampleBucketV2, err := s3.NewBucketV2(ctx, "example", &s3.BucketV2Args{
Bucket: pulumi.String("example"),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = s3.NewBucketPolicy(ctx, "example", &s3.BucketPolicyArgs{
Bucket: exampleBucketV2.ID(),
Policy: pulumi.All(exampleBucketV2.Arn, exampleBucketV2.Arn).ApplyT(func(_args []interface{}) (string, error) {
exampleBucketV2Arn := _args[0].(string)
exampleBucketV2Arn1 := _args[1].(string)
var _zero string
tmpJSON1, err := json.Marshal(map[string]interface{}{
"Version": "2012-10-17",
"Statement": []map[string]interface{}{
map[string]interface{}{
"Sid": "Customer Profiles S3 policy",
"Effect": "Allow",
"Action": []string{
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket",
},
"Resource": []string{
exampleBucketV2Arn,
fmt.Sprintf("%v/*", exampleBucketV2Arn1),
},
"Principal": map[string]interface{}{
"Service": "profile.amazonaws.com",
},
},
},
})
if err != nil {
return _zero, err
}
json1 := string(tmpJSON1)
return json1, nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
_, err = customerprofiles.NewDomain(ctx, "test", &customerprofiles.DomainArgs{
DomainName: example,
DeadLetterQueueUrl: example.ID(),
DefaultEncryptionKey: exampleKey.Arn,
DefaultExpirationDays: pulumi.Int(365),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sqs.Queue;
import com.pulumi.aws.sqs.QueueArgs;
import com.pulumi.aws.kms.Key;
import com.pulumi.aws.kms.KeyArgs;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.s3.BucketPolicy;
import com.pulumi.aws.s3.BucketPolicyArgs;
import com.pulumi.aws.customerprofiles.Domain;
import com.pulumi.aws.customerprofiles.DomainArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 Queue("example", QueueArgs.builder()
.name("example")
.policy(serializeJson(
jsonObject(
jsonProperty("Version", "2012-10-17"),
jsonProperty("Statement", jsonArray(jsonObject(
jsonProperty("Sid", "Customer Profiles SQS policy"),
jsonProperty("Effect", "Allow"),
jsonProperty("Action", jsonArray("sqs:SendMessage")),
jsonProperty("Resource", "*"),
jsonProperty("Principal", jsonObject(
jsonProperty("Service", "profile.amazonaws.com")
))
)))
)))
.build());
var exampleKey = new Key("exampleKey", KeyArgs.builder()
.description("example")
.deletionWindowInDays(10)
.build());
var exampleBucketV2 = new BucketV2("exampleBucketV2", BucketV2Args.builder()
.bucket("example")
.forceDestroy(true)
.build());
var exampleBucketPolicy = new BucketPolicy("exampleBucketPolicy", BucketPolicyArgs.builder()
.bucket(exampleBucketV2.id())
.policy(Output.tuple(exampleBucketV2.arn(), exampleBucketV2.arn()).applyValue(values -> {
var exampleBucketV2Arn = values.t1;
var exampleBucketV2Arn1 = values.t2;
return serializeJson(
jsonObject(
jsonProperty("Version", "2012-10-17"),
jsonProperty("Statement", jsonArray(jsonObject(
jsonProperty("Sid", "Customer Profiles S3 policy"),
jsonProperty("Effect", "Allow"),
jsonProperty("Action", jsonArray(
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket"
)),
jsonProperty("Resource", jsonArray(
exampleBucketV2Arn,
String.format("%s/*", exampleBucketV2Arn1)
)),
jsonProperty("Principal", jsonObject(
jsonProperty("Service", "profile.amazonaws.com")
))
)))
));
}))
.build());
var test = new Domain("test", DomainArgs.builder()
.domainName(example)
.deadLetterQueueUrl(example.id())
.defaultEncryptionKey(exampleKey.arn())
.defaultExpirationDays(365)
.build());
}
}
resources:
example:
type: aws:sqs:Queue
properties:
name: example
policy:
fn::toJSON:
Version: 2012-10-17
Statement:
- Sid: Customer Profiles SQS policy
Effect: Allow
Action:
- sqs:SendMessage
Resource: '*'
Principal:
Service: profile.amazonaws.com
exampleKey:
type: aws:kms:Key
name: example
properties:
description: example
deletionWindowInDays: 10
exampleBucketV2:
type: aws:s3:BucketV2
name: example
properties:
bucket: example
forceDestroy: true
exampleBucketPolicy:
type: aws:s3:BucketPolicy
name: example
properties:
bucket: ${exampleBucketV2.id}
policy:
fn::toJSON:
Version: 2012-10-17
Statement:
- Sid: Customer Profiles S3 policy
Effect: Allow
Action:
- s3:GetObject
- s3:PutObject
- s3:ListBucket
Resource:
- ${exampleBucketV2.arn}
- ${exampleBucketV2.arn}/*
Principal:
Service: profile.amazonaws.com
test:
type: aws:customerprofiles:Domain
properties:
domainName: ${example}
deadLetterQueueUrl: ${example.id}
defaultEncryptionKey: ${exampleKey.arn}
defaultExpirationDays: 365

Import

Using pulumi import, import Amazon Customer Profiles Domain using the resource id. For example:

$ pulumi import aws:customerprofiles/domain:Domain example e6f777be-22d0-4b40-b307-5d2720ef16b2

Constructors

Link copied to clipboard
constructor(deadLetterQueueUrl: Output<String>? = null, defaultEncryptionKey: Output<String>? = null, defaultExpirationDays: Output<Int>? = null, domainName: Output<String>? = null, matching: Output<DomainMatchingArgs>? = null, ruleBasedMatching: Output<DomainRuleBasedMatchingArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val deadLetterQueueUrl: Output<String>? = null

The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications.

Link copied to clipboard
val defaultEncryptionKey: Output<String>? = null

The default encryption key, which is an AWS managed key, is used when no specific type of encryption key is specified. It is used to encrypt all data before it is placed in permanent or semi-permanent storage.

Link copied to clipboard
val defaultExpirationDays: Output<Int>? = null

The default number of days until the data within the domain expires. The following arguments are optional:

Link copied to clipboard
val domainName: Output<String>? = null

The name for your Customer Profile domain. It must be unique for your AWS account.

Link copied to clipboard
val matching: Output<DomainMatchingArgs>? = null

A block that specifies the process of matching duplicate profiles. Documented below.

Link copied to clipboard

A block that specifies the process of matching duplicate profiles using the Rule-Based matching. Documented below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Tags to apply to the domain. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. //////

Functions

Link copied to clipboard
open override fun toJava(): DomainArgs