Domain class
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/v7/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
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_customerprofiles_domain" "example" {
domain_name = "example"
}
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.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 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 exampleBucket = new aws.s3.Bucket("example", {
bucket: "example",
forceDestroy: true,
});
const exampleBucketPolicy = new aws.s3.BucketPolicy("example", {
bucket: exampleBucket.id,
policy: pulumi.jsonStringify({
Version: "2012-10-17",
Statement: [{
Sid: "Customer Profiles S3 policy",
Effect: "Allow",
Action: [
"s3:GetObject",
"s3:PutObject",
"s3:ListBucket",
],
Resource: [
exampleBucket.arn,
pulumi.interpolate`${exampleBucket.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 = aws.s3.Bucket("example",
bucket="example",
force_destroy=True)
example_bucket_policy = aws.s3.BucketPolicy("example",
bucket=example_bucket.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.arn,
example_bucket.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 exampleBucket = new Aws.S3.Bucket("example", new()
{
BucketName = "example",
ForceDestroy = true,
});
var exampleBucketPolicy = new Aws.S3.BucketPolicy("example", new()
{
Bucket = exampleBucket.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[]
{
exampleBucket.Arn,
exampleBucket.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/v7/go/aws/customerprofiles"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/kms"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/s3"
"github.com/pulumi/pulumi-aws/sdk/v7/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]string{
"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
}
exampleBucket, err := s3.NewBucket(ctx, "example", &s3.BucketArgs{
Bucket: pulumi.String("example"),
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = s3.NewBucketPolicy(ctx, "example", &s3.BucketPolicyArgs{
Bucket: exampleBucket.ID().ToIDOutput().ToStringOutput(),
Policy: exampleBucket.Arn.ApplyT(func(arn string) (pulumi.String, error) {
var _zero pulumi.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{
arn,
fmt.Sprintf("%v/*", arn),
},
"Principal": map[string]string{
"Service": "profile.amazonaws.com",
},
},
},
})
if err != nil {
return _zero, err
}
json1 := string(tmpJSON1)
return pulumi.String(json1), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
_, err = customerprofiles.NewDomain(ctx, "test", &customerprofiles.DomainArgs{
DomainName: example,
DeadLetterQueueUrl: example.ID().ToIDOutput().ToStringOutput(),
DefaultEncryptionKey: exampleKey.Arn,
DefaultExpirationDays: pulumi.Int(365),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_sqs_queue" "example" {
name = "example"
policy = jsonencode({
"Version" = "2012-10-17"
"Statement" = [{
"Sid" = "Customer Profiles SQS policy"
"Effect" = "Allow"
"Action" = ["sqs:SendMessage"]
"Resource" = "*"
"Principal" = {
"Service" = "profile.amazonaws.com"
}
}]
})
}
resource "aws_kms_key" "example" {
description = "example"
deletion_window_in_days = 10
}
resource "aws_s3_bucket" "example" {
bucket = "example"
force_destroy = true
}
resource "aws_s3_bucketpolicy" "example" {
bucket = aws_s3_bucket.example.id
policy = jsonencode({
"Version" = "2012-10-17"
"Statement" = [{
"Sid" = "Customer Profiles S3 policy"
"Effect" = "Allow"
"Action" = ["s3:GetObject", "s3:PutObject", "s3:ListBucket"]
"Resource" = [aws_s3_bucket.example.arn, "${aws_s3_bucket.example.arn}/*"]
"Principal" = {
"Service" = "profile.amazonaws.com"
}
}]
})
}
resource "aws_customerprofiles_domain" "test" {
domain_name = aws_sqs_queue.example
dead_letter_queue_url = aws_sqs_queue.example.id
default_encryption_key = aws_kms_key.example.arn
default_expiration_days = 365
}
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.Bucket;
import com.pulumi.aws.s3.BucketArgs;
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.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 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 exampleBucket = new Bucket("exampleBucket", BucketArgs.builder()
.bucket("example")
.forceDestroy(true)
.build());
var exampleBucketPolicy = new BucketPolicy("exampleBucketPolicy", BucketPolicyArgs.builder()
.bucket(exampleBucket.id())
.policy(exampleBucket.arn().applyValue(_arn -> 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(
_arn,
String.format("%s/*", _arn)
)),
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
exampleBucket:
type: aws:s3:Bucket
name: example
properties:
bucket: example
forceDestroy: true
exampleBucketPolicy:
type: aws:s3:BucketPolicy
name: example
properties:
bucket: ${exampleBucket.id}
policy:
fn::toJSON:
Version: 2012-10-17
Statement:
- Sid: Customer Profiles S3 policy
Effect: Allow
Action:
- s3:GetObject
- s3:PutObject
- s3:ListBucket
Resource:
- ${exampleBucket.arn}
- ${exampleBucket.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
- Domain(String name, {DomainArgs? args, CustomResourceOptions? options})
-
Creates a new Domain.
nameThe Pulumi resource name.argsArguments used to configure this Domain. The set of arguments for Domain.optionsResource options controlling this resource's behavior. - Domain.reference(String urn)
- Creates a typed reference to an existing Domain resource.
Properties
-
arn
↔ Output<
String> -
ARN of the Customer Profiles Domain.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
deadLetterQueueUrl
↔ Output<
String?> -
The URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications.
latefinal
-
defaultEncryptionKey
↔ Output<
String?> -
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.
latefinal
-
defaultExpirationDays
↔ Output<
int> -
The default number of days until the data within the domain expires.
latefinal
-
domainName
↔ Output<
String> -
The name for your Customer Profile domain. It must be unique for your AWS account.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
matching
↔ Output<
DomainMatching?> -
A block that specifies the process of matching duplicate profiles. Documented below.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
ruleBasedMatching
↔ Output<
DomainRuleBasedMatching?> -
A block that specifies the process of matching duplicate profiles using the Rule-Based matching. Documented below.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Tags to apply to the domain. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited