diff --git a/examples/examples_nodejs_test.go b/examples/examples_nodejs_test.go index e4b26b5f96c..39e73547b37 100644 --- a/examples/examples_nodejs_test.go +++ b/examples/examples_nodejs_test.go @@ -580,10 +580,10 @@ func TestRegress3421Update(t *testing.T) { opttest.LocalProviderPath("aws", filepath.Join(getCwd(t), "..", "bin")), ) - test.SetConfig("listenerPort", "80") - test.Up() - test.SetConfig("listenerPort", "81") - test.Up() + test.SetConfig(t, "listenerPort", "80") + test.Up(t) + test.SetConfig(t, "listenerPort", "81") + test.Up(t) } func getJSBaseOptions(t *testing.T) integration.ProgramTestOptions { @@ -619,22 +619,22 @@ func TestUpdateImportedLambda(t *testing.T) { opttest.LocalProviderPath("aws", filepath.Join(getCwd(t), "..", "bin")), ) - test.SetConfig("runtime", "nodejs18.x") - res := test.Up() + test.SetConfig(t, "runtime", "nodejs18.x") + res := test.Up(t) lambdaName := res.Outputs["lambda_name"] lambdaRole := res.Outputs["lambda_role"] - secondStack := test.InstallStack("new_stack") + secondStack := test.InstallStack(t, "new_stack") // Check that we can reimport the lambda. - secondStack.SetConfig("lambda_name", lambdaName.Value.(string)) - secondStack.SetConfig("runtime", "nodejs18.x") - secondStack.SetConfig("lambda_role", lambdaRole.Value.(string)) - secondStack.Up() + secondStack.SetConfig(t, "lambda_name", lambdaName.Value.(string)) + secondStack.SetConfig(t, "runtime", "nodejs18.x") + secondStack.SetConfig(t, "lambda_role", lambdaRole.Value.(string)) + secondStack.Up(t) // Check that we can change a property on the lambda - secondStack.SetConfig("runtime", "nodejs16.x") - secondStack.Up() + secondStack.SetConfig(t, "runtime", "nodejs16.x") + secondStack.Up(t) } func TestNoCodeLambda(t *testing.T) { diff --git a/examples/examples_test.go b/examples/examples_test.go index e603c9da73c..f39dc348427 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -4,15 +4,15 @@ package examples import ( "context" - "io/ioutil" + "io" "math/rand" "net/http" "os" "testing" "time" + testreplay "github.com/pulumi/providertest/replay" pfbridge "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge" - testutils "github.com/pulumi/pulumi-terraform-bridge/testing/x" "github.com/pulumi/pulumi/pkg/v3/testing/integration" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -66,7 +66,7 @@ func validateAPITest(isValid func(body string)) func(t *testing.T, stack integra time.Sleep(10 * time.Second) } defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) assert.NoError(t, err) isValid(string(body)) } @@ -90,7 +90,8 @@ func replay(t *testing.T, sequence string) { []byte("{}"), )(nil) require.NoError(t, err) - testutils.ReplaySequence(t, p, sequence) + + testreplay.ReplaySequence(t, p, sequence) } var letterRunes = []rune("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") diff --git a/examples/go.mod b/examples/go.mod index 55a12c0c91e..7e5fba20b68 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -6,11 +6,11 @@ require ( github.com/aws/aws-sdk-go v1.55.5 github.com/aws/aws-sdk-go-v2/config v1.27.39 github.com/aws/aws-sdk-go-v2/service/iam v1.36.3 - github.com/pulumi/providertest v0.0.14 + github.com/pulumi/providertest v0.1.2 github.com/pulumi/pulumi-aws/provider/v6 v6.0.0-00010101000000-000000000000 - github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1 + github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0 github.com/pulumi/pulumi-terraform-bridge/testing v0.0.2-0.20230927165309-e3fd9503f2d3 - github.com/pulumi/pulumi/pkg/v3 v3.133.0 + github.com/pulumi/pulumi/pkg/v3 v3.136.1 github.com/stretchr/testify v1.9.0 ) @@ -449,10 +449,10 @@ require ( github.com/pulumi/esc v0.10.0 // indirect github.com/pulumi/inflector v0.1.1 // indirect github.com/pulumi/pulumi-java/pkg v0.16.1 // indirect - github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1 // indirect - github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect - github.com/pulumi/pulumi-yaml v1.10.0 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.133.0 // indirect + github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0 // indirect + github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10 // indirect + github.com/pulumi/pulumi-yaml v1.10.3 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.136.1 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect diff --git a/examples/go.sum b/examples/go.sum index 393fc8ae679..362725dfff6 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -2440,24 +2440,24 @@ github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE= github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c= github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+SobA= github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY= -github.com/pulumi/providertest v0.0.14 h1:5QlAPAAs82jkQraHsJvq1xgVfC7xtW8sFJwv2pHgxQ8= -github.com/pulumi/providertest v0.0.14/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= +github.com/pulumi/providertest v0.1.2 h1:9pJS9MeNkMyGwyNeHmvh8QqLgJy39Nk2/ym5u7r13ng= +github.com/pulumi/providertest v0.1.2/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= github.com/pulumi/pulumi-java/pkg v0.16.1 h1:orHnDWFbpOERwaBLry9f+6nqPX7x0MsrIkaa5QDGAns= github.com/pulumi/pulumi-java/pkg v0.16.1/go.mod h1:QH0DihZkWYle9XFc+LJ76m4hUo+fA3RdyaM90pqOaSM= -github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1 h1:39UPLBqbnvylm2heU/Rxa1+G++NZHdtW2Qg+hEhp5Wo= -github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1/go.mod h1:Zj4XBf+TuV3um7y82X3xk2yQiP+pnQ7YxMc4fq/rVVw= +github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0 h1:RIu3thoVfOR2yyyVS1xwuJ9ud05SPuXTf7Q+mnV6CQg= +github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0/go.mod h1:bcSV/ALzPJm4Ib1qS2rga27/O3DCGo2mV4XXGrcNfZE= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.2-0.20230927165309-e3fd9503f2d3 h1:bBWWeAtSPPYpKYlPZr2h0BiYgWQpHRIk0HO/MQmB+jc= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.2-0.20230927165309-e3fd9503f2d3/go.mod h1:vAQ7DeddebQ7FHdRaSG6ijuS28FS9PC4j8Y9wUuue0c= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1 h1:Twh0IKS1pGHP6LHDq1oR0vbHlV52asoUCC7spEJl3Ao= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1/go.mod h1:DvueDDtOIbf7W1Or4oH0o7F990ozp/ROmlm/vgLoe+g= -github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= -github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= -github.com/pulumi/pulumi-yaml v1.10.0 h1:djbgMJCxJBmYMr4kOpAXH5iauxGohYjEuTLfxD3NUUI= -github.com/pulumi/pulumi-yaml v1.10.0/go.mod h1://lTvwHpgJ+WBKeMGiLrd/jinc4dl3eWV5LZ3G8iCfE= -github.com/pulumi/pulumi/pkg/v3 v3.133.0 h1:j1rd7ToLZIQc5H0427ISOXSbOIIemZ6B0MXtRhQ38Yg= -github.com/pulumi/pulumi/pkg/v3 v3.133.0/go.mod h1:JtMAnrsFIccO138WcMfPdhO0PioDukKihnZC0xTRLwo= -github.com/pulumi/pulumi/sdk/v3 v3.133.0 h1:o+7dbJZY9BVgAjOF5GYIWgjp/zpKAgWZwD4pPjUMXKQ= -github.com/pulumi/pulumi/sdk/v3 v3.133.0/go.mod h1:J5kQEX8v87aeUhk6NdQXnjCo1DbiOnOiL3Sf2DuDda8= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0 h1:LOUHyMFGYkchv4Bzej7v+1W1ooaspgQG6/oZVJ+3lXY= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0/go.mod h1:aI3U3eanRcyOX05No+Nk6FuJvppx4jjcQwFelHSI8yE= +github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10 h1:VAXmHuldKd760ZlMe6khXeJY0ccY3TJF1g1FnWGccaM= +github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10/go.mod h1:+AQS/2h775Chx1a4vxb7cDdyiOsdEw2Q6gD7K5QCIwI= +github.com/pulumi/pulumi-yaml v1.10.3 h1:j5cjPiE32ILmjrWnC1cfZ0MWdqCZ8fg9wlaWk7HOtM4= +github.com/pulumi/pulumi-yaml v1.10.3/go.mod h1:MFMQXkaUP5YQUKVJ6Z/aagZDl2f8hdU9oGaJfTcMf1Y= +github.com/pulumi/pulumi/pkg/v3 v3.136.1 h1:zA8aJZ7qI0QgZkBKjjQaYHEcigK6pZfrbfG38imXzWo= +github.com/pulumi/pulumi/pkg/v3 v3.136.1/go.mod h1:Iz8QIs07AbEdrO52hEIEM5C4VBDUYFH2NdM9u2xxBxY= +github.com/pulumi/pulumi/sdk/v3 v3.136.1 h1:VJWTgdBrLvvzIkMbGq/epNEfT65P9gTvw14UF/I7hTI= +github.com/pulumi/pulumi/sdk/v3 v3.136.1/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= diff --git a/provider/cmd/pulumi-resource-aws/schema.json b/provider/cmd/pulumi-resource-aws/schema.json index cf7d31530a2..fea5a82ea9a 100644 --- a/provider/cmd/pulumi-resource-aws/schema.json +++ b/provider/cmd/pulumi-resource-aws/schema.json @@ -3248,7 +3248,7 @@ "items": { "$ref": "#/types/aws:appautoscaling/PolicyStepScalingPolicyConfigurationStepAdjustment:PolicyStepScalingPolicyConfigurationStepAdjustment" }, - "description": "Set of adjustments that manage scaling. These have the following structure:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ecsPolicy = new aws.appautoscaling.Policy(\"ecs_policy\", {stepScalingPolicyConfiguration: {\n stepAdjustments: [\n {\n metricIntervalLowerBound: \"1\",\n metricIntervalUpperBound: \"2\",\n scalingAdjustment: -1,\n },\n {\n metricIntervalLowerBound: \"2\",\n metricIntervalUpperBound: \"3\",\n scalingAdjustment: 1,\n },\n ],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\necs_policy = aws.appautoscaling.Policy(\"ecs_policy\", step_scaling_policy_configuration={\n \"step_adjustments\": [\n {\n \"metric_interval_lower_bound\": \"1\",\n \"metric_interval_upper_bound\": \"2\",\n \"scaling_adjustment\": -1,\n },\n {\n \"metric_interval_lower_bound\": \"2\",\n \"metric_interval_upper_bound\": \"3\",\n \"scaling_adjustment\": 1,\n },\n ],\n})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecsPolicy = new Aws.AppAutoScaling.Policy(\"ecs_policy\", new()\n {\n StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs\n {\n StepAdjustments = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs\n {\n MetricIntervalLowerBound = \"1\",\n MetricIntervalUpperBound = \"2\",\n ScalingAdjustment = -1,\n },\n new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs\n {\n MetricIntervalLowerBound = \"2\",\n MetricIntervalUpperBound = \"3\",\n ScalingAdjustment = 1,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := appautoscaling.NewPolicy(ctx, \"ecs_policy\", \u0026appautoscaling.PolicyArgs{\n\t\t\tStepScalingPolicyConfiguration: \u0026appautoscaling.PolicyStepScalingPolicyConfigurationArgs{\n\t\t\t\tStepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{\n\t\t\t\t\t\u0026appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{\n\t\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"1\"),\n\t\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"2\"),\n\t\t\t\t\t\tScalingAdjustment: int(-1),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{\n\t\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"2\"),\n\t\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"3\"),\n\t\t\t\t\t\tScalingAdjustment: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n ecsPolicy:\n type: aws:appautoscaling:Policy\n name: ecs_policy\n properties:\n stepScalingPolicyConfiguration:\n stepAdjustments:\n - metricIntervalLowerBound: 1\n metricIntervalUpperBound: 2\n scalingAdjustment: -1\n - metricIntervalLowerBound: 2\n metricIntervalUpperBound: 3\n scalingAdjustment: 1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n" + "description": "Set of adjustments that manage scaling. These have the following structure:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ecsPolicy = new aws.appautoscaling.Policy(\"ecs_policy\", {stepScalingPolicyConfiguration: {\n stepAdjustments: [\n {\n metricIntervalLowerBound: \"1\",\n metricIntervalUpperBound: \"2\",\n scalingAdjustment: -1,\n },\n {\n metricIntervalLowerBound: \"2\",\n metricIntervalUpperBound: \"3\",\n scalingAdjustment: 1,\n },\n ],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\necs_policy = aws.appautoscaling.Policy(\"ecs_policy\", step_scaling_policy_configuration={\n \"step_adjustments\": [\n {\n \"metric_interval_lower_bound\": \"1\",\n \"metric_interval_upper_bound\": \"2\",\n \"scaling_adjustment\": -1,\n },\n {\n \"metric_interval_lower_bound\": \"2\",\n \"metric_interval_upper_bound\": \"3\",\n \"scaling_adjustment\": 1,\n },\n ],\n})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecsPolicy = new Aws.AppAutoScaling.Policy(\"ecs_policy\", new()\n {\n StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs\n {\n StepAdjustments = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs\n {\n MetricIntervalLowerBound = \"1\",\n MetricIntervalUpperBound = \"2\",\n ScalingAdjustment = -1,\n },\n new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs\n {\n MetricIntervalLowerBound = \"2\",\n MetricIntervalUpperBound = \"3\",\n ScalingAdjustment = 1,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := appautoscaling.NewPolicy(ctx, \"ecs_policy\", \u0026appautoscaling.PolicyArgs{\n\t\t\tStepScalingPolicyConfiguration: \u0026appautoscaling.PolicyStepScalingPolicyConfigurationArgs{\n\t\t\t\tStepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{\n\t\t\t\t\t\u0026appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{\n\t\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"1\"),\n\t\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"2\"),\n\t\t\t\t\t\tScalingAdjustment: pulumi.Int(-1),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{\n\t\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"2\"),\n\t\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"3\"),\n\t\t\t\t\t\tScalingAdjustment: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ecsPolicy = new Policy(\"ecsPolicy\", PolicyArgs.builder()\n .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()\n .stepAdjustments( \n PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()\n .metricIntervalLowerBound(1)\n .metricIntervalUpperBound(2)\n .scalingAdjustment(-1)\n .build(),\n PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()\n .metricIntervalLowerBound(2)\n .metricIntervalUpperBound(3)\n .scalingAdjustment(1)\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ecsPolicy:\n type: aws:appautoscaling:Policy\n name: ecs_policy\n properties:\n stepScalingPolicyConfiguration:\n stepAdjustments:\n - metricIntervalLowerBound: 1\n metricIntervalUpperBound: 2\n scalingAdjustment: -1\n - metricIntervalLowerBound: 2\n metricIntervalUpperBound: 3\n scalingAdjustment: 1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n" } }, "type": "object" @@ -169369,7 +169369,7 @@ } }, "aws:acmpca/certificateAuthorityCertificate:CertificateAuthorityCertificate": { - "description": "Associates a certificate with an AWS Certificate Manager Private Certificate Authority (ACM PCA Certificate Authority). An ACM PCA Certificate Authority is unable to issue certificates until it has a certificate associated with it. A root level ACM PCA Certificate Authority is able to self-sign its own root certificate.\n\n## Example Usage\n\n### Self-Signed Root Certificate Authority Certificate\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleCertificateAuthority = new aws.acmpca.CertificateAuthority(\"example\", {\n type: \"ROOT\",\n certificateAuthorityConfiguration: {\n keyAlgorithm: \"RSA_4096\",\n signingAlgorithm: \"SHA512WITHRSA\",\n subject: {\n commonName: \"example.com\",\n },\n },\n});\nconst current = aws.getPartition({});\nconst exampleCertificate = new aws.acmpca.Certificate(\"example\", {\n certificateAuthorityArn: exampleCertificateAuthority.arn,\n certificateSigningRequest: exampleCertificateAuthority.certificateSigningRequest,\n signingAlgorithm: \"SHA512WITHRSA\",\n templateArn: current.then(current =\u003e `arn:${current.partition}:acm-pca:::template/RootCACertificate/V1`),\n validity: {\n type: \"YEARS\",\n value: \"1\",\n },\n});\nconst example = new aws.acmpca.CertificateAuthorityCertificate(\"example\", {\n certificateAuthorityArn: exampleCertificateAuthority.arn,\n certificate: exampleCertificate.certificate,\n certificateChain: exampleCertificate.certificateChain,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_certificate_authority = aws.acmpca.CertificateAuthority(\"example\",\n type=\"ROOT\",\n certificate_authority_configuration={\n \"key_algorithm\": \"RSA_4096\",\n \"signing_algorithm\": \"SHA512WITHRSA\",\n \"subject\": {\n \"common_name\": \"example.com\",\n },\n })\ncurrent = aws.get_partition()\nexample_certificate = aws.acmpca.Certificate(\"example\",\n certificate_authority_arn=example_certificate_authority.arn,\n certificate_signing_request=example_certificate_authority.certificate_signing_request,\n signing_algorithm=\"SHA512WITHRSA\",\n template_arn=f\"arn:{current.partition}:acm-pca:::template/RootCACertificate/V1\",\n validity={\n \"type\": \"YEARS\",\n \"value\": \"1\",\n })\nexample = aws.acmpca.CertificateAuthorityCertificate(\"example\",\n certificate_authority_arn=example_certificate_authority.arn,\n certificate=example_certificate.certificate,\n certificate_chain=example_certificate.certificate_chain)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleCertificateAuthority = new Aws.Acmpca.CertificateAuthority(\"example\", new()\n {\n Type = \"ROOT\",\n CertificateAuthorityConfiguration = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs\n {\n KeyAlgorithm = \"RSA_4096\",\n SigningAlgorithm = \"SHA512WITHRSA\",\n Subject = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs\n {\n CommonName = \"example.com\",\n },\n },\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var exampleCertificate = new Aws.Acmpca.Certificate(\"example\", new()\n {\n CertificateAuthorityArn = exampleCertificateAuthority.Arn,\n CertificateSigningRequest = exampleCertificateAuthority.CertificateSigningRequest,\n SigningAlgorithm = \"SHA512WITHRSA\",\n TemplateArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:acm-pca:::template/RootCACertificate/V1\",\n Validity = new Aws.Acmpca.Inputs.CertificateValidityArgs\n {\n Type = \"YEARS\",\n Value = \"1\",\n },\n });\n\n var example = new Aws.Acmpca.CertificateAuthorityCertificate(\"example\", new()\n {\n CertificateAuthorityArn = exampleCertificateAuthority.Arn,\n Certificate = exampleCertificate.Certificate,\n CertificateChain = exampleCertificate.CertificateChain,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/acmpca\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleCertificateAuthority, err := acmpca.NewCertificateAuthority(ctx, \"example\", \u0026acmpca.CertificateAuthorityArgs{\n\t\t\tType: pulumi.String(\"ROOT\"),\n\t\t\tCertificateAuthorityConfiguration: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationArgs{\n\t\t\t\tKeyAlgorithm: pulumi.String(\"RSA_4096\"),\n\t\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\t\tSubject: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs{\n\t\t\t\t\tCommonName: pulumi.String(\"example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleCertificate, err := acmpca.NewCertificate(ctx, \"example\", \u0026acmpca.CertificateArgs{\n\t\t\tCertificateAuthorityArn: exampleCertificateAuthority.Arn,\n\t\t\tCertificateSigningRequest: exampleCertificateAuthority.CertificateSigningRequest,\n\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\tTemplateArn: pulumi.Sprintf(\"arn:%v:acm-pca:::template/RootCACertificate/V1\", current.Partition),\n\t\t\tValidity: \u0026acmpca.CertificateValidityArgs{\n\t\t\t\tType: pulumi.String(\"YEARS\"),\n\t\t\t\tValue: pulumi.String(\"1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificateAuthorityCertificate(ctx, \"example\", \u0026acmpca.CertificateAuthorityCertificateArgs{\n\t\t\tCertificateAuthorityArn: exampleCertificateAuthority.Arn,\n\t\t\tCertificate: exampleCertificate.Certificate,\n\t\t\tCertificateChain: exampleCertificate.CertificateChain,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.acmpca.CertificateAuthority;\nimport com.pulumi.aws.acmpca.CertificateAuthorityArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.acmpca.Certificate;\nimport com.pulumi.aws.acmpca.CertificateArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateValidityArgs;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificate;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificateArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleCertificateAuthority = new CertificateAuthority(\"exampleCertificateAuthority\", CertificateAuthorityArgs.builder()\n .type(\"ROOT\")\n .certificateAuthorityConfiguration(CertificateAuthorityCertificateAuthorityConfigurationArgs.builder()\n .keyAlgorithm(\"RSA_4096\")\n .signingAlgorithm(\"SHA512WITHRSA\")\n .subject(CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs.builder()\n .commonName(\"example.com\")\n .build())\n .build())\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n var exampleCertificate = new Certificate(\"exampleCertificate\", CertificateArgs.builder()\n .certificateAuthorityArn(exampleCertificateAuthority.arn())\n .certificateSigningRequest(exampleCertificateAuthority.certificateSigningRequest())\n .signingAlgorithm(\"SHA512WITHRSA\")\n .templateArn(String.format(\"arn:%s:acm-pca:::template/RootCACertificate/V1\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .validity(CertificateValidityArgs.builder()\n .type(\"YEARS\")\n .value(1)\n .build())\n .build());\n\n var example = new CertificateAuthorityCertificate(\"example\", CertificateAuthorityCertificateArgs.builder()\n .certificateAuthorityArn(exampleCertificateAuthority.arn())\n .certificate(exampleCertificate.certificate())\n .certificateChain(exampleCertificate.certificateChain())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:acmpca:CertificateAuthorityCertificate\n properties:\n certificateAuthorityArn: ${exampleCertificateAuthority.arn}\n certificate: ${exampleCertificate.certificate}\n certificateChain: ${exampleCertificate.certificateChain}\n exampleCertificate:\n type: aws:acmpca:Certificate\n name: example\n properties:\n certificateAuthorityArn: ${exampleCertificateAuthority.arn}\n certificateSigningRequest: ${exampleCertificateAuthority.certificateSigningRequest}\n signingAlgorithm: SHA512WITHRSA\n templateArn: arn:${current.partition}:acm-pca:::template/RootCACertificate/V1\n validity:\n type: YEARS\n value: 1\n exampleCertificateAuthority:\n type: aws:acmpca:CertificateAuthority\n name: example\n properties:\n type: ROOT\n certificateAuthorityConfiguration:\n keyAlgorithm: RSA_4096\n signingAlgorithm: SHA512WITHRSA\n subject:\n commonName: example.com\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Certificate for Subordinate Certificate Authority\n\nNote that the certificate for the subordinate certificate authority must be issued by the root certificate authority using a signing request from the subordinate certificate authority.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst subordinateCertificateAuthority = new aws.acmpca.CertificateAuthority(\"subordinate\", {\n type: \"SUBORDINATE\",\n certificateAuthorityConfiguration: {\n keyAlgorithm: \"RSA_2048\",\n signingAlgorithm: \"SHA512WITHRSA\",\n subject: {\n commonName: \"sub.example.com\",\n },\n },\n});\nconst root = new aws.acmpca.CertificateAuthority(\"root\", {});\nconst current = aws.getPartition({});\nconst subordinateCertificate = new aws.acmpca.Certificate(\"subordinate\", {\n certificateAuthorityArn: root.arn,\n certificateSigningRequest: subordinateCertificateAuthority.certificateSigningRequest,\n signingAlgorithm: \"SHA512WITHRSA\",\n templateArn: current.then(current =\u003e `arn:${current.partition}:acm-pca:::template/SubordinateCACertificate_PathLen0/V1`),\n validity: {\n type: \"YEARS\",\n value: \"1\",\n },\n});\nconst subordinate = new aws.acmpca.CertificateAuthorityCertificate(\"subordinate\", {\n certificateAuthorityArn: subordinateCertificateAuthority.arn,\n certificate: subordinateCertificate.certificate,\n certificateChain: subordinateCertificate.certificateChain,\n});\nconst rootCertificateAuthorityCertificate = new aws.acmpca.CertificateAuthorityCertificate(\"root\", {});\nconst rootCertificate = new aws.acmpca.Certificate(\"root\", {});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nsubordinate_certificate_authority = aws.acmpca.CertificateAuthority(\"subordinate\",\n type=\"SUBORDINATE\",\n certificate_authority_configuration={\n \"key_algorithm\": \"RSA_2048\",\n \"signing_algorithm\": \"SHA512WITHRSA\",\n \"subject\": {\n \"common_name\": \"sub.example.com\",\n },\n })\nroot = aws.acmpca.CertificateAuthority(\"root\")\ncurrent = aws.get_partition()\nsubordinate_certificate = aws.acmpca.Certificate(\"subordinate\",\n certificate_authority_arn=root.arn,\n certificate_signing_request=subordinate_certificate_authority.certificate_signing_request,\n signing_algorithm=\"SHA512WITHRSA\",\n template_arn=f\"arn:{current.partition}:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\",\n validity={\n \"type\": \"YEARS\",\n \"value\": \"1\",\n })\nsubordinate = aws.acmpca.CertificateAuthorityCertificate(\"subordinate\",\n certificate_authority_arn=subordinate_certificate_authority.arn,\n certificate=subordinate_certificate.certificate,\n certificate_chain=subordinate_certificate.certificate_chain)\nroot_certificate_authority_certificate = aws.acmpca.CertificateAuthorityCertificate(\"root\")\nroot_certificate = aws.acmpca.Certificate(\"root\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var subordinateCertificateAuthority = new Aws.Acmpca.CertificateAuthority(\"subordinate\", new()\n {\n Type = \"SUBORDINATE\",\n CertificateAuthorityConfiguration = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs\n {\n KeyAlgorithm = \"RSA_2048\",\n SigningAlgorithm = \"SHA512WITHRSA\",\n Subject = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs\n {\n CommonName = \"sub.example.com\",\n },\n },\n });\n\n var root = new Aws.Acmpca.CertificateAuthority(\"root\");\n\n var current = Aws.GetPartition.Invoke();\n\n var subordinateCertificate = new Aws.Acmpca.Certificate(\"subordinate\", new()\n {\n CertificateAuthorityArn = root.Arn,\n CertificateSigningRequest = subordinateCertificateAuthority.CertificateSigningRequest,\n SigningAlgorithm = \"SHA512WITHRSA\",\n TemplateArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\",\n Validity = new Aws.Acmpca.Inputs.CertificateValidityArgs\n {\n Type = \"YEARS\",\n Value = \"1\",\n },\n });\n\n var subordinate = new Aws.Acmpca.CertificateAuthorityCertificate(\"subordinate\", new()\n {\n CertificateAuthorityArn = subordinateCertificateAuthority.Arn,\n Certificate = subordinateCertificate.Certificate,\n CertificateChain = subordinateCertificate.CertificateChain,\n });\n\n var rootCertificateAuthorityCertificate = new Aws.Acmpca.CertificateAuthorityCertificate(\"root\");\n\n var rootCertificate = new Aws.Acmpca.Certificate(\"root\");\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/acmpca\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsubordinateCertificateAuthority, err := acmpca.NewCertificateAuthority(ctx, \"subordinate\", \u0026acmpca.CertificateAuthorityArgs{\n\t\t\tType: pulumi.String(\"SUBORDINATE\"),\n\t\t\tCertificateAuthorityConfiguration: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationArgs{\n\t\t\t\tKeyAlgorithm: pulumi.String(\"RSA_2048\"),\n\t\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\t\tSubject: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs{\n\t\t\t\t\tCommonName: pulumi.String(\"sub.example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\troot, err := acmpca.NewCertificateAuthority(ctx, \"root\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsubordinateCertificate, err := acmpca.NewCertificate(ctx, \"subordinate\", \u0026acmpca.CertificateArgs{\n\t\t\tCertificateAuthorityArn: root.Arn,\n\t\t\tCertificateSigningRequest: subordinateCertificateAuthority.CertificateSigningRequest,\n\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\tTemplateArn: pulumi.Sprintf(\"arn:%v:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\", current.Partition),\n\t\t\tValidity: \u0026acmpca.CertificateValidityArgs{\n\t\t\t\tType: pulumi.String(\"YEARS\"),\n\t\t\t\tValue: pulumi.String(\"1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificateAuthorityCertificate(ctx, \"subordinate\", \u0026acmpca.CertificateAuthorityCertificateArgs{\n\t\t\tCertificateAuthorityArn: subordinateCertificateAuthority.Arn,\n\t\t\tCertificate: subordinateCertificate.Certificate,\n\t\t\tCertificateChain: subordinateCertificate.CertificateChain,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificateAuthorityCertificate(ctx, \"root\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificate(ctx, \"root\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.acmpca.CertificateAuthority;\nimport com.pulumi.aws.acmpca.CertificateAuthorityArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.acmpca.Certificate;\nimport com.pulumi.aws.acmpca.CertificateArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateValidityArgs;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificate;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificateArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var subordinateCertificateAuthority = new CertificateAuthority(\"subordinateCertificateAuthority\", CertificateAuthorityArgs.builder()\n .type(\"SUBORDINATE\")\n .certificateAuthorityConfiguration(CertificateAuthorityCertificateAuthorityConfigurationArgs.builder()\n .keyAlgorithm(\"RSA_2048\")\n .signingAlgorithm(\"SHA512WITHRSA\")\n .subject(CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs.builder()\n .commonName(\"sub.example.com\")\n .build())\n .build())\n .build());\n\n var root = new CertificateAuthority(\"root\");\n\n final var current = AwsFunctions.getPartition();\n\n var subordinateCertificate = new Certificate(\"subordinateCertificate\", CertificateArgs.builder()\n .certificateAuthorityArn(root.arn())\n .certificateSigningRequest(subordinateCertificateAuthority.certificateSigningRequest())\n .signingAlgorithm(\"SHA512WITHRSA\")\n .templateArn(String.format(\"arn:%s:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .validity(CertificateValidityArgs.builder()\n .type(\"YEARS\")\n .value(1)\n .build())\n .build());\n\n var subordinate = new CertificateAuthorityCertificate(\"subordinate\", CertificateAuthorityCertificateArgs.builder()\n .certificateAuthorityArn(subordinateCertificateAuthority.arn())\n .certificate(subordinateCertificate.certificate())\n .certificateChain(subordinateCertificate.certificateChain())\n .build());\n\n var rootCertificateAuthorityCertificate = new CertificateAuthorityCertificate(\"rootCertificateAuthorityCertificate\");\n\n var rootCertificate = new Certificate(\"rootCertificate\");\n\n }\n}\n```\n```yaml\nresources:\n subordinate:\n type: aws:acmpca:CertificateAuthorityCertificate\n properties:\n certificateAuthorityArn: ${subordinateCertificateAuthority.arn}\n certificate: ${subordinateCertificate.certificate}\n certificateChain: ${subordinateCertificate.certificateChain}\n subordinateCertificate:\n type: aws:acmpca:Certificate\n name: subordinate\n properties:\n certificateAuthorityArn: ${root.arn}\n certificateSigningRequest: ${subordinateCertificateAuthority.certificateSigningRequest}\n signingAlgorithm: SHA512WITHRSA\n templateArn: arn:${current.partition}:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\n validity:\n type: YEARS\n value: 1\n subordinateCertificateAuthority:\n type: aws:acmpca:CertificateAuthority\n name: subordinate\n properties:\n type: SUBORDINATE\n certificateAuthorityConfiguration:\n keyAlgorithm: RSA_2048\n signingAlgorithm: SHA512WITHRSA\n subject:\n commonName: sub.example.com\n root:\n type: aws:acmpca:CertificateAuthority\n rootCertificateAuthorityCertificate:\n type: aws:acmpca:CertificateAuthorityCertificate\n name: root\n rootCertificate:\n type: aws:acmpca:Certificate\n name: root\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Associates a certificate with an AWS Certificate Manager Private Certificate Authority (ACM PCA Certificate Authority). An ACM PCA Certificate Authority is unable to issue certificates until it has a certificate associated with it. A root level ACM PCA Certificate Authority is able to self-sign its own root certificate.\n\n## Example Usage\n\n### Self-Signed Root Certificate Authority Certificate\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleCertificateAuthority = new aws.acmpca.CertificateAuthority(\"example\", {\n type: \"ROOT\",\n certificateAuthorityConfiguration: {\n keyAlgorithm: \"RSA_4096\",\n signingAlgorithm: \"SHA512WITHRSA\",\n subject: {\n commonName: \"example.com\",\n },\n },\n});\nconst current = aws.getPartition({});\nconst exampleCertificate = new aws.acmpca.Certificate(\"example\", {\n certificateAuthorityArn: exampleCertificateAuthority.arn,\n certificateSigningRequest: exampleCertificateAuthority.certificateSigningRequest,\n signingAlgorithm: \"SHA512WITHRSA\",\n templateArn: current.then(current =\u003e `arn:${current.partition}:acm-pca:::template/RootCACertificate/V1`),\n validity: {\n type: \"YEARS\",\n value: \"1\",\n },\n});\nconst example = new aws.acmpca.CertificateAuthorityCertificate(\"example\", {\n certificateAuthorityArn: exampleCertificateAuthority.arn,\n certificate: exampleCertificate.certificate,\n certificateChain: exampleCertificate.certificateChain,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_certificate_authority = aws.acmpca.CertificateAuthority(\"example\",\n type=\"ROOT\",\n certificate_authority_configuration={\n \"key_algorithm\": \"RSA_4096\",\n \"signing_algorithm\": \"SHA512WITHRSA\",\n \"subject\": {\n \"common_name\": \"example.com\",\n },\n })\ncurrent = aws.get_partition()\nexample_certificate = aws.acmpca.Certificate(\"example\",\n certificate_authority_arn=example_certificate_authority.arn,\n certificate_signing_request=example_certificate_authority.certificate_signing_request,\n signing_algorithm=\"SHA512WITHRSA\",\n template_arn=f\"arn:{current.partition}:acm-pca:::template/RootCACertificate/V1\",\n validity={\n \"type\": \"YEARS\",\n \"value\": \"1\",\n })\nexample = aws.acmpca.CertificateAuthorityCertificate(\"example\",\n certificate_authority_arn=example_certificate_authority.arn,\n certificate=example_certificate.certificate,\n certificate_chain=example_certificate.certificate_chain)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleCertificateAuthority = new Aws.Acmpca.CertificateAuthority(\"example\", new()\n {\n Type = \"ROOT\",\n CertificateAuthorityConfiguration = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs\n {\n KeyAlgorithm = \"RSA_4096\",\n SigningAlgorithm = \"SHA512WITHRSA\",\n Subject = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs\n {\n CommonName = \"example.com\",\n },\n },\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var exampleCertificate = new Aws.Acmpca.Certificate(\"example\", new()\n {\n CertificateAuthorityArn = exampleCertificateAuthority.Arn,\n CertificateSigningRequest = exampleCertificateAuthority.CertificateSigningRequest,\n SigningAlgorithm = \"SHA512WITHRSA\",\n TemplateArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:acm-pca:::template/RootCACertificate/V1\",\n Validity = new Aws.Acmpca.Inputs.CertificateValidityArgs\n {\n Type = \"YEARS\",\n Value = \"1\",\n },\n });\n\n var example = new Aws.Acmpca.CertificateAuthorityCertificate(\"example\", new()\n {\n CertificateAuthorityArn = exampleCertificateAuthority.Arn,\n Certificate = exampleCertificate.Certificate,\n CertificateChain = exampleCertificate.CertificateChain,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/acmpca\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleCertificateAuthority, err := acmpca.NewCertificateAuthority(ctx, \"example\", \u0026acmpca.CertificateAuthorityArgs{\n\t\t\tType: pulumi.String(\"ROOT\"),\n\t\t\tCertificateAuthorityConfiguration: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationArgs{\n\t\t\t\tKeyAlgorithm: pulumi.String(\"RSA_4096\"),\n\t\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\t\tSubject: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs{\n\t\t\t\t\tCommonName: pulumi.String(\"example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleCertificate, err := acmpca.NewCertificate(ctx, \"example\", \u0026acmpca.CertificateArgs{\n\t\t\tCertificateAuthorityArn: exampleCertificateAuthority.Arn,\n\t\t\tCertificateSigningRequest: exampleCertificateAuthority.CertificateSigningRequest,\n\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\tTemplateArn: pulumi.Sprintf(\"arn:%v:acm-pca:::template/RootCACertificate/V1\", current.Partition),\n\t\t\tValidity: \u0026acmpca.CertificateValidityArgs{\n\t\t\t\tType: pulumi.String(\"YEARS\"),\n\t\t\t\tValue: pulumi.String(\"1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificateAuthorityCertificate(ctx, \"example\", \u0026acmpca.CertificateAuthorityCertificateArgs{\n\t\t\tCertificateAuthorityArn: exampleCertificateAuthority.Arn,\n\t\t\tCertificate: exampleCertificate.Certificate,\n\t\t\tCertificateChain: exampleCertificate.CertificateChain,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.acmpca.CertificateAuthority;\nimport com.pulumi.aws.acmpca.CertificateAuthorityArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.acmpca.Certificate;\nimport com.pulumi.aws.acmpca.CertificateArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateValidityArgs;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificate;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificateArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleCertificateAuthority = new CertificateAuthority(\"exampleCertificateAuthority\", CertificateAuthorityArgs.builder()\n .type(\"ROOT\")\n .certificateAuthorityConfiguration(CertificateAuthorityCertificateAuthorityConfigurationArgs.builder()\n .keyAlgorithm(\"RSA_4096\")\n .signingAlgorithm(\"SHA512WITHRSA\")\n .subject(CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs.builder()\n .commonName(\"example.com\")\n .build())\n .build())\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n var exampleCertificate = new Certificate(\"exampleCertificate\", CertificateArgs.builder()\n .certificateAuthorityArn(exampleCertificateAuthority.arn())\n .certificateSigningRequest(exampleCertificateAuthority.certificateSigningRequest())\n .signingAlgorithm(\"SHA512WITHRSA\")\n .templateArn(String.format(\"arn:%s:acm-pca:::template/RootCACertificate/V1\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .validity(CertificateValidityArgs.builder()\n .type(\"YEARS\")\n .value(1)\n .build())\n .build());\n\n var example = new CertificateAuthorityCertificate(\"example\", CertificateAuthorityCertificateArgs.builder()\n .certificateAuthorityArn(exampleCertificateAuthority.arn())\n .certificate(exampleCertificate.certificate())\n .certificateChain(exampleCertificate.certificateChain())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:acmpca:CertificateAuthorityCertificate\n properties:\n certificateAuthorityArn: ${exampleCertificateAuthority.arn}\n certificate: ${exampleCertificate.certificate}\n certificateChain: ${exampleCertificate.certificateChain}\n exampleCertificate:\n type: aws:acmpca:Certificate\n name: example\n properties:\n certificateAuthorityArn: ${exampleCertificateAuthority.arn}\n certificateSigningRequest: ${exampleCertificateAuthority.certificateSigningRequest}\n signingAlgorithm: SHA512WITHRSA\n templateArn: arn:${current.partition}:acm-pca:::template/RootCACertificate/V1\n validity:\n type: YEARS\n value: 1\n exampleCertificateAuthority:\n type: aws:acmpca:CertificateAuthority\n name: example\n properties:\n type: ROOT\n certificateAuthorityConfiguration:\n keyAlgorithm: RSA_4096\n signingAlgorithm: SHA512WITHRSA\n subject:\n commonName: example.com\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Certificate for Subordinate Certificate Authority\n\nNote that the certificate for the subordinate certificate authority must be issued by the root certificate authority using a signing request from the subordinate certificate authority.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst subordinateCertificateAuthority = new aws.acmpca.CertificateAuthority(\"subordinate\", {\n type: \"SUBORDINATE\",\n certificateAuthorityConfiguration: {\n keyAlgorithm: \"RSA_2048\",\n signingAlgorithm: \"SHA512WITHRSA\",\n subject: {\n commonName: \"sub.example.com\",\n },\n },\n});\nconst root = new aws.acmpca.CertificateAuthority(\"root\", {});\nconst current = aws.getPartition({});\nconst subordinateCertificate = new aws.acmpca.Certificate(\"subordinate\", {\n certificateAuthorityArn: root.arn,\n certificateSigningRequest: subordinateCertificateAuthority.certificateSigningRequest,\n signingAlgorithm: \"SHA512WITHRSA\",\n templateArn: current.then(current =\u003e `arn:${current.partition}:acm-pca:::template/SubordinateCACertificate_PathLen0/V1`),\n validity: {\n type: \"YEARS\",\n value: \"1\",\n },\n});\nconst subordinate = new aws.acmpca.CertificateAuthorityCertificate(\"subordinate\", {\n certificateAuthorityArn: subordinateCertificateAuthority.arn,\n certificate: subordinateCertificate.certificate,\n certificateChain: subordinateCertificate.certificateChain,\n});\nconst rootCertificateAuthorityCertificate = new aws.acmpca.CertificateAuthorityCertificate(\"root\", {});\nconst rootCertificate = new aws.acmpca.Certificate(\"root\", {});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nsubordinate_certificate_authority = aws.acmpca.CertificateAuthority(\"subordinate\",\n type=\"SUBORDINATE\",\n certificate_authority_configuration={\n \"key_algorithm\": \"RSA_2048\",\n \"signing_algorithm\": \"SHA512WITHRSA\",\n \"subject\": {\n \"common_name\": \"sub.example.com\",\n },\n })\nroot = aws.acmpca.CertificateAuthority(\"root\")\ncurrent = aws.get_partition()\nsubordinate_certificate = aws.acmpca.Certificate(\"subordinate\",\n certificate_authority_arn=root.arn,\n certificate_signing_request=subordinate_certificate_authority.certificate_signing_request,\n signing_algorithm=\"SHA512WITHRSA\",\n template_arn=f\"arn:{current.partition}:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\",\n validity={\n \"type\": \"YEARS\",\n \"value\": \"1\",\n })\nsubordinate = aws.acmpca.CertificateAuthorityCertificate(\"subordinate\",\n certificate_authority_arn=subordinate_certificate_authority.arn,\n certificate=subordinate_certificate.certificate,\n certificate_chain=subordinate_certificate.certificate_chain)\nroot_certificate_authority_certificate = aws.acmpca.CertificateAuthorityCertificate(\"root\")\nroot_certificate = aws.acmpca.Certificate(\"root\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var subordinateCertificateAuthority = new Aws.Acmpca.CertificateAuthority(\"subordinate\", new()\n {\n Type = \"SUBORDINATE\",\n CertificateAuthorityConfiguration = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs\n {\n KeyAlgorithm = \"RSA_2048\",\n SigningAlgorithm = \"SHA512WITHRSA\",\n Subject = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs\n {\n CommonName = \"sub.example.com\",\n },\n },\n });\n\n var root = new Aws.Acmpca.CertificateAuthority(\"root\");\n\n var current = Aws.GetPartition.Invoke();\n\n var subordinateCertificate = new Aws.Acmpca.Certificate(\"subordinate\", new()\n {\n CertificateAuthorityArn = root.Arn,\n CertificateSigningRequest = subordinateCertificateAuthority.CertificateSigningRequest,\n SigningAlgorithm = \"SHA512WITHRSA\",\n TemplateArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\",\n Validity = new Aws.Acmpca.Inputs.CertificateValidityArgs\n {\n Type = \"YEARS\",\n Value = \"1\",\n },\n });\n\n var subordinate = new Aws.Acmpca.CertificateAuthorityCertificate(\"subordinate\", new()\n {\n CertificateAuthorityArn = subordinateCertificateAuthority.Arn,\n Certificate = subordinateCertificate.Certificate,\n CertificateChain = subordinateCertificate.CertificateChain,\n });\n\n var rootCertificateAuthorityCertificate = new Aws.Acmpca.CertificateAuthorityCertificate(\"root\");\n\n var rootCertificate = new Aws.Acmpca.Certificate(\"root\");\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/acmpca\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsubordinateCertificateAuthority, err := acmpca.NewCertificateAuthority(ctx, \"subordinate\", \u0026acmpca.CertificateAuthorityArgs{\n\t\t\tType: pulumi.String(\"SUBORDINATE\"),\n\t\t\tCertificateAuthorityConfiguration: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationArgs{\n\t\t\t\tKeyAlgorithm: pulumi.String(\"RSA_2048\"),\n\t\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\t\tSubject: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs{\n\t\t\t\t\tCommonName: pulumi.String(\"sub.example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\troot, err := acmpca.NewCertificateAuthority(ctx, \"root\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsubordinateCertificate, err := acmpca.NewCertificate(ctx, \"subordinate\", \u0026acmpca.CertificateArgs{\n\t\t\tCertificateAuthorityArn: root.Arn,\n\t\t\tCertificateSigningRequest: subordinateCertificateAuthority.CertificateSigningRequest,\n\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\tTemplateArn: pulumi.Sprintf(\"arn:%v:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\", current.Partition),\n\t\t\tValidity: \u0026acmpca.CertificateValidityArgs{\n\t\t\t\tType: pulumi.String(\"YEARS\"),\n\t\t\t\tValue: pulumi.String(\"1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificateAuthorityCertificate(ctx, \"subordinate\", \u0026acmpca.CertificateAuthorityCertificateArgs{\n\t\t\tCertificateAuthorityArn: subordinateCertificateAuthority.Arn,\n\t\t\tCertificate: subordinateCertificate.Certificate,\n\t\t\tCertificateChain: subordinateCertificate.CertificateChain,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificateAuthorityCertificate(ctx, \"root\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificate(ctx, \"root\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.acmpca.CertificateAuthority;\nimport com.pulumi.aws.acmpca.CertificateAuthorityArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.acmpca.Certificate;\nimport com.pulumi.aws.acmpca.CertificateArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateValidityArgs;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificate;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificateArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var subordinateCertificateAuthority = new CertificateAuthority(\"subordinateCertificateAuthority\", CertificateAuthorityArgs.builder()\n .type(\"SUBORDINATE\")\n .certificateAuthorityConfiguration(CertificateAuthorityCertificateAuthorityConfigurationArgs.builder()\n .keyAlgorithm(\"RSA_2048\")\n .signingAlgorithm(\"SHA512WITHRSA\")\n .subject(CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs.builder()\n .commonName(\"sub.example.com\")\n .build())\n .build())\n .build());\n\n var root = new CertificateAuthority(\"root\");\n\n final var current = AwsFunctions.getPartition();\n\n var subordinateCertificate = new Certificate(\"subordinateCertificate\", CertificateArgs.builder()\n .certificateAuthorityArn(root.arn())\n .certificateSigningRequest(subordinateCertificateAuthority.certificateSigningRequest())\n .signingAlgorithm(\"SHA512WITHRSA\")\n .templateArn(String.format(\"arn:%s:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .validity(CertificateValidityArgs.builder()\n .type(\"YEARS\")\n .value(1)\n .build())\n .build());\n\n var subordinate = new CertificateAuthorityCertificate(\"subordinate\", CertificateAuthorityCertificateArgs.builder()\n .certificateAuthorityArn(subordinateCertificateAuthority.arn())\n .certificate(subordinateCertificate.certificate())\n .certificateChain(subordinateCertificate.certificateChain())\n .build());\n\n var rootCertificateAuthorityCertificate = new CertificateAuthorityCertificate(\"rootCertificateAuthorityCertificate\");\n\n var rootCertificate = new Certificate(\"rootCertificate\");\n\n }\n}\n```\n```yaml\nresources:\n subordinate:\n type: aws:acmpca:CertificateAuthorityCertificate\n properties:\n certificateAuthorityArn: ${subordinateCertificateAuthority.arn}\n certificate: ${subordinateCertificate.certificate}\n certificateChain: ${subordinateCertificate.certificateChain}\n subordinateCertificate:\n type: aws:acmpca:Certificate\n name: subordinate\n properties:\n certificateAuthorityArn: ${root.arn}\n certificateSigningRequest: ${subordinateCertificateAuthority.certificateSigningRequest}\n signingAlgorithm: SHA512WITHRSA\n templateArn: arn:${current.partition}:acm-pca:::template/SubordinateCACertificate_PathLen0/V1\n validity:\n type: YEARS\n value: 1\n subordinateCertificateAuthority:\n type: aws:acmpca:CertificateAuthority\n name: subordinate\n properties:\n type: SUBORDINATE\n certificateAuthorityConfiguration:\n keyAlgorithm: RSA_2048\n signingAlgorithm: SHA512WITHRSA\n subject:\n commonName: sub.example.com\n root:\n type: aws:acmpca:CertificateAuthority\n rootCertificateAuthorityCertificate:\n type: aws:acmpca:CertificateAuthorityCertificate\n name: root\n rootCertificate:\n type: aws:acmpca:Certificate\n name: root\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "certificate": { "type": "string", @@ -177401,7 +177401,7 @@ } }, "aws:appautoscaling/policy:Policy": { - "description": "Provides an Application AutoScaling Policy resource.\n\n## Example Usage\n\n### DynamoDB Table Autoscaling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst dynamodbTableReadTarget = new aws.appautoscaling.Target(\"dynamodb_table_read_target\", {\n maxCapacity: 100,\n minCapacity: 5,\n resourceId: \"table/tableName\",\n scalableDimension: \"dynamodb:table:ReadCapacityUnits\",\n serviceNamespace: \"dynamodb\",\n});\nconst dynamodbTableReadPolicy = new aws.appautoscaling.Policy(\"dynamodb_table_read_policy\", {\n name: pulumi.interpolate`DynamoDBReadCapacityUtilization:${dynamodbTableReadTarget.resourceId}`,\n policyType: \"TargetTrackingScaling\",\n resourceId: dynamodbTableReadTarget.resourceId,\n scalableDimension: dynamodbTableReadTarget.scalableDimension,\n serviceNamespace: dynamodbTableReadTarget.serviceNamespace,\n targetTrackingScalingPolicyConfiguration: {\n predefinedMetricSpecification: {\n predefinedMetricType: \"DynamoDBReadCapacityUtilization\",\n },\n targetValue: 70,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ndynamodb_table_read_target = aws.appautoscaling.Target(\"dynamodb_table_read_target\",\n max_capacity=100,\n min_capacity=5,\n resource_id=\"table/tableName\",\n scalable_dimension=\"dynamodb:table:ReadCapacityUnits\",\n service_namespace=\"dynamodb\")\ndynamodb_table_read_policy = aws.appautoscaling.Policy(\"dynamodb_table_read_policy\",\n name=dynamodb_table_read_target.resource_id.apply(lambda resource_id: f\"DynamoDBReadCapacityUtilization:{resource_id}\"),\n policy_type=\"TargetTrackingScaling\",\n resource_id=dynamodb_table_read_target.resource_id,\n scalable_dimension=dynamodb_table_read_target.scalable_dimension,\n service_namespace=dynamodb_table_read_target.service_namespace,\n target_tracking_scaling_policy_configuration={\n \"predefined_metric_specification\": {\n \"predefined_metric_type\": \"DynamoDBReadCapacityUtilization\",\n },\n \"target_value\": 70,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dynamodbTableReadTarget = new Aws.AppAutoScaling.Target(\"dynamodb_table_read_target\", new()\n {\n MaxCapacity = 100,\n MinCapacity = 5,\n ResourceId = \"table/tableName\",\n ScalableDimension = \"dynamodb:table:ReadCapacityUnits\",\n ServiceNamespace = \"dynamodb\",\n });\n\n var dynamodbTableReadPolicy = new Aws.AppAutoScaling.Policy(\"dynamodb_table_read_policy\", new()\n {\n Name = dynamodbTableReadTarget.ResourceId.Apply(resourceId =\u003e $\"DynamoDBReadCapacityUtilization:{resourceId}\"),\n PolicyType = \"TargetTrackingScaling\",\n ResourceId = dynamodbTableReadTarget.ResourceId,\n ScalableDimension = dynamodbTableReadTarget.ScalableDimension,\n ServiceNamespace = dynamodbTableReadTarget.ServiceNamespace,\n TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs\n {\n PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs\n {\n PredefinedMetricType = \"DynamoDBReadCapacityUtilization\",\n },\n TargetValue = 70,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdynamodbTableReadTarget, err := appautoscaling.NewTarget(ctx, \"dynamodb_table_read_target\", \u0026appautoscaling.TargetArgs{\n\t\t\tMaxCapacity: pulumi.Int(100),\n\t\t\tMinCapacity: pulumi.Int(5),\n\t\t\tResourceId: pulumi.String(\"table/tableName\"),\n\t\t\tScalableDimension: pulumi.String(\"dynamodb:table:ReadCapacityUnits\"),\n\t\t\tServiceNamespace: pulumi.String(\"dynamodb\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"dynamodb_table_read_policy\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: dynamodbTableReadTarget.ResourceId.ApplyT(func(resourceId string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"DynamoDBReadCapacityUtilization:%v\", resourceId), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t\tPolicyType: pulumi.String(\"TargetTrackingScaling\"),\n\t\t\tResourceId: dynamodbTableReadTarget.ResourceId,\n\t\t\tScalableDimension: dynamodbTableReadTarget.ScalableDimension,\n\t\t\tServiceNamespace: dynamodbTableReadTarget.ServiceNamespace,\n\t\t\tTargetTrackingScalingPolicyConfiguration: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{\n\t\t\t\tPredefinedMetricSpecification: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{\n\t\t\t\t\tPredefinedMetricType: pulumi.String(\"DynamoDBReadCapacityUtilization\"),\n\t\t\t\t},\n\t\t\t\tTargetValue: pulumi.Float64(70),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Target;\nimport com.pulumi.aws.appautoscaling.TargetArgs;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var dynamodbTableReadTarget = new Target(\"dynamodbTableReadTarget\", TargetArgs.builder()\n .maxCapacity(100)\n .minCapacity(5)\n .resourceId(\"table/tableName\")\n .scalableDimension(\"dynamodb:table:ReadCapacityUnits\")\n .serviceNamespace(\"dynamodb\")\n .build());\n\n var dynamodbTableReadPolicy = new Policy(\"dynamodbTableReadPolicy\", PolicyArgs.builder()\n .name(dynamodbTableReadTarget.resourceId().applyValue(resourceId -\u003e String.format(\"DynamoDBReadCapacityUtilization:%s\", resourceId)))\n .policyType(\"TargetTrackingScaling\")\n .resourceId(dynamodbTableReadTarget.resourceId())\n .scalableDimension(dynamodbTableReadTarget.scalableDimension())\n .serviceNamespace(dynamodbTableReadTarget.serviceNamespace())\n .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()\n .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()\n .predefinedMetricType(\"DynamoDBReadCapacityUtilization\")\n .build())\n .targetValue(70)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dynamodbTableReadTarget:\n type: aws:appautoscaling:Target\n name: dynamodb_table_read_target\n properties:\n maxCapacity: 100\n minCapacity: 5\n resourceId: table/tableName\n scalableDimension: dynamodb:table:ReadCapacityUnits\n serviceNamespace: dynamodb\n dynamodbTableReadPolicy:\n type: aws:appautoscaling:Policy\n name: dynamodb_table_read_policy\n properties:\n name: DynamoDBReadCapacityUtilization:${dynamodbTableReadTarget.resourceId}\n policyType: TargetTrackingScaling\n resourceId: ${dynamodbTableReadTarget.resourceId}\n scalableDimension: ${dynamodbTableReadTarget.scalableDimension}\n serviceNamespace: ${dynamodbTableReadTarget.serviceNamespace}\n targetTrackingScalingPolicyConfiguration:\n predefinedMetricSpecification:\n predefinedMetricType: DynamoDBReadCapacityUtilization\n targetValue: 70\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### ECS Service Autoscaling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ecsTarget = new aws.appautoscaling.Target(\"ecs_target\", {\n maxCapacity: 4,\n minCapacity: 1,\n resourceId: \"service/clusterName/serviceName\",\n scalableDimension: \"ecs:service:DesiredCount\",\n serviceNamespace: \"ecs\",\n});\nconst ecsPolicy = new aws.appautoscaling.Policy(\"ecs_policy\", {\n name: \"scale-down\",\n policyType: \"StepScaling\",\n resourceId: ecsTarget.resourceId,\n scalableDimension: ecsTarget.scalableDimension,\n serviceNamespace: ecsTarget.serviceNamespace,\n stepScalingPolicyConfiguration: {\n adjustmentType: \"ChangeInCapacity\",\n cooldown: 60,\n metricAggregationType: \"Maximum\",\n stepAdjustments: [{\n metricIntervalUpperBound: \"0\",\n scalingAdjustment: -1,\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\necs_target = aws.appautoscaling.Target(\"ecs_target\",\n max_capacity=4,\n min_capacity=1,\n resource_id=\"service/clusterName/serviceName\",\n scalable_dimension=\"ecs:service:DesiredCount\",\n service_namespace=\"ecs\")\necs_policy = aws.appautoscaling.Policy(\"ecs_policy\",\n name=\"scale-down\",\n policy_type=\"StepScaling\",\n resource_id=ecs_target.resource_id,\n scalable_dimension=ecs_target.scalable_dimension,\n service_namespace=ecs_target.service_namespace,\n step_scaling_policy_configuration={\n \"adjustment_type\": \"ChangeInCapacity\",\n \"cooldown\": 60,\n \"metric_aggregation_type\": \"Maximum\",\n \"step_adjustments\": [{\n \"metric_interval_upper_bound\": \"0\",\n \"scaling_adjustment\": -1,\n }],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecsTarget = new Aws.AppAutoScaling.Target(\"ecs_target\", new()\n {\n MaxCapacity = 4,\n MinCapacity = 1,\n ResourceId = \"service/clusterName/serviceName\",\n ScalableDimension = \"ecs:service:DesiredCount\",\n ServiceNamespace = \"ecs\",\n });\n\n var ecsPolicy = new Aws.AppAutoScaling.Policy(\"ecs_policy\", new()\n {\n Name = \"scale-down\",\n PolicyType = \"StepScaling\",\n ResourceId = ecsTarget.ResourceId,\n ScalableDimension = ecsTarget.ScalableDimension,\n ServiceNamespace = ecsTarget.ServiceNamespace,\n StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs\n {\n AdjustmentType = \"ChangeInCapacity\",\n Cooldown = 60,\n MetricAggregationType = \"Maximum\",\n StepAdjustments = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs\n {\n MetricIntervalUpperBound = \"0\",\n ScalingAdjustment = -1,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tecsTarget, err := appautoscaling.NewTarget(ctx, \"ecs_target\", \u0026appautoscaling.TargetArgs{\n\t\t\tMaxCapacity: pulumi.Int(4),\n\t\t\tMinCapacity: pulumi.Int(1),\n\t\t\tResourceId: pulumi.String(\"service/clusterName/serviceName\"),\n\t\t\tScalableDimension: pulumi.String(\"ecs:service:DesiredCount\"),\n\t\t\tServiceNamespace: pulumi.String(\"ecs\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"ecs_policy\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"scale-down\"),\n\t\t\tPolicyType: pulumi.String(\"StepScaling\"),\n\t\t\tResourceId: ecsTarget.ResourceId,\n\t\t\tScalableDimension: ecsTarget.ScalableDimension,\n\t\t\tServiceNamespace: ecsTarget.ServiceNamespace,\n\t\t\tStepScalingPolicyConfiguration: \u0026appautoscaling.PolicyStepScalingPolicyConfigurationArgs{\n\t\t\t\tAdjustmentType: pulumi.String(\"ChangeInCapacity\"),\n\t\t\t\tCooldown: pulumi.Int(60),\n\t\t\t\tMetricAggregationType: pulumi.String(\"Maximum\"),\n\t\t\t\tStepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{\n\t\t\t\t\t\u0026appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{\n\t\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"0\"),\n\t\t\t\t\t\tScalingAdjustment: int(-1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n ecsTarget:\n type: aws:appautoscaling:Target\n name: ecs_target\n properties:\n maxCapacity: 4\n minCapacity: 1\n resourceId: service/clusterName/serviceName\n scalableDimension: ecs:service:DesiredCount\n serviceNamespace: ecs\n ecsPolicy:\n type: aws:appautoscaling:Policy\n name: ecs_policy\n properties:\n name: scale-down\n policyType: StepScaling\n resourceId: ${ecsTarget.resourceId}\n scalableDimension: ${ecsTarget.scalableDimension}\n serviceNamespace: ${ecsTarget.serviceNamespace}\n stepScalingPolicyConfiguration:\n adjustmentType: ChangeInCapacity\n cooldown: 60\n metricAggregationType: Maximum\n stepAdjustments:\n - metricIntervalUpperBound: 0\n scalingAdjustment: -1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Preserve desired count when updating an autoscaled ECS Service\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ecsService = new aws.ecs.Service(\"ecs_service\", {\n name: \"serviceName\",\n cluster: \"clusterName\",\n taskDefinition: \"taskDefinitionFamily:1\",\n desiredCount: 2,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\necs_service = aws.ecs.Service(\"ecs_service\",\n name=\"serviceName\",\n cluster=\"clusterName\",\n task_definition=\"taskDefinitionFamily:1\",\n desired_count=2)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecsService = new Aws.Ecs.Service(\"ecs_service\", new()\n {\n Name = \"serviceName\",\n Cluster = \"clusterName\",\n TaskDefinition = \"taskDefinitionFamily:1\",\n DesiredCount = 2,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecs.NewService(ctx, \"ecs_service\", \u0026ecs.ServiceArgs{\n\t\t\tName: pulumi.String(\"serviceName\"),\n\t\t\tCluster: pulumi.String(\"clusterName\"),\n\t\t\tTaskDefinition: pulumi.String(\"taskDefinitionFamily:1\"),\n\t\t\tDesiredCount: pulumi.Int(2),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecs.Service;\nimport com.pulumi.aws.ecs.ServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ecsService = new Service(\"ecsService\", ServiceArgs.builder()\n .name(\"serviceName\")\n .cluster(\"clusterName\")\n .taskDefinition(\"taskDefinitionFamily:1\")\n .desiredCount(2)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ecsService:\n type: aws:ecs:Service\n name: ecs_service\n properties:\n name: serviceName\n cluster: clusterName\n taskDefinition: taskDefinitionFamily:1\n desiredCount: 2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Aurora Read Replica Autoscaling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst replicas = new aws.appautoscaling.Target(\"replicas\", {\n serviceNamespace: \"rds\",\n scalableDimension: \"rds:cluster:ReadReplicaCount\",\n resourceId: `cluster:${example.id}`,\n minCapacity: 1,\n maxCapacity: 15,\n});\nconst replicasPolicy = new aws.appautoscaling.Policy(\"replicas\", {\n name: \"cpu-auto-scaling\",\n serviceNamespace: replicas.serviceNamespace,\n scalableDimension: replicas.scalableDimension,\n resourceId: replicas.resourceId,\n policyType: \"TargetTrackingScaling\",\n targetTrackingScalingPolicyConfiguration: {\n predefinedMetricSpecification: {\n predefinedMetricType: \"RDSReaderAverageCPUUtilization\",\n },\n targetValue: 75,\n scaleInCooldown: 300,\n scaleOutCooldown: 300,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nreplicas = aws.appautoscaling.Target(\"replicas\",\n service_namespace=\"rds\",\n scalable_dimension=\"rds:cluster:ReadReplicaCount\",\n resource_id=f\"cluster:{example['id']}\",\n min_capacity=1,\n max_capacity=15)\nreplicas_policy = aws.appautoscaling.Policy(\"replicas\",\n name=\"cpu-auto-scaling\",\n service_namespace=replicas.service_namespace,\n scalable_dimension=replicas.scalable_dimension,\n resource_id=replicas.resource_id,\n policy_type=\"TargetTrackingScaling\",\n target_tracking_scaling_policy_configuration={\n \"predefined_metric_specification\": {\n \"predefined_metric_type\": \"RDSReaderAverageCPUUtilization\",\n },\n \"target_value\": 75,\n \"scale_in_cooldown\": 300,\n \"scale_out_cooldown\": 300,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var replicas = new Aws.AppAutoScaling.Target(\"replicas\", new()\n {\n ServiceNamespace = \"rds\",\n ScalableDimension = \"rds:cluster:ReadReplicaCount\",\n ResourceId = $\"cluster:{example.Id}\",\n MinCapacity = 1,\n MaxCapacity = 15,\n });\n\n var replicasPolicy = new Aws.AppAutoScaling.Policy(\"replicas\", new()\n {\n Name = \"cpu-auto-scaling\",\n ServiceNamespace = replicas.ServiceNamespace,\n ScalableDimension = replicas.ScalableDimension,\n ResourceId = replicas.ResourceId,\n PolicyType = \"TargetTrackingScaling\",\n TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs\n {\n PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs\n {\n PredefinedMetricType = \"RDSReaderAverageCPUUtilization\",\n },\n TargetValue = 75,\n ScaleInCooldown = 300,\n ScaleOutCooldown = 300,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\treplicas, err := appautoscaling.NewTarget(ctx, \"replicas\", \u0026appautoscaling.TargetArgs{\n\t\t\tServiceNamespace: pulumi.String(\"rds\"),\n\t\t\tScalableDimension: pulumi.String(\"rds:cluster:ReadReplicaCount\"),\n\t\t\tResourceId: pulumi.Sprintf(\"cluster:%v\", example.Id),\n\t\t\tMinCapacity: pulumi.Int(1),\n\t\t\tMaxCapacity: pulumi.Int(15),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"replicas\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"cpu-auto-scaling\"),\n\t\t\tServiceNamespace: replicas.ServiceNamespace,\n\t\t\tScalableDimension: replicas.ScalableDimension,\n\t\t\tResourceId: replicas.ResourceId,\n\t\t\tPolicyType: pulumi.String(\"TargetTrackingScaling\"),\n\t\t\tTargetTrackingScalingPolicyConfiguration: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{\n\t\t\t\tPredefinedMetricSpecification: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{\n\t\t\t\t\tPredefinedMetricType: pulumi.String(\"RDSReaderAverageCPUUtilization\"),\n\t\t\t\t},\n\t\t\t\tTargetValue: pulumi.Float64(75),\n\t\t\t\tScaleInCooldown: pulumi.Int(300),\n\t\t\t\tScaleOutCooldown: pulumi.Int(300),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Target;\nimport com.pulumi.aws.appautoscaling.TargetArgs;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var replicas = new Target(\"replicas\", TargetArgs.builder()\n .serviceNamespace(\"rds\")\n .scalableDimension(\"rds:cluster:ReadReplicaCount\")\n .resourceId(String.format(\"cluster:%s\", example.id()))\n .minCapacity(1)\n .maxCapacity(15)\n .build());\n\n var replicasPolicy = new Policy(\"replicasPolicy\", PolicyArgs.builder()\n .name(\"cpu-auto-scaling\")\n .serviceNamespace(replicas.serviceNamespace())\n .scalableDimension(replicas.scalableDimension())\n .resourceId(replicas.resourceId())\n .policyType(\"TargetTrackingScaling\")\n .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()\n .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()\n .predefinedMetricType(\"RDSReaderAverageCPUUtilization\")\n .build())\n .targetValue(75)\n .scaleInCooldown(300)\n .scaleOutCooldown(300)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n replicas:\n type: aws:appautoscaling:Target\n properties:\n serviceNamespace: rds\n scalableDimension: rds:cluster:ReadReplicaCount\n resourceId: cluster:${example.id}\n minCapacity: 1\n maxCapacity: 15\n replicasPolicy:\n type: aws:appautoscaling:Policy\n name: replicas\n properties:\n name: cpu-auto-scaling\n serviceNamespace: ${replicas.serviceNamespace}\n scalableDimension: ${replicas.scalableDimension}\n resourceId: ${replicas.resourceId}\n policyType: TargetTrackingScaling\n targetTrackingScalingPolicyConfiguration:\n predefinedMetricSpecification:\n predefinedMetricType: RDSReaderAverageCPUUtilization\n targetValue: 75\n scaleInCooldown: 300\n scaleOutCooldown: 300\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create target tracking scaling policy using metric math\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ecsTarget = new aws.appautoscaling.Target(\"ecs_target\", {\n maxCapacity: 4,\n minCapacity: 1,\n resourceId: \"service/clusterName/serviceName\",\n scalableDimension: \"ecs:service:DesiredCount\",\n serviceNamespace: \"ecs\",\n});\nconst example = new aws.appautoscaling.Policy(\"example\", {\n name: \"foo\",\n policyType: \"TargetTrackingScaling\",\n resourceId: ecsTarget.resourceId,\n scalableDimension: ecsTarget.scalableDimension,\n serviceNamespace: ecsTarget.serviceNamespace,\n targetTrackingScalingPolicyConfiguration: {\n targetValue: 100,\n customizedMetricSpecification: {\n metrics: [\n {\n label: \"Get the queue size (the number of messages waiting to be processed)\",\n id: \"m1\",\n metricStat: {\n metric: {\n metricName: \"ApproximateNumberOfMessagesVisible\",\n namespace: \"AWS/SQS\",\n dimensions: [{\n name: \"QueueName\",\n value: \"my-queue\",\n }],\n },\n stat: \"Sum\",\n },\n returnData: false,\n },\n {\n label: \"Get the ECS running task count (the number of currently running tasks)\",\n id: \"m2\",\n metricStat: {\n metric: {\n metricName: \"RunningTaskCount\",\n namespace: \"ECS/ContainerInsights\",\n dimensions: [\n {\n name: \"ClusterName\",\n value: \"default\",\n },\n {\n name: \"ServiceName\",\n value: \"web-app\",\n },\n ],\n },\n stat: \"Average\",\n },\n returnData: false,\n },\n {\n label: \"Calculate the backlog per instance\",\n id: \"e1\",\n expression: \"m1 / m2\",\n returnData: true,\n },\n ],\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\necs_target = aws.appautoscaling.Target(\"ecs_target\",\n max_capacity=4,\n min_capacity=1,\n resource_id=\"service/clusterName/serviceName\",\n scalable_dimension=\"ecs:service:DesiredCount\",\n service_namespace=\"ecs\")\nexample = aws.appautoscaling.Policy(\"example\",\n name=\"foo\",\n policy_type=\"TargetTrackingScaling\",\n resource_id=ecs_target.resource_id,\n scalable_dimension=ecs_target.scalable_dimension,\n service_namespace=ecs_target.service_namespace,\n target_tracking_scaling_policy_configuration={\n \"target_value\": 100,\n \"customized_metric_specification\": {\n \"metrics\": [\n {\n \"label\": \"Get the queue size (the number of messages waiting to be processed)\",\n \"id\": \"m1\",\n \"metric_stat\": {\n \"metric\": {\n \"metric_name\": \"ApproximateNumberOfMessagesVisible\",\n \"namespace\": \"AWS/SQS\",\n \"dimensions\": [{\n \"name\": \"QueueName\",\n \"value\": \"my-queue\",\n }],\n },\n \"stat\": \"Sum\",\n },\n \"return_data\": False,\n },\n {\n \"label\": \"Get the ECS running task count (the number of currently running tasks)\",\n \"id\": \"m2\",\n \"metric_stat\": {\n \"metric\": {\n \"metric_name\": \"RunningTaskCount\",\n \"namespace\": \"ECS/ContainerInsights\",\n \"dimensions\": [\n {\n \"name\": \"ClusterName\",\n \"value\": \"default\",\n },\n {\n \"name\": \"ServiceName\",\n \"value\": \"web-app\",\n },\n ],\n },\n \"stat\": \"Average\",\n },\n \"return_data\": False,\n },\n {\n \"label\": \"Calculate the backlog per instance\",\n \"id\": \"e1\",\n \"expression\": \"m1 / m2\",\n \"return_data\": True,\n },\n ],\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecsTarget = new Aws.AppAutoScaling.Target(\"ecs_target\", new()\n {\n MaxCapacity = 4,\n MinCapacity = 1,\n ResourceId = \"service/clusterName/serviceName\",\n ScalableDimension = \"ecs:service:DesiredCount\",\n ServiceNamespace = \"ecs\",\n });\n\n var example = new Aws.AppAutoScaling.Policy(\"example\", new()\n {\n Name = \"foo\",\n PolicyType = \"TargetTrackingScaling\",\n ResourceId = ecsTarget.ResourceId,\n ScalableDimension = ecsTarget.ScalableDimension,\n ServiceNamespace = ecsTarget.ServiceNamespace,\n TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs\n {\n TargetValue = 100,\n CustomizedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs\n {\n Metrics = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs\n {\n Label = \"Get the queue size (the number of messages waiting to be processed)\",\n Id = \"m1\",\n MetricStat = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs\n {\n Metric = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs\n {\n MetricName = \"ApproximateNumberOfMessagesVisible\",\n Namespace = \"AWS/SQS\",\n Dimensions = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs\n {\n Name = \"QueueName\",\n Value = \"my-queue\",\n },\n },\n },\n Stat = \"Sum\",\n },\n ReturnData = false,\n },\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs\n {\n Label = \"Get the ECS running task count (the number of currently running tasks)\",\n Id = \"m2\",\n MetricStat = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs\n {\n Metric = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs\n {\n MetricName = \"RunningTaskCount\",\n Namespace = \"ECS/ContainerInsights\",\n Dimensions = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs\n {\n Name = \"ClusterName\",\n Value = \"default\",\n },\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs\n {\n Name = \"ServiceName\",\n Value = \"web-app\",\n },\n },\n },\n Stat = \"Average\",\n },\n ReturnData = false,\n },\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs\n {\n Label = \"Calculate the backlog per instance\",\n Id = \"e1\",\n Expression = \"m1 / m2\",\n ReturnData = true,\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tecsTarget, err := appautoscaling.NewTarget(ctx, \"ecs_target\", \u0026appautoscaling.TargetArgs{\n\t\t\tMaxCapacity: pulumi.Int(4),\n\t\t\tMinCapacity: pulumi.Int(1),\n\t\t\tResourceId: pulumi.String(\"service/clusterName/serviceName\"),\n\t\t\tScalableDimension: pulumi.String(\"ecs:service:DesiredCount\"),\n\t\t\tServiceNamespace: pulumi.String(\"ecs\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"example\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"foo\"),\n\t\t\tPolicyType: pulumi.String(\"TargetTrackingScaling\"),\n\t\t\tResourceId: ecsTarget.ResourceId,\n\t\t\tScalableDimension: ecsTarget.ScalableDimension,\n\t\t\tServiceNamespace: ecsTarget.ServiceNamespace,\n\t\t\tTargetTrackingScalingPolicyConfiguration: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{\n\t\t\t\tTargetValue: pulumi.Float64(100),\n\t\t\t\tCustomizedMetricSpecification: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs{\n\t\t\t\t\tMetrics: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArray{\n\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Get the queue size (the number of messages waiting to be processed)\"),\n\t\t\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\t\t\tMetricStat: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{\n\t\t\t\t\t\t\t\tMetric: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{\n\t\t\t\t\t\t\t\t\tMetricName: pulumi.String(\"ApproximateNumberOfMessagesVisible\"),\n\t\t\t\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/SQS\"),\n\t\t\t\t\t\t\t\t\tDimensions: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{\n\t\t\t\t\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{\n\t\t\t\t\t\t\t\t\t\t\tName: pulumi.String(\"QueueName\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"my-queue\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tReturnData: pulumi.Bool(false),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Get the ECS running task count (the number of currently running tasks)\"),\n\t\t\t\t\t\t\tId: pulumi.String(\"m2\"),\n\t\t\t\t\t\t\tMetricStat: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{\n\t\t\t\t\t\t\t\tMetric: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{\n\t\t\t\t\t\t\t\t\tMetricName: pulumi.String(\"RunningTaskCount\"),\n\t\t\t\t\t\t\t\t\tNamespace: pulumi.String(\"ECS/ContainerInsights\"),\n\t\t\t\t\t\t\t\t\tDimensions: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{\n\t\t\t\t\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{\n\t\t\t\t\t\t\t\t\t\t\tName: pulumi.String(\"ClusterName\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"default\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{\n\t\t\t\t\t\t\t\t\t\t\tName: pulumi.String(\"ServiceName\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"web-app\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tStat: pulumi.String(\"Average\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tReturnData: pulumi.Bool(false),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Calculate the backlog per instance\"),\n\t\t\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\t\t\tExpression: pulumi.String(\"m1 / m2\"),\n\t\t\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Target;\nimport com.pulumi.aws.appautoscaling.TargetArgs;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ecsTarget = new Target(\"ecsTarget\", TargetArgs.builder()\n .maxCapacity(4)\n .minCapacity(1)\n .resourceId(\"service/clusterName/serviceName\")\n .scalableDimension(\"ecs:service:DesiredCount\")\n .serviceNamespace(\"ecs\")\n .build());\n\n var example = new Policy(\"example\", PolicyArgs.builder()\n .name(\"foo\")\n .policyType(\"TargetTrackingScaling\")\n .resourceId(ecsTarget.resourceId())\n .scalableDimension(ecsTarget.scalableDimension())\n .serviceNamespace(ecsTarget.serviceNamespace())\n .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()\n .targetValue(100)\n .customizedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs.builder()\n .metrics( \n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()\n .label(\"Get the queue size (the number of messages waiting to be processed)\")\n .id(\"m1\")\n .metricStat(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()\n .metric(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()\n .metricName(\"ApproximateNumberOfMessagesVisible\")\n .namespace(\"AWS/SQS\")\n .dimensions(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()\n .name(\"QueueName\")\n .value(\"my-queue\")\n .build())\n .build())\n .stat(\"Sum\")\n .build())\n .returnData(false)\n .build(),\n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()\n .label(\"Get the ECS running task count (the number of currently running tasks)\")\n .id(\"m2\")\n .metricStat(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()\n .metric(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()\n .metricName(\"RunningTaskCount\")\n .namespace(\"ECS/ContainerInsights\")\n .dimensions( \n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()\n .name(\"ClusterName\")\n .value(\"default\")\n .build(),\n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()\n .name(\"ServiceName\")\n .value(\"web-app\")\n .build())\n .build())\n .stat(\"Average\")\n .build())\n .returnData(false)\n .build(),\n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()\n .label(\"Calculate the backlog per instance\")\n .id(\"e1\")\n .expression(\"m1 / m2\")\n .returnData(true)\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ecsTarget:\n type: aws:appautoscaling:Target\n name: ecs_target\n properties:\n maxCapacity: 4\n minCapacity: 1\n resourceId: service/clusterName/serviceName\n scalableDimension: ecs:service:DesiredCount\n serviceNamespace: ecs\n example:\n type: aws:appautoscaling:Policy\n properties:\n name: foo\n policyType: TargetTrackingScaling\n resourceId: ${ecsTarget.resourceId}\n scalableDimension: ${ecsTarget.scalableDimension}\n serviceNamespace: ${ecsTarget.serviceNamespace}\n targetTrackingScalingPolicyConfiguration:\n targetValue: 100\n customizedMetricSpecification:\n metrics:\n - label: Get the queue size (the number of messages waiting to be processed)\n id: m1\n metricStat:\n metric:\n metricName: ApproximateNumberOfMessagesVisible\n namespace: AWS/SQS\n dimensions:\n - name: QueueName\n value: my-queue\n stat: Sum\n returnData: false\n - label: Get the ECS running task count (the number of currently running tasks)\n id: m2\n metricStat:\n metric:\n metricName: RunningTaskCount\n namespace: ECS/ContainerInsights\n dimensions:\n - name: ClusterName\n value: default\n - name: ServiceName\n value: web-app\n stat: Average\n returnData: false\n - label: Calculate the backlog per instance\n id: e1\n expression: m1 / m2\n returnData: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### MSK / Kafka Autoscaling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mskTarget = new aws.appautoscaling.Target(\"msk_target\", {\n serviceNamespace: \"kafka\",\n scalableDimension: \"kafka:broker-storage:VolumeSize\",\n resourceId: example.arn,\n minCapacity: 1,\n maxCapacity: 8,\n});\nconst targets = new aws.appautoscaling.Policy(\"targets\", {\n name: \"storage-size-auto-scaling\",\n serviceNamespace: mskTarget.serviceNamespace,\n scalableDimension: mskTarget.scalableDimension,\n resourceId: mskTarget.resourceId,\n policyType: \"TargetTrackingScaling\",\n targetTrackingScalingPolicyConfiguration: {\n predefinedMetricSpecification: {\n predefinedMetricType: \"KafkaBrokerStorageUtilization\",\n },\n targetValue: 55,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmsk_target = aws.appautoscaling.Target(\"msk_target\",\n service_namespace=\"kafka\",\n scalable_dimension=\"kafka:broker-storage:VolumeSize\",\n resource_id=example[\"arn\"],\n min_capacity=1,\n max_capacity=8)\ntargets = aws.appautoscaling.Policy(\"targets\",\n name=\"storage-size-auto-scaling\",\n service_namespace=msk_target.service_namespace,\n scalable_dimension=msk_target.scalable_dimension,\n resource_id=msk_target.resource_id,\n policy_type=\"TargetTrackingScaling\",\n target_tracking_scaling_policy_configuration={\n \"predefined_metric_specification\": {\n \"predefined_metric_type\": \"KafkaBrokerStorageUtilization\",\n },\n \"target_value\": 55,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mskTarget = new Aws.AppAutoScaling.Target(\"msk_target\", new()\n {\n ServiceNamespace = \"kafka\",\n ScalableDimension = \"kafka:broker-storage:VolumeSize\",\n ResourceId = example.Arn,\n MinCapacity = 1,\n MaxCapacity = 8,\n });\n\n var targets = new Aws.AppAutoScaling.Policy(\"targets\", new()\n {\n Name = \"storage-size-auto-scaling\",\n ServiceNamespace = mskTarget.ServiceNamespace,\n ScalableDimension = mskTarget.ScalableDimension,\n ResourceId = mskTarget.ResourceId,\n PolicyType = \"TargetTrackingScaling\",\n TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs\n {\n PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs\n {\n PredefinedMetricType = \"KafkaBrokerStorageUtilization\",\n },\n TargetValue = 55,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmskTarget, err := appautoscaling.NewTarget(ctx, \"msk_target\", \u0026appautoscaling.TargetArgs{\n\t\t\tServiceNamespace: pulumi.String(\"kafka\"),\n\t\t\tScalableDimension: pulumi.String(\"kafka:broker-storage:VolumeSize\"),\n\t\t\tResourceId: pulumi.Any(example.Arn),\n\t\t\tMinCapacity: pulumi.Int(1),\n\t\t\tMaxCapacity: pulumi.Int(8),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"targets\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"storage-size-auto-scaling\"),\n\t\t\tServiceNamespace: mskTarget.ServiceNamespace,\n\t\t\tScalableDimension: mskTarget.ScalableDimension,\n\t\t\tResourceId: mskTarget.ResourceId,\n\t\t\tPolicyType: pulumi.String(\"TargetTrackingScaling\"),\n\t\t\tTargetTrackingScalingPolicyConfiguration: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{\n\t\t\t\tPredefinedMetricSpecification: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{\n\t\t\t\t\tPredefinedMetricType: pulumi.String(\"KafkaBrokerStorageUtilization\"),\n\t\t\t\t},\n\t\t\t\tTargetValue: pulumi.Float64(55),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Target;\nimport com.pulumi.aws.appautoscaling.TargetArgs;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var mskTarget = new Target(\"mskTarget\", TargetArgs.builder()\n .serviceNamespace(\"kafka\")\n .scalableDimension(\"kafka:broker-storage:VolumeSize\")\n .resourceId(example.arn())\n .minCapacity(1)\n .maxCapacity(8)\n .build());\n\n var targets = new Policy(\"targets\", PolicyArgs.builder()\n .name(\"storage-size-auto-scaling\")\n .serviceNamespace(mskTarget.serviceNamespace())\n .scalableDimension(mskTarget.scalableDimension())\n .resourceId(mskTarget.resourceId())\n .policyType(\"TargetTrackingScaling\")\n .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()\n .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()\n .predefinedMetricType(\"KafkaBrokerStorageUtilization\")\n .build())\n .targetValue(55)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mskTarget:\n type: aws:appautoscaling:Target\n name: msk_target\n properties:\n serviceNamespace: kafka\n scalableDimension: kafka:broker-storage:VolumeSize\n resourceId: ${example.arn}\n minCapacity: 1\n maxCapacity: 8\n targets:\n type: aws:appautoscaling:Policy\n properties:\n name: storage-size-auto-scaling\n serviceNamespace: ${mskTarget.serviceNamespace}\n scalableDimension: ${mskTarget.scalableDimension}\n resourceId: ${mskTarget.resourceId}\n policyType: TargetTrackingScaling\n targetTrackingScalingPolicyConfiguration:\n predefinedMetricSpecification:\n predefinedMetricType: KafkaBrokerStorageUtilization\n targetValue: 55\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Application AutoScaling Policy using the `service-namespace` , `resource-id`, `scalable-dimension` and `policy-name` separated by `/`. For example:\n\n```sh\n$ pulumi import aws:appautoscaling/policy:Policy test-policy service-namespace/resource-id/scalable-dimension/policy-name\n```\n", + "description": "Provides an Application AutoScaling Policy resource.\n\n## Example Usage\n\n### DynamoDB Table Autoscaling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst dynamodbTableReadTarget = new aws.appautoscaling.Target(\"dynamodb_table_read_target\", {\n maxCapacity: 100,\n minCapacity: 5,\n resourceId: \"table/tableName\",\n scalableDimension: \"dynamodb:table:ReadCapacityUnits\",\n serviceNamespace: \"dynamodb\",\n});\nconst dynamodbTableReadPolicy = new aws.appautoscaling.Policy(\"dynamodb_table_read_policy\", {\n name: pulumi.interpolate`DynamoDBReadCapacityUtilization:${dynamodbTableReadTarget.resourceId}`,\n policyType: \"TargetTrackingScaling\",\n resourceId: dynamodbTableReadTarget.resourceId,\n scalableDimension: dynamodbTableReadTarget.scalableDimension,\n serviceNamespace: dynamodbTableReadTarget.serviceNamespace,\n targetTrackingScalingPolicyConfiguration: {\n predefinedMetricSpecification: {\n predefinedMetricType: \"DynamoDBReadCapacityUtilization\",\n },\n targetValue: 70,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ndynamodb_table_read_target = aws.appautoscaling.Target(\"dynamodb_table_read_target\",\n max_capacity=100,\n min_capacity=5,\n resource_id=\"table/tableName\",\n scalable_dimension=\"dynamodb:table:ReadCapacityUnits\",\n service_namespace=\"dynamodb\")\ndynamodb_table_read_policy = aws.appautoscaling.Policy(\"dynamodb_table_read_policy\",\n name=dynamodb_table_read_target.resource_id.apply(lambda resource_id: f\"DynamoDBReadCapacityUtilization:{resource_id}\"),\n policy_type=\"TargetTrackingScaling\",\n resource_id=dynamodb_table_read_target.resource_id,\n scalable_dimension=dynamodb_table_read_target.scalable_dimension,\n service_namespace=dynamodb_table_read_target.service_namespace,\n target_tracking_scaling_policy_configuration={\n \"predefined_metric_specification\": {\n \"predefined_metric_type\": \"DynamoDBReadCapacityUtilization\",\n },\n \"target_value\": 70,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dynamodbTableReadTarget = new Aws.AppAutoScaling.Target(\"dynamodb_table_read_target\", new()\n {\n MaxCapacity = 100,\n MinCapacity = 5,\n ResourceId = \"table/tableName\",\n ScalableDimension = \"dynamodb:table:ReadCapacityUnits\",\n ServiceNamespace = \"dynamodb\",\n });\n\n var dynamodbTableReadPolicy = new Aws.AppAutoScaling.Policy(\"dynamodb_table_read_policy\", new()\n {\n Name = dynamodbTableReadTarget.ResourceId.Apply(resourceId =\u003e $\"DynamoDBReadCapacityUtilization:{resourceId}\"),\n PolicyType = \"TargetTrackingScaling\",\n ResourceId = dynamodbTableReadTarget.ResourceId,\n ScalableDimension = dynamodbTableReadTarget.ScalableDimension,\n ServiceNamespace = dynamodbTableReadTarget.ServiceNamespace,\n TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs\n {\n PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs\n {\n PredefinedMetricType = \"DynamoDBReadCapacityUtilization\",\n },\n TargetValue = 70,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdynamodbTableReadTarget, err := appautoscaling.NewTarget(ctx, \"dynamodb_table_read_target\", \u0026appautoscaling.TargetArgs{\n\t\t\tMaxCapacity: pulumi.Int(100),\n\t\t\tMinCapacity: pulumi.Int(5),\n\t\t\tResourceId: pulumi.String(\"table/tableName\"),\n\t\t\tScalableDimension: pulumi.String(\"dynamodb:table:ReadCapacityUnits\"),\n\t\t\tServiceNamespace: pulumi.String(\"dynamodb\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"dynamodb_table_read_policy\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: dynamodbTableReadTarget.ResourceId.ApplyT(func(resourceId string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"DynamoDBReadCapacityUtilization:%v\", resourceId), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t\tPolicyType: pulumi.String(\"TargetTrackingScaling\"),\n\t\t\tResourceId: dynamodbTableReadTarget.ResourceId,\n\t\t\tScalableDimension: dynamodbTableReadTarget.ScalableDimension,\n\t\t\tServiceNamespace: dynamodbTableReadTarget.ServiceNamespace,\n\t\t\tTargetTrackingScalingPolicyConfiguration: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{\n\t\t\t\tPredefinedMetricSpecification: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{\n\t\t\t\t\tPredefinedMetricType: pulumi.String(\"DynamoDBReadCapacityUtilization\"),\n\t\t\t\t},\n\t\t\t\tTargetValue: pulumi.Float64(70),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Target;\nimport com.pulumi.aws.appautoscaling.TargetArgs;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var dynamodbTableReadTarget = new Target(\"dynamodbTableReadTarget\", TargetArgs.builder()\n .maxCapacity(100)\n .minCapacity(5)\n .resourceId(\"table/tableName\")\n .scalableDimension(\"dynamodb:table:ReadCapacityUnits\")\n .serviceNamespace(\"dynamodb\")\n .build());\n\n var dynamodbTableReadPolicy = new Policy(\"dynamodbTableReadPolicy\", PolicyArgs.builder()\n .name(dynamodbTableReadTarget.resourceId().applyValue(resourceId -\u003e String.format(\"DynamoDBReadCapacityUtilization:%s\", resourceId)))\n .policyType(\"TargetTrackingScaling\")\n .resourceId(dynamodbTableReadTarget.resourceId())\n .scalableDimension(dynamodbTableReadTarget.scalableDimension())\n .serviceNamespace(dynamodbTableReadTarget.serviceNamespace())\n .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()\n .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()\n .predefinedMetricType(\"DynamoDBReadCapacityUtilization\")\n .build())\n .targetValue(70)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dynamodbTableReadTarget:\n type: aws:appautoscaling:Target\n name: dynamodb_table_read_target\n properties:\n maxCapacity: 100\n minCapacity: 5\n resourceId: table/tableName\n scalableDimension: dynamodb:table:ReadCapacityUnits\n serviceNamespace: dynamodb\n dynamodbTableReadPolicy:\n type: aws:appautoscaling:Policy\n name: dynamodb_table_read_policy\n properties:\n name: DynamoDBReadCapacityUtilization:${dynamodbTableReadTarget.resourceId}\n policyType: TargetTrackingScaling\n resourceId: ${dynamodbTableReadTarget.resourceId}\n scalableDimension: ${dynamodbTableReadTarget.scalableDimension}\n serviceNamespace: ${dynamodbTableReadTarget.serviceNamespace}\n targetTrackingScalingPolicyConfiguration:\n predefinedMetricSpecification:\n predefinedMetricType: DynamoDBReadCapacityUtilization\n targetValue: 70\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### ECS Service Autoscaling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ecsTarget = new aws.appautoscaling.Target(\"ecs_target\", {\n maxCapacity: 4,\n minCapacity: 1,\n resourceId: \"service/clusterName/serviceName\",\n scalableDimension: \"ecs:service:DesiredCount\",\n serviceNamespace: \"ecs\",\n});\nconst ecsPolicy = new aws.appautoscaling.Policy(\"ecs_policy\", {\n name: \"scale-down\",\n policyType: \"StepScaling\",\n resourceId: ecsTarget.resourceId,\n scalableDimension: ecsTarget.scalableDimension,\n serviceNamespace: ecsTarget.serviceNamespace,\n stepScalingPolicyConfiguration: {\n adjustmentType: \"ChangeInCapacity\",\n cooldown: 60,\n metricAggregationType: \"Maximum\",\n stepAdjustments: [{\n metricIntervalUpperBound: \"0\",\n scalingAdjustment: -1,\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\necs_target = aws.appautoscaling.Target(\"ecs_target\",\n max_capacity=4,\n min_capacity=1,\n resource_id=\"service/clusterName/serviceName\",\n scalable_dimension=\"ecs:service:DesiredCount\",\n service_namespace=\"ecs\")\necs_policy = aws.appautoscaling.Policy(\"ecs_policy\",\n name=\"scale-down\",\n policy_type=\"StepScaling\",\n resource_id=ecs_target.resource_id,\n scalable_dimension=ecs_target.scalable_dimension,\n service_namespace=ecs_target.service_namespace,\n step_scaling_policy_configuration={\n \"adjustment_type\": \"ChangeInCapacity\",\n \"cooldown\": 60,\n \"metric_aggregation_type\": \"Maximum\",\n \"step_adjustments\": [{\n \"metric_interval_upper_bound\": \"0\",\n \"scaling_adjustment\": -1,\n }],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecsTarget = new Aws.AppAutoScaling.Target(\"ecs_target\", new()\n {\n MaxCapacity = 4,\n MinCapacity = 1,\n ResourceId = \"service/clusterName/serviceName\",\n ScalableDimension = \"ecs:service:DesiredCount\",\n ServiceNamespace = \"ecs\",\n });\n\n var ecsPolicy = new Aws.AppAutoScaling.Policy(\"ecs_policy\", new()\n {\n Name = \"scale-down\",\n PolicyType = \"StepScaling\",\n ResourceId = ecsTarget.ResourceId,\n ScalableDimension = ecsTarget.ScalableDimension,\n ServiceNamespace = ecsTarget.ServiceNamespace,\n StepScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationArgs\n {\n AdjustmentType = \"ChangeInCapacity\",\n Cooldown = 60,\n MetricAggregationType = \"Maximum\",\n StepAdjustments = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs\n {\n MetricIntervalUpperBound = \"0\",\n ScalingAdjustment = -1,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tecsTarget, err := appautoscaling.NewTarget(ctx, \"ecs_target\", \u0026appautoscaling.TargetArgs{\n\t\t\tMaxCapacity: pulumi.Int(4),\n\t\t\tMinCapacity: pulumi.Int(1),\n\t\t\tResourceId: pulumi.String(\"service/clusterName/serviceName\"),\n\t\t\tScalableDimension: pulumi.String(\"ecs:service:DesiredCount\"),\n\t\t\tServiceNamespace: pulumi.String(\"ecs\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"ecs_policy\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"scale-down\"),\n\t\t\tPolicyType: pulumi.String(\"StepScaling\"),\n\t\t\tResourceId: ecsTarget.ResourceId,\n\t\t\tScalableDimension: ecsTarget.ScalableDimension,\n\t\t\tServiceNamespace: ecsTarget.ServiceNamespace,\n\t\t\tStepScalingPolicyConfiguration: \u0026appautoscaling.PolicyStepScalingPolicyConfigurationArgs{\n\t\t\t\tAdjustmentType: pulumi.String(\"ChangeInCapacity\"),\n\t\t\t\tCooldown: pulumi.Int(60),\n\t\t\t\tMetricAggregationType: pulumi.String(\"Maximum\"),\n\t\t\t\tStepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{\n\t\t\t\t\t\u0026appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{\n\t\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"0\"),\n\t\t\t\t\t\tScalingAdjustment: pulumi.Int(-1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Target;\nimport com.pulumi.aws.appautoscaling.TargetArgs;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ecsTarget = new Target(\"ecsTarget\", TargetArgs.builder()\n .maxCapacity(4)\n .minCapacity(1)\n .resourceId(\"service/clusterName/serviceName\")\n .scalableDimension(\"ecs:service:DesiredCount\")\n .serviceNamespace(\"ecs\")\n .build());\n\n var ecsPolicy = new Policy(\"ecsPolicy\", PolicyArgs.builder()\n .name(\"scale-down\")\n .policyType(\"StepScaling\")\n .resourceId(ecsTarget.resourceId())\n .scalableDimension(ecsTarget.scalableDimension())\n .serviceNamespace(ecsTarget.serviceNamespace())\n .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder()\n .adjustmentType(\"ChangeInCapacity\")\n .cooldown(60)\n .metricAggregationType(\"Maximum\")\n .stepAdjustments(PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder()\n .metricIntervalUpperBound(0)\n .scalingAdjustment(-1)\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ecsTarget:\n type: aws:appautoscaling:Target\n name: ecs_target\n properties:\n maxCapacity: 4\n minCapacity: 1\n resourceId: service/clusterName/serviceName\n scalableDimension: ecs:service:DesiredCount\n serviceNamespace: ecs\n ecsPolicy:\n type: aws:appautoscaling:Policy\n name: ecs_policy\n properties:\n name: scale-down\n policyType: StepScaling\n resourceId: ${ecsTarget.resourceId}\n scalableDimension: ${ecsTarget.scalableDimension}\n serviceNamespace: ${ecsTarget.serviceNamespace}\n stepScalingPolicyConfiguration:\n adjustmentType: ChangeInCapacity\n cooldown: 60\n metricAggregationType: Maximum\n stepAdjustments:\n - metricIntervalUpperBound: 0\n scalingAdjustment: -1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Preserve desired count when updating an autoscaled ECS Service\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ecsService = new aws.ecs.Service(\"ecs_service\", {\n name: \"serviceName\",\n cluster: \"clusterName\",\n taskDefinition: \"taskDefinitionFamily:1\",\n desiredCount: 2,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\necs_service = aws.ecs.Service(\"ecs_service\",\n name=\"serviceName\",\n cluster=\"clusterName\",\n task_definition=\"taskDefinitionFamily:1\",\n desired_count=2)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecsService = new Aws.Ecs.Service(\"ecs_service\", new()\n {\n Name = \"serviceName\",\n Cluster = \"clusterName\",\n TaskDefinition = \"taskDefinitionFamily:1\",\n DesiredCount = 2,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecs.NewService(ctx, \"ecs_service\", \u0026ecs.ServiceArgs{\n\t\t\tName: pulumi.String(\"serviceName\"),\n\t\t\tCluster: pulumi.String(\"clusterName\"),\n\t\t\tTaskDefinition: pulumi.String(\"taskDefinitionFamily:1\"),\n\t\t\tDesiredCount: pulumi.Int(2),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecs.Service;\nimport com.pulumi.aws.ecs.ServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ecsService = new Service(\"ecsService\", ServiceArgs.builder()\n .name(\"serviceName\")\n .cluster(\"clusterName\")\n .taskDefinition(\"taskDefinitionFamily:1\")\n .desiredCount(2)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ecsService:\n type: aws:ecs:Service\n name: ecs_service\n properties:\n name: serviceName\n cluster: clusterName\n taskDefinition: taskDefinitionFamily:1\n desiredCount: 2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Aurora Read Replica Autoscaling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst replicas = new aws.appautoscaling.Target(\"replicas\", {\n serviceNamespace: \"rds\",\n scalableDimension: \"rds:cluster:ReadReplicaCount\",\n resourceId: `cluster:${example.id}`,\n minCapacity: 1,\n maxCapacity: 15,\n});\nconst replicasPolicy = new aws.appautoscaling.Policy(\"replicas\", {\n name: \"cpu-auto-scaling\",\n serviceNamespace: replicas.serviceNamespace,\n scalableDimension: replicas.scalableDimension,\n resourceId: replicas.resourceId,\n policyType: \"TargetTrackingScaling\",\n targetTrackingScalingPolicyConfiguration: {\n predefinedMetricSpecification: {\n predefinedMetricType: \"RDSReaderAverageCPUUtilization\",\n },\n targetValue: 75,\n scaleInCooldown: 300,\n scaleOutCooldown: 300,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nreplicas = aws.appautoscaling.Target(\"replicas\",\n service_namespace=\"rds\",\n scalable_dimension=\"rds:cluster:ReadReplicaCount\",\n resource_id=f\"cluster:{example['id']}\",\n min_capacity=1,\n max_capacity=15)\nreplicas_policy = aws.appautoscaling.Policy(\"replicas\",\n name=\"cpu-auto-scaling\",\n service_namespace=replicas.service_namespace,\n scalable_dimension=replicas.scalable_dimension,\n resource_id=replicas.resource_id,\n policy_type=\"TargetTrackingScaling\",\n target_tracking_scaling_policy_configuration={\n \"predefined_metric_specification\": {\n \"predefined_metric_type\": \"RDSReaderAverageCPUUtilization\",\n },\n \"target_value\": 75,\n \"scale_in_cooldown\": 300,\n \"scale_out_cooldown\": 300,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var replicas = new Aws.AppAutoScaling.Target(\"replicas\", new()\n {\n ServiceNamespace = \"rds\",\n ScalableDimension = \"rds:cluster:ReadReplicaCount\",\n ResourceId = $\"cluster:{example.Id}\",\n MinCapacity = 1,\n MaxCapacity = 15,\n });\n\n var replicasPolicy = new Aws.AppAutoScaling.Policy(\"replicas\", new()\n {\n Name = \"cpu-auto-scaling\",\n ServiceNamespace = replicas.ServiceNamespace,\n ScalableDimension = replicas.ScalableDimension,\n ResourceId = replicas.ResourceId,\n PolicyType = \"TargetTrackingScaling\",\n TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs\n {\n PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs\n {\n PredefinedMetricType = \"RDSReaderAverageCPUUtilization\",\n },\n TargetValue = 75,\n ScaleInCooldown = 300,\n ScaleOutCooldown = 300,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\treplicas, err := appautoscaling.NewTarget(ctx, \"replicas\", \u0026appautoscaling.TargetArgs{\n\t\t\tServiceNamespace: pulumi.String(\"rds\"),\n\t\t\tScalableDimension: pulumi.String(\"rds:cluster:ReadReplicaCount\"),\n\t\t\tResourceId: pulumi.Sprintf(\"cluster:%v\", example.Id),\n\t\t\tMinCapacity: pulumi.Int(1),\n\t\t\tMaxCapacity: pulumi.Int(15),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"replicas\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"cpu-auto-scaling\"),\n\t\t\tServiceNamespace: replicas.ServiceNamespace,\n\t\t\tScalableDimension: replicas.ScalableDimension,\n\t\t\tResourceId: replicas.ResourceId,\n\t\t\tPolicyType: pulumi.String(\"TargetTrackingScaling\"),\n\t\t\tTargetTrackingScalingPolicyConfiguration: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{\n\t\t\t\tPredefinedMetricSpecification: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{\n\t\t\t\t\tPredefinedMetricType: pulumi.String(\"RDSReaderAverageCPUUtilization\"),\n\t\t\t\t},\n\t\t\t\tTargetValue: pulumi.Float64(75),\n\t\t\t\tScaleInCooldown: pulumi.Int(300),\n\t\t\t\tScaleOutCooldown: pulumi.Int(300),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Target;\nimport com.pulumi.aws.appautoscaling.TargetArgs;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var replicas = new Target(\"replicas\", TargetArgs.builder()\n .serviceNamespace(\"rds\")\n .scalableDimension(\"rds:cluster:ReadReplicaCount\")\n .resourceId(String.format(\"cluster:%s\", example.id()))\n .minCapacity(1)\n .maxCapacity(15)\n .build());\n\n var replicasPolicy = new Policy(\"replicasPolicy\", PolicyArgs.builder()\n .name(\"cpu-auto-scaling\")\n .serviceNamespace(replicas.serviceNamespace())\n .scalableDimension(replicas.scalableDimension())\n .resourceId(replicas.resourceId())\n .policyType(\"TargetTrackingScaling\")\n .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()\n .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()\n .predefinedMetricType(\"RDSReaderAverageCPUUtilization\")\n .build())\n .targetValue(75)\n .scaleInCooldown(300)\n .scaleOutCooldown(300)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n replicas:\n type: aws:appautoscaling:Target\n properties:\n serviceNamespace: rds\n scalableDimension: rds:cluster:ReadReplicaCount\n resourceId: cluster:${example.id}\n minCapacity: 1\n maxCapacity: 15\n replicasPolicy:\n type: aws:appautoscaling:Policy\n name: replicas\n properties:\n name: cpu-auto-scaling\n serviceNamespace: ${replicas.serviceNamespace}\n scalableDimension: ${replicas.scalableDimension}\n resourceId: ${replicas.resourceId}\n policyType: TargetTrackingScaling\n targetTrackingScalingPolicyConfiguration:\n predefinedMetricSpecification:\n predefinedMetricType: RDSReaderAverageCPUUtilization\n targetValue: 75\n scaleInCooldown: 300\n scaleOutCooldown: 300\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create target tracking scaling policy using metric math\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ecsTarget = new aws.appautoscaling.Target(\"ecs_target\", {\n maxCapacity: 4,\n minCapacity: 1,\n resourceId: \"service/clusterName/serviceName\",\n scalableDimension: \"ecs:service:DesiredCount\",\n serviceNamespace: \"ecs\",\n});\nconst example = new aws.appautoscaling.Policy(\"example\", {\n name: \"foo\",\n policyType: \"TargetTrackingScaling\",\n resourceId: ecsTarget.resourceId,\n scalableDimension: ecsTarget.scalableDimension,\n serviceNamespace: ecsTarget.serviceNamespace,\n targetTrackingScalingPolicyConfiguration: {\n targetValue: 100,\n customizedMetricSpecification: {\n metrics: [\n {\n label: \"Get the queue size (the number of messages waiting to be processed)\",\n id: \"m1\",\n metricStat: {\n metric: {\n metricName: \"ApproximateNumberOfMessagesVisible\",\n namespace: \"AWS/SQS\",\n dimensions: [{\n name: \"QueueName\",\n value: \"my-queue\",\n }],\n },\n stat: \"Sum\",\n },\n returnData: false,\n },\n {\n label: \"Get the ECS running task count (the number of currently running tasks)\",\n id: \"m2\",\n metricStat: {\n metric: {\n metricName: \"RunningTaskCount\",\n namespace: \"ECS/ContainerInsights\",\n dimensions: [\n {\n name: \"ClusterName\",\n value: \"default\",\n },\n {\n name: \"ServiceName\",\n value: \"web-app\",\n },\n ],\n },\n stat: \"Average\",\n },\n returnData: false,\n },\n {\n label: \"Calculate the backlog per instance\",\n id: \"e1\",\n expression: \"m1 / m2\",\n returnData: true,\n },\n ],\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\necs_target = aws.appautoscaling.Target(\"ecs_target\",\n max_capacity=4,\n min_capacity=1,\n resource_id=\"service/clusterName/serviceName\",\n scalable_dimension=\"ecs:service:DesiredCount\",\n service_namespace=\"ecs\")\nexample = aws.appautoscaling.Policy(\"example\",\n name=\"foo\",\n policy_type=\"TargetTrackingScaling\",\n resource_id=ecs_target.resource_id,\n scalable_dimension=ecs_target.scalable_dimension,\n service_namespace=ecs_target.service_namespace,\n target_tracking_scaling_policy_configuration={\n \"target_value\": 100,\n \"customized_metric_specification\": {\n \"metrics\": [\n {\n \"label\": \"Get the queue size (the number of messages waiting to be processed)\",\n \"id\": \"m1\",\n \"metric_stat\": {\n \"metric\": {\n \"metric_name\": \"ApproximateNumberOfMessagesVisible\",\n \"namespace\": \"AWS/SQS\",\n \"dimensions\": [{\n \"name\": \"QueueName\",\n \"value\": \"my-queue\",\n }],\n },\n \"stat\": \"Sum\",\n },\n \"return_data\": False,\n },\n {\n \"label\": \"Get the ECS running task count (the number of currently running tasks)\",\n \"id\": \"m2\",\n \"metric_stat\": {\n \"metric\": {\n \"metric_name\": \"RunningTaskCount\",\n \"namespace\": \"ECS/ContainerInsights\",\n \"dimensions\": [\n {\n \"name\": \"ClusterName\",\n \"value\": \"default\",\n },\n {\n \"name\": \"ServiceName\",\n \"value\": \"web-app\",\n },\n ],\n },\n \"stat\": \"Average\",\n },\n \"return_data\": False,\n },\n {\n \"label\": \"Calculate the backlog per instance\",\n \"id\": \"e1\",\n \"expression\": \"m1 / m2\",\n \"return_data\": True,\n },\n ],\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecsTarget = new Aws.AppAutoScaling.Target(\"ecs_target\", new()\n {\n MaxCapacity = 4,\n MinCapacity = 1,\n ResourceId = \"service/clusterName/serviceName\",\n ScalableDimension = \"ecs:service:DesiredCount\",\n ServiceNamespace = \"ecs\",\n });\n\n var example = new Aws.AppAutoScaling.Policy(\"example\", new()\n {\n Name = \"foo\",\n PolicyType = \"TargetTrackingScaling\",\n ResourceId = ecsTarget.ResourceId,\n ScalableDimension = ecsTarget.ScalableDimension,\n ServiceNamespace = ecsTarget.ServiceNamespace,\n TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs\n {\n TargetValue = 100,\n CustomizedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs\n {\n Metrics = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs\n {\n Label = \"Get the queue size (the number of messages waiting to be processed)\",\n Id = \"m1\",\n MetricStat = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs\n {\n Metric = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs\n {\n MetricName = \"ApproximateNumberOfMessagesVisible\",\n Namespace = \"AWS/SQS\",\n Dimensions = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs\n {\n Name = \"QueueName\",\n Value = \"my-queue\",\n },\n },\n },\n Stat = \"Sum\",\n },\n ReturnData = false,\n },\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs\n {\n Label = \"Get the ECS running task count (the number of currently running tasks)\",\n Id = \"m2\",\n MetricStat = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs\n {\n Metric = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs\n {\n MetricName = \"RunningTaskCount\",\n Namespace = \"ECS/ContainerInsights\",\n Dimensions = new[]\n {\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs\n {\n Name = \"ClusterName\",\n Value = \"default\",\n },\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs\n {\n Name = \"ServiceName\",\n Value = \"web-app\",\n },\n },\n },\n Stat = \"Average\",\n },\n ReturnData = false,\n },\n new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs\n {\n Label = \"Calculate the backlog per instance\",\n Id = \"e1\",\n Expression = \"m1 / m2\",\n ReturnData = true,\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tecsTarget, err := appautoscaling.NewTarget(ctx, \"ecs_target\", \u0026appautoscaling.TargetArgs{\n\t\t\tMaxCapacity: pulumi.Int(4),\n\t\t\tMinCapacity: pulumi.Int(1),\n\t\t\tResourceId: pulumi.String(\"service/clusterName/serviceName\"),\n\t\t\tScalableDimension: pulumi.String(\"ecs:service:DesiredCount\"),\n\t\t\tServiceNamespace: pulumi.String(\"ecs\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"example\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"foo\"),\n\t\t\tPolicyType: pulumi.String(\"TargetTrackingScaling\"),\n\t\t\tResourceId: ecsTarget.ResourceId,\n\t\t\tScalableDimension: ecsTarget.ScalableDimension,\n\t\t\tServiceNamespace: ecsTarget.ServiceNamespace,\n\t\t\tTargetTrackingScalingPolicyConfiguration: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{\n\t\t\t\tTargetValue: pulumi.Float64(100),\n\t\t\t\tCustomizedMetricSpecification: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs{\n\t\t\t\t\tMetrics: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArray{\n\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Get the queue size (the number of messages waiting to be processed)\"),\n\t\t\t\t\t\t\tId: pulumi.String(\"m1\"),\n\t\t\t\t\t\t\tMetricStat: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{\n\t\t\t\t\t\t\t\tMetric: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{\n\t\t\t\t\t\t\t\t\tMetricName: pulumi.String(\"ApproximateNumberOfMessagesVisible\"),\n\t\t\t\t\t\t\t\t\tNamespace: pulumi.String(\"AWS/SQS\"),\n\t\t\t\t\t\t\t\t\tDimensions: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{\n\t\t\t\t\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{\n\t\t\t\t\t\t\t\t\t\t\tName: pulumi.String(\"QueueName\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"my-queue\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tStat: pulumi.String(\"Sum\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tReturnData: pulumi.Bool(false),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Get the ECS running task count (the number of currently running tasks)\"),\n\t\t\t\t\t\t\tId: pulumi.String(\"m2\"),\n\t\t\t\t\t\t\tMetricStat: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs{\n\t\t\t\t\t\t\t\tMetric: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs{\n\t\t\t\t\t\t\t\t\tMetricName: pulumi.String(\"RunningTaskCount\"),\n\t\t\t\t\t\t\t\t\tNamespace: pulumi.String(\"ECS/ContainerInsights\"),\n\t\t\t\t\t\t\t\t\tDimensions: appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArray{\n\t\t\t\t\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{\n\t\t\t\t\t\t\t\t\t\t\tName: pulumi.String(\"ClusterName\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"default\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs{\n\t\t\t\t\t\t\t\t\t\t\tName: pulumi.String(\"ServiceName\"),\n\t\t\t\t\t\t\t\t\t\t\tValue: pulumi.String(\"web-app\"),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tStat: pulumi.String(\"Average\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tReturnData: pulumi.Bool(false),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs{\n\t\t\t\t\t\t\tLabel: pulumi.String(\"Calculate the backlog per instance\"),\n\t\t\t\t\t\t\tId: pulumi.String(\"e1\"),\n\t\t\t\t\t\t\tExpression: pulumi.String(\"m1 / m2\"),\n\t\t\t\t\t\t\tReturnData: pulumi.Bool(true),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Target;\nimport com.pulumi.aws.appautoscaling.TargetArgs;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ecsTarget = new Target(\"ecsTarget\", TargetArgs.builder()\n .maxCapacity(4)\n .minCapacity(1)\n .resourceId(\"service/clusterName/serviceName\")\n .scalableDimension(\"ecs:service:DesiredCount\")\n .serviceNamespace(\"ecs\")\n .build());\n\n var example = new Policy(\"example\", PolicyArgs.builder()\n .name(\"foo\")\n .policyType(\"TargetTrackingScaling\")\n .resourceId(ecsTarget.resourceId())\n .scalableDimension(ecsTarget.scalableDimension())\n .serviceNamespace(ecsTarget.serviceNamespace())\n .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()\n .targetValue(100)\n .customizedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationArgs.builder()\n .metrics( \n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()\n .label(\"Get the queue size (the number of messages waiting to be processed)\")\n .id(\"m1\")\n .metricStat(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()\n .metric(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()\n .metricName(\"ApproximateNumberOfMessagesVisible\")\n .namespace(\"AWS/SQS\")\n .dimensions(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()\n .name(\"QueueName\")\n .value(\"my-queue\")\n .build())\n .build())\n .stat(\"Sum\")\n .build())\n .returnData(false)\n .build(),\n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()\n .label(\"Get the ECS running task count (the number of currently running tasks)\")\n .id(\"m2\")\n .metricStat(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatArgs.builder()\n .metric(PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricArgs.builder()\n .metricName(\"RunningTaskCount\")\n .namespace(\"ECS/ContainerInsights\")\n .dimensions( \n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()\n .name(\"ClusterName\")\n .value(\"default\")\n .build(),\n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricMetricStatMetricDimensionArgs.builder()\n .name(\"ServiceName\")\n .value(\"web-app\")\n .build())\n .build())\n .stat(\"Average\")\n .build())\n .returnData(false)\n .build(),\n PolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricArgs.builder()\n .label(\"Calculate the backlog per instance\")\n .id(\"e1\")\n .expression(\"m1 / m2\")\n .returnData(true)\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ecsTarget:\n type: aws:appautoscaling:Target\n name: ecs_target\n properties:\n maxCapacity: 4\n minCapacity: 1\n resourceId: service/clusterName/serviceName\n scalableDimension: ecs:service:DesiredCount\n serviceNamespace: ecs\n example:\n type: aws:appautoscaling:Policy\n properties:\n name: foo\n policyType: TargetTrackingScaling\n resourceId: ${ecsTarget.resourceId}\n scalableDimension: ${ecsTarget.scalableDimension}\n serviceNamespace: ${ecsTarget.serviceNamespace}\n targetTrackingScalingPolicyConfiguration:\n targetValue: 100\n customizedMetricSpecification:\n metrics:\n - label: Get the queue size (the number of messages waiting to be processed)\n id: m1\n metricStat:\n metric:\n metricName: ApproximateNumberOfMessagesVisible\n namespace: AWS/SQS\n dimensions:\n - name: QueueName\n value: my-queue\n stat: Sum\n returnData: false\n - label: Get the ECS running task count (the number of currently running tasks)\n id: m2\n metricStat:\n metric:\n metricName: RunningTaskCount\n namespace: ECS/ContainerInsights\n dimensions:\n - name: ClusterName\n value: default\n - name: ServiceName\n value: web-app\n stat: Average\n returnData: false\n - label: Calculate the backlog per instance\n id: e1\n expression: m1 / m2\n returnData: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### MSK / Kafka Autoscaling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mskTarget = new aws.appautoscaling.Target(\"msk_target\", {\n serviceNamespace: \"kafka\",\n scalableDimension: \"kafka:broker-storage:VolumeSize\",\n resourceId: example.arn,\n minCapacity: 1,\n maxCapacity: 8,\n});\nconst targets = new aws.appautoscaling.Policy(\"targets\", {\n name: \"storage-size-auto-scaling\",\n serviceNamespace: mskTarget.serviceNamespace,\n scalableDimension: mskTarget.scalableDimension,\n resourceId: mskTarget.resourceId,\n policyType: \"TargetTrackingScaling\",\n targetTrackingScalingPolicyConfiguration: {\n predefinedMetricSpecification: {\n predefinedMetricType: \"KafkaBrokerStorageUtilization\",\n },\n targetValue: 55,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmsk_target = aws.appautoscaling.Target(\"msk_target\",\n service_namespace=\"kafka\",\n scalable_dimension=\"kafka:broker-storage:VolumeSize\",\n resource_id=example[\"arn\"],\n min_capacity=1,\n max_capacity=8)\ntargets = aws.appautoscaling.Policy(\"targets\",\n name=\"storage-size-auto-scaling\",\n service_namespace=msk_target.service_namespace,\n scalable_dimension=msk_target.scalable_dimension,\n resource_id=msk_target.resource_id,\n policy_type=\"TargetTrackingScaling\",\n target_tracking_scaling_policy_configuration={\n \"predefined_metric_specification\": {\n \"predefined_metric_type\": \"KafkaBrokerStorageUtilization\",\n },\n \"target_value\": 55,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mskTarget = new Aws.AppAutoScaling.Target(\"msk_target\", new()\n {\n ServiceNamespace = \"kafka\",\n ScalableDimension = \"kafka:broker-storage:VolumeSize\",\n ResourceId = example.Arn,\n MinCapacity = 1,\n MaxCapacity = 8,\n });\n\n var targets = new Aws.AppAutoScaling.Policy(\"targets\", new()\n {\n Name = \"storage-size-auto-scaling\",\n ServiceNamespace = mskTarget.ServiceNamespace,\n ScalableDimension = mskTarget.ScalableDimension,\n ResourceId = mskTarget.ResourceId,\n PolicyType = \"TargetTrackingScaling\",\n TargetTrackingScalingPolicyConfiguration = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs\n {\n PredefinedMetricSpecification = new Aws.AppAutoScaling.Inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs\n {\n PredefinedMetricType = \"KafkaBrokerStorageUtilization\",\n },\n TargetValue = 55,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmskTarget, err := appautoscaling.NewTarget(ctx, \"msk_target\", \u0026appautoscaling.TargetArgs{\n\t\t\tServiceNamespace: pulumi.String(\"kafka\"),\n\t\t\tScalableDimension: pulumi.String(\"kafka:broker-storage:VolumeSize\"),\n\t\t\tResourceId: pulumi.Any(example.Arn),\n\t\t\tMinCapacity: pulumi.Int(1),\n\t\t\tMaxCapacity: pulumi.Int(8),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appautoscaling.NewPolicy(ctx, \"targets\", \u0026appautoscaling.PolicyArgs{\n\t\t\tName: pulumi.String(\"storage-size-auto-scaling\"),\n\t\t\tServiceNamespace: mskTarget.ServiceNamespace,\n\t\t\tScalableDimension: mskTarget.ScalableDimension,\n\t\t\tResourceId: mskTarget.ResourceId,\n\t\t\tPolicyType: pulumi.String(\"TargetTrackingScaling\"),\n\t\t\tTargetTrackingScalingPolicyConfiguration: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationArgs{\n\t\t\t\tPredefinedMetricSpecification: \u0026appautoscaling.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs{\n\t\t\t\t\tPredefinedMetricType: pulumi.String(\"KafkaBrokerStorageUtilization\"),\n\t\t\t\t},\n\t\t\t\tTargetValue: pulumi.Float64(55),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appautoscaling.Target;\nimport com.pulumi.aws.appautoscaling.TargetArgs;\nimport com.pulumi.aws.appautoscaling.Policy;\nimport com.pulumi.aws.appautoscaling.PolicyArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationArgs;\nimport com.pulumi.aws.appautoscaling.inputs.PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var mskTarget = new Target(\"mskTarget\", TargetArgs.builder()\n .serviceNamespace(\"kafka\")\n .scalableDimension(\"kafka:broker-storage:VolumeSize\")\n .resourceId(example.arn())\n .minCapacity(1)\n .maxCapacity(8)\n .build());\n\n var targets = new Policy(\"targets\", PolicyArgs.builder()\n .name(\"storage-size-auto-scaling\")\n .serviceNamespace(mskTarget.serviceNamespace())\n .scalableDimension(mskTarget.scalableDimension())\n .resourceId(mskTarget.resourceId())\n .policyType(\"TargetTrackingScaling\")\n .targetTrackingScalingPolicyConfiguration(PolicyTargetTrackingScalingPolicyConfigurationArgs.builder()\n .predefinedMetricSpecification(PolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationArgs.builder()\n .predefinedMetricType(\"KafkaBrokerStorageUtilization\")\n .build())\n .targetValue(55)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mskTarget:\n type: aws:appautoscaling:Target\n name: msk_target\n properties:\n serviceNamespace: kafka\n scalableDimension: kafka:broker-storage:VolumeSize\n resourceId: ${example.arn}\n minCapacity: 1\n maxCapacity: 8\n targets:\n type: aws:appautoscaling:Policy\n properties:\n name: storage-size-auto-scaling\n serviceNamespace: ${mskTarget.serviceNamespace}\n scalableDimension: ${mskTarget.scalableDimension}\n resourceId: ${mskTarget.resourceId}\n policyType: TargetTrackingScaling\n targetTrackingScalingPolicyConfiguration:\n predefinedMetricSpecification:\n predefinedMetricType: KafkaBrokerStorageUtilization\n targetValue: 55\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Application AutoScaling Policy using the `service-namespace` , `resource-id`, `scalable-dimension` and `policy-name` separated by `/`. For example:\n\n```sh\n$ pulumi import aws:appautoscaling/policy:Policy test-policy service-namespace/resource-id/scalable-dimension/policy-name\n```\n", "properties": { "alarmArns": { "type": "array", @@ -187284,7 +187284,7 @@ "items": { "$ref": "#/types/aws:autoscaling/PolicyStepAdjustment:PolicyStepAdjustment" }, - "description": "Set of adjustments that manage\ngroup scaling. These have the following structure:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.autoscaling.Policy(\"example\", {stepAdjustments: [\n {\n scalingAdjustment: -1,\n metricIntervalLowerBound: \"1\",\n metricIntervalUpperBound: \"2\",\n },\n {\n scalingAdjustment: 1,\n metricIntervalLowerBound: \"2\",\n metricIntervalUpperBound: \"3\",\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.autoscaling.Policy(\"example\", step_adjustments=[\n {\n \"scaling_adjustment\": -1,\n \"metric_interval_lower_bound\": \"1\",\n \"metric_interval_upper_bound\": \"2\",\n },\n {\n \"scaling_adjustment\": 1,\n \"metric_interval_lower_bound\": \"2\",\n \"metric_interval_upper_bound\": \"3\",\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.AutoScaling.Policy(\"example\", new()\n {\n StepAdjustments = new[]\n {\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = -1,\n MetricIntervalLowerBound = \"1\",\n MetricIntervalUpperBound = \"2\",\n },\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = 1,\n MetricIntervalLowerBound = \"2\",\n MetricIntervalUpperBound = \"3\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := autoscaling.NewPolicy(ctx, \"example\", \u0026autoscaling.PolicyArgs{\n\t\t\tStepAdjustments: autoscaling.PolicyStepAdjustmentArray{\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: int(-1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"1\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"2\"),\n\t\t\t\t},\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: pulumi.Int(1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"2\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"3\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n example:\n type: aws:autoscaling:Policy\n properties:\n stepAdjustments:\n - scalingAdjustment: -1\n metricIntervalLowerBound: 1\n metricIntervalUpperBound: 2\n - scalingAdjustment: 1\n metricIntervalLowerBound: 2\n metricIntervalUpperBound: 3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following fields are available in step adjustments:\n" + "description": "Set of adjustments that manage\ngroup scaling. These have the following structure:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.autoscaling.Policy(\"example\", {stepAdjustments: [\n {\n scalingAdjustment: -1,\n metricIntervalLowerBound: \"1\",\n metricIntervalUpperBound: \"2\",\n },\n {\n scalingAdjustment: 1,\n metricIntervalLowerBound: \"2\",\n metricIntervalUpperBound: \"3\",\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.autoscaling.Policy(\"example\", step_adjustments=[\n {\n \"scaling_adjustment\": -1,\n \"metric_interval_lower_bound\": \"1\",\n \"metric_interval_upper_bound\": \"2\",\n },\n {\n \"scaling_adjustment\": 1,\n \"metric_interval_lower_bound\": \"2\",\n \"metric_interval_upper_bound\": \"3\",\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.AutoScaling.Policy(\"example\", new()\n {\n StepAdjustments = new[]\n {\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = -1,\n MetricIntervalLowerBound = \"1\",\n MetricIntervalUpperBound = \"2\",\n },\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = 1,\n MetricIntervalLowerBound = \"2\",\n MetricIntervalUpperBound = \"3\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := autoscaling.NewPolicy(ctx, \"example\", \u0026autoscaling.PolicyArgs{\n\t\t\tStepAdjustments: autoscaling.PolicyStepAdjustmentArray{\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: pulumi.Int(-1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"1\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"2\"),\n\t\t\t\t},\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: pulumi.Int(1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"2\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"3\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.autoscaling.Policy;\nimport com.pulumi.aws.autoscaling.PolicyArgs;\nimport com.pulumi.aws.autoscaling.inputs.PolicyStepAdjustmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Policy(\"example\", PolicyArgs.builder()\n .stepAdjustments( \n PolicyStepAdjustmentArgs.builder()\n .scalingAdjustment(-1)\n .metricIntervalLowerBound(1)\n .metricIntervalUpperBound(2)\n .build(),\n PolicyStepAdjustmentArgs.builder()\n .scalingAdjustment(1)\n .metricIntervalLowerBound(2)\n .metricIntervalUpperBound(3)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:autoscaling:Policy\n properties:\n stepAdjustments:\n - scalingAdjustment: -1\n metricIntervalLowerBound: 1\n metricIntervalUpperBound: 2\n - scalingAdjustment: 1\n metricIntervalLowerBound: 2\n metricIntervalUpperBound: 3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following fields are available in step adjustments:\n" }, "targetTrackingConfiguration": { "$ref": "#/types/aws:autoscaling/PolicyTargetTrackingConfiguration:PolicyTargetTrackingConfiguration", @@ -187349,7 +187349,7 @@ "items": { "$ref": "#/types/aws:autoscaling/PolicyStepAdjustment:PolicyStepAdjustment" }, - "description": "Set of adjustments that manage\ngroup scaling. These have the following structure:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.autoscaling.Policy(\"example\", {stepAdjustments: [\n {\n scalingAdjustment: -1,\n metricIntervalLowerBound: \"1\",\n metricIntervalUpperBound: \"2\",\n },\n {\n scalingAdjustment: 1,\n metricIntervalLowerBound: \"2\",\n metricIntervalUpperBound: \"3\",\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.autoscaling.Policy(\"example\", step_adjustments=[\n {\n \"scaling_adjustment\": -1,\n \"metric_interval_lower_bound\": \"1\",\n \"metric_interval_upper_bound\": \"2\",\n },\n {\n \"scaling_adjustment\": 1,\n \"metric_interval_lower_bound\": \"2\",\n \"metric_interval_upper_bound\": \"3\",\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.AutoScaling.Policy(\"example\", new()\n {\n StepAdjustments = new[]\n {\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = -1,\n MetricIntervalLowerBound = \"1\",\n MetricIntervalUpperBound = \"2\",\n },\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = 1,\n MetricIntervalLowerBound = \"2\",\n MetricIntervalUpperBound = \"3\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := autoscaling.NewPolicy(ctx, \"example\", \u0026autoscaling.PolicyArgs{\n\t\t\tStepAdjustments: autoscaling.PolicyStepAdjustmentArray{\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: int(-1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"1\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"2\"),\n\t\t\t\t},\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: pulumi.Int(1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"2\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"3\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n example:\n type: aws:autoscaling:Policy\n properties:\n stepAdjustments:\n - scalingAdjustment: -1\n metricIntervalLowerBound: 1\n metricIntervalUpperBound: 2\n - scalingAdjustment: 1\n metricIntervalLowerBound: 2\n metricIntervalUpperBound: 3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following fields are available in step adjustments:\n" + "description": "Set of adjustments that manage\ngroup scaling. These have the following structure:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.autoscaling.Policy(\"example\", {stepAdjustments: [\n {\n scalingAdjustment: -1,\n metricIntervalLowerBound: \"1\",\n metricIntervalUpperBound: \"2\",\n },\n {\n scalingAdjustment: 1,\n metricIntervalLowerBound: \"2\",\n metricIntervalUpperBound: \"3\",\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.autoscaling.Policy(\"example\", step_adjustments=[\n {\n \"scaling_adjustment\": -1,\n \"metric_interval_lower_bound\": \"1\",\n \"metric_interval_upper_bound\": \"2\",\n },\n {\n \"scaling_adjustment\": 1,\n \"metric_interval_lower_bound\": \"2\",\n \"metric_interval_upper_bound\": \"3\",\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.AutoScaling.Policy(\"example\", new()\n {\n StepAdjustments = new[]\n {\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = -1,\n MetricIntervalLowerBound = \"1\",\n MetricIntervalUpperBound = \"2\",\n },\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = 1,\n MetricIntervalLowerBound = \"2\",\n MetricIntervalUpperBound = \"3\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := autoscaling.NewPolicy(ctx, \"example\", \u0026autoscaling.PolicyArgs{\n\t\t\tStepAdjustments: autoscaling.PolicyStepAdjustmentArray{\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: pulumi.Int(-1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"1\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"2\"),\n\t\t\t\t},\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: pulumi.Int(1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"2\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"3\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.autoscaling.Policy;\nimport com.pulumi.aws.autoscaling.PolicyArgs;\nimport com.pulumi.aws.autoscaling.inputs.PolicyStepAdjustmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Policy(\"example\", PolicyArgs.builder()\n .stepAdjustments( \n PolicyStepAdjustmentArgs.builder()\n .scalingAdjustment(-1)\n .metricIntervalLowerBound(1)\n .metricIntervalUpperBound(2)\n .build(),\n PolicyStepAdjustmentArgs.builder()\n .scalingAdjustment(1)\n .metricIntervalLowerBound(2)\n .metricIntervalUpperBound(3)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:autoscaling:Policy\n properties:\n stepAdjustments:\n - scalingAdjustment: -1\n metricIntervalLowerBound: 1\n metricIntervalUpperBound: 2\n - scalingAdjustment: 1\n metricIntervalLowerBound: 2\n metricIntervalUpperBound: 3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following fields are available in step adjustments:\n" }, "targetTrackingConfiguration": { "$ref": "#/types/aws:autoscaling/PolicyTargetTrackingConfiguration:PolicyTargetTrackingConfiguration", @@ -187417,7 +187417,7 @@ "items": { "$ref": "#/types/aws:autoscaling/PolicyStepAdjustment:PolicyStepAdjustment" }, - "description": "Set of adjustments that manage\ngroup scaling. These have the following structure:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.autoscaling.Policy(\"example\", {stepAdjustments: [\n {\n scalingAdjustment: -1,\n metricIntervalLowerBound: \"1\",\n metricIntervalUpperBound: \"2\",\n },\n {\n scalingAdjustment: 1,\n metricIntervalLowerBound: \"2\",\n metricIntervalUpperBound: \"3\",\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.autoscaling.Policy(\"example\", step_adjustments=[\n {\n \"scaling_adjustment\": -1,\n \"metric_interval_lower_bound\": \"1\",\n \"metric_interval_upper_bound\": \"2\",\n },\n {\n \"scaling_adjustment\": 1,\n \"metric_interval_lower_bound\": \"2\",\n \"metric_interval_upper_bound\": \"3\",\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.AutoScaling.Policy(\"example\", new()\n {\n StepAdjustments = new[]\n {\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = -1,\n MetricIntervalLowerBound = \"1\",\n MetricIntervalUpperBound = \"2\",\n },\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = 1,\n MetricIntervalLowerBound = \"2\",\n MetricIntervalUpperBound = \"3\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := autoscaling.NewPolicy(ctx, \"example\", \u0026autoscaling.PolicyArgs{\n\t\t\tStepAdjustments: autoscaling.PolicyStepAdjustmentArray{\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: int(-1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"1\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"2\"),\n\t\t\t\t},\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: pulumi.Int(1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"2\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"3\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n example:\n type: aws:autoscaling:Policy\n properties:\n stepAdjustments:\n - scalingAdjustment: -1\n metricIntervalLowerBound: 1\n metricIntervalUpperBound: 2\n - scalingAdjustment: 1\n metricIntervalLowerBound: 2\n metricIntervalUpperBound: 3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following fields are available in step adjustments:\n" + "description": "Set of adjustments that manage\ngroup scaling. These have the following structure:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.autoscaling.Policy(\"example\", {stepAdjustments: [\n {\n scalingAdjustment: -1,\n metricIntervalLowerBound: \"1\",\n metricIntervalUpperBound: \"2\",\n },\n {\n scalingAdjustment: 1,\n metricIntervalLowerBound: \"2\",\n metricIntervalUpperBound: \"3\",\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.autoscaling.Policy(\"example\", step_adjustments=[\n {\n \"scaling_adjustment\": -1,\n \"metric_interval_lower_bound\": \"1\",\n \"metric_interval_upper_bound\": \"2\",\n },\n {\n \"scaling_adjustment\": 1,\n \"metric_interval_lower_bound\": \"2\",\n \"metric_interval_upper_bound\": \"3\",\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.AutoScaling.Policy(\"example\", new()\n {\n StepAdjustments = new[]\n {\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = -1,\n MetricIntervalLowerBound = \"1\",\n MetricIntervalUpperBound = \"2\",\n },\n new Aws.AutoScaling.Inputs.PolicyStepAdjustmentArgs\n {\n ScalingAdjustment = 1,\n MetricIntervalLowerBound = \"2\",\n MetricIntervalUpperBound = \"3\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := autoscaling.NewPolicy(ctx, \"example\", \u0026autoscaling.PolicyArgs{\n\t\t\tStepAdjustments: autoscaling.PolicyStepAdjustmentArray{\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: pulumi.Int(-1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"1\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"2\"),\n\t\t\t\t},\n\t\t\t\t\u0026autoscaling.PolicyStepAdjustmentArgs{\n\t\t\t\t\tScalingAdjustment: pulumi.Int(1),\n\t\t\t\t\tMetricIntervalLowerBound: pulumi.String(\"2\"),\n\t\t\t\t\tMetricIntervalUpperBound: pulumi.String(\"3\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.autoscaling.Policy;\nimport com.pulumi.aws.autoscaling.PolicyArgs;\nimport com.pulumi.aws.autoscaling.inputs.PolicyStepAdjustmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Policy(\"example\", PolicyArgs.builder()\n .stepAdjustments( \n PolicyStepAdjustmentArgs.builder()\n .scalingAdjustment(-1)\n .metricIntervalLowerBound(1)\n .metricIntervalUpperBound(2)\n .build(),\n PolicyStepAdjustmentArgs.builder()\n .scalingAdjustment(1)\n .metricIntervalLowerBound(2)\n .metricIntervalUpperBound(3)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:autoscaling:Policy\n properties:\n stepAdjustments:\n - scalingAdjustment: -1\n metricIntervalLowerBound: 1\n metricIntervalUpperBound: 2\n - scalingAdjustment: 1\n metricIntervalLowerBound: 2\n metricIntervalUpperBound: 3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following fields are available in step adjustments:\n" }, "targetTrackingConfiguration": { "$ref": "#/types/aws:autoscaling/PolicyTargetTrackingConfiguration:PolicyTargetTrackingConfiguration", @@ -188843,7 +188843,7 @@ } }, "aws:backup/vaultPolicy:VaultPolicy": { - "description": "Provides an AWS Backup vault policy resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst exampleVault = new aws.backup.Vault(\"example\", {name: \"example\"});\nconst example = pulumi.all([current, exampleVault.arn]).apply(([current, arn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [current.accountId],\n }],\n actions: [\n \"backup:DescribeBackupVault\",\n \"backup:DeleteBackupVault\",\n \"backup:PutBackupVaultAccessPolicy\",\n \"backup:DeleteBackupVaultAccessPolicy\",\n \"backup:GetBackupVaultAccessPolicy\",\n \"backup:StartBackupJob\",\n \"backup:GetBackupVaultNotifications\",\n \"backup:PutBackupVaultNotifications\",\n ],\n resources: [arn],\n }],\n}));\nconst exampleVaultPolicy = new aws.backup.VaultPolicy(\"example\", {\n backupVaultName: exampleVault.name,\n policy: example.apply(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample_vault = aws.backup.Vault(\"example\", name=\"example\")\nexample = example_vault.arn.apply(lambda arn: aws.iam.get_policy_document_output(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [current.account_id],\n }],\n \"actions\": [\n \"backup:DescribeBackupVault\",\n \"backup:DeleteBackupVault\",\n \"backup:PutBackupVaultAccessPolicy\",\n \"backup:DeleteBackupVaultAccessPolicy\",\n \"backup:GetBackupVaultAccessPolicy\",\n \"backup:StartBackupJob\",\n \"backup:GetBackupVaultNotifications\",\n \"backup:PutBackupVaultNotifications\",\n ],\n \"resources\": [arn],\n}]))\nexample_vault_policy = aws.backup.VaultPolicy(\"example\",\n backup_vault_name=example_vault.name,\n policy=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var exampleVault = new Aws.Backup.Vault(\"example\", new()\n {\n Name = \"example\",\n });\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n Actions = new[]\n {\n \"backup:DescribeBackupVault\",\n \"backup:DeleteBackupVault\",\n \"backup:PutBackupVaultAccessPolicy\",\n \"backup:DeleteBackupVaultAccessPolicy\",\n \"backup:GetBackupVaultAccessPolicy\",\n \"backup:StartBackupJob\",\n \"backup:GetBackupVaultNotifications\",\n \"backup:PutBackupVaultNotifications\",\n },\n Resources = new[]\n {\n exampleVault.Arn,\n },\n },\n },\n });\n\n var exampleVaultPolicy = new Aws.Backup.VaultPolicy(\"example\", new()\n {\n BackupVaultName = exampleVault.Name,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\ncurrent, err := aws.GetCallerIdentity(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nexampleVault, err := backup.NewVault(ctx, \"example\", \u0026backup.VaultArgs{\nName: pulumi.String(\"example\"),\n})\nif err != nil {\nreturn err\n}\nexample := exampleVault.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) {\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\ncurrent.AccountId,\n},\n},\n},\nActions: []string{\n\"backup:DescribeBackupVault\",\n\"backup:DeleteBackupVault\",\n\"backup:PutBackupVaultAccessPolicy\",\n\"backup:DeleteBackupVaultAccessPolicy\",\n\"backup:GetBackupVaultAccessPolicy\",\n\"backup:StartBackupJob\",\n\"backup:GetBackupVaultNotifications\",\n\"backup:PutBackupVaultNotifications\",\n},\nResources: []string{\narn,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = backup.NewVaultPolicy(ctx, \"example\", \u0026backup.VaultPolicyArgs{\nBackupVaultName: exampleVault.Name,\nPolicy: pulumi.String(example.ApplyT(func(example iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026example.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.backup.Vault;\nimport com.pulumi.aws.backup.VaultArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.backup.VaultPolicy;\nimport com.pulumi.aws.backup.VaultPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var exampleVault = new Vault(\"exampleVault\", VaultArgs.builder()\n .name(\"example\")\n .build());\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .actions( \n \"backup:DescribeBackupVault\",\n \"backup:DeleteBackupVault\",\n \"backup:PutBackupVaultAccessPolicy\",\n \"backup:DeleteBackupVaultAccessPolicy\",\n \"backup:GetBackupVaultAccessPolicy\",\n \"backup:StartBackupJob\",\n \"backup:GetBackupVaultNotifications\",\n \"backup:PutBackupVaultNotifications\")\n .resources(exampleVault.arn())\n .build())\n .build());\n\n var exampleVaultPolicy = new VaultPolicy(\"exampleVaultPolicy\", VaultPolicyArgs.builder()\n .backupVaultName(exampleVault.name())\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(example -\u003e example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleVault:\n type: aws:backup:Vault\n name: example\n properties:\n name: example\n exampleVaultPolicy:\n type: aws:backup:VaultPolicy\n name: example\n properties:\n backupVaultName: ${exampleVault.name}\n policy: ${example.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${current.accountId}\n actions:\n - backup:DescribeBackupVault\n - backup:DeleteBackupVault\n - backup:PutBackupVaultAccessPolicy\n - backup:DeleteBackupVaultAccessPolicy\n - backup:GetBackupVaultAccessPolicy\n - backup:StartBackupJob\n - backup:GetBackupVaultNotifications\n - backup:PutBackupVaultNotifications\n resources:\n - ${exampleVault.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Backup vault policy using the `name`. For example:\n\n```sh\n$ pulumi import aws:backup/vaultPolicy:VaultPolicy test TestVault\n```\n", + "description": "Provides an AWS Backup vault policy resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst exampleVault = new aws.backup.Vault(\"example\", {name: \"example\"});\nconst example = pulumi.all([current, exampleVault.arn]).apply(([current, arn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [current.accountId],\n }],\n actions: [\n \"backup:DescribeBackupVault\",\n \"backup:DeleteBackupVault\",\n \"backup:PutBackupVaultAccessPolicy\",\n \"backup:DeleteBackupVaultAccessPolicy\",\n \"backup:GetBackupVaultAccessPolicy\",\n \"backup:StartBackupJob\",\n \"backup:GetBackupVaultNotifications\",\n \"backup:PutBackupVaultNotifications\",\n ],\n resources: [arn],\n }],\n}));\nconst exampleVaultPolicy = new aws.backup.VaultPolicy(\"example\", {\n backupVaultName: exampleVault.name,\n policy: example.apply(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample_vault = aws.backup.Vault(\"example\", name=\"example\")\nexample = example_vault.arn.apply(lambda arn: aws.iam.get_policy_document_output(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [current.account_id],\n }],\n \"actions\": [\n \"backup:DescribeBackupVault\",\n \"backup:DeleteBackupVault\",\n \"backup:PutBackupVaultAccessPolicy\",\n \"backup:DeleteBackupVaultAccessPolicy\",\n \"backup:GetBackupVaultAccessPolicy\",\n \"backup:StartBackupJob\",\n \"backup:GetBackupVaultNotifications\",\n \"backup:PutBackupVaultNotifications\",\n ],\n \"resources\": [arn],\n}]))\nexample_vault_policy = aws.backup.VaultPolicy(\"example\",\n backup_vault_name=example_vault.name,\n policy=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var exampleVault = new Aws.Backup.Vault(\"example\", new()\n {\n Name = \"example\",\n });\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n Actions = new[]\n {\n \"backup:DescribeBackupVault\",\n \"backup:DeleteBackupVault\",\n \"backup:PutBackupVaultAccessPolicy\",\n \"backup:DeleteBackupVaultAccessPolicy\",\n \"backup:GetBackupVaultAccessPolicy\",\n \"backup:StartBackupJob\",\n \"backup:GetBackupVaultNotifications\",\n \"backup:PutBackupVaultNotifications\",\n },\n Resources = new[]\n {\n exampleVault.Arn,\n },\n },\n },\n });\n\n var exampleVaultPolicy = new Aws.Backup.VaultPolicy(\"example\", new()\n {\n BackupVaultName = exampleVault.Name,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\ncurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{\n}, nil);\nif err != nil {\nreturn err\n}\nexampleVault, err := backup.NewVault(ctx, \"example\", \u0026backup.VaultArgs{\nName: pulumi.String(\"example\"),\n})\nif err != nil {\nreturn err\n}\nexample := exampleVault.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) {\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\ncurrent.AccountId,\n},\n},\n},\nActions: []string{\n\"backup:DescribeBackupVault\",\n\"backup:DeleteBackupVault\",\n\"backup:PutBackupVaultAccessPolicy\",\n\"backup:DeleteBackupVaultAccessPolicy\",\n\"backup:GetBackupVaultAccessPolicy\",\n\"backup:StartBackupJob\",\n\"backup:GetBackupVaultNotifications\",\n\"backup:PutBackupVaultNotifications\",\n},\nResources: []string{\narn,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = backup.NewVaultPolicy(ctx, \"example\", \u0026backup.VaultPolicyArgs{\nBackupVaultName: exampleVault.Name,\nPolicy: pulumi.String(example.ApplyT(func(example iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026example.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.backup.Vault;\nimport com.pulumi.aws.backup.VaultArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.backup.VaultPolicy;\nimport com.pulumi.aws.backup.VaultPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var exampleVault = new Vault(\"exampleVault\", VaultArgs.builder()\n .name(\"example\")\n .build());\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .actions( \n \"backup:DescribeBackupVault\",\n \"backup:DeleteBackupVault\",\n \"backup:PutBackupVaultAccessPolicy\",\n \"backup:DeleteBackupVaultAccessPolicy\",\n \"backup:GetBackupVaultAccessPolicy\",\n \"backup:StartBackupJob\",\n \"backup:GetBackupVaultNotifications\",\n \"backup:PutBackupVaultNotifications\")\n .resources(exampleVault.arn())\n .build())\n .build());\n\n var exampleVaultPolicy = new VaultPolicy(\"exampleVaultPolicy\", VaultPolicyArgs.builder()\n .backupVaultName(exampleVault.name())\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(example -\u003e example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleVault:\n type: aws:backup:Vault\n name: example\n properties:\n name: example\n exampleVaultPolicy:\n type: aws:backup:VaultPolicy\n name: example\n properties:\n backupVaultName: ${exampleVault.name}\n policy: ${example.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${current.accountId}\n actions:\n - backup:DescribeBackupVault\n - backup:DeleteBackupVault\n - backup:PutBackupVaultAccessPolicy\n - backup:DeleteBackupVaultAccessPolicy\n - backup:GetBackupVaultAccessPolicy\n - backup:StartBackupJob\n - backup:GetBackupVaultNotifications\n - backup:PutBackupVaultNotifications\n resources:\n - ${exampleVault.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Backup vault policy using the `name`. For example:\n\n```sh\n$ pulumi import aws:backup/vaultPolicy:VaultPolicy test TestVault\n```\n", "properties": { "backupVaultArn": { "type": "string", @@ -189724,7 +189724,7 @@ } }, "aws:bedrock/agentAgent:AgentAgent": { - "description": "Resource for managing an AWS Agents for Amazon Bedrock Agent.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst exampleAgentTrust = Promise.all([current, currentGetPartition, currentGetRegion, current]).then(([current, currentGetPartition, currentGetRegion, current1]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n identifiers: [\"bedrock.amazonaws.com\"],\n type: \"Service\",\n }],\n conditions: [\n {\n test: \"StringEquals\",\n values: [current.accountId],\n variable: \"aws:SourceAccount\",\n },\n {\n test: \"ArnLike\",\n values: [`arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.name}:${current1.accountId}:agent/*`],\n variable: \"AWS:SourceArn\",\n },\n ],\n }],\n}));\nconst exampleAgentPermissions = Promise.all([currentGetPartition, currentGetRegion]).then(([currentGetPartition, currentGetRegion]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"bedrock:InvokeModel\"],\n resources: [`arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.name}::foundation-model/anthropic.claude-v2`],\n }],\n}));\nconst example = new aws.iam.Role(\"example\", {\n assumeRolePolicy: exampleAgentTrust.then(exampleAgentTrust =\u003e exampleAgentTrust.json),\n namePrefix: \"AmazonBedrockExecutionRoleForAgents_\",\n});\nconst exampleRolePolicy = new aws.iam.RolePolicy(\"example\", {\n policy: exampleAgentPermissions.then(exampleAgentPermissions =\u003e exampleAgentPermissions.json),\n role: example.id,\n});\nconst exampleAgentAgent = new aws.bedrock.AgentAgent(\"example\", {\n agentName: \"my-agent-name\",\n agentResourceRoleArn: example.arn,\n idleSessionTtlInSeconds: 500,\n foundationModel: \"anthropic.claude-v2\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\ncurrent_get_region = aws.get_region()\nexample_agent_trust = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"identifiers\": [\"bedrock.amazonaws.com\"],\n \"type\": \"Service\",\n }],\n \"conditions\": [\n {\n \"test\": \"StringEquals\",\n \"values\": [current.account_id],\n \"variable\": \"aws:SourceAccount\",\n },\n {\n \"test\": \"ArnLike\",\n \"values\": [f\"arn:{current_get_partition.partition}:bedrock:{current_get_region.name}:{current.account_id}:agent/*\"],\n \"variable\": \"AWS:SourceArn\",\n },\n ],\n}])\nexample_agent_permissions = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"bedrock:InvokeModel\"],\n \"resources\": [f\"arn:{current_get_partition.partition}:bedrock:{current_get_region.name}::foundation-model/anthropic.claude-v2\"],\n}])\nexample = aws.iam.Role(\"example\",\n assume_role_policy=example_agent_trust.json,\n name_prefix=\"AmazonBedrockExecutionRoleForAgents_\")\nexample_role_policy = aws.iam.RolePolicy(\"example\",\n policy=example_agent_permissions.json,\n role=example.id)\nexample_agent_agent = aws.bedrock.AgentAgent(\"example\",\n agent_name=\"my-agent-name\",\n agent_resource_role_arn=example.arn,\n idle_session_ttl_in_seconds=500,\n foundation_model=\"anthropic.claude-v2\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var exampleAgentTrust = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Identifiers = new[]\n {\n \"bedrock.amazonaws.com\",\n },\n Type = \"Service\",\n },\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Values = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n Variable = \"aws:SourceAccount\",\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"ArnLike\",\n Values = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:bedrock:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:agent/*\",\n },\n Variable = \"AWS:SourceArn\",\n },\n },\n },\n },\n });\n\n var exampleAgentPermissions = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"bedrock:InvokeModel\",\n },\n Resources = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:bedrock:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}::foundation-model/anthropic.claude-v2\",\n },\n },\n },\n });\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n AssumeRolePolicy = exampleAgentTrust.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n NamePrefix = \"AmazonBedrockExecutionRoleForAgents_\",\n });\n\n var exampleRolePolicy = new Aws.Iam.RolePolicy(\"example\", new()\n {\n Policy = exampleAgentPermissions.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n Role = example.Id,\n });\n\n var exampleAgentAgent = new Aws.Bedrock.AgentAgent(\"example\", new()\n {\n AgentName = \"my-agent-name\",\n AgentResourceRoleArn = example.Arn,\n IdleSessionTtlInSeconds = 500,\n FoundationModel = \"anthropic.claude-v2\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\ncurrent, err := aws.GetCallerIdentity(ctx, nil, nil);\nif err != nil {\nreturn err\n}\ncurrentGetPartition, err := aws.GetPartition(ctx, nil, nil);\nif err != nil {\nreturn err\n}\ncurrentGetRegion, err := aws.GetRegion(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nexampleAgentTrust, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nActions: []string{\n\"sts:AssumeRole\",\n},\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nIdentifiers: []string{\n\"bedrock.amazonaws.com\",\n},\nType: \"Service\",\n},\n},\nConditions: []iam.GetPolicyDocumentStatementCondition{\n{\nTest: \"StringEquals\",\nValues: interface{}{\ncurrent.AccountId,\n},\nVariable: \"aws:SourceAccount\",\n},\n{\nTest: \"ArnLike\",\nValues: []string{\nfmt.Sprintf(\"arn:%v:bedrock:%v:%v:agent/*\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n},\nVariable: \"AWS:SourceArn\",\n},\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nexampleAgentPermissions, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nActions: []string{\n\"bedrock:InvokeModel\",\n},\nResources: []string{\nfmt.Sprintf(\"arn:%v:bedrock:%v::foundation-model/anthropic.claude-v2\", currentGetPartition.Partition, currentGetRegion.Name),\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nexample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\nAssumeRolePolicy: pulumi.String(exampleAgentTrust.Json),\nNamePrefix: pulumi.String(\"AmazonBedrockExecutionRoleForAgents_\"),\n})\nif err != nil {\nreturn err\n}\n_, err = iam.NewRolePolicy(ctx, \"example\", \u0026iam.RolePolicyArgs{\nPolicy: pulumi.String(exampleAgentPermissions.Json),\nRole: example.ID(),\n})\nif err != nil {\nreturn err\n}\n_, err = bedrock.NewAgentAgent(ctx, \"example\", \u0026bedrock.AgentAgentArgs{\nAgentName: pulumi.String(\"my-agent-name\"),\nAgentResourceRoleArn: example.Arn,\nIdleSessionTtlInSeconds: pulumi.Int(500),\nFoundationModel: pulumi.String(\"anthropic.claude-v2\"),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport com.pulumi.aws.bedrock.AgentAgent;\nimport com.pulumi.aws.bedrock.AgentAgentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n final var exampleAgentTrust = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"sts:AssumeRole\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .identifiers(\"bedrock.amazonaws.com\")\n .type(\"Service\")\n .build())\n .conditions( \n GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .values(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .variable(\"aws:SourceAccount\")\n .build(),\n GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"ArnLike\")\n .values(String.format(\"arn:%s:bedrock:%s:%s:agent/*\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .variable(\"AWS:SourceArn\")\n .build())\n .build())\n .build());\n\n final var exampleAgentPermissions = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"bedrock:InvokeModel\")\n .resources(String.format(\"arn:%s:bedrock:%s::foundation-model/anthropic.claude-v2\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build())\n .build());\n\n var example = new Role(\"example\", RoleArgs.builder()\n .assumeRolePolicy(exampleAgentTrust.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .namePrefix(\"AmazonBedrockExecutionRoleForAgents_\")\n .build());\n\n var exampleRolePolicy = new RolePolicy(\"exampleRolePolicy\", RolePolicyArgs.builder()\n .policy(exampleAgentPermissions.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .role(example.id())\n .build());\n\n var exampleAgentAgent = new AgentAgent(\"exampleAgentAgent\", AgentAgentArgs.builder()\n .agentName(\"my-agent-name\")\n .agentResourceRoleArn(example.arn())\n .idleSessionTtlInSeconds(500)\n .foundationModel(\"anthropic.claude-v2\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n assumeRolePolicy: ${exampleAgentTrust.json}\n namePrefix: AmazonBedrockExecutionRoleForAgents_\n exampleRolePolicy:\n type: aws:iam:RolePolicy\n name: example\n properties:\n policy: ${exampleAgentPermissions.json}\n role: ${example.id}\n exampleAgentAgent:\n type: aws:bedrock:AgentAgent\n name: example\n properties:\n agentName: my-agent-name\n agentResourceRoleArn: ${example.arn}\n idleSessionTtlInSeconds: 500\n foundationModel: anthropic.claude-v2\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n exampleAgentTrust:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - sts:AssumeRole\n principals:\n - identifiers:\n - bedrock.amazonaws.com\n type: Service\n conditions:\n - test: StringEquals\n values:\n - ${current.accountId}\n variable: aws:SourceAccount\n - test: ArnLike\n values:\n - arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.name}:${current.accountId}:agent/*\n variable: AWS:SourceArn\n exampleAgentPermissions:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - bedrock:InvokeModel\n resources:\n - arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.name}::foundation-model/anthropic.claude-v2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Agents for Amazon Bedrock Agent using the agent ID. For example:\n\n```sh\n$ pulumi import aws:bedrock/agentAgent:AgentAgent example GGRRAED6JP\n```\n", + "description": "Resource for managing an AWS Agents for Amazon Bedrock Agent.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst exampleAgentTrust = Promise.all([current, currentGetPartition, currentGetRegion, current]).then(([current, currentGetPartition, currentGetRegion, current1]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n identifiers: [\"bedrock.amazonaws.com\"],\n type: \"Service\",\n }],\n conditions: [\n {\n test: \"StringEquals\",\n values: [current.accountId],\n variable: \"aws:SourceAccount\",\n },\n {\n test: \"ArnLike\",\n values: [`arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.name}:${current1.accountId}:agent/*`],\n variable: \"AWS:SourceArn\",\n },\n ],\n }],\n}));\nconst exampleAgentPermissions = Promise.all([currentGetPartition, currentGetRegion]).then(([currentGetPartition, currentGetRegion]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"bedrock:InvokeModel\"],\n resources: [`arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.name}::foundation-model/anthropic.claude-v2`],\n }],\n}));\nconst example = new aws.iam.Role(\"example\", {\n assumeRolePolicy: exampleAgentTrust.then(exampleAgentTrust =\u003e exampleAgentTrust.json),\n namePrefix: \"AmazonBedrockExecutionRoleForAgents_\",\n});\nconst exampleRolePolicy = new aws.iam.RolePolicy(\"example\", {\n policy: exampleAgentPermissions.then(exampleAgentPermissions =\u003e exampleAgentPermissions.json),\n role: example.id,\n});\nconst exampleAgentAgent = new aws.bedrock.AgentAgent(\"example\", {\n agentName: \"my-agent-name\",\n agentResourceRoleArn: example.arn,\n idleSessionTtlInSeconds: 500,\n foundationModel: \"anthropic.claude-v2\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\ncurrent_get_region = aws.get_region()\nexample_agent_trust = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"identifiers\": [\"bedrock.amazonaws.com\"],\n \"type\": \"Service\",\n }],\n \"conditions\": [\n {\n \"test\": \"StringEquals\",\n \"values\": [current.account_id],\n \"variable\": \"aws:SourceAccount\",\n },\n {\n \"test\": \"ArnLike\",\n \"values\": [f\"arn:{current_get_partition.partition}:bedrock:{current_get_region.name}:{current.account_id}:agent/*\"],\n \"variable\": \"AWS:SourceArn\",\n },\n ],\n}])\nexample_agent_permissions = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"bedrock:InvokeModel\"],\n \"resources\": [f\"arn:{current_get_partition.partition}:bedrock:{current_get_region.name}::foundation-model/anthropic.claude-v2\"],\n}])\nexample = aws.iam.Role(\"example\",\n assume_role_policy=example_agent_trust.json,\n name_prefix=\"AmazonBedrockExecutionRoleForAgents_\")\nexample_role_policy = aws.iam.RolePolicy(\"example\",\n policy=example_agent_permissions.json,\n role=example.id)\nexample_agent_agent = aws.bedrock.AgentAgent(\"example\",\n agent_name=\"my-agent-name\",\n agent_resource_role_arn=example.arn,\n idle_session_ttl_in_seconds=500,\n foundation_model=\"anthropic.claude-v2\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var exampleAgentTrust = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Identifiers = new[]\n {\n \"bedrock.amazonaws.com\",\n },\n Type = \"Service\",\n },\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Values = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n Variable = \"aws:SourceAccount\",\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"ArnLike\",\n Values = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:bedrock:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:agent/*\",\n },\n Variable = \"AWS:SourceArn\",\n },\n },\n },\n },\n });\n\n var exampleAgentPermissions = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"bedrock:InvokeModel\",\n },\n Resources = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:bedrock:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}::foundation-model/anthropic.claude-v2\",\n },\n },\n },\n });\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n AssumeRolePolicy = exampleAgentTrust.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n NamePrefix = \"AmazonBedrockExecutionRoleForAgents_\",\n });\n\n var exampleRolePolicy = new Aws.Iam.RolePolicy(\"example\", new()\n {\n Policy = exampleAgentPermissions.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n Role = example.Id,\n });\n\n var exampleAgentAgent = new Aws.Bedrock.AgentAgent(\"example\", new()\n {\n AgentName = \"my-agent-name\",\n AgentResourceRoleArn = example.Arn,\n IdleSessionTtlInSeconds = 500,\n FoundationModel = \"anthropic.claude-v2\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\ncurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{\n}, nil);\nif err != nil {\nreturn err\n}\ncurrentGetPartition, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{\n}, nil);\nif err != nil {\nreturn err\n}\ncurrentGetRegion, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{\n}, nil);\nif err != nil {\nreturn err\n}\nexampleAgentTrust, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nActions: []string{\n\"sts:AssumeRole\",\n},\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nIdentifiers: []string{\n\"bedrock.amazonaws.com\",\n},\nType: \"Service\",\n},\n},\nConditions: []iam.GetPolicyDocumentStatementCondition{\n{\nTest: \"StringEquals\",\nValues: interface{}{\ncurrent.AccountId,\n},\nVariable: \"aws:SourceAccount\",\n},\n{\nTest: \"ArnLike\",\nValues: []string{\nfmt.Sprintf(\"arn:%v:bedrock:%v:%v:agent/*\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n},\nVariable: \"AWS:SourceArn\",\n},\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nexampleAgentPermissions, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nActions: []string{\n\"bedrock:InvokeModel\",\n},\nResources: []string{\nfmt.Sprintf(\"arn:%v:bedrock:%v::foundation-model/anthropic.claude-v2\", currentGetPartition.Partition, currentGetRegion.Name),\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nexample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\nAssumeRolePolicy: pulumi.String(exampleAgentTrust.Json),\nNamePrefix: pulumi.String(\"AmazonBedrockExecutionRoleForAgents_\"),\n})\nif err != nil {\nreturn err\n}\n_, err = iam.NewRolePolicy(ctx, \"example\", \u0026iam.RolePolicyArgs{\nPolicy: pulumi.String(exampleAgentPermissions.Json),\nRole: example.ID(),\n})\nif err != nil {\nreturn err\n}\n_, err = bedrock.NewAgentAgent(ctx, \"example\", \u0026bedrock.AgentAgentArgs{\nAgentName: pulumi.String(\"my-agent-name\"),\nAgentResourceRoleArn: example.Arn,\nIdleSessionTtlInSeconds: pulumi.Int(500),\nFoundationModel: pulumi.String(\"anthropic.claude-v2\"),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport com.pulumi.aws.bedrock.AgentAgent;\nimport com.pulumi.aws.bedrock.AgentAgentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n final var exampleAgentTrust = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"sts:AssumeRole\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .identifiers(\"bedrock.amazonaws.com\")\n .type(\"Service\")\n .build())\n .conditions( \n GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .values(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .variable(\"aws:SourceAccount\")\n .build(),\n GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"ArnLike\")\n .values(String.format(\"arn:%s:bedrock:%s:%s:agent/*\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .variable(\"AWS:SourceArn\")\n .build())\n .build())\n .build());\n\n final var exampleAgentPermissions = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"bedrock:InvokeModel\")\n .resources(String.format(\"arn:%s:bedrock:%s::foundation-model/anthropic.claude-v2\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build())\n .build());\n\n var example = new Role(\"example\", RoleArgs.builder()\n .assumeRolePolicy(exampleAgentTrust.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .namePrefix(\"AmazonBedrockExecutionRoleForAgents_\")\n .build());\n\n var exampleRolePolicy = new RolePolicy(\"exampleRolePolicy\", RolePolicyArgs.builder()\n .policy(exampleAgentPermissions.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .role(example.id())\n .build());\n\n var exampleAgentAgent = new AgentAgent(\"exampleAgentAgent\", AgentAgentArgs.builder()\n .agentName(\"my-agent-name\")\n .agentResourceRoleArn(example.arn())\n .idleSessionTtlInSeconds(500)\n .foundationModel(\"anthropic.claude-v2\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n assumeRolePolicy: ${exampleAgentTrust.json}\n namePrefix: AmazonBedrockExecutionRoleForAgents_\n exampleRolePolicy:\n type: aws:iam:RolePolicy\n name: example\n properties:\n policy: ${exampleAgentPermissions.json}\n role: ${example.id}\n exampleAgentAgent:\n type: aws:bedrock:AgentAgent\n name: example\n properties:\n agentName: my-agent-name\n agentResourceRoleArn: ${example.arn}\n idleSessionTtlInSeconds: 500\n foundationModel: anthropic.claude-v2\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n exampleAgentTrust:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - sts:AssumeRole\n principals:\n - identifiers:\n - bedrock.amazonaws.com\n type: Service\n conditions:\n - test: StringEquals\n values:\n - ${current.accountId}\n variable: aws:SourceAccount\n - test: ArnLike\n values:\n - arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.name}:${current.accountId}:agent/*\n variable: AWS:SourceArn\n exampleAgentPermissions:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - bedrock:InvokeModel\n resources:\n - arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.name}::foundation-model/anthropic.claude-v2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Agents for Amazon Bedrock Agent using the agent ID. For example:\n\n```sh\n$ pulumi import aws:bedrock/agentAgent:AgentAgent example GGRRAED6JP\n```\n", "properties": { "agentArn": { "type": "string", @@ -191686,7 +191686,7 @@ } }, "aws:budgets/budgetAction:BudgetAction": { - "description": "Provides a budget action resource. Budget actions are cost savings controls that run either automatically on your behalf or by using a workflow approval process.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n actions: [\"ec2:Describe*\"],\n resources: [\"*\"],\n }],\n});\nconst examplePolicy = new aws.iam.Policy(\"example\", {\n name: \"example\",\n description: \"My example policy\",\n policy: example.then(example =\u003e example.json),\n});\nconst current = aws.getPartition({});\nconst assumeRole = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [`budgets.${current.dnsSuffix}`],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n}));\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst exampleBudget = new aws.budgets.Budget(\"example\", {\n name: \"example\",\n budgetType: \"USAGE\",\n limitAmount: \"10.0\",\n limitUnit: \"dollars\",\n timePeriodStart: \"2006-01-02_15:04\",\n timeUnit: \"MONTHLY\",\n});\nconst exampleBudgetAction = new aws.budgets.BudgetAction(\"example\", {\n budgetName: exampleBudget.name,\n actionType: \"APPLY_IAM_POLICY\",\n approvalModel: \"AUTOMATIC\",\n notificationType: \"ACTUAL\",\n executionRoleArn: exampleRole.arn,\n actionThreshold: {\n actionThresholdType: \"ABSOLUTE_VALUE\",\n actionThresholdValue: 100,\n },\n definition: {\n iamActionDefinition: {\n policyArn: examplePolicy.arn,\n roles: [exampleRole.name],\n },\n },\n subscribers: [{\n address: \"example@example.example\",\n subscriptionType: \"EMAIL\",\n }],\n tags: {\n Tag1: \"Value1\",\n Tag2: \"Value2\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"actions\": [\"ec2:Describe*\"],\n \"resources\": [\"*\"],\n}])\nexample_policy = aws.iam.Policy(\"example\",\n name=\"example\",\n description=\"My example policy\",\n policy=example.json)\ncurrent = aws.get_partition()\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [f\"budgets.{current.dns_suffix}\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\nexample_role = aws.iam.Role(\"example\",\n name=\"example\",\n assume_role_policy=assume_role.json)\nexample_budget = aws.budgets.Budget(\"example\",\n name=\"example\",\n budget_type=\"USAGE\",\n limit_amount=\"10.0\",\n limit_unit=\"dollars\",\n time_period_start=\"2006-01-02_15:04\",\n time_unit=\"MONTHLY\")\nexample_budget_action = aws.budgets.BudgetAction(\"example\",\n budget_name=example_budget.name,\n action_type=\"APPLY_IAM_POLICY\",\n approval_model=\"AUTOMATIC\",\n notification_type=\"ACTUAL\",\n execution_role_arn=example_role.arn,\n action_threshold={\n \"action_threshold_type\": \"ABSOLUTE_VALUE\",\n \"action_threshold_value\": 100,\n },\n definition={\n \"iam_action_definition\": {\n \"policy_arn\": example_policy.arn,\n \"roles\": [example_role.name],\n },\n },\n subscribers=[{\n \"address\": \"example@example.example\",\n \"subscription_type\": \"EMAIL\",\n }],\n tags={\n \"Tag1\": \"Value1\",\n \"Tag2\": \"Value2\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ec2:Describe*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var examplePolicy = new Aws.Iam.Policy(\"example\", new()\n {\n Name = \"example\",\n Description = \"My example policy\",\n PolicyDocument = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n $\"budgets.{current.Apply(getPartitionResult =\u003e getPartitionResult.DnsSuffix)}\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleBudget = new Aws.Budgets.Budget(\"example\", new()\n {\n Name = \"example\",\n BudgetType = \"USAGE\",\n LimitAmount = \"10.0\",\n LimitUnit = \"dollars\",\n TimePeriodStart = \"2006-01-02_15:04\",\n TimeUnit = \"MONTHLY\",\n });\n\n var exampleBudgetAction = new Aws.Budgets.BudgetAction(\"example\", new()\n {\n BudgetName = exampleBudget.Name,\n ActionType = \"APPLY_IAM_POLICY\",\n ApprovalModel = \"AUTOMATIC\",\n NotificationType = \"ACTUAL\",\n ExecutionRoleArn = exampleRole.Arn,\n ActionThreshold = new Aws.Budgets.Inputs.BudgetActionActionThresholdArgs\n {\n ActionThresholdType = \"ABSOLUTE_VALUE\",\n ActionThresholdValue = 100,\n },\n Definition = new Aws.Budgets.Inputs.BudgetActionDefinitionArgs\n {\n IamActionDefinition = new Aws.Budgets.Inputs.BudgetActionDefinitionIamActionDefinitionArgs\n {\n PolicyArn = examplePolicy.Arn,\n Roles = new[]\n {\n exampleRole.Name,\n },\n },\n },\n Subscribers = new[]\n {\n new Aws.Budgets.Inputs.BudgetActionSubscriberArgs\n {\n Address = \"example@example.example\",\n SubscriptionType = \"EMAIL\",\n },\n },\n Tags = \n {\n { \"Tag1\", \"Value1\" },\n { \"Tag2\", \"Value2\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePolicy, err := iam.NewPolicy(ctx, \"example\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDescription: pulumi.String(\"My example policy\"),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"budgets.%v\", current.DnsSuffix),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBudget, err := budgets.NewBudget(ctx, \"example\", \u0026budgets.BudgetArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tBudgetType: pulumi.String(\"USAGE\"),\n\t\t\tLimitAmount: pulumi.String(\"10.0\"),\n\t\t\tLimitUnit: pulumi.String(\"dollars\"),\n\t\t\tTimePeriodStart: pulumi.String(\"2006-01-02_15:04\"),\n\t\t\tTimeUnit: pulumi.String(\"MONTHLY\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = budgets.NewBudgetAction(ctx, \"example\", \u0026budgets.BudgetActionArgs{\n\t\t\tBudgetName: exampleBudget.Name,\n\t\t\tActionType: pulumi.String(\"APPLY_IAM_POLICY\"),\n\t\t\tApprovalModel: pulumi.String(\"AUTOMATIC\"),\n\t\t\tNotificationType: pulumi.String(\"ACTUAL\"),\n\t\t\tExecutionRoleArn: exampleRole.Arn,\n\t\t\tActionThreshold: \u0026budgets.BudgetActionActionThresholdArgs{\n\t\t\t\tActionThresholdType: pulumi.String(\"ABSOLUTE_VALUE\"),\n\t\t\t\tActionThresholdValue: pulumi.Float64(100),\n\t\t\t},\n\t\t\tDefinition: \u0026budgets.BudgetActionDefinitionArgs{\n\t\t\t\tIamActionDefinition: \u0026budgets.BudgetActionDefinitionIamActionDefinitionArgs{\n\t\t\t\t\tPolicyArn: examplePolicy.Arn,\n\t\t\t\t\tRoles: pulumi.StringArray{\n\t\t\t\t\t\texampleRole.Name,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tSubscribers: budgets.BudgetActionSubscriberArray{\n\t\t\t\t\u0026budgets.BudgetActionSubscriberArgs{\n\t\t\t\t\tAddress: pulumi.String(\"example@example.example\"),\n\t\t\t\t\tSubscriptionType: pulumi.String(\"EMAIL\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Tag1\": pulumi.String(\"Value1\"),\n\t\t\t\t\"Tag2\": pulumi.String(\"Value2\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.budgets.Budget;\nimport com.pulumi.aws.budgets.BudgetArgs;\nimport com.pulumi.aws.budgets.BudgetAction;\nimport com.pulumi.aws.budgets.BudgetActionArgs;\nimport com.pulumi.aws.budgets.inputs.BudgetActionActionThresholdArgs;\nimport com.pulumi.aws.budgets.inputs.BudgetActionDefinitionArgs;\nimport com.pulumi.aws.budgets.inputs.BudgetActionDefinitionIamActionDefinitionArgs;\nimport com.pulumi.aws.budgets.inputs.BudgetActionSubscriberArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ec2:Describe*\")\n .resources(\"*\")\n .build())\n .build());\n\n var examplePolicy = new Policy(\"examplePolicy\", PolicyArgs.builder()\n .name(\"example\")\n .description(\"My example policy\")\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(String.format(\"budgets.%s\", current.applyValue(getPartitionResult -\u003e getPartitionResult.dnsSuffix())))\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleBudget = new Budget(\"exampleBudget\", BudgetArgs.builder()\n .name(\"example\")\n .budgetType(\"USAGE\")\n .limitAmount(\"10.0\")\n .limitUnit(\"dollars\")\n .timePeriodStart(\"2006-01-02_15:04\")\n .timeUnit(\"MONTHLY\")\n .build());\n\n var exampleBudgetAction = new BudgetAction(\"exampleBudgetAction\", BudgetActionArgs.builder()\n .budgetName(exampleBudget.name())\n .actionType(\"APPLY_IAM_POLICY\")\n .approvalModel(\"AUTOMATIC\")\n .notificationType(\"ACTUAL\")\n .executionRoleArn(exampleRole.arn())\n .actionThreshold(BudgetActionActionThresholdArgs.builder()\n .actionThresholdType(\"ABSOLUTE_VALUE\")\n .actionThresholdValue(100)\n .build())\n .definition(BudgetActionDefinitionArgs.builder()\n .iamActionDefinition(BudgetActionDefinitionIamActionDefinitionArgs.builder()\n .policyArn(examplePolicy.arn())\n .roles(exampleRole.name())\n .build())\n .build())\n .subscribers(BudgetActionSubscriberArgs.builder()\n .address(\"example@example.example\")\n .subscriptionType(\"EMAIL\")\n .build())\n .tags(Map.ofEntries(\n Map.entry(\"Tag1\", \"Value1\"),\n Map.entry(\"Tag2\", \"Value2\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleBudgetAction:\n type: aws:budgets:BudgetAction\n name: example\n properties:\n budgetName: ${exampleBudget.name}\n actionType: APPLY_IAM_POLICY\n approvalModel: AUTOMATIC\n notificationType: ACTUAL\n executionRoleArn: ${exampleRole.arn}\n actionThreshold:\n actionThresholdType: ABSOLUTE_VALUE\n actionThresholdValue: 100\n definition:\n iamActionDefinition:\n policyArn: ${examplePolicy.arn}\n roles:\n - ${exampleRole.name}\n subscribers:\n - address: example@example.example\n subscriptionType: EMAIL\n tags:\n Tag1: Value1\n Tag2: Value2\n examplePolicy:\n type: aws:iam:Policy\n name: example\n properties:\n name: example\n description: My example policy\n policy: ${example.json}\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example\n assumeRolePolicy: ${assumeRole.json}\n exampleBudget:\n type: aws:budgets:Budget\n name: example\n properties:\n name: example\n budgetType: USAGE\n limitAmount: '10.0'\n limitUnit: dollars\n timePeriodStart: 2006-01-02_15:04\n timeUnit: MONTHLY\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - ec2:Describe*\n resources:\n - '*'\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - budgets.${current.dnsSuffix}\n actions:\n - sts:AssumeRole\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import budget actions using `AccountID:ActionID:BudgetName`. For example:\n\n```sh\n$ pulumi import aws:budgets/budgetAction:BudgetAction myBudget 123456789012:some-id:myBudget\n```\n", + "description": "Provides a budget action resource. Budget actions are cost savings controls that run either automatically on your behalf or by using a workflow approval process.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n actions: [\"ec2:Describe*\"],\n resources: [\"*\"],\n }],\n});\nconst examplePolicy = new aws.iam.Policy(\"example\", {\n name: \"example\",\n description: \"My example policy\",\n policy: example.then(example =\u003e example.json),\n});\nconst current = aws.getPartition({});\nconst assumeRole = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [`budgets.${current.dnsSuffix}`],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n}));\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst exampleBudget = new aws.budgets.Budget(\"example\", {\n name: \"example\",\n budgetType: \"USAGE\",\n limitAmount: \"10.0\",\n limitUnit: \"dollars\",\n timePeriodStart: \"2006-01-02_15:04\",\n timeUnit: \"MONTHLY\",\n});\nconst exampleBudgetAction = new aws.budgets.BudgetAction(\"example\", {\n budgetName: exampleBudget.name,\n actionType: \"APPLY_IAM_POLICY\",\n approvalModel: \"AUTOMATIC\",\n notificationType: \"ACTUAL\",\n executionRoleArn: exampleRole.arn,\n actionThreshold: {\n actionThresholdType: \"ABSOLUTE_VALUE\",\n actionThresholdValue: 100,\n },\n definition: {\n iamActionDefinition: {\n policyArn: examplePolicy.arn,\n roles: [exampleRole.name],\n },\n },\n subscribers: [{\n address: \"example@example.example\",\n subscriptionType: \"EMAIL\",\n }],\n tags: {\n Tag1: \"Value1\",\n Tag2: \"Value2\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"actions\": [\"ec2:Describe*\"],\n \"resources\": [\"*\"],\n}])\nexample_policy = aws.iam.Policy(\"example\",\n name=\"example\",\n description=\"My example policy\",\n policy=example.json)\ncurrent = aws.get_partition()\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [f\"budgets.{current.dns_suffix}\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\nexample_role = aws.iam.Role(\"example\",\n name=\"example\",\n assume_role_policy=assume_role.json)\nexample_budget = aws.budgets.Budget(\"example\",\n name=\"example\",\n budget_type=\"USAGE\",\n limit_amount=\"10.0\",\n limit_unit=\"dollars\",\n time_period_start=\"2006-01-02_15:04\",\n time_unit=\"MONTHLY\")\nexample_budget_action = aws.budgets.BudgetAction(\"example\",\n budget_name=example_budget.name,\n action_type=\"APPLY_IAM_POLICY\",\n approval_model=\"AUTOMATIC\",\n notification_type=\"ACTUAL\",\n execution_role_arn=example_role.arn,\n action_threshold={\n \"action_threshold_type\": \"ABSOLUTE_VALUE\",\n \"action_threshold_value\": 100,\n },\n definition={\n \"iam_action_definition\": {\n \"policy_arn\": example_policy.arn,\n \"roles\": [example_role.name],\n },\n },\n subscribers=[{\n \"address\": \"example@example.example\",\n \"subscription_type\": \"EMAIL\",\n }],\n tags={\n \"Tag1\": \"Value1\",\n \"Tag2\": \"Value2\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ec2:Describe*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var examplePolicy = new Aws.Iam.Policy(\"example\", new()\n {\n Name = \"example\",\n Description = \"My example policy\",\n PolicyDocument = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n $\"budgets.{current.Apply(getPartitionResult =\u003e getPartitionResult.DnsSuffix)}\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleBudget = new Aws.Budgets.Budget(\"example\", new()\n {\n Name = \"example\",\n BudgetType = \"USAGE\",\n LimitAmount = \"10.0\",\n LimitUnit = \"dollars\",\n TimePeriodStart = \"2006-01-02_15:04\",\n TimeUnit = \"MONTHLY\",\n });\n\n var exampleBudgetAction = new Aws.Budgets.BudgetAction(\"example\", new()\n {\n BudgetName = exampleBudget.Name,\n ActionType = \"APPLY_IAM_POLICY\",\n ApprovalModel = \"AUTOMATIC\",\n NotificationType = \"ACTUAL\",\n ExecutionRoleArn = exampleRole.Arn,\n ActionThreshold = new Aws.Budgets.Inputs.BudgetActionActionThresholdArgs\n {\n ActionThresholdType = \"ABSOLUTE_VALUE\",\n ActionThresholdValue = 100,\n },\n Definition = new Aws.Budgets.Inputs.BudgetActionDefinitionArgs\n {\n IamActionDefinition = new Aws.Budgets.Inputs.BudgetActionDefinitionIamActionDefinitionArgs\n {\n PolicyArn = examplePolicy.Arn,\n Roles = new[]\n {\n exampleRole.Name,\n },\n },\n },\n Subscribers = new[]\n {\n new Aws.Budgets.Inputs.BudgetActionSubscriberArgs\n {\n Address = \"example@example.example\",\n SubscriptionType = \"EMAIL\",\n },\n },\n Tags = \n {\n { \"Tag1\", \"Value1\" },\n { \"Tag2\", \"Value2\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePolicy, err := iam.NewPolicy(ctx, \"example\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDescription: pulumi.String(\"My example policy\"),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"budgets.%v\", current.DnsSuffix),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBudget, err := budgets.NewBudget(ctx, \"example\", \u0026budgets.BudgetArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tBudgetType: pulumi.String(\"USAGE\"),\n\t\t\tLimitAmount: pulumi.String(\"10.0\"),\n\t\t\tLimitUnit: pulumi.String(\"dollars\"),\n\t\t\tTimePeriodStart: pulumi.String(\"2006-01-02_15:04\"),\n\t\t\tTimeUnit: pulumi.String(\"MONTHLY\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = budgets.NewBudgetAction(ctx, \"example\", \u0026budgets.BudgetActionArgs{\n\t\t\tBudgetName: exampleBudget.Name,\n\t\t\tActionType: pulumi.String(\"APPLY_IAM_POLICY\"),\n\t\t\tApprovalModel: pulumi.String(\"AUTOMATIC\"),\n\t\t\tNotificationType: pulumi.String(\"ACTUAL\"),\n\t\t\tExecutionRoleArn: exampleRole.Arn,\n\t\t\tActionThreshold: \u0026budgets.BudgetActionActionThresholdArgs{\n\t\t\t\tActionThresholdType: pulumi.String(\"ABSOLUTE_VALUE\"),\n\t\t\t\tActionThresholdValue: pulumi.Float64(100),\n\t\t\t},\n\t\t\tDefinition: \u0026budgets.BudgetActionDefinitionArgs{\n\t\t\t\tIamActionDefinition: \u0026budgets.BudgetActionDefinitionIamActionDefinitionArgs{\n\t\t\t\t\tPolicyArn: examplePolicy.Arn,\n\t\t\t\t\tRoles: pulumi.StringArray{\n\t\t\t\t\t\texampleRole.Name,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tSubscribers: budgets.BudgetActionSubscriberArray{\n\t\t\t\t\u0026budgets.BudgetActionSubscriberArgs{\n\t\t\t\t\tAddress: pulumi.String(\"example@example.example\"),\n\t\t\t\t\tSubscriptionType: pulumi.String(\"EMAIL\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Tag1\": pulumi.String(\"Value1\"),\n\t\t\t\t\"Tag2\": pulumi.String(\"Value2\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.budgets.Budget;\nimport com.pulumi.aws.budgets.BudgetArgs;\nimport com.pulumi.aws.budgets.BudgetAction;\nimport com.pulumi.aws.budgets.BudgetActionArgs;\nimport com.pulumi.aws.budgets.inputs.BudgetActionActionThresholdArgs;\nimport com.pulumi.aws.budgets.inputs.BudgetActionDefinitionArgs;\nimport com.pulumi.aws.budgets.inputs.BudgetActionDefinitionIamActionDefinitionArgs;\nimport com.pulumi.aws.budgets.inputs.BudgetActionSubscriberArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ec2:Describe*\")\n .resources(\"*\")\n .build())\n .build());\n\n var examplePolicy = new Policy(\"examplePolicy\", PolicyArgs.builder()\n .name(\"example\")\n .description(\"My example policy\")\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(String.format(\"budgets.%s\", current.applyValue(getPartitionResult -\u003e getPartitionResult.dnsSuffix())))\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleBudget = new Budget(\"exampleBudget\", BudgetArgs.builder()\n .name(\"example\")\n .budgetType(\"USAGE\")\n .limitAmount(\"10.0\")\n .limitUnit(\"dollars\")\n .timePeriodStart(\"2006-01-02_15:04\")\n .timeUnit(\"MONTHLY\")\n .build());\n\n var exampleBudgetAction = new BudgetAction(\"exampleBudgetAction\", BudgetActionArgs.builder()\n .budgetName(exampleBudget.name())\n .actionType(\"APPLY_IAM_POLICY\")\n .approvalModel(\"AUTOMATIC\")\n .notificationType(\"ACTUAL\")\n .executionRoleArn(exampleRole.arn())\n .actionThreshold(BudgetActionActionThresholdArgs.builder()\n .actionThresholdType(\"ABSOLUTE_VALUE\")\n .actionThresholdValue(100)\n .build())\n .definition(BudgetActionDefinitionArgs.builder()\n .iamActionDefinition(BudgetActionDefinitionIamActionDefinitionArgs.builder()\n .policyArn(examplePolicy.arn())\n .roles(exampleRole.name())\n .build())\n .build())\n .subscribers(BudgetActionSubscriberArgs.builder()\n .address(\"example@example.example\")\n .subscriptionType(\"EMAIL\")\n .build())\n .tags(Map.ofEntries(\n Map.entry(\"Tag1\", \"Value1\"),\n Map.entry(\"Tag2\", \"Value2\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleBudgetAction:\n type: aws:budgets:BudgetAction\n name: example\n properties:\n budgetName: ${exampleBudget.name}\n actionType: APPLY_IAM_POLICY\n approvalModel: AUTOMATIC\n notificationType: ACTUAL\n executionRoleArn: ${exampleRole.arn}\n actionThreshold:\n actionThresholdType: ABSOLUTE_VALUE\n actionThresholdValue: 100\n definition:\n iamActionDefinition:\n policyArn: ${examplePolicy.arn}\n roles:\n - ${exampleRole.name}\n subscribers:\n - address: example@example.example\n subscriptionType: EMAIL\n tags:\n Tag1: Value1\n Tag2: Value2\n examplePolicy:\n type: aws:iam:Policy\n name: example\n properties:\n name: example\n description: My example policy\n policy: ${example.json}\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example\n assumeRolePolicy: ${assumeRole.json}\n exampleBudget:\n type: aws:budgets:Budget\n name: example\n properties:\n name: example\n budgetType: USAGE\n limitAmount: '10.0'\n limitUnit: dollars\n timePeriodStart: 2006-01-02_15:04\n timeUnit: MONTHLY\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - ec2:Describe*\n resources:\n - '*'\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - budgets.${current.dnsSuffix}\n actions:\n - sts:AssumeRole\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import budget actions using `AccountID:ActionID:BudgetName`. For example:\n\n```sh\n$ pulumi import aws:budgets/budgetAction:BudgetAction myBudget 123456789012:some-id:myBudget\n```\n", "properties": { "accountId": { "type": "string", @@ -199068,7 +199068,7 @@ } }, "aws:cloudtrail/organizationDelegatedAdminAccount:OrganizationDelegatedAdminAccount": { - "description": "Provides a resource to manage an AWS CloudTrail Delegated Administrator.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst delegated = aws.getCallerIdentity({});\nconst example = new aws.cloudtrail.OrganizationDelegatedAdminAccount(\"example\", {accountId: delegated.then(delegated =\u003e delegated.accountId)});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ndelegated = aws.get_caller_identity()\nexample = aws.cloudtrail.OrganizationDelegatedAdminAccount(\"example\", account_id=delegated.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var delegated = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.CloudTrail.OrganizationDelegatedAdminAccount(\"example\", new()\n {\n AccountId = delegated.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdelegated, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewOrganizationDelegatedAdminAccount(ctx, \"example\", \u0026cloudtrail.OrganizationDelegatedAdminAccountArgs{\n\t\t\tAccountId: pulumi.String(delegated.AccountId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.cloudtrail.OrganizationDelegatedAdminAccount;\nimport com.pulumi.aws.cloudtrail.OrganizationDelegatedAdminAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var delegated = AwsFunctions.getCallerIdentity();\n\n var example = new OrganizationDelegatedAdminAccount(\"example\", OrganizationDelegatedAdminAccountArgs.builder()\n .accountId(delegated.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:OrganizationDelegatedAdminAccount\n properties:\n accountId: ${delegated.accountId}\nvariables:\n delegated:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import delegated administrators using the delegate account `id`. For example:\n\n```sh\n$ pulumi import aws:cloudtrail/organizationDelegatedAdminAccount:OrganizationDelegatedAdminAccount example 12345678901\n```\n", + "description": "Provides a resource to manage an AWS CloudTrail Delegated Administrator.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst delegated = aws.getCallerIdentity({});\nconst example = new aws.cloudtrail.OrganizationDelegatedAdminAccount(\"example\", {accountId: delegated.then(delegated =\u003e delegated.accountId)});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ndelegated = aws.get_caller_identity()\nexample = aws.cloudtrail.OrganizationDelegatedAdminAccount(\"example\", account_id=delegated.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var delegated = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.CloudTrail.OrganizationDelegatedAdminAccount(\"example\", new()\n {\n AccountId = delegated.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdelegated, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewOrganizationDelegatedAdminAccount(ctx, \"example\", \u0026cloudtrail.OrganizationDelegatedAdminAccountArgs{\n\t\t\tAccountId: pulumi.String(delegated.AccountId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.cloudtrail.OrganizationDelegatedAdminAccount;\nimport com.pulumi.aws.cloudtrail.OrganizationDelegatedAdminAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var delegated = AwsFunctions.getCallerIdentity();\n\n var example = new OrganizationDelegatedAdminAccount(\"example\", OrganizationDelegatedAdminAccountArgs.builder()\n .accountId(delegated.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:OrganizationDelegatedAdminAccount\n properties:\n accountId: ${delegated.accountId}\nvariables:\n delegated:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import delegated administrators using the delegate account `id`. For example:\n\n```sh\n$ pulumi import aws:cloudtrail/organizationDelegatedAdminAccount:OrganizationDelegatedAdminAccount example 12345678901\n```\n", "properties": { "accountId": { "type": "string", @@ -199135,7 +199135,7 @@ } }, "aws:cloudtrail/trail:Trail": { - "description": "Provides a CloudTrail resource.\n\n\u003e **Tip:** For a multi-region trail, this resource must be in the home region of the trail.\n\n\u003e **Tip:** For an organization trail, this resource must be in the master account of the organization.\n\n## Example Usage\n\n### Basic\n\nEnable CloudTrail to capture all compatible management events in region.\nFor capturing events from services like IAM, `include_global_service_events` must be enabled.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {\n bucket: \"my-test-trail\",\n forceDestroy: true,\n});\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst example = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n sid: \"AWSCloudTrailAclCheck\",\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"cloudtrail.amazonaws.com\"],\n }],\n actions: [\"s3:GetBucketAcl\"],\n resources: [exampleBucketV2.arn],\n conditions: [{\n test: \"StringEquals\",\n variable: \"aws:SourceArn\",\n values: [Promise.all([currentGetPartition, currentGetRegion, current]).then(([currentGetPartition, currentGetRegion, current]) =\u003e `arn:${currentGetPartition.partition}:cloudtrail:${currentGetRegion.name}:${current.accountId}:trail/example`)],\n }],\n },\n {\n sid: \"AWSCloudTrailWrite\",\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"cloudtrail.amazonaws.com\"],\n }],\n actions: [\"s3:PutObject\"],\n resources: [pulumi.all([exampleBucketV2.arn, current]).apply(([arn, current]) =\u003e `${arn}/prefix/AWSLogs/${current.accountId}/*`)],\n conditions: [\n {\n test: \"StringEquals\",\n variable: \"s3:x-amz-acl\",\n values: [\"bucket-owner-full-control\"],\n },\n {\n test: \"StringEquals\",\n variable: \"aws:SourceArn\",\n values: [Promise.all([currentGetPartition, currentGetRegion, current]).then(([currentGetPartition, currentGetRegion, current]) =\u003e `arn:${currentGetPartition.partition}:cloudtrail:${currentGetRegion.name}:${current.accountId}:trail/example`)],\n },\n ],\n },\n ],\n});\nconst exampleBucketPolicy = new aws.s3.BucketPolicy(\"example\", {\n bucket: exampleBucketV2.id,\n policy: example.apply(example =\u003e example.json),\n});\nconst exampleTrail = new aws.cloudtrail.Trail(\"example\", {\n name: \"example\",\n s3BucketName: exampleBucketV2.id,\n s3KeyPrefix: \"prefix\",\n includeGlobalServiceEvents: false,\n}, {\n dependsOn: [exampleBucketPolicy],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_bucket_v2 = aws.s3.BucketV2(\"example\",\n bucket=\"my-test-trail\",\n force_destroy=True)\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\ncurrent_get_region = aws.get_region()\nexample = aws.iam.get_policy_document_output(statements=[\n {\n \"sid\": \"AWSCloudTrailAclCheck\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"cloudtrail.amazonaws.com\"],\n }],\n \"actions\": [\"s3:GetBucketAcl\"],\n \"resources\": [example_bucket_v2.arn],\n \"conditions\": [{\n \"test\": \"StringEquals\",\n \"variable\": \"aws:SourceArn\",\n \"values\": [f\"arn:{current_get_partition.partition}:cloudtrail:{current_get_region.name}:{current.account_id}:trail/example\"],\n }],\n },\n {\n \"sid\": \"AWSCloudTrailWrite\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"cloudtrail.amazonaws.com\"],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [example_bucket_v2.arn.apply(lambda arn: f\"{arn}/prefix/AWSLogs/{current.account_id}/*\")],\n \"conditions\": [\n {\n \"test\": \"StringEquals\",\n \"variable\": \"s3:x-amz-acl\",\n \"values\": [\"bucket-owner-full-control\"],\n },\n {\n \"test\": \"StringEquals\",\n \"variable\": \"aws:SourceArn\",\n \"values\": [f\"arn:{current_get_partition.partition}:cloudtrail:{current_get_region.name}:{current.account_id}:trail/example\"],\n },\n ],\n },\n])\nexample_bucket_policy = aws.s3.BucketPolicy(\"example\",\n bucket=example_bucket_v2.id,\n policy=example.json)\nexample_trail = aws.cloudtrail.Trail(\"example\",\n name=\"example\",\n s3_bucket_name=example_bucket_v2.id,\n s3_key_prefix=\"prefix\",\n include_global_service_events=False,\n opts = pulumi.ResourceOptions(depends_on=[example_bucket_policy]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-test-trail\",\n ForceDestroy = true,\n });\n\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"AWSCloudTrailAclCheck\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"cloudtrail.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"s3:GetBucketAcl\",\n },\n Resources = new[]\n {\n exampleBucketV2.Arn,\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"aws:SourceArn\",\n Values = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:cloudtrail:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:trail/example\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"AWSCloudTrailWrite\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"cloudtrail.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{exampleBucketV2.Arn}/prefix/AWSLogs/{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}/*\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"s3:x-amz-acl\",\n Values = new[]\n {\n \"bucket-owner-full-control\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"aws:SourceArn\",\n Values = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:cloudtrail:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:trail/example\",\n },\n },\n },\n },\n },\n });\n\n var exampleBucketPolicy = new Aws.S3.BucketPolicy(\"example\", new()\n {\n Bucket = exampleBucketV2.Id,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleTrail = new Aws.CloudTrail.Trail(\"example\", new()\n {\n Name = \"example\",\n S3BucketName = exampleBucketV2.Id,\n S3KeyPrefix = \"prefix\",\n IncludeGlobalServiceEvents = false,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketPolicy,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-test-trail\"),\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"AWSCloudTrailAclCheck\"),\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"cloudtrail.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"s3:GetBucketAcl\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texampleBucketV2.Arn,\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"StringEquals\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"aws:SourceArn\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"arn:%v:cloudtrail:%v:%v:trail/example\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"AWSCloudTrailWrite\"),\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"cloudtrail.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"s3:PutObject\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texampleBucketV2.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v/prefix/AWSLogs/%v/*\", arn, current.AccountId), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"StringEquals\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"s3:x-amz-acl\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"bucket-owner-full-control\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"StringEquals\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"aws:SourceArn\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"arn:%v:cloudtrail:%v:%v:trail/example\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\texampleBucketPolicy, err := s3.NewBucketPolicy(ctx, \"example\", \u0026s3.BucketPolicyArgs{\n\t\t\tBucket: exampleBucketV2.ID(),\n\t\t\tPolicy: pulumi.String(example.ApplyT(func(example iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026example.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tS3BucketName: exampleBucketV2.ID(),\n\t\t\tS3KeyPrefix: pulumi.String(\"prefix\"),\n\t\t\tIncludeGlobalServiceEvents: pulumi.Bool(false),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketPolicy,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"my-test-trail\")\n .forceDestroy(true)\n .build());\n\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"AWSCloudTrailAclCheck\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"cloudtrail.amazonaws.com\")\n .build())\n .actions(\"s3:GetBucketAcl\")\n .resources(exampleBucketV2.arn())\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"aws:SourceArn\")\n .values(String.format(\"arn:%s:cloudtrail:%s:%s:trail/example\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"AWSCloudTrailWrite\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"cloudtrail.amazonaws.com\")\n .build())\n .actions(\"s3:PutObject\")\n .resources(exampleBucketV2.arn().applyValue(arn -\u003e String.format(\"%s/prefix/AWSLogs/%s/*\", arn,current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))))\n .conditions( \n GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"s3:x-amz-acl\")\n .values(\"bucket-owner-full-control\")\n .build(),\n GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"aws:SourceArn\")\n .values(String.format(\"arn:%s:cloudtrail:%s:%s:trail/example\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build())\n .build());\n\n var exampleBucketPolicy = new BucketPolicy(\"exampleBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(exampleBucketV2.id())\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(example -\u003e example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var exampleTrail = new Trail(\"exampleTrail\", TrailArgs.builder()\n .name(\"example\")\n .s3BucketName(exampleBucketV2.id())\n .s3KeyPrefix(\"prefix\")\n .includeGlobalServiceEvents(false)\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleBucketPolicy)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleTrail:\n type: aws:cloudtrail:Trail\n name: example\n properties:\n name: example\n s3BucketName: ${exampleBucketV2.id}\n s3KeyPrefix: prefix\n includeGlobalServiceEvents: false\n options:\n dependson:\n - ${exampleBucketPolicy}\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: my-test-trail\n forceDestroy: true\n exampleBucketPolicy:\n type: aws:s3:BucketPolicy\n name: example\n properties:\n bucket: ${exampleBucketV2.id}\n policy: ${example.json}\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: AWSCloudTrailAclCheck\n effect: Allow\n principals:\n - type: Service\n identifiers:\n - cloudtrail.amazonaws.com\n actions:\n - s3:GetBucketAcl\n resources:\n - ${exampleBucketV2.arn}\n conditions:\n - test: StringEquals\n variable: aws:SourceArn\n values:\n - arn:${currentGetPartition.partition}:cloudtrail:${currentGetRegion.name}:${current.accountId}:trail/example\n - sid: AWSCloudTrailWrite\n effect: Allow\n principals:\n - type: Service\n identifiers:\n - cloudtrail.amazonaws.com\n actions:\n - s3:PutObject\n resources:\n - ${exampleBucketV2.arn}/prefix/AWSLogs/${current.accountId}/*\n conditions:\n - test: StringEquals\n variable: s3:x-amz-acl\n values:\n - bucket-owner-full-control\n - test: StringEquals\n variable: aws:SourceArn\n values:\n - arn:${currentGetPartition.partition}:cloudtrail:${currentGetRegion.name}:${current.accountId}:trail/example\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Data Event Logging\n\nCloudTrail can log [Data Events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) for certain services such as S3 objects and Lambda function invocations. Additional information about data event configuration can be found in the following links:\n\n* [CloudTrail API DataResource documentation](https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_DataResource.html) (for basic event selector).\n* [CloudTrail API AdvancedFieldSelector documentation](https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedFieldSelector.html) (for advanced event selector).\n\n### Logging All Lambda Function Invocations By Using Basic Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudtrail.Trail(\"example\", {eventSelectors: [{\n readWriteType: \"All\",\n includeManagementEvents: true,\n dataResources: [{\n type: \"AWS::Lambda::Function\",\n values: [\"arn:aws:lambda\"],\n }],\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudtrail.Trail(\"example\", event_selectors=[{\n \"read_write_type\": \"All\",\n \"include_management_events\": True,\n \"data_resources\": [{\n \"type\": \"AWS::Lambda::Function\",\n \"values\": [\"arn:aws:lambda\"],\n }],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n EventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorArgs\n {\n ReadWriteType = \"All\",\n IncludeManagementEvents = true,\n DataResources = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorDataResourceArgs\n {\n Type = \"AWS::Lambda::Function\",\n Values = new[]\n {\n \"arn:aws:lambda\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tEventSelectors: cloudtrail.TrailEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailEventSelectorArgs{\n\t\t\t\t\tReadWriteType: pulumi.String(\"All\"),\n\t\t\t\t\tIncludeManagementEvents: pulumi.Bool(true),\n\t\t\t\t\tDataResources: cloudtrail.TrailEventSelectorDataResourceArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailEventSelectorDataResourceArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"AWS::Lambda::Function\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"arn:aws:lambda\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Trail(\"example\", TrailArgs.builder()\n .eventSelectors(TrailEventSelectorArgs.builder()\n .readWriteType(\"All\")\n .includeManagementEvents(true)\n .dataResources(TrailEventSelectorDataResourceArgs.builder()\n .type(\"AWS::Lambda::Function\")\n .values(\"arn:aws:lambda\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n eventSelectors:\n - readWriteType: All\n includeManagementEvents: true\n dataResources:\n - type: AWS::Lambda::Function\n values:\n - arn:aws:lambda\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging All S3 Object Events By Using Basic Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudtrail.Trail(\"example\", {eventSelectors: [{\n readWriteType: \"All\",\n includeManagementEvents: true,\n dataResources: [{\n type: \"AWS::S3::Object\",\n values: [\"arn:aws:s3\"],\n }],\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudtrail.Trail(\"example\", event_selectors=[{\n \"read_write_type\": \"All\",\n \"include_management_events\": True,\n \"data_resources\": [{\n \"type\": \"AWS::S3::Object\",\n \"values\": [\"arn:aws:s3\"],\n }],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n EventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorArgs\n {\n ReadWriteType = \"All\",\n IncludeManagementEvents = true,\n DataResources = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorDataResourceArgs\n {\n Type = \"AWS::S3::Object\",\n Values = new[]\n {\n \"arn:aws:s3\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tEventSelectors: cloudtrail.TrailEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailEventSelectorArgs{\n\t\t\t\t\tReadWriteType: pulumi.String(\"All\"),\n\t\t\t\t\tIncludeManagementEvents: pulumi.Bool(true),\n\t\t\t\t\tDataResources: cloudtrail.TrailEventSelectorDataResourceArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailEventSelectorDataResourceArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"arn:aws:s3\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Trail(\"example\", TrailArgs.builder()\n .eventSelectors(TrailEventSelectorArgs.builder()\n .readWriteType(\"All\")\n .includeManagementEvents(true)\n .dataResources(TrailEventSelectorDataResourceArgs.builder()\n .type(\"AWS::S3::Object\")\n .values(\"arn:aws:s3\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n eventSelectors:\n - readWriteType: All\n includeManagementEvents: true\n dataResources:\n - type: AWS::S3::Object\n values:\n - arn:aws:s3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging Individual S3 Bucket Events By Using Basic Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst important-bucket = aws.s3.getBucket({\n bucket: \"important-bucket\",\n});\nconst example = new aws.cloudtrail.Trail(\"example\", {eventSelectors: [{\n readWriteType: \"All\",\n includeManagementEvents: true,\n dataResources: [{\n type: \"AWS::S3::Object\",\n values: [important_bucket.then(important_bucket =\u003e `${important_bucket.arn}/`)],\n }],\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nimportant_bucket = aws.s3.get_bucket(bucket=\"important-bucket\")\nexample = aws.cloudtrail.Trail(\"example\", event_selectors=[{\n \"read_write_type\": \"All\",\n \"include_management_events\": True,\n \"data_resources\": [{\n \"type\": \"AWS::S3::Object\",\n \"values\": [f\"{important_bucket.arn}/\"],\n }],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var important_bucket = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"important-bucket\",\n });\n\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n EventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorArgs\n {\n ReadWriteType = \"All\",\n IncludeManagementEvents = true,\n DataResources = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorDataResourceArgs\n {\n Type = \"AWS::S3::Object\",\n Values = new[]\n {\n important_bucket.Apply(important_bucket =\u003e $\"{important_bucket.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\timportant_bucket, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"important-bucket\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tEventSelectors: cloudtrail.TrailEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailEventSelectorArgs{\n\t\t\t\t\tReadWriteType: pulumi.String(\"All\"),\n\t\t\t\t\tIncludeManagementEvents: pulumi.Bool(true),\n\t\t\t\t\tDataResources: cloudtrail.TrailEventSelectorDataResourceArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailEventSelectorDataResourceArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", important_bucket.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.inputs.GetBucketArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var important-bucket = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"important-bucket\")\n .build());\n\n var example = new Trail(\"example\", TrailArgs.builder()\n .eventSelectors(TrailEventSelectorArgs.builder()\n .readWriteType(\"All\")\n .includeManagementEvents(true)\n .dataResources(TrailEventSelectorDataResourceArgs.builder()\n .type(\"AWS::S3::Object\")\n .values(String.format(\"%s/\", important_bucket.arn()))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n eventSelectors:\n - readWriteType: All\n includeManagementEvents: true\n dataResources:\n - type: AWS::S3::Object\n values:\n - ${[\"important-bucket\"].arn}/\nvariables:\n important-bucket:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: important-bucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging All S3 Object Events Except For Two S3 Buckets By Using Advanced Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst not-important-bucket-1 = aws.s3.getBucket({\n bucket: \"not-important-bucket-1\",\n});\nconst not-important-bucket-2 = aws.s3.getBucket({\n bucket: \"not-important-bucket-2\",\n});\nconst example = new aws.cloudtrail.Trail(\"example\", {advancedEventSelectors: [\n {\n name: \"Log all S3 objects events except for two S3 buckets\",\n fieldSelectors: [\n {\n field: \"eventCategory\",\n equals: [\"Data\"],\n },\n {\n field: \"resources.ARN\",\n notStartsWiths: [\n not_important_bucket_1.then(not_important_bucket_1 =\u003e `${not_important_bucket_1.arn}/`),\n not_important_bucket_2.then(not_important_bucket_2 =\u003e `${not_important_bucket_2.arn}/`),\n ],\n },\n {\n field: \"resources.type\",\n equals: [\"AWS::S3::Object\"],\n },\n ],\n },\n {\n name: \"Log readOnly and writeOnly management events\",\n fieldSelectors: [{\n field: \"eventCategory\",\n equals: [\"Management\"],\n }],\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nnot_important_bucket_1 = aws.s3.get_bucket(bucket=\"not-important-bucket-1\")\nnot_important_bucket_2 = aws.s3.get_bucket(bucket=\"not-important-bucket-2\")\nexample = aws.cloudtrail.Trail(\"example\", advanced_event_selectors=[\n {\n \"name\": \"Log all S3 objects events except for two S3 buckets\",\n \"field_selectors\": [\n {\n \"field\": \"eventCategory\",\n \"equals\": [\"Data\"],\n },\n {\n \"field\": \"resources.ARN\",\n \"not_starts_withs\": [\n f\"{not_important_bucket_1.arn}/\",\n f\"{not_important_bucket_2.arn}/\",\n ],\n },\n {\n \"field\": \"resources.type\",\n \"equals\": [\"AWS::S3::Object\"],\n },\n ],\n },\n {\n \"name\": \"Log readOnly and writeOnly management events\",\n \"field_selectors\": [{\n \"field\": \"eventCategory\",\n \"equals\": [\"Management\"],\n }],\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var not_important_bucket_1 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"not-important-bucket-1\",\n });\n\n var not_important_bucket_2 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"not-important-bucket-2\",\n });\n\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n AdvancedEventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorArgs\n {\n Name = \"Log all S3 objects events except for two S3 buckets\",\n FieldSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventCategory\",\n Equals = new[]\n {\n \"Data\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.ARN\",\n NotStartsWiths = new[]\n {\n not_important_bucket_1.Apply(not_important_bucket_1 =\u003e $\"{not_important_bucket_1.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n not_important_bucket_2.Apply(not_important_bucket_2 =\u003e $\"{not_important_bucket_2.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.type\",\n Equals = new[]\n {\n \"AWS::S3::Object\",\n },\n },\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorArgs\n {\n Name = \"Log readOnly and writeOnly management events\",\n FieldSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventCategory\",\n Equals = new[]\n {\n \"Management\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tnot_important_bucket_1, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"not-important-bucket-1\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tnot_important_bucket_2, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"not-important-bucket-2\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tAdvancedEventSelectors: cloudtrail.TrailAdvancedEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorArgs{\n\t\t\t\t\tName: pulumi.String(\"Log all S3 objects events except for two S3 buckets\"),\n\t\t\t\t\tFieldSelectors: cloudtrail.TrailAdvancedEventSelectorFieldSelectorArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventCategory\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Data\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.ARN\"),\n\t\t\t\t\t\t\tNotStartsWiths: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", not_important_bucket_1.Arn),\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", not_important_bucket_2.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.type\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorArgs{\n\t\t\t\t\tName: pulumi.String(\"Log readOnly and writeOnly management events\"),\n\t\t\t\t\tFieldSelectors: cloudtrail.TrailAdvancedEventSelectorFieldSelectorArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventCategory\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Management\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.inputs.GetBucketArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailAdvancedEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var not-important-bucket-1 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"not-important-bucket-1\")\n .build());\n\n final var not-important-bucket-2 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"not-important-bucket-2\")\n .build());\n\n var example = new Trail(\"example\", TrailArgs.builder()\n .advancedEventSelectors( \n TrailAdvancedEventSelectorArgs.builder()\n .name(\"Log all S3 objects events except for two S3 buckets\")\n .fieldSelectors( \n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventCategory\")\n .equals(\"Data\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.ARN\")\n .notStartsWiths( \n String.format(\"%s/\", not_important_bucket_1.arn()),\n String.format(\"%s/\", not_important_bucket_2.arn()))\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.type\")\n .equals(\"AWS::S3::Object\")\n .build())\n .build(),\n TrailAdvancedEventSelectorArgs.builder()\n .name(\"Log readOnly and writeOnly management events\")\n .fieldSelectors(TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventCategory\")\n .equals(\"Management\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n advancedEventSelectors:\n - name: Log all S3 objects events except for two S3 buckets\n fieldSelectors:\n - field: eventCategory\n equals:\n - Data\n - field: resources.ARN\n notStartsWiths:\n - ${[\"not-important-bucket-1\"].arn}/\n - ${[\"not-important-bucket-2\"].arn}/\n - field: resources.type\n equals:\n - AWS::S3::Object\n - name: Log readOnly and writeOnly management events\n fieldSelectors:\n - field: eventCategory\n equals:\n - Management\nvariables:\n not-important-bucket-1:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: not-important-bucket-1\n not-important-bucket-2:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: not-important-bucket-2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging Individual S3 Buckets And Specific Event Names By Using Advanced Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst important-bucket-1 = aws.s3.getBucket({\n bucket: \"important-bucket-1\",\n});\nconst important-bucket-2 = aws.s3.getBucket({\n bucket: \"important-bucket-2\",\n});\nconst important-bucket-3 = aws.s3.getBucket({\n bucket: \"important-bucket-3\",\n});\nconst example = new aws.cloudtrail.Trail(\"example\", {advancedEventSelectors: [\n {\n name: \"Log PutObject and DeleteObject events for two S3 buckets\",\n fieldSelectors: [\n {\n field: \"eventCategory\",\n equals: [\"Data\"],\n },\n {\n field: \"eventName\",\n equals: [\n \"PutObject\",\n \"DeleteObject\",\n ],\n },\n {\n field: \"resources.ARN\",\n startsWiths: [\n important_bucket_1.then(important_bucket_1 =\u003e `${important_bucket_1.arn}/`),\n important_bucket_2.then(important_bucket_2 =\u003e `${important_bucket_2.arn}/`),\n ],\n },\n {\n field: \"readOnly\",\n equals: [\"false\"],\n },\n {\n field: \"resources.type\",\n equals: [\"AWS::S3::Object\"],\n },\n ],\n },\n {\n name: \"Log Delete* events for one S3 bucket\",\n fieldSelectors: [\n {\n field: \"eventCategory\",\n equals: [\"Data\"],\n },\n {\n field: \"eventName\",\n startsWiths: [\"Delete\"],\n },\n {\n field: \"resources.ARN\",\n equals: [important_bucket_3.then(important_bucket_3 =\u003e `${important_bucket_3.arn}/important-prefix`)],\n },\n {\n field: \"readOnly\",\n equals: [\"false\"],\n },\n {\n field: \"resources.type\",\n equals: [\"AWS::S3::Object\"],\n },\n ],\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nimportant_bucket_1 = aws.s3.get_bucket(bucket=\"important-bucket-1\")\nimportant_bucket_2 = aws.s3.get_bucket(bucket=\"important-bucket-2\")\nimportant_bucket_3 = aws.s3.get_bucket(bucket=\"important-bucket-3\")\nexample = aws.cloudtrail.Trail(\"example\", advanced_event_selectors=[\n {\n \"name\": \"Log PutObject and DeleteObject events for two S3 buckets\",\n \"field_selectors\": [\n {\n \"field\": \"eventCategory\",\n \"equals\": [\"Data\"],\n },\n {\n \"field\": \"eventName\",\n \"equals\": [\n \"PutObject\",\n \"DeleteObject\",\n ],\n },\n {\n \"field\": \"resources.ARN\",\n \"starts_withs\": [\n f\"{important_bucket_1.arn}/\",\n f\"{important_bucket_2.arn}/\",\n ],\n },\n {\n \"field\": \"readOnly\",\n \"equals\": [\"false\"],\n },\n {\n \"field\": \"resources.type\",\n \"equals\": [\"AWS::S3::Object\"],\n },\n ],\n },\n {\n \"name\": \"Log Delete* events for one S3 bucket\",\n \"field_selectors\": [\n {\n \"field\": \"eventCategory\",\n \"equals\": [\"Data\"],\n },\n {\n \"field\": \"eventName\",\n \"starts_withs\": [\"Delete\"],\n },\n {\n \"field\": \"resources.ARN\",\n \"equals\": [f\"{important_bucket_3.arn}/important-prefix\"],\n },\n {\n \"field\": \"readOnly\",\n \"equals\": [\"false\"],\n },\n {\n \"field\": \"resources.type\",\n \"equals\": [\"AWS::S3::Object\"],\n },\n ],\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var important_bucket_1 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"important-bucket-1\",\n });\n\n var important_bucket_2 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"important-bucket-2\",\n });\n\n var important_bucket_3 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"important-bucket-3\",\n });\n\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n AdvancedEventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorArgs\n {\n Name = \"Log PutObject and DeleteObject events for two S3 buckets\",\n FieldSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventCategory\",\n Equals = new[]\n {\n \"Data\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventName\",\n Equals = new[]\n {\n \"PutObject\",\n \"DeleteObject\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.ARN\",\n StartsWiths = new[]\n {\n important_bucket_1.Apply(important_bucket_1 =\u003e $\"{important_bucket_1.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n important_bucket_2.Apply(important_bucket_2 =\u003e $\"{important_bucket_2.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"readOnly\",\n Equals = new[]\n {\n \"false\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.type\",\n Equals = new[]\n {\n \"AWS::S3::Object\",\n },\n },\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorArgs\n {\n Name = \"Log Delete* events for one S3 bucket\",\n FieldSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventCategory\",\n Equals = new[]\n {\n \"Data\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventName\",\n StartsWiths = new[]\n {\n \"Delete\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.ARN\",\n Equals = new[]\n {\n important_bucket_3.Apply(important_bucket_3 =\u003e $\"{important_bucket_3.Apply(getBucketResult =\u003e getBucketResult.Arn)}/important-prefix\"),\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"readOnly\",\n Equals = new[]\n {\n \"false\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.type\",\n Equals = new[]\n {\n \"AWS::S3::Object\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\timportant_bucket_1, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"important-bucket-1\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\timportant_bucket_2, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"important-bucket-2\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\timportant_bucket_3, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"important-bucket-3\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tAdvancedEventSelectors: cloudtrail.TrailAdvancedEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorArgs{\n\t\t\t\t\tName: pulumi.String(\"Log PutObject and DeleteObject events for two S3 buckets\"),\n\t\t\t\t\tFieldSelectors: cloudtrail.TrailAdvancedEventSelectorFieldSelectorArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventCategory\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Data\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventName\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"PutObject\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"DeleteObject\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.ARN\"),\n\t\t\t\t\t\t\tStartsWiths: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", important_bucket_1.Arn),\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", important_bucket_2.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"readOnly\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"false\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.type\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorArgs{\n\t\t\t\t\tName: pulumi.String(\"Log Delete* events for one S3 bucket\"),\n\t\t\t\t\tFieldSelectors: cloudtrail.TrailAdvancedEventSelectorFieldSelectorArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventCategory\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Data\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventName\"),\n\t\t\t\t\t\t\tStartsWiths: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Delete\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.ARN\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/important-prefix\", important_bucket_3.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"readOnly\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"false\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.type\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.inputs.GetBucketArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailAdvancedEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var important-bucket-1 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"important-bucket-1\")\n .build());\n\n final var important-bucket-2 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"important-bucket-2\")\n .build());\n\n final var important-bucket-3 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"important-bucket-3\")\n .build());\n\n var example = new Trail(\"example\", TrailArgs.builder()\n .advancedEventSelectors( \n TrailAdvancedEventSelectorArgs.builder()\n .name(\"Log PutObject and DeleteObject events for two S3 buckets\")\n .fieldSelectors( \n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventCategory\")\n .equals(\"Data\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventName\")\n .equals( \n \"PutObject\",\n \"DeleteObject\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.ARN\")\n .startsWiths( \n String.format(\"%s/\", important_bucket_1.arn()),\n String.format(\"%s/\", important_bucket_2.arn()))\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"readOnly\")\n .equals(\"false\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.type\")\n .equals(\"AWS::S3::Object\")\n .build())\n .build(),\n TrailAdvancedEventSelectorArgs.builder()\n .name(\"Log Delete* events for one S3 bucket\")\n .fieldSelectors( \n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventCategory\")\n .equals(\"Data\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventName\")\n .startsWiths(\"Delete\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.ARN\")\n .equals(String.format(\"%s/important-prefix\", important_bucket_3.arn()))\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"readOnly\")\n .equals(\"false\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.type\")\n .equals(\"AWS::S3::Object\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n advancedEventSelectors:\n - name: Log PutObject and DeleteObject events for two S3 buckets\n fieldSelectors:\n - field: eventCategory\n equals:\n - Data\n - field: eventName\n equals:\n - PutObject\n - DeleteObject\n - field: resources.ARN\n startsWiths:\n - ${[\"important-bucket-1\"].arn}/\n - ${[\"important-bucket-2\"].arn}/\n - field: readOnly\n equals:\n - 'false'\n - field: resources.type\n equals:\n - AWS::S3::Object\n - name: Log Delete* events for one S3 bucket\n fieldSelectors:\n - field: eventCategory\n equals:\n - Data\n - field: eventName\n startsWiths:\n - Delete\n - field: resources.ARN\n equals:\n - ${[\"important-bucket-3\"].arn}/important-prefix\n - field: readOnly\n equals:\n - 'false'\n - field: resources.type\n equals:\n - AWS::S3::Object\nvariables:\n important-bucket-1:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: important-bucket-1\n important-bucket-2:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: important-bucket-2\n important-bucket-3:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: important-bucket-3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Sending Events to CloudWatch Logs\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudwatch.LogGroup(\"example\", {name: \"Example\"});\nconst exampleTrail = new aws.cloudtrail.Trail(\"example\", {cloudWatchLogsGroupArn: pulumi.interpolate`${example.arn}:*`});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"Example\")\nexample_trail = aws.cloudtrail.Trail(\"example\", cloud_watch_logs_group_arn=example.arn.apply(lambda arn: f\"{arn}:*\"))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"Example\",\n });\n\n var exampleTrail = new Aws.CloudTrail.Trail(\"example\", new()\n {\n CloudWatchLogsGroupArn = example.Arn.Apply(arn =\u003e $\"{arn}:*\"),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tCloudWatchLogsGroupArn: example.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"%v:*\", arn), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new LogGroup(\"example\", LogGroupArgs.builder()\n .name(\"Example\")\n .build());\n\n var exampleTrail = new Trail(\"exampleTrail\", TrailArgs.builder()\n .cloudWatchLogsGroupArn(example.arn().applyValue(arn -\u003e String.format(\"%s:*\", arn)))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: Example\n exampleTrail:\n type: aws:cloudtrail:Trail\n name: example\n properties:\n cloudWatchLogsGroupArn: ${example.arn}:*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Cloudtrails using the `arn`. For example:\n\n```sh\n$ pulumi import aws:cloudtrail/trail:Trail sample arn:aws:cloudtrail:us-east-1:123456789012:trail/my-sample-trail\n```\n", + "description": "Provides a CloudTrail resource.\n\n\u003e **Tip:** For a multi-region trail, this resource must be in the home region of the trail.\n\n\u003e **Tip:** For an organization trail, this resource must be in the master account of the organization.\n\n## Example Usage\n\n### Basic\n\nEnable CloudTrail to capture all compatible management events in region.\nFor capturing events from services like IAM, `include_global_service_events` must be enabled.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {\n bucket: \"my-test-trail\",\n forceDestroy: true,\n});\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst example = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n sid: \"AWSCloudTrailAclCheck\",\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"cloudtrail.amazonaws.com\"],\n }],\n actions: [\"s3:GetBucketAcl\"],\n resources: [exampleBucketV2.arn],\n conditions: [{\n test: \"StringEquals\",\n variable: \"aws:SourceArn\",\n values: [Promise.all([currentGetPartition, currentGetRegion, current]).then(([currentGetPartition, currentGetRegion, current]) =\u003e `arn:${currentGetPartition.partition}:cloudtrail:${currentGetRegion.name}:${current.accountId}:trail/example`)],\n }],\n },\n {\n sid: \"AWSCloudTrailWrite\",\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"cloudtrail.amazonaws.com\"],\n }],\n actions: [\"s3:PutObject\"],\n resources: [pulumi.all([exampleBucketV2.arn, current]).apply(([arn, current]) =\u003e `${arn}/prefix/AWSLogs/${current.accountId}/*`)],\n conditions: [\n {\n test: \"StringEquals\",\n variable: \"s3:x-amz-acl\",\n values: [\"bucket-owner-full-control\"],\n },\n {\n test: \"StringEquals\",\n variable: \"aws:SourceArn\",\n values: [Promise.all([currentGetPartition, currentGetRegion, current]).then(([currentGetPartition, currentGetRegion, current]) =\u003e `arn:${currentGetPartition.partition}:cloudtrail:${currentGetRegion.name}:${current.accountId}:trail/example`)],\n },\n ],\n },\n ],\n});\nconst exampleBucketPolicy = new aws.s3.BucketPolicy(\"example\", {\n bucket: exampleBucketV2.id,\n policy: example.apply(example =\u003e example.json),\n});\nconst exampleTrail = new aws.cloudtrail.Trail(\"example\", {\n name: \"example\",\n s3BucketName: exampleBucketV2.id,\n s3KeyPrefix: \"prefix\",\n includeGlobalServiceEvents: false,\n}, {\n dependsOn: [exampleBucketPolicy],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_bucket_v2 = aws.s3.BucketV2(\"example\",\n bucket=\"my-test-trail\",\n force_destroy=True)\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\ncurrent_get_region = aws.get_region()\nexample = aws.iam.get_policy_document_output(statements=[\n {\n \"sid\": \"AWSCloudTrailAclCheck\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"cloudtrail.amazonaws.com\"],\n }],\n \"actions\": [\"s3:GetBucketAcl\"],\n \"resources\": [example_bucket_v2.arn],\n \"conditions\": [{\n \"test\": \"StringEquals\",\n \"variable\": \"aws:SourceArn\",\n \"values\": [f\"arn:{current_get_partition.partition}:cloudtrail:{current_get_region.name}:{current.account_id}:trail/example\"],\n }],\n },\n {\n \"sid\": \"AWSCloudTrailWrite\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"cloudtrail.amazonaws.com\"],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [example_bucket_v2.arn.apply(lambda arn: f\"{arn}/prefix/AWSLogs/{current.account_id}/*\")],\n \"conditions\": [\n {\n \"test\": \"StringEquals\",\n \"variable\": \"s3:x-amz-acl\",\n \"values\": [\"bucket-owner-full-control\"],\n },\n {\n \"test\": \"StringEquals\",\n \"variable\": \"aws:SourceArn\",\n \"values\": [f\"arn:{current_get_partition.partition}:cloudtrail:{current_get_region.name}:{current.account_id}:trail/example\"],\n },\n ],\n },\n])\nexample_bucket_policy = aws.s3.BucketPolicy(\"example\",\n bucket=example_bucket_v2.id,\n policy=example.json)\nexample_trail = aws.cloudtrail.Trail(\"example\",\n name=\"example\",\n s3_bucket_name=example_bucket_v2.id,\n s3_key_prefix=\"prefix\",\n include_global_service_events=False,\n opts = pulumi.ResourceOptions(depends_on=[example_bucket_policy]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-test-trail\",\n ForceDestroy = true,\n });\n\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"AWSCloudTrailAclCheck\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"cloudtrail.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"s3:GetBucketAcl\",\n },\n Resources = new[]\n {\n exampleBucketV2.Arn,\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"aws:SourceArn\",\n Values = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:cloudtrail:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:trail/example\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"AWSCloudTrailWrite\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"cloudtrail.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{exampleBucketV2.Arn}/prefix/AWSLogs/{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}/*\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"s3:x-amz-acl\",\n Values = new[]\n {\n \"bucket-owner-full-control\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"aws:SourceArn\",\n Values = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:cloudtrail:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:trail/example\",\n },\n },\n },\n },\n },\n });\n\n var exampleBucketPolicy = new Aws.S3.BucketPolicy(\"example\", new()\n {\n Bucket = exampleBucketV2.Id,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleTrail = new Aws.CloudTrail.Trail(\"example\", new()\n {\n Name = \"example\",\n S3BucketName = exampleBucketV2.Id,\n S3KeyPrefix = \"prefix\",\n IncludeGlobalServiceEvents = false,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketPolicy,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-test-trail\"),\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"AWSCloudTrailAclCheck\"),\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"cloudtrail.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"s3:GetBucketAcl\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texampleBucketV2.Arn,\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"StringEquals\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"aws:SourceArn\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"arn:%v:cloudtrail:%v:%v:trail/example\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"AWSCloudTrailWrite\"),\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"cloudtrail.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"s3:PutObject\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texampleBucketV2.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v/prefix/AWSLogs/%v/*\", arn, current.AccountId), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"StringEquals\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"s3:x-amz-acl\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"bucket-owner-full-control\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"StringEquals\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"aws:SourceArn\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"arn:%v:cloudtrail:%v:%v:trail/example\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\texampleBucketPolicy, err := s3.NewBucketPolicy(ctx, \"example\", \u0026s3.BucketPolicyArgs{\n\t\t\tBucket: exampleBucketV2.ID(),\n\t\t\tPolicy: pulumi.String(example.ApplyT(func(example iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026example.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tS3BucketName: exampleBucketV2.ID(),\n\t\t\tS3KeyPrefix: pulumi.String(\"prefix\"),\n\t\t\tIncludeGlobalServiceEvents: pulumi.Bool(false),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketPolicy,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"my-test-trail\")\n .forceDestroy(true)\n .build());\n\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"AWSCloudTrailAclCheck\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"cloudtrail.amazonaws.com\")\n .build())\n .actions(\"s3:GetBucketAcl\")\n .resources(exampleBucketV2.arn())\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"aws:SourceArn\")\n .values(String.format(\"arn:%s:cloudtrail:%s:%s:trail/example\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"AWSCloudTrailWrite\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"cloudtrail.amazonaws.com\")\n .build())\n .actions(\"s3:PutObject\")\n .resources(exampleBucketV2.arn().applyValue(arn -\u003e String.format(\"%s/prefix/AWSLogs/%s/*\", arn,current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))))\n .conditions( \n GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"s3:x-amz-acl\")\n .values(\"bucket-owner-full-control\")\n .build(),\n GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"aws:SourceArn\")\n .values(String.format(\"arn:%s:cloudtrail:%s:%s:trail/example\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build())\n .build());\n\n var exampleBucketPolicy = new BucketPolicy(\"exampleBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(exampleBucketV2.id())\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(example -\u003e example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var exampleTrail = new Trail(\"exampleTrail\", TrailArgs.builder()\n .name(\"example\")\n .s3BucketName(exampleBucketV2.id())\n .s3KeyPrefix(\"prefix\")\n .includeGlobalServiceEvents(false)\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleBucketPolicy)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleTrail:\n type: aws:cloudtrail:Trail\n name: example\n properties:\n name: example\n s3BucketName: ${exampleBucketV2.id}\n s3KeyPrefix: prefix\n includeGlobalServiceEvents: false\n options:\n dependson:\n - ${exampleBucketPolicy}\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: my-test-trail\n forceDestroy: true\n exampleBucketPolicy:\n type: aws:s3:BucketPolicy\n name: example\n properties:\n bucket: ${exampleBucketV2.id}\n policy: ${example.json}\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: AWSCloudTrailAclCheck\n effect: Allow\n principals:\n - type: Service\n identifiers:\n - cloudtrail.amazonaws.com\n actions:\n - s3:GetBucketAcl\n resources:\n - ${exampleBucketV2.arn}\n conditions:\n - test: StringEquals\n variable: aws:SourceArn\n values:\n - arn:${currentGetPartition.partition}:cloudtrail:${currentGetRegion.name}:${current.accountId}:trail/example\n - sid: AWSCloudTrailWrite\n effect: Allow\n principals:\n - type: Service\n identifiers:\n - cloudtrail.amazonaws.com\n actions:\n - s3:PutObject\n resources:\n - ${exampleBucketV2.arn}/prefix/AWSLogs/${current.accountId}/*\n conditions:\n - test: StringEquals\n variable: s3:x-amz-acl\n values:\n - bucket-owner-full-control\n - test: StringEquals\n variable: aws:SourceArn\n values:\n - arn:${currentGetPartition.partition}:cloudtrail:${currentGetRegion.name}:${current.accountId}:trail/example\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Data Event Logging\n\nCloudTrail can log [Data Events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) for certain services such as S3 objects and Lambda function invocations. Additional information about data event configuration can be found in the following links:\n\n* [CloudTrail API DataResource documentation](https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_DataResource.html) (for basic event selector).\n* [CloudTrail API AdvancedFieldSelector documentation](https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedFieldSelector.html) (for advanced event selector).\n\n### Logging All Lambda Function Invocations By Using Basic Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudtrail.Trail(\"example\", {eventSelectors: [{\n readWriteType: \"All\",\n includeManagementEvents: true,\n dataResources: [{\n type: \"AWS::Lambda::Function\",\n values: [\"arn:aws:lambda\"],\n }],\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudtrail.Trail(\"example\", event_selectors=[{\n \"read_write_type\": \"All\",\n \"include_management_events\": True,\n \"data_resources\": [{\n \"type\": \"AWS::Lambda::Function\",\n \"values\": [\"arn:aws:lambda\"],\n }],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n EventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorArgs\n {\n ReadWriteType = \"All\",\n IncludeManagementEvents = true,\n DataResources = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorDataResourceArgs\n {\n Type = \"AWS::Lambda::Function\",\n Values = new[]\n {\n \"arn:aws:lambda\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tEventSelectors: cloudtrail.TrailEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailEventSelectorArgs{\n\t\t\t\t\tReadWriteType: pulumi.String(\"All\"),\n\t\t\t\t\tIncludeManagementEvents: pulumi.Bool(true),\n\t\t\t\t\tDataResources: cloudtrail.TrailEventSelectorDataResourceArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailEventSelectorDataResourceArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"AWS::Lambda::Function\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"arn:aws:lambda\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Trail(\"example\", TrailArgs.builder()\n .eventSelectors(TrailEventSelectorArgs.builder()\n .readWriteType(\"All\")\n .includeManagementEvents(true)\n .dataResources(TrailEventSelectorDataResourceArgs.builder()\n .type(\"AWS::Lambda::Function\")\n .values(\"arn:aws:lambda\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n eventSelectors:\n - readWriteType: All\n includeManagementEvents: true\n dataResources:\n - type: AWS::Lambda::Function\n values:\n - arn:aws:lambda\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging All S3 Object Events By Using Basic Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudtrail.Trail(\"example\", {eventSelectors: [{\n readWriteType: \"All\",\n includeManagementEvents: true,\n dataResources: [{\n type: \"AWS::S3::Object\",\n values: [\"arn:aws:s3\"],\n }],\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudtrail.Trail(\"example\", event_selectors=[{\n \"read_write_type\": \"All\",\n \"include_management_events\": True,\n \"data_resources\": [{\n \"type\": \"AWS::S3::Object\",\n \"values\": [\"arn:aws:s3\"],\n }],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n EventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorArgs\n {\n ReadWriteType = \"All\",\n IncludeManagementEvents = true,\n DataResources = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorDataResourceArgs\n {\n Type = \"AWS::S3::Object\",\n Values = new[]\n {\n \"arn:aws:s3\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tEventSelectors: cloudtrail.TrailEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailEventSelectorArgs{\n\t\t\t\t\tReadWriteType: pulumi.String(\"All\"),\n\t\t\t\t\tIncludeManagementEvents: pulumi.Bool(true),\n\t\t\t\t\tDataResources: cloudtrail.TrailEventSelectorDataResourceArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailEventSelectorDataResourceArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"arn:aws:s3\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Trail(\"example\", TrailArgs.builder()\n .eventSelectors(TrailEventSelectorArgs.builder()\n .readWriteType(\"All\")\n .includeManagementEvents(true)\n .dataResources(TrailEventSelectorDataResourceArgs.builder()\n .type(\"AWS::S3::Object\")\n .values(\"arn:aws:s3\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n eventSelectors:\n - readWriteType: All\n includeManagementEvents: true\n dataResources:\n - type: AWS::S3::Object\n values:\n - arn:aws:s3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging Individual S3 Bucket Events By Using Basic Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst important-bucket = aws.s3.getBucket({\n bucket: \"important-bucket\",\n});\nconst example = new aws.cloudtrail.Trail(\"example\", {eventSelectors: [{\n readWriteType: \"All\",\n includeManagementEvents: true,\n dataResources: [{\n type: \"AWS::S3::Object\",\n values: [important_bucket.then(important_bucket =\u003e `${important_bucket.arn}/`)],\n }],\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nimportant_bucket = aws.s3.get_bucket(bucket=\"important-bucket\")\nexample = aws.cloudtrail.Trail(\"example\", event_selectors=[{\n \"read_write_type\": \"All\",\n \"include_management_events\": True,\n \"data_resources\": [{\n \"type\": \"AWS::S3::Object\",\n \"values\": [f\"{important_bucket.arn}/\"],\n }],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var important_bucket = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"important-bucket\",\n });\n\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n EventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorArgs\n {\n ReadWriteType = \"All\",\n IncludeManagementEvents = true,\n DataResources = new[]\n {\n new Aws.CloudTrail.Inputs.TrailEventSelectorDataResourceArgs\n {\n Type = \"AWS::S3::Object\",\n Values = new[]\n {\n important_bucket.Apply(important_bucket =\u003e $\"{important_bucket.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\timportant_bucket, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"important-bucket\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tEventSelectors: cloudtrail.TrailEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailEventSelectorArgs{\n\t\t\t\t\tReadWriteType: pulumi.String(\"All\"),\n\t\t\t\t\tIncludeManagementEvents: pulumi.Bool(true),\n\t\t\t\t\tDataResources: cloudtrail.TrailEventSelectorDataResourceArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailEventSelectorDataResourceArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", important_bucket.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.inputs.GetBucketArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var important-bucket = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"important-bucket\")\n .build());\n\n var example = new Trail(\"example\", TrailArgs.builder()\n .eventSelectors(TrailEventSelectorArgs.builder()\n .readWriteType(\"All\")\n .includeManagementEvents(true)\n .dataResources(TrailEventSelectorDataResourceArgs.builder()\n .type(\"AWS::S3::Object\")\n .values(String.format(\"%s/\", important_bucket.arn()))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n eventSelectors:\n - readWriteType: All\n includeManagementEvents: true\n dataResources:\n - type: AWS::S3::Object\n values:\n - ${[\"important-bucket\"].arn}/\nvariables:\n important-bucket:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: important-bucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging All S3 Object Events Except For Two S3 Buckets By Using Advanced Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst not-important-bucket-1 = aws.s3.getBucket({\n bucket: \"not-important-bucket-1\",\n});\nconst not-important-bucket-2 = aws.s3.getBucket({\n bucket: \"not-important-bucket-2\",\n});\nconst example = new aws.cloudtrail.Trail(\"example\", {advancedEventSelectors: [\n {\n name: \"Log all S3 objects events except for two S3 buckets\",\n fieldSelectors: [\n {\n field: \"eventCategory\",\n equals: [\"Data\"],\n },\n {\n field: \"resources.ARN\",\n notStartsWiths: [\n not_important_bucket_1.then(not_important_bucket_1 =\u003e `${not_important_bucket_1.arn}/`),\n not_important_bucket_2.then(not_important_bucket_2 =\u003e `${not_important_bucket_2.arn}/`),\n ],\n },\n {\n field: \"resources.type\",\n equals: [\"AWS::S3::Object\"],\n },\n ],\n },\n {\n name: \"Log readOnly and writeOnly management events\",\n fieldSelectors: [{\n field: \"eventCategory\",\n equals: [\"Management\"],\n }],\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nnot_important_bucket_1 = aws.s3.get_bucket(bucket=\"not-important-bucket-1\")\nnot_important_bucket_2 = aws.s3.get_bucket(bucket=\"not-important-bucket-2\")\nexample = aws.cloudtrail.Trail(\"example\", advanced_event_selectors=[\n {\n \"name\": \"Log all S3 objects events except for two S3 buckets\",\n \"field_selectors\": [\n {\n \"field\": \"eventCategory\",\n \"equals\": [\"Data\"],\n },\n {\n \"field\": \"resources.ARN\",\n \"not_starts_withs\": [\n f\"{not_important_bucket_1.arn}/\",\n f\"{not_important_bucket_2.arn}/\",\n ],\n },\n {\n \"field\": \"resources.type\",\n \"equals\": [\"AWS::S3::Object\"],\n },\n ],\n },\n {\n \"name\": \"Log readOnly and writeOnly management events\",\n \"field_selectors\": [{\n \"field\": \"eventCategory\",\n \"equals\": [\"Management\"],\n }],\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var not_important_bucket_1 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"not-important-bucket-1\",\n });\n\n var not_important_bucket_2 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"not-important-bucket-2\",\n });\n\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n AdvancedEventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorArgs\n {\n Name = \"Log all S3 objects events except for two S3 buckets\",\n FieldSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventCategory\",\n Equals = new[]\n {\n \"Data\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.ARN\",\n NotStartsWiths = new[]\n {\n not_important_bucket_1.Apply(not_important_bucket_1 =\u003e $\"{not_important_bucket_1.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n not_important_bucket_2.Apply(not_important_bucket_2 =\u003e $\"{not_important_bucket_2.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.type\",\n Equals = new[]\n {\n \"AWS::S3::Object\",\n },\n },\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorArgs\n {\n Name = \"Log readOnly and writeOnly management events\",\n FieldSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventCategory\",\n Equals = new[]\n {\n \"Management\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tnot_important_bucket_1, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"not-important-bucket-1\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tnot_important_bucket_2, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"not-important-bucket-2\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tAdvancedEventSelectors: cloudtrail.TrailAdvancedEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorArgs{\n\t\t\t\t\tName: pulumi.String(\"Log all S3 objects events except for two S3 buckets\"),\n\t\t\t\t\tFieldSelectors: cloudtrail.TrailAdvancedEventSelectorFieldSelectorArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventCategory\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Data\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.ARN\"),\n\t\t\t\t\t\t\tNotStartsWiths: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", not_important_bucket_1.Arn),\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", not_important_bucket_2.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.type\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorArgs{\n\t\t\t\t\tName: pulumi.String(\"Log readOnly and writeOnly management events\"),\n\t\t\t\t\tFieldSelectors: cloudtrail.TrailAdvancedEventSelectorFieldSelectorArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventCategory\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Management\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.inputs.GetBucketArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailAdvancedEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var not-important-bucket-1 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"not-important-bucket-1\")\n .build());\n\n final var not-important-bucket-2 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"not-important-bucket-2\")\n .build());\n\n var example = new Trail(\"example\", TrailArgs.builder()\n .advancedEventSelectors( \n TrailAdvancedEventSelectorArgs.builder()\n .name(\"Log all S3 objects events except for two S3 buckets\")\n .fieldSelectors( \n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventCategory\")\n .equals(\"Data\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.ARN\")\n .notStartsWiths( \n String.format(\"%s/\", not_important_bucket_1.arn()),\n String.format(\"%s/\", not_important_bucket_2.arn()))\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.type\")\n .equals(\"AWS::S3::Object\")\n .build())\n .build(),\n TrailAdvancedEventSelectorArgs.builder()\n .name(\"Log readOnly and writeOnly management events\")\n .fieldSelectors(TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventCategory\")\n .equals(\"Management\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n advancedEventSelectors:\n - name: Log all S3 objects events except for two S3 buckets\n fieldSelectors:\n - field: eventCategory\n equals:\n - Data\n - field: resources.ARN\n notStartsWiths:\n - ${[\"not-important-bucket-1\"].arn}/\n - ${[\"not-important-bucket-2\"].arn}/\n - field: resources.type\n equals:\n - AWS::S3::Object\n - name: Log readOnly and writeOnly management events\n fieldSelectors:\n - field: eventCategory\n equals:\n - Management\nvariables:\n not-important-bucket-1:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: not-important-bucket-1\n not-important-bucket-2:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: not-important-bucket-2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Logging Individual S3 Buckets And Specific Event Names By Using Advanced Event Selectors\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst important-bucket-1 = aws.s3.getBucket({\n bucket: \"important-bucket-1\",\n});\nconst important-bucket-2 = aws.s3.getBucket({\n bucket: \"important-bucket-2\",\n});\nconst important-bucket-3 = aws.s3.getBucket({\n bucket: \"important-bucket-3\",\n});\nconst example = new aws.cloudtrail.Trail(\"example\", {advancedEventSelectors: [\n {\n name: \"Log PutObject and DeleteObject events for two S3 buckets\",\n fieldSelectors: [\n {\n field: \"eventCategory\",\n equals: [\"Data\"],\n },\n {\n field: \"eventName\",\n equals: [\n \"PutObject\",\n \"DeleteObject\",\n ],\n },\n {\n field: \"resources.ARN\",\n startsWiths: [\n important_bucket_1.then(important_bucket_1 =\u003e `${important_bucket_1.arn}/`),\n important_bucket_2.then(important_bucket_2 =\u003e `${important_bucket_2.arn}/`),\n ],\n },\n {\n field: \"readOnly\",\n equals: [\"false\"],\n },\n {\n field: \"resources.type\",\n equals: [\"AWS::S3::Object\"],\n },\n ],\n },\n {\n name: \"Log Delete* events for one S3 bucket\",\n fieldSelectors: [\n {\n field: \"eventCategory\",\n equals: [\"Data\"],\n },\n {\n field: \"eventName\",\n startsWiths: [\"Delete\"],\n },\n {\n field: \"resources.ARN\",\n equals: [important_bucket_3.then(important_bucket_3 =\u003e `${important_bucket_3.arn}/important-prefix`)],\n },\n {\n field: \"readOnly\",\n equals: [\"false\"],\n },\n {\n field: \"resources.type\",\n equals: [\"AWS::S3::Object\"],\n },\n ],\n },\n]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nimportant_bucket_1 = aws.s3.get_bucket(bucket=\"important-bucket-1\")\nimportant_bucket_2 = aws.s3.get_bucket(bucket=\"important-bucket-2\")\nimportant_bucket_3 = aws.s3.get_bucket(bucket=\"important-bucket-3\")\nexample = aws.cloudtrail.Trail(\"example\", advanced_event_selectors=[\n {\n \"name\": \"Log PutObject and DeleteObject events for two S3 buckets\",\n \"field_selectors\": [\n {\n \"field\": \"eventCategory\",\n \"equals\": [\"Data\"],\n },\n {\n \"field\": \"eventName\",\n \"equals\": [\n \"PutObject\",\n \"DeleteObject\",\n ],\n },\n {\n \"field\": \"resources.ARN\",\n \"starts_withs\": [\n f\"{important_bucket_1.arn}/\",\n f\"{important_bucket_2.arn}/\",\n ],\n },\n {\n \"field\": \"readOnly\",\n \"equals\": [\"false\"],\n },\n {\n \"field\": \"resources.type\",\n \"equals\": [\"AWS::S3::Object\"],\n },\n ],\n },\n {\n \"name\": \"Log Delete* events for one S3 bucket\",\n \"field_selectors\": [\n {\n \"field\": \"eventCategory\",\n \"equals\": [\"Data\"],\n },\n {\n \"field\": \"eventName\",\n \"starts_withs\": [\"Delete\"],\n },\n {\n \"field\": \"resources.ARN\",\n \"equals\": [f\"{important_bucket_3.arn}/important-prefix\"],\n },\n {\n \"field\": \"readOnly\",\n \"equals\": [\"false\"],\n },\n {\n \"field\": \"resources.type\",\n \"equals\": [\"AWS::S3::Object\"],\n },\n ],\n },\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var important_bucket_1 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"important-bucket-1\",\n });\n\n var important_bucket_2 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"important-bucket-2\",\n });\n\n var important_bucket_3 = Aws.S3.GetBucket.Invoke(new()\n {\n Bucket = \"important-bucket-3\",\n });\n\n var example = new Aws.CloudTrail.Trail(\"example\", new()\n {\n AdvancedEventSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorArgs\n {\n Name = \"Log PutObject and DeleteObject events for two S3 buckets\",\n FieldSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventCategory\",\n Equals = new[]\n {\n \"Data\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventName\",\n Equals = new[]\n {\n \"PutObject\",\n \"DeleteObject\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.ARN\",\n StartsWiths = new[]\n {\n important_bucket_1.Apply(important_bucket_1 =\u003e $\"{important_bucket_1.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n important_bucket_2.Apply(important_bucket_2 =\u003e $\"{important_bucket_2.Apply(getBucketResult =\u003e getBucketResult.Arn)}/\"),\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"readOnly\",\n Equals = new[]\n {\n \"false\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.type\",\n Equals = new[]\n {\n \"AWS::S3::Object\",\n },\n },\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorArgs\n {\n Name = \"Log Delete* events for one S3 bucket\",\n FieldSelectors = new[]\n {\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventCategory\",\n Equals = new[]\n {\n \"Data\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"eventName\",\n StartsWiths = new[]\n {\n \"Delete\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.ARN\",\n Equals = new[]\n {\n important_bucket_3.Apply(important_bucket_3 =\u003e $\"{important_bucket_3.Apply(getBucketResult =\u003e getBucketResult.Arn)}/important-prefix\"),\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"readOnly\",\n Equals = new[]\n {\n \"false\",\n },\n },\n new Aws.CloudTrail.Inputs.TrailAdvancedEventSelectorFieldSelectorArgs\n {\n Field = \"resources.type\",\n Equals = new[]\n {\n \"AWS::S3::Object\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\timportant_bucket_1, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"important-bucket-1\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\timportant_bucket_2, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"important-bucket-2\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\timportant_bucket_3, err := s3.LookupBucket(ctx, \u0026s3.LookupBucketArgs{\n\t\t\tBucket: \"important-bucket-3\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tAdvancedEventSelectors: cloudtrail.TrailAdvancedEventSelectorArray{\n\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorArgs{\n\t\t\t\t\tName: pulumi.String(\"Log PutObject and DeleteObject events for two S3 buckets\"),\n\t\t\t\t\tFieldSelectors: cloudtrail.TrailAdvancedEventSelectorFieldSelectorArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventCategory\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Data\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventName\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"PutObject\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"DeleteObject\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.ARN\"),\n\t\t\t\t\t\t\tStartsWiths: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", important_bucket_1.Arn),\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/\", important_bucket_2.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"readOnly\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"false\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.type\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorArgs{\n\t\t\t\t\tName: pulumi.String(\"Log Delete* events for one S3 bucket\"),\n\t\t\t\t\tFieldSelectors: cloudtrail.TrailAdvancedEventSelectorFieldSelectorArray{\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventCategory\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Data\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"eventName\"),\n\t\t\t\t\t\t\tStartsWiths: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Delete\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.ARN\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"%v/important-prefix\", important_bucket_3.Arn),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"readOnly\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"false\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026cloudtrail.TrailAdvancedEventSelectorFieldSelectorArgs{\n\t\t\t\t\t\t\tField: pulumi.String(\"resources.type\"),\n\t\t\t\t\t\t\tEquals: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"AWS::S3::Object\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.inputs.GetBucketArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport com.pulumi.aws.cloudtrail.inputs.TrailAdvancedEventSelectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var important-bucket-1 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"important-bucket-1\")\n .build());\n\n final var important-bucket-2 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"important-bucket-2\")\n .build());\n\n final var important-bucket-3 = S3Functions.getBucket(GetBucketArgs.builder()\n .bucket(\"important-bucket-3\")\n .build());\n\n var example = new Trail(\"example\", TrailArgs.builder()\n .advancedEventSelectors( \n TrailAdvancedEventSelectorArgs.builder()\n .name(\"Log PutObject and DeleteObject events for two S3 buckets\")\n .fieldSelectors( \n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventCategory\")\n .equals(\"Data\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventName\")\n .equals( \n \"PutObject\",\n \"DeleteObject\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.ARN\")\n .startsWiths( \n String.format(\"%s/\", important_bucket_1.arn()),\n String.format(\"%s/\", important_bucket_2.arn()))\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"readOnly\")\n .equals(\"false\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.type\")\n .equals(\"AWS::S3::Object\")\n .build())\n .build(),\n TrailAdvancedEventSelectorArgs.builder()\n .name(\"Log Delete* events for one S3 bucket\")\n .fieldSelectors( \n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventCategory\")\n .equals(\"Data\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"eventName\")\n .startsWiths(\"Delete\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.ARN\")\n .equals(String.format(\"%s/important-prefix\", important_bucket_3.arn()))\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"readOnly\")\n .equals(\"false\")\n .build(),\n TrailAdvancedEventSelectorFieldSelectorArgs.builder()\n .field(\"resources.type\")\n .equals(\"AWS::S3::Object\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudtrail:Trail\n properties:\n advancedEventSelectors:\n - name: Log PutObject and DeleteObject events for two S3 buckets\n fieldSelectors:\n - field: eventCategory\n equals:\n - Data\n - field: eventName\n equals:\n - PutObject\n - DeleteObject\n - field: resources.ARN\n startsWiths:\n - ${[\"important-bucket-1\"].arn}/\n - ${[\"important-bucket-2\"].arn}/\n - field: readOnly\n equals:\n - 'false'\n - field: resources.type\n equals:\n - AWS::S3::Object\n - name: Log Delete* events for one S3 bucket\n fieldSelectors:\n - field: eventCategory\n equals:\n - Data\n - field: eventName\n startsWiths:\n - Delete\n - field: resources.ARN\n equals:\n - ${[\"important-bucket-3\"].arn}/important-prefix\n - field: readOnly\n equals:\n - 'false'\n - field: resources.type\n equals:\n - AWS::S3::Object\nvariables:\n important-bucket-1:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: important-bucket-1\n important-bucket-2:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: important-bucket-2\n important-bucket-3:\n fn::invoke:\n Function: aws:s3:getBucket\n Arguments:\n bucket: important-bucket-3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Sending Events to CloudWatch Logs\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudwatch.LogGroup(\"example\", {name: \"Example\"});\nconst exampleTrail = new aws.cloudtrail.Trail(\"example\", {cloudWatchLogsGroupArn: pulumi.interpolate`${example.arn}:*`});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"Example\")\nexample_trail = aws.cloudtrail.Trail(\"example\", cloud_watch_logs_group_arn=example.arn.apply(lambda arn: f\"{arn}:*\"))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"Example\",\n });\n\n var exampleTrail = new Aws.CloudTrail.Trail(\"example\", new()\n {\n CloudWatchLogsGroupArn = example.Arn.Apply(arn =\u003e $\"{arn}:*\"),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudtrail.NewTrail(ctx, \"example\", \u0026cloudtrail.TrailArgs{\n\t\t\tCloudWatchLogsGroupArn: example.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"%v:*\", arn), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.cloudtrail.Trail;\nimport com.pulumi.aws.cloudtrail.TrailArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new LogGroup(\"example\", LogGroupArgs.builder()\n .name(\"Example\")\n .build());\n\n var exampleTrail = new Trail(\"exampleTrail\", TrailArgs.builder()\n .cloudWatchLogsGroupArn(example.arn().applyValue(arn -\u003e String.format(\"%s:*\", arn)))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: Example\n exampleTrail:\n type: aws:cloudtrail:Trail\n name: example\n properties:\n cloudWatchLogsGroupArn: ${example.arn}:*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Cloudtrails using the `arn`. For example:\n\n```sh\n$ pulumi import aws:cloudtrail/trail:Trail sample arn:aws:cloudtrail:us-east-1:123456789012:trail/my-sample-trail\n```\n", "properties": { "advancedEventSelectors": { "type": "array", @@ -200510,7 +200510,7 @@ } }, "aws:cloudwatch/eventTarget:EventTarget": { - "description": "Provides an EventBridge Target resource.\n\n\u003e **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical.\n\n## Example Usage\n\n### Kinesis Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst console = new aws.cloudwatch.EventRule(\"console\", {\n name: \"capture-ec2-scaling-events\",\n description: \"Capture all EC2 scaling events\",\n eventPattern: JSON.stringify({\n source: [\"aws.autoscaling\"],\n \"detail-type\": [\n \"EC2 Instance Launch Successful\",\n \"EC2 Instance Terminate Successful\",\n \"EC2 Instance Launch Unsuccessful\",\n \"EC2 Instance Terminate Unsuccessful\",\n ],\n }),\n});\nconst testStream = new aws.kinesis.Stream(\"test_stream\", {\n name: \"kinesis-test\",\n shardCount: 1,\n});\nconst yada = new aws.cloudwatch.EventTarget(\"yada\", {\n targetId: \"Yada\",\n rule: console.name,\n arn: testStream.arn,\n runCommandTargets: [\n {\n key: \"tag:Name\",\n values: [\"FooBar\"],\n },\n {\n key: \"InstanceIds\",\n values: [\"i-162058cd308bffec2\"],\n },\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nconsole = aws.cloudwatch.EventRule(\"console\",\n name=\"capture-ec2-scaling-events\",\n description=\"Capture all EC2 scaling events\",\n event_pattern=json.dumps({\n \"source\": [\"aws.autoscaling\"],\n \"detail-type\": [\n \"EC2 Instance Launch Successful\",\n \"EC2 Instance Terminate Successful\",\n \"EC2 Instance Launch Unsuccessful\",\n \"EC2 Instance Terminate Unsuccessful\",\n ],\n }))\ntest_stream = aws.kinesis.Stream(\"test_stream\",\n name=\"kinesis-test\",\n shard_count=1)\nyada = aws.cloudwatch.EventTarget(\"yada\",\n target_id=\"Yada\",\n rule=console.name,\n arn=test_stream.arn,\n run_command_targets=[\n {\n \"key\": \"tag:Name\",\n \"values\": [\"FooBar\"],\n },\n {\n \"key\": \"InstanceIds\",\n \"values\": [\"i-162058cd308bffec2\"],\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var console = new Aws.CloudWatch.EventRule(\"console\", new()\n {\n Name = \"capture-ec2-scaling-events\",\n Description = \"Capture all EC2 scaling events\",\n EventPattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"source\"] = new[]\n {\n \"aws.autoscaling\",\n },\n [\"detail-type\"] = new[]\n {\n \"EC2 Instance Launch Successful\",\n \"EC2 Instance Terminate Successful\",\n \"EC2 Instance Launch Unsuccessful\",\n \"EC2 Instance Terminate Unsuccessful\",\n },\n }),\n });\n\n var testStream = new Aws.Kinesis.Stream(\"test_stream\", new()\n {\n Name = \"kinesis-test\",\n ShardCount = 1,\n });\n\n var yada = new Aws.CloudWatch.EventTarget(\"yada\", new()\n {\n TargetId = \"Yada\",\n Rule = console.Name,\n Arn = testStream.Arn,\n RunCommandTargets = new[]\n {\n new Aws.CloudWatch.Inputs.EventTargetRunCommandTargetArgs\n {\n Key = \"tag:Name\",\n Values = new[]\n {\n \"FooBar\",\n },\n },\n new Aws.CloudWatch.Inputs.EventTargetRunCommandTargetArgs\n {\n Key = \"InstanceIds\",\n Values = new[]\n {\n \"i-162058cd308bffec2\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"source\": []string{\n\t\t\t\t\"aws.autoscaling\",\n\t\t\t},\n\t\t\t\"detail-type\": []string{\n\t\t\t\t\"EC2 Instance Launch Successful\",\n\t\t\t\t\"EC2 Instance Terminate Successful\",\n\t\t\t\t\"EC2 Instance Launch Unsuccessful\",\n\t\t\t\t\"EC2 Instance Terminate Unsuccessful\",\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\tconsole, err := cloudwatch.NewEventRule(ctx, \"console\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"capture-ec2-scaling-events\"),\n\t\t\tDescription: pulumi.String(\"Capture all EC2 scaling events\"),\n\t\t\tEventPattern: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestStream, err := kinesis.NewStream(ctx, \"test_stream\", \u0026kinesis.StreamArgs{\n\t\t\tName: pulumi.String(\"kinesis-test\"),\n\t\t\tShardCount: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"yada\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tTargetId: pulumi.String(\"Yada\"),\n\t\t\tRule: console.Name,\n\t\t\tArn: testStream.Arn,\n\t\t\tRunCommandTargets: cloudwatch.EventTargetRunCommandTargetArray{\n\t\t\t\t\u0026cloudwatch.EventTargetRunCommandTargetArgs{\n\t\t\t\t\tKey: pulumi.String(\"tag:Name\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"FooBar\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.EventTargetRunCommandTargetArgs{\n\t\t\t\t\tKey: pulumi.String(\"InstanceIds\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"i-162058cd308bffec2\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.kinesis.Stream;\nimport com.pulumi.aws.kinesis.StreamArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetRunCommandTargetArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var console = new EventRule(\"console\", EventRuleArgs.builder()\n .name(\"capture-ec2-scaling-events\")\n .description(\"Capture all EC2 scaling events\")\n .eventPattern(serializeJson(\n jsonObject(\n jsonProperty(\"source\", jsonArray(\"aws.autoscaling\")),\n jsonProperty(\"detail-type\", jsonArray(\n \"EC2 Instance Launch Successful\", \n \"EC2 Instance Terminate Successful\", \n \"EC2 Instance Launch Unsuccessful\", \n \"EC2 Instance Terminate Unsuccessful\"\n ))\n )))\n .build());\n\n var testStream = new Stream(\"testStream\", StreamArgs.builder()\n .name(\"kinesis-test\")\n .shardCount(1)\n .build());\n\n var yada = new EventTarget(\"yada\", EventTargetArgs.builder()\n .targetId(\"Yada\")\n .rule(console.name())\n .arn(testStream.arn())\n .runCommandTargets( \n EventTargetRunCommandTargetArgs.builder()\n .key(\"tag:Name\")\n .values(\"FooBar\")\n .build(),\n EventTargetRunCommandTargetArgs.builder()\n .key(\"InstanceIds\")\n .values(\"i-162058cd308bffec2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n yada:\n type: aws:cloudwatch:EventTarget\n properties:\n targetId: Yada\n rule: ${console.name}\n arn: ${testStream.arn}\n runCommandTargets:\n - key: tag:Name\n values:\n - FooBar\n - key: InstanceIds\n values:\n - i-162058cd308bffec2\n console:\n type: aws:cloudwatch:EventRule\n properties:\n name: capture-ec2-scaling-events\n description: Capture all EC2 scaling events\n eventPattern:\n fn::toJSON:\n source:\n - aws.autoscaling\n detail-type:\n - EC2 Instance Launch Successful\n - EC2 Instance Terminate Successful\n - EC2 Instance Launch Unsuccessful\n - EC2 Instance Terminate Unsuccessful\n testStream:\n type: aws:kinesis:Stream\n name: test_stream\n properties:\n name: kinesis-test\n shardCount: 1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SSM Document Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ssmLifecycleTrust = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n }],\n});\nconst stopInstance = new aws.ssm.Document(\"stop_instance\", {\n name: \"stop_instance\",\n documentType: \"Command\",\n content: JSON.stringify({\n schemaVersion: \"1.2\",\n description: \"Stop an instance\",\n parameters: {},\n runtimeConfig: {\n \"aws:runShellScript\": {\n properties: [{\n id: \"0.aws:runShellScript\",\n runCommand: [\"halt\"],\n }],\n },\n },\n }),\n});\nconst ssmLifecycle = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n actions: [\"ssm:SendCommand\"],\n resources: [\"arn:aws:ec2:eu-west-1:1234567890:instance/*\"],\n conditions: [{\n test: \"StringEquals\",\n variable: \"ec2:ResourceTag/Terminate\",\n values: [\"*\"],\n }],\n },\n {\n effect: \"Allow\",\n actions: [\"ssm:SendCommand\"],\n resources: [stopInstance.arn],\n },\n ],\n});\nconst ssmLifecycleRole = new aws.iam.Role(\"ssm_lifecycle\", {\n name: \"SSMLifecycle\",\n assumeRolePolicy: ssmLifecycleTrust.then(ssmLifecycleTrust =\u003e ssmLifecycleTrust.json),\n});\nconst ssmLifecyclePolicy = new aws.iam.Policy(\"ssm_lifecycle\", {\n name: \"SSMLifecycle\",\n policy: ssmLifecycle.apply(ssmLifecycle =\u003e ssmLifecycle.json),\n});\nconst ssmLifecycleRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"ssm_lifecycle\", {\n policyArn: ssmLifecyclePolicy.arn,\n role: ssmLifecycleRole.name,\n});\nconst stopInstances = new aws.cloudwatch.EventRule(\"stop_instances\", {\n name: \"StopInstance\",\n description: \"Stop instances nightly\",\n scheduleExpression: \"cron(0 0 * * ? *)\",\n});\nconst stopInstancesEventTarget = new aws.cloudwatch.EventTarget(\"stop_instances\", {\n targetId: \"StopInstance\",\n arn: stopInstance.arn,\n rule: stopInstances.name,\n roleArn: ssmLifecycleRole.arn,\n runCommandTargets: [{\n key: \"tag:Terminate\",\n values: [\"midnight\"],\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nssm_lifecycle_trust = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n}])\nstop_instance = aws.ssm.Document(\"stop_instance\",\n name=\"stop_instance\",\n document_type=\"Command\",\n content=json.dumps({\n \"schemaVersion\": \"1.2\",\n \"description\": \"Stop an instance\",\n \"parameters\": {},\n \"runtimeConfig\": {\n \"aws:runShellScript\": {\n \"properties\": [{\n \"id\": \"0.aws:runShellScript\",\n \"runCommand\": [\"halt\"],\n }],\n },\n },\n }))\nssm_lifecycle = aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\"ssm:SendCommand\"],\n \"resources\": [\"arn:aws:ec2:eu-west-1:1234567890:instance/*\"],\n \"conditions\": [{\n \"test\": \"StringEquals\",\n \"variable\": \"ec2:ResourceTag/Terminate\",\n \"values\": [\"*\"],\n }],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"ssm:SendCommand\"],\n \"resources\": [stop_instance.arn],\n },\n])\nssm_lifecycle_role = aws.iam.Role(\"ssm_lifecycle\",\n name=\"SSMLifecycle\",\n assume_role_policy=ssm_lifecycle_trust.json)\nssm_lifecycle_policy = aws.iam.Policy(\"ssm_lifecycle\",\n name=\"SSMLifecycle\",\n policy=ssm_lifecycle.json)\nssm_lifecycle_role_policy_attachment = aws.iam.RolePolicyAttachment(\"ssm_lifecycle\",\n policy_arn=ssm_lifecycle_policy.arn,\n role=ssm_lifecycle_role.name)\nstop_instances = aws.cloudwatch.EventRule(\"stop_instances\",\n name=\"StopInstance\",\n description=\"Stop instances nightly\",\n schedule_expression=\"cron(0 0 * * ? *)\")\nstop_instances_event_target = aws.cloudwatch.EventTarget(\"stop_instances\",\n target_id=\"StopInstance\",\n arn=stop_instance.arn,\n rule=stop_instances.name,\n role_arn=ssm_lifecycle_role.arn,\n run_command_targets=[{\n \"key\": \"tag:Terminate\",\n \"values\": [\"midnight\"],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ssmLifecycleTrust = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n },\n },\n },\n },\n },\n });\n\n var stopInstance = new Aws.Ssm.Document(\"stop_instance\", new()\n {\n Name = \"stop_instance\",\n DocumentType = \"Command\",\n Content = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"schemaVersion\"] = \"1.2\",\n [\"description\"] = \"Stop an instance\",\n [\"parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n [\"runtimeConfig\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:runShellScript\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"properties\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"id\"] = \"0.aws:runShellScript\",\n [\"runCommand\"] = new[]\n {\n \"halt\",\n },\n },\n },\n },\n },\n }),\n });\n\n var ssmLifecycle = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ssm:SendCommand\",\n },\n Resources = new[]\n {\n \"arn:aws:ec2:eu-west-1:1234567890:instance/*\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"ec2:ResourceTag/Terminate\",\n Values = new[]\n {\n \"*\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ssm:SendCommand\",\n },\n Resources = new[]\n {\n stopInstance.Arn,\n },\n },\n },\n });\n\n var ssmLifecycleRole = new Aws.Iam.Role(\"ssm_lifecycle\", new()\n {\n Name = \"SSMLifecycle\",\n AssumeRolePolicy = ssmLifecycleTrust.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var ssmLifecyclePolicy = new Aws.Iam.Policy(\"ssm_lifecycle\", new()\n {\n Name = \"SSMLifecycle\",\n PolicyDocument = ssmLifecycle.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var ssmLifecycleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"ssm_lifecycle\", new()\n {\n PolicyArn = ssmLifecyclePolicy.Arn,\n Role = ssmLifecycleRole.Name,\n });\n\n var stopInstances = new Aws.CloudWatch.EventRule(\"stop_instances\", new()\n {\n Name = \"StopInstance\",\n Description = \"Stop instances nightly\",\n ScheduleExpression = \"cron(0 0 * * ? *)\",\n });\n\n var stopInstancesEventTarget = new Aws.CloudWatch.EventTarget(\"stop_instances\", new()\n {\n TargetId = \"StopInstance\",\n Arn = stopInstance.Arn,\n Rule = stopInstances.Name,\n RoleArn = ssmLifecycleRole.Arn,\n RunCommandTargets = new[]\n {\n new Aws.CloudWatch.Inputs.EventTargetRunCommandTargetArgs\n {\n Key = \"tag:Terminate\",\n Values = new[]\n {\n \"midnight\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tssmLifecycleTrust, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"events.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"schemaVersion\": \"1.2\",\n\t\t\t\"description\": \"Stop an instance\",\n\t\t\t\"parameters\": nil,\n\t\t\t\"runtimeConfig\": map[string]interface{}{\n\t\t\t\t\"aws:runShellScript\": map[string]interface{}{\n\t\t\t\t\t\"properties\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"id\": \"0.aws:runShellScript\",\n\t\t\t\t\t\t\t\"runCommand\": []string{\n\t\t\t\t\t\t\t\t\"halt\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\tstopInstance, err := ssm.NewDocument(ctx, \"stop_instance\", \u0026ssm.DocumentArgs{\n\t\t\tName: pulumi.String(\"stop_instance\"),\n\t\t\tDocumentType: pulumi.String(\"Command\"),\n\t\t\tContent: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tssmLifecycle := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"ssm:SendCommand\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"arn:aws:ec2:eu-west-1:1234567890:instance/*\"),\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"StringEquals\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"ec2:ResourceTag/Terminate\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"*\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"ssm:SendCommand\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tstopInstance.Arn,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tssmLifecycleRole, err := iam.NewRole(ctx, \"ssm_lifecycle\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"SSMLifecycle\"),\n\t\t\tAssumeRolePolicy: pulumi.String(ssmLifecycleTrust.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tssmLifecyclePolicy, err := iam.NewPolicy(ctx, \"ssm_lifecycle\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"SSMLifecycle\"),\n\t\t\tPolicy: pulumi.String(ssmLifecycle.ApplyT(func(ssmLifecycle iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026ssmLifecycle.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicyAttachment(ctx, \"ssm_lifecycle\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tPolicyArn: ssmLifecyclePolicy.Arn,\n\t\t\tRole: ssmLifecycleRole.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tstopInstances, err := cloudwatch.NewEventRule(ctx, \"stop_instances\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"StopInstance\"),\n\t\t\tDescription: pulumi.String(\"Stop instances nightly\"),\n\t\t\tScheduleExpression: pulumi.String(\"cron(0 0 * * ? *)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"stop_instances\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tTargetId: pulumi.String(\"StopInstance\"),\n\t\t\tArn: stopInstance.Arn,\n\t\t\tRule: stopInstances.Name,\n\t\t\tRoleArn: ssmLifecycleRole.Arn,\n\t\t\tRunCommandTargets: cloudwatch.EventTargetRunCommandTargetArray{\n\t\t\t\t\u0026cloudwatch.EventTargetRunCommandTargetArgs{\n\t\t\t\t\tKey: pulumi.String(\"tag:Terminate\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"midnight\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.ssm.Document;\nimport com.pulumi.aws.ssm.DocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetRunCommandTargetArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var ssmLifecycleTrust = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"sts:AssumeRole\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .build())\n .build());\n\n var stopInstance = new Document(\"stopInstance\", DocumentArgs.builder()\n .name(\"stop_instance\")\n .documentType(\"Command\")\n .content(serializeJson(\n jsonObject(\n jsonProperty(\"schemaVersion\", \"1.2\"),\n jsonProperty(\"description\", \"Stop an instance\"),\n jsonProperty(\"parameters\", jsonObject(\n\n )),\n jsonProperty(\"runtimeConfig\", jsonObject(\n jsonProperty(\"aws:runShellScript\", jsonObject(\n jsonProperty(\"properties\", jsonArray(jsonObject(\n jsonProperty(\"id\", \"0.aws:runShellScript\"),\n jsonProperty(\"runCommand\", jsonArray(\"halt\"))\n )))\n ))\n ))\n )))\n .build());\n\n final var ssmLifecycle = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ssm:SendCommand\")\n .resources(\"arn:aws:ec2:eu-west-1:1234567890:instance/*\")\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"ec2:ResourceTag/Terminate\")\n .values(\"*\")\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ssm:SendCommand\")\n .resources(stopInstance.arn())\n .build())\n .build());\n\n var ssmLifecycleRole = new Role(\"ssmLifecycleRole\", RoleArgs.builder()\n .name(\"SSMLifecycle\")\n .assumeRolePolicy(ssmLifecycleTrust.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var ssmLifecyclePolicy = new Policy(\"ssmLifecyclePolicy\", PolicyArgs.builder()\n .name(\"SSMLifecycle\")\n .policy(ssmLifecycle.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(ssmLifecycle -\u003e ssmLifecycle.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var ssmLifecycleRolePolicyAttachment = new RolePolicyAttachment(\"ssmLifecycleRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .policyArn(ssmLifecyclePolicy.arn())\n .role(ssmLifecycleRole.name())\n .build());\n\n var stopInstances = new EventRule(\"stopInstances\", EventRuleArgs.builder()\n .name(\"StopInstance\")\n .description(\"Stop instances nightly\")\n .scheduleExpression(\"cron(0 0 * * ? *)\")\n .build());\n\n var stopInstancesEventTarget = new EventTarget(\"stopInstancesEventTarget\", EventTargetArgs.builder()\n .targetId(\"StopInstance\")\n .arn(stopInstance.arn())\n .rule(stopInstances.name())\n .roleArn(ssmLifecycleRole.arn())\n .runCommandTargets(EventTargetRunCommandTargetArgs.builder()\n .key(\"tag:Terminate\")\n .values(\"midnight\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ssmLifecycleRole:\n type: aws:iam:Role\n name: ssm_lifecycle\n properties:\n name: SSMLifecycle\n assumeRolePolicy: ${ssmLifecycleTrust.json}\n ssmLifecyclePolicy:\n type: aws:iam:Policy\n name: ssm_lifecycle\n properties:\n name: SSMLifecycle\n policy: ${ssmLifecycle.json}\n ssmLifecycleRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: ssm_lifecycle\n properties:\n policyArn: ${ssmLifecyclePolicy.arn}\n role: ${ssmLifecycleRole.name}\n stopInstance:\n type: aws:ssm:Document\n name: stop_instance\n properties:\n name: stop_instance\n documentType: Command\n content:\n fn::toJSON:\n schemaVersion: '1.2'\n description: Stop an instance\n parameters: {}\n runtimeConfig:\n aws:runShellScript:\n properties:\n - id: 0.aws:runShellScript\n runCommand:\n - halt\n stopInstances:\n type: aws:cloudwatch:EventRule\n name: stop_instances\n properties:\n name: StopInstance\n description: Stop instances nightly\n scheduleExpression: cron(0 0 * * ? *)\n stopInstancesEventTarget:\n type: aws:cloudwatch:EventTarget\n name: stop_instances\n properties:\n targetId: StopInstance\n arn: ${stopInstance.arn}\n rule: ${stopInstances.name}\n roleArn: ${ssmLifecycleRole.arn}\n runCommandTargets:\n - key: tag:Terminate\n values:\n - midnight\nvariables:\n ssmLifecycleTrust:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - sts:AssumeRole\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n ssmLifecycle:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - ssm:SendCommand\n resources:\n - arn:aws:ec2:eu-west-1:1234567890:instance/*\n conditions:\n - test: StringEquals\n variable: ec2:ResourceTag/Terminate\n values:\n - '*'\n - effect: Allow\n actions:\n - ssm:SendCommand\n resources:\n - ${stopInstance.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### RunCommand Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst stopInstances = new aws.cloudwatch.EventRule(\"stop_instances\", {\n name: \"StopInstance\",\n description: \"Stop instances nightly\",\n scheduleExpression: \"cron(0 0 * * ? *)\",\n});\nconst stopInstancesEventTarget = new aws.cloudwatch.EventTarget(\"stop_instances\", {\n targetId: \"StopInstance\",\n arn: `arn:aws:ssm:${awsRegion}::document/AWS-RunShellScript`,\n input: \"{\\\"commands\\\":[\\\"halt\\\"]}\",\n rule: stopInstances.name,\n roleArn: ssmLifecycle.arn,\n runCommandTargets: [{\n key: \"tag:Terminate\",\n values: [\"midnight\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nstop_instances = aws.cloudwatch.EventRule(\"stop_instances\",\n name=\"StopInstance\",\n description=\"Stop instances nightly\",\n schedule_expression=\"cron(0 0 * * ? *)\")\nstop_instances_event_target = aws.cloudwatch.EventTarget(\"stop_instances\",\n target_id=\"StopInstance\",\n arn=f\"arn:aws:ssm:{aws_region}::document/AWS-RunShellScript\",\n input=\"{\\\"commands\\\":[\\\"halt\\\"]}\",\n rule=stop_instances.name,\n role_arn=ssm_lifecycle[\"arn\"],\n run_command_targets=[{\n \"key\": \"tag:Terminate\",\n \"values\": [\"midnight\"],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var stopInstances = new Aws.CloudWatch.EventRule(\"stop_instances\", new()\n {\n Name = \"StopInstance\",\n Description = \"Stop instances nightly\",\n ScheduleExpression = \"cron(0 0 * * ? *)\",\n });\n\n var stopInstancesEventTarget = new Aws.CloudWatch.EventTarget(\"stop_instances\", new()\n {\n TargetId = \"StopInstance\",\n Arn = $\"arn:aws:ssm:{awsRegion}::document/AWS-RunShellScript\",\n Input = \"{\\\"commands\\\":[\\\"halt\\\"]}\",\n Rule = stopInstances.Name,\n RoleArn = ssmLifecycle.Arn,\n RunCommandTargets = new[]\n {\n new Aws.CloudWatch.Inputs.EventTargetRunCommandTargetArgs\n {\n Key = \"tag:Terminate\",\n Values = new[]\n {\n \"midnight\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tstopInstances, err := cloudwatch.NewEventRule(ctx, \"stop_instances\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"StopInstance\"),\n\t\t\tDescription: pulumi.String(\"Stop instances nightly\"),\n\t\t\tScheduleExpression: pulumi.String(\"cron(0 0 * * ? *)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"stop_instances\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tTargetId: pulumi.String(\"StopInstance\"),\n\t\t\tArn: pulumi.Sprintf(\"arn:aws:ssm:%v::document/AWS-RunShellScript\", awsRegion),\n\t\t\tInput: pulumi.String(\"{\\\"commands\\\":[\\\"halt\\\"]}\"),\n\t\t\tRule: stopInstances.Name,\n\t\t\tRoleArn: pulumi.Any(ssmLifecycle.Arn),\n\t\t\tRunCommandTargets: cloudwatch.EventTargetRunCommandTargetArray{\n\t\t\t\t\u0026cloudwatch.EventTargetRunCommandTargetArgs{\n\t\t\t\t\tKey: pulumi.String(\"tag:Terminate\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"midnight\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetRunCommandTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var stopInstances = new EventRule(\"stopInstances\", EventRuleArgs.builder()\n .name(\"StopInstance\")\n .description(\"Stop instances nightly\")\n .scheduleExpression(\"cron(0 0 * * ? *)\")\n .build());\n\n var stopInstancesEventTarget = new EventTarget(\"stopInstancesEventTarget\", EventTargetArgs.builder()\n .targetId(\"StopInstance\")\n .arn(String.format(\"arn:aws:ssm:%s::document/AWS-RunShellScript\", awsRegion))\n .input(\"{\\\"commands\\\":[\\\"halt\\\"]}\")\n .rule(stopInstances.name())\n .roleArn(ssmLifecycle.arn())\n .runCommandTargets(EventTargetRunCommandTargetArgs.builder()\n .key(\"tag:Terminate\")\n .values(\"midnight\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n stopInstances:\n type: aws:cloudwatch:EventRule\n name: stop_instances\n properties:\n name: StopInstance\n description: Stop instances nightly\n scheduleExpression: cron(0 0 * * ? *)\n stopInstancesEventTarget:\n type: aws:cloudwatch:EventTarget\n name: stop_instances\n properties:\n targetId: StopInstance\n arn: arn:aws:ssm:${awsRegion}::document/AWS-RunShellScript\n input: '{\"commands\":[\"halt\"]}'\n rule: ${stopInstances.name}\n roleArn: ${ssmLifecycle.arn}\n runCommandTargets:\n - key: tag:Terminate\n values:\n - midnight\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### ECS Run Task with Role and Task Override Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst ecsEvents = new aws.iam.Role(\"ecs_events\", {\n name: \"ecs_events\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst ecsEventsRunTaskWithAnyRole = std.replace({\n text: taskName.arn,\n search: \"/:\\\\d+$/\",\n replace: \":*\",\n}).then(invoke =\u003e aws.iam.getPolicyDocument({\n statements: [\n {\n effect: \"Allow\",\n actions: [\"iam:PassRole\"],\n resources: [\"*\"],\n },\n {\n effect: \"Allow\",\n actions: [\"ecs:RunTask\"],\n resources: [invoke.result],\n },\n ],\n}));\nconst ecsEventsRunTaskWithAnyRoleRolePolicy = new aws.iam.RolePolicy(\"ecs_events_run_task_with_any_role\", {\n name: \"ecs_events_run_task_with_any_role\",\n role: ecsEvents.id,\n policy: ecsEventsRunTaskWithAnyRole.then(ecsEventsRunTaskWithAnyRole =\u003e ecsEventsRunTaskWithAnyRole.json),\n});\nconst ecsScheduledTask = new aws.cloudwatch.EventTarget(\"ecs_scheduled_task\", {\n targetId: \"run-scheduled-task-every-hour\",\n arn: clusterName.arn,\n rule: everyHour.name,\n roleArn: ecsEvents.arn,\n ecsTarget: {\n taskCount: 1,\n taskDefinitionArn: taskName.arn,\n },\n input: JSON.stringify({\n containerOverrides: [{\n name: \"name-of-container-to-override\",\n command: [\n \"bin/console\",\n \"scheduled-task\",\n ],\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\necs_events = aws.iam.Role(\"ecs_events\",\n name=\"ecs_events\",\n assume_role_policy=assume_role.json)\necs_events_run_task_with_any_role = aws.iam.get_policy_document(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\"iam:PassRole\"],\n \"resources\": [\"*\"],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"ecs:RunTask\"],\n \"resources\": [std.replace(text=task_name[\"arn\"],\n search=\"/:\\\\d+$/\",\n replace=\":*\").result],\n },\n])\necs_events_run_task_with_any_role_role_policy = aws.iam.RolePolicy(\"ecs_events_run_task_with_any_role\",\n name=\"ecs_events_run_task_with_any_role\",\n role=ecs_events.id,\n policy=ecs_events_run_task_with_any_role.json)\necs_scheduled_task = aws.cloudwatch.EventTarget(\"ecs_scheduled_task\",\n target_id=\"run-scheduled-task-every-hour\",\n arn=cluster_name[\"arn\"],\n rule=every_hour[\"name\"],\n role_arn=ecs_events.arn,\n ecs_target={\n \"task_count\": 1,\n \"task_definition_arn\": task_name[\"arn\"],\n },\n input=json.dumps({\n \"containerOverrides\": [{\n \"name\": \"name-of-container-to-override\",\n \"command\": [\n \"bin/console\",\n \"scheduled-task\",\n ],\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var ecsEvents = new Aws.Iam.Role(\"ecs_events\", new()\n {\n Name = \"ecs_events\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var ecsEventsRunTaskWithAnyRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"iam:PassRole\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ecs:RunTask\",\n },\n Resources = new[]\n {\n Std.Replace.Invoke(new()\n {\n Text = taskName.Arn,\n Search = \"/:\\\\d+$/\",\n Replace = \":*\",\n }).Result,\n },\n },\n },\n });\n\n var ecsEventsRunTaskWithAnyRoleRolePolicy = new Aws.Iam.RolePolicy(\"ecs_events_run_task_with_any_role\", new()\n {\n Name = \"ecs_events_run_task_with_any_role\",\n Role = ecsEvents.Id,\n Policy = ecsEventsRunTaskWithAnyRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var ecsScheduledTask = new Aws.CloudWatch.EventTarget(\"ecs_scheduled_task\", new()\n {\n TargetId = \"run-scheduled-task-every-hour\",\n Arn = clusterName.Arn,\n Rule = everyHour.Name,\n RoleArn = ecsEvents.Arn,\n EcsTarget = new Aws.CloudWatch.Inputs.EventTargetEcsTargetArgs\n {\n TaskCount = 1,\n TaskDefinitionArn = taskName.Arn,\n },\n Input = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"containerOverrides\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"name-of-container-to-override\",\n [\"command\"] = new[]\n {\n \"bin/console\",\n \"scheduled-task\",\n },\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: pulumi.StringRef(\"Allow\"),\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"Service\",\nIdentifiers: []string{\n\"events.amazonaws.com\",\n},\n},\n},\nActions: []string{\n\"sts:AssumeRole\",\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\necsEvents, err := iam.NewRole(ctx, \"ecs_events\", \u0026iam.RoleArgs{\nName: pulumi.String(\"ecs_events\"),\nAssumeRolePolicy: pulumi.String(assumeRole.Json),\n})\nif err != nil {\nreturn err\n}\necsEventsRunTaskWithAnyRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: pulumi.StringRef(\"Allow\"),\nActions: []string{\n\"iam:PassRole\",\n},\nResources: []string{\n\"*\",\n},\n},\n{\nEffect: pulumi.StringRef(\"Allow\"),\nActions: []string{\n\"ecs:RunTask\",\n},\nResources: interface{}{\nstd.Replace(ctx, {\nText: taskName.Arn,\nSearch: \"/:\\\\d+$/\",\nReplace: \":*\",\n}, nil).Result,\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\n_, err = iam.NewRolePolicy(ctx, \"ecs_events_run_task_with_any_role\", \u0026iam.RolePolicyArgs{\nName: pulumi.String(\"ecs_events_run_task_with_any_role\"),\nRole: ecsEvents.ID(),\nPolicy: pulumi.String(ecsEventsRunTaskWithAnyRole.Json),\n})\nif err != nil {\nreturn err\n}\ntmpJSON0, err := json.Marshal(map[string]interface{}{\n\"containerOverrides\": []map[string]interface{}{\nmap[string]interface{}{\n\"name\": \"name-of-container-to-override\",\n\"command\": []string{\n\"bin/console\",\n\"scheduled-task\",\n},\n},\n},\n})\nif err != nil {\nreturn err\n}\njson0 := string(tmpJSON0)\n_, err = cloudwatch.NewEventTarget(ctx, \"ecs_scheduled_task\", \u0026cloudwatch.EventTargetArgs{\nTargetId: pulumi.String(\"run-scheduled-task-every-hour\"),\nArn: pulumi.Any(clusterName.Arn),\nRule: pulumi.Any(everyHour.Name),\nRoleArn: ecsEvents.Arn,\nEcsTarget: \u0026cloudwatch.EventTargetEcsTargetArgs{\nTaskCount: pulumi.Int(1),\nTaskDefinitionArn: pulumi.Any(taskName.Arn),\n},\nInput: pulumi.String(json0),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetEcsTargetArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var ecsEvents = new Role(\"ecsEvents\", RoleArgs.builder()\n .name(\"ecs_events\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var ecsEventsRunTaskWithAnyRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"iam:PassRole\")\n .resources(\"*\")\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ecs:RunTask\")\n .resources(StdFunctions.replace(ReplaceArgs.builder()\n .text(taskName.arn())\n .search(\"/:\\\\d+$/\")\n .replace(\":*\")\n .build()).result())\n .build())\n .build());\n\n var ecsEventsRunTaskWithAnyRoleRolePolicy = new RolePolicy(\"ecsEventsRunTaskWithAnyRoleRolePolicy\", RolePolicyArgs.builder()\n .name(\"ecs_events_run_task_with_any_role\")\n .role(ecsEvents.id())\n .policy(ecsEventsRunTaskWithAnyRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var ecsScheduledTask = new EventTarget(\"ecsScheduledTask\", EventTargetArgs.builder()\n .targetId(\"run-scheduled-task-every-hour\")\n .arn(clusterName.arn())\n .rule(everyHour.name())\n .roleArn(ecsEvents.arn())\n .ecsTarget(EventTargetEcsTargetArgs.builder()\n .taskCount(1)\n .taskDefinitionArn(taskName.arn())\n .build())\n .input(serializeJson(\n jsonObject(\n jsonProperty(\"containerOverrides\", jsonArray(jsonObject(\n jsonProperty(\"name\", \"name-of-container-to-override\"),\n jsonProperty(\"command\", jsonArray(\n \"bin/console\", \n \"scheduled-task\"\n ))\n )))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ecsEvents:\n type: aws:iam:Role\n name: ecs_events\n properties:\n name: ecs_events\n assumeRolePolicy: ${assumeRole.json}\n ecsEventsRunTaskWithAnyRoleRolePolicy:\n type: aws:iam:RolePolicy\n name: ecs_events_run_task_with_any_role\n properties:\n name: ecs_events_run_task_with_any_role\n role: ${ecsEvents.id}\n policy: ${ecsEventsRunTaskWithAnyRole.json}\n ecsScheduledTask:\n type: aws:cloudwatch:EventTarget\n name: ecs_scheduled_task\n properties:\n targetId: run-scheduled-task-every-hour\n arn: ${clusterName.arn}\n rule: ${everyHour.name}\n roleArn: ${ecsEvents.arn}\n ecsTarget:\n taskCount: 1\n taskDefinitionArn: ${taskName.arn}\n input:\n fn::toJSON:\n containerOverrides:\n - name: name-of-container-to-override\n command:\n - bin/console\n - scheduled-task\nvariables:\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n actions:\n - sts:AssumeRole\n ecsEventsRunTaskWithAnyRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - iam:PassRole\n resources:\n - '*'\n - effect: Allow\n actions:\n - ecs:RunTask\n resources:\n - fn::invoke:\n Function: std:replace\n Arguments:\n text: ${taskName.arn}\n search: /:\\d+$/\n replace: :*\n Return: result\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### API Gateway target\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleEventRule = new aws.cloudwatch.EventRule(\"example\", {});\nconst exampleDeployment = new aws.apigateway.Deployment(\"example\", {restApi: exampleAwsApiGatewayRestApi.id});\nconst exampleStage = new aws.apigateway.Stage(\"example\", {\n restApi: exampleAwsApiGatewayRestApi.id,\n deployment: exampleDeployment.id,\n});\nconst example = new aws.cloudwatch.EventTarget(\"example\", {\n arn: pulumi.interpolate`${exampleStage.executionArn}/GET`,\n rule: exampleEventRule.id,\n httpTarget: {\n queryStringParameters: {\n Body: \"$.detail.body\",\n },\n headerParameters: {\n Env: \"Test\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_event_rule = aws.cloudwatch.EventRule(\"example\")\nexample_deployment = aws.apigateway.Deployment(\"example\", rest_api=example_aws_api_gateway_rest_api[\"id\"])\nexample_stage = aws.apigateway.Stage(\"example\",\n rest_api=example_aws_api_gateway_rest_api[\"id\"],\n deployment=example_deployment.id)\nexample = aws.cloudwatch.EventTarget(\"example\",\n arn=example_stage.execution_arn.apply(lambda execution_arn: f\"{execution_arn}/GET\"),\n rule=example_event_rule.id,\n http_target={\n \"query_string_parameters\": {\n \"body\": \"$.detail.body\",\n },\n \"header_parameters\": {\n \"env\": \"Test\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleEventRule = new Aws.CloudWatch.EventRule(\"example\");\n\n var exampleDeployment = new Aws.ApiGateway.Deployment(\"example\", new()\n {\n RestApi = exampleAwsApiGatewayRestApi.Id,\n });\n\n var exampleStage = new Aws.ApiGateway.Stage(\"example\", new()\n {\n RestApi = exampleAwsApiGatewayRestApi.Id,\n Deployment = exampleDeployment.Id,\n });\n\n var example = new Aws.CloudWatch.EventTarget(\"example\", new()\n {\n Arn = exampleStage.ExecutionArn.Apply(executionArn =\u003e $\"{executionArn}/GET\"),\n Rule = exampleEventRule.Id,\n HttpTarget = new Aws.CloudWatch.Inputs.EventTargetHttpTargetArgs\n {\n QueryStringParameters = \n {\n { \"Body\", \"$.detail.body\" },\n },\n HeaderParameters = \n {\n { \"Env\", \"Test\" },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleEventRule, err := cloudwatch.NewEventRule(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleDeployment, err := apigateway.NewDeployment(ctx, \"example\", \u0026apigateway.DeploymentArgs{\n\t\t\tRestApi: pulumi.Any(exampleAwsApiGatewayRestApi.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleStage, err := apigateway.NewStage(ctx, \"example\", \u0026apigateway.StageArgs{\n\t\t\tRestApi: pulumi.Any(exampleAwsApiGatewayRestApi.Id),\n\t\t\tDeployment: exampleDeployment.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"example\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: exampleStage.ExecutionArn.ApplyT(func(executionArn string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"%v/GET\", executionArn), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t\tRule: exampleEventRule.ID(),\n\t\t\tHttpTarget: \u0026cloudwatch.EventTargetHttpTargetArgs{\n\t\t\t\tQueryStringParameters: pulumi.StringMap{\n\t\t\t\t\t\"Body\": pulumi.String(\"$.detail.body\"),\n\t\t\t\t},\n\t\t\t\tHeaderParameters: pulumi.StringMap{\n\t\t\t\t\t\"Env\": pulumi.String(\"Test\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.apigateway.Deployment;\nimport com.pulumi.aws.apigateway.DeploymentArgs;\nimport com.pulumi.aws.apigateway.Stage;\nimport com.pulumi.aws.apigateway.StageArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetHttpTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleEventRule = new EventRule(\"exampleEventRule\");\n\n var exampleDeployment = new Deployment(\"exampleDeployment\", DeploymentArgs.builder()\n .restApi(exampleAwsApiGatewayRestApi.id())\n .build());\n\n var exampleStage = new Stage(\"exampleStage\", StageArgs.builder()\n .restApi(exampleAwsApiGatewayRestApi.id())\n .deployment(exampleDeployment.id())\n .build());\n\n var example = new EventTarget(\"example\", EventTargetArgs.builder()\n .arn(exampleStage.executionArn().applyValue(executionArn -\u003e String.format(\"%s/GET\", executionArn)))\n .rule(exampleEventRule.id())\n .httpTarget(EventTargetHttpTargetArgs.builder()\n .queryStringParameters(Map.of(\"Body\", \"$.detail.body\"))\n .headerParameters(Map.of(\"Env\", \"Test\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:EventTarget\n properties:\n arn: ${exampleStage.executionArn}/GET\n rule: ${exampleEventRule.id}\n httpTarget:\n queryStringParameters:\n Body: $.detail.body\n headerParameters:\n Env: Test\n exampleEventRule:\n type: aws:cloudwatch:EventRule\n name: example\n exampleDeployment:\n type: aws:apigateway:Deployment\n name: example\n properties:\n restApi: ${exampleAwsApiGatewayRestApi.id}\n exampleStage:\n type: aws:apigateway:Stage\n name: example\n properties:\n restApi: ${exampleAwsApiGatewayRestApi.id}\n deployment: ${exampleDeployment.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Cross-Account Event Bus target\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst eventBusInvokeRemoteEventBusRole = new aws.iam.Role(\"event_bus_invoke_remote_event_bus\", {\n name: \"event-bus-invoke-remote-event-bus\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst eventBusInvokeRemoteEventBus = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n actions: [\"events:PutEvents\"],\n resources: [\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\"],\n }],\n});\nconst eventBusInvokeRemoteEventBusPolicy = new aws.iam.Policy(\"event_bus_invoke_remote_event_bus\", {\n name: \"event_bus_invoke_remote_event_bus\",\n policy: eventBusInvokeRemoteEventBus.then(eventBusInvokeRemoteEventBus =\u003e eventBusInvokeRemoteEventBus.json),\n});\nconst eventBusInvokeRemoteEventBusRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"event_bus_invoke_remote_event_bus\", {\n role: eventBusInvokeRemoteEventBusRole.name,\n policyArn: eventBusInvokeRemoteEventBusPolicy.arn,\n});\nconst stopInstances = new aws.cloudwatch.EventRule(\"stop_instances\", {\n name: \"StopInstance\",\n description: \"Stop instances nightly\",\n scheduleExpression: \"cron(0 0 * * ? *)\",\n});\nconst stopInstancesEventTarget = new aws.cloudwatch.EventTarget(\"stop_instances\", {\n targetId: \"StopInstance\",\n arn: \"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n rule: stopInstances.name,\n roleArn: eventBusInvokeRemoteEventBusRole.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\nevent_bus_invoke_remote_event_bus_role = aws.iam.Role(\"event_bus_invoke_remote_event_bus\",\n name=\"event-bus-invoke-remote-event-bus\",\n assume_role_policy=assume_role.json)\nevent_bus_invoke_remote_event_bus = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"actions\": [\"events:PutEvents\"],\n \"resources\": [\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\"],\n}])\nevent_bus_invoke_remote_event_bus_policy = aws.iam.Policy(\"event_bus_invoke_remote_event_bus\",\n name=\"event_bus_invoke_remote_event_bus\",\n policy=event_bus_invoke_remote_event_bus.json)\nevent_bus_invoke_remote_event_bus_role_policy_attachment = aws.iam.RolePolicyAttachment(\"event_bus_invoke_remote_event_bus\",\n role=event_bus_invoke_remote_event_bus_role.name,\n policy_arn=event_bus_invoke_remote_event_bus_policy.arn)\nstop_instances = aws.cloudwatch.EventRule(\"stop_instances\",\n name=\"StopInstance\",\n description=\"Stop instances nightly\",\n schedule_expression=\"cron(0 0 * * ? *)\")\nstop_instances_event_target = aws.cloudwatch.EventTarget(\"stop_instances\",\n target_id=\"StopInstance\",\n arn=\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n rule=stop_instances.name,\n role_arn=event_bus_invoke_remote_event_bus_role.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var eventBusInvokeRemoteEventBusRole = new Aws.Iam.Role(\"event_bus_invoke_remote_event_bus\", new()\n {\n Name = \"event-bus-invoke-remote-event-bus\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var eventBusInvokeRemoteEventBus = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"events:PutEvents\",\n },\n Resources = new[]\n {\n \"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n },\n },\n },\n });\n\n var eventBusInvokeRemoteEventBusPolicy = new Aws.Iam.Policy(\"event_bus_invoke_remote_event_bus\", new()\n {\n Name = \"event_bus_invoke_remote_event_bus\",\n PolicyDocument = eventBusInvokeRemoteEventBus.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var eventBusInvokeRemoteEventBusRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"event_bus_invoke_remote_event_bus\", new()\n {\n Role = eventBusInvokeRemoteEventBusRole.Name,\n PolicyArn = eventBusInvokeRemoteEventBusPolicy.Arn,\n });\n\n var stopInstances = new Aws.CloudWatch.EventRule(\"stop_instances\", new()\n {\n Name = \"StopInstance\",\n Description = \"Stop instances nightly\",\n ScheduleExpression = \"cron(0 0 * * ? *)\",\n });\n\n var stopInstancesEventTarget = new Aws.CloudWatch.EventTarget(\"stop_instances\", new()\n {\n TargetId = \"StopInstance\",\n Arn = \"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n Rule = stopInstances.Name,\n RoleArn = eventBusInvokeRemoteEventBusRole.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"events.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\teventBusInvokeRemoteEventBusRole, err := iam.NewRole(ctx, \"event_bus_invoke_remote_event_bus\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"event-bus-invoke-remote-event-bus\"),\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\teventBusInvokeRemoteEventBus, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"events:PutEvents\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\teventBusInvokeRemoteEventBusPolicy, err := iam.NewPolicy(ctx, \"event_bus_invoke_remote_event_bus\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"event_bus_invoke_remote_event_bus\"),\n\t\t\tPolicy: pulumi.String(eventBusInvokeRemoteEventBus.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicyAttachment(ctx, \"event_bus_invoke_remote_event_bus\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tRole: eventBusInvokeRemoteEventBusRole.Name,\n\t\t\tPolicyArn: eventBusInvokeRemoteEventBusPolicy.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tstopInstances, err := cloudwatch.NewEventRule(ctx, \"stop_instances\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"StopInstance\"),\n\t\t\tDescription: pulumi.String(\"Stop instances nightly\"),\n\t\t\tScheduleExpression: pulumi.String(\"cron(0 0 * * ? *)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"stop_instances\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tTargetId: pulumi.String(\"StopInstance\"),\n\t\t\tArn: pulumi.String(\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\"),\n\t\t\tRule: stopInstances.Name,\n\t\t\tRoleArn: eventBusInvokeRemoteEventBusRole.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var eventBusInvokeRemoteEventBusRole = new Role(\"eventBusInvokeRemoteEventBusRole\", RoleArgs.builder()\n .name(\"event-bus-invoke-remote-event-bus\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var eventBusInvokeRemoteEventBus = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"events:PutEvents\")\n .resources(\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\")\n .build())\n .build());\n\n var eventBusInvokeRemoteEventBusPolicy = new Policy(\"eventBusInvokeRemoteEventBusPolicy\", PolicyArgs.builder()\n .name(\"event_bus_invoke_remote_event_bus\")\n .policy(eventBusInvokeRemoteEventBus.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var eventBusInvokeRemoteEventBusRolePolicyAttachment = new RolePolicyAttachment(\"eventBusInvokeRemoteEventBusRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .role(eventBusInvokeRemoteEventBusRole.name())\n .policyArn(eventBusInvokeRemoteEventBusPolicy.arn())\n .build());\n\n var stopInstances = new EventRule(\"stopInstances\", EventRuleArgs.builder()\n .name(\"StopInstance\")\n .description(\"Stop instances nightly\")\n .scheduleExpression(\"cron(0 0 * * ? *)\")\n .build());\n\n var stopInstancesEventTarget = new EventTarget(\"stopInstancesEventTarget\", EventTargetArgs.builder()\n .targetId(\"StopInstance\")\n .arn(\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\")\n .rule(stopInstances.name())\n .roleArn(eventBusInvokeRemoteEventBusRole.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n eventBusInvokeRemoteEventBusRole:\n type: aws:iam:Role\n name: event_bus_invoke_remote_event_bus\n properties:\n name: event-bus-invoke-remote-event-bus\n assumeRolePolicy: ${assumeRole.json}\n eventBusInvokeRemoteEventBusPolicy:\n type: aws:iam:Policy\n name: event_bus_invoke_remote_event_bus\n properties:\n name: event_bus_invoke_remote_event_bus\n policy: ${eventBusInvokeRemoteEventBus.json}\n eventBusInvokeRemoteEventBusRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: event_bus_invoke_remote_event_bus\n properties:\n role: ${eventBusInvokeRemoteEventBusRole.name}\n policyArn: ${eventBusInvokeRemoteEventBusPolicy.arn}\n stopInstances:\n type: aws:cloudwatch:EventRule\n name: stop_instances\n properties:\n name: StopInstance\n description: Stop instances nightly\n scheduleExpression: cron(0 0 * * ? *)\n stopInstancesEventTarget:\n type: aws:cloudwatch:EventTarget\n name: stop_instances\n properties:\n targetId: StopInstance\n arn: arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\n rule: ${stopInstances.name}\n roleArn: ${eventBusInvokeRemoteEventBusRole.arn}\nvariables:\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n actions:\n - sts:AssumeRole\n eventBusInvokeRemoteEventBus:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - events:PutEvents\n resources:\n - arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Input Transformer Usage - JSON Object\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleEventRule = new aws.cloudwatch.EventRule(\"example\", {});\nconst example = new aws.cloudwatch.EventTarget(\"example\", {\n arn: exampleAwsLambdaFunction.arn,\n rule: exampleEventRule.id,\n inputTransformer: {\n inputPaths: {\n instance: \"$.detail.instance\",\n status: \"$.detail.status\",\n },\n inputTemplate: `{\n \"instance_id\": \u003cinstance\u003e,\n \"instance_status\": \u003cstatus\u003e\n}\n`,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_event_rule = aws.cloudwatch.EventRule(\"example\")\nexample = aws.cloudwatch.EventTarget(\"example\",\n arn=example_aws_lambda_function[\"arn\"],\n rule=example_event_rule.id,\n input_transformer={\n \"input_paths\": {\n \"instance\": \"$.detail.instance\",\n \"status\": \"$.detail.status\",\n },\n \"input_template\": \"\"\"{\n \"instance_id\": \u003cinstance\u003e,\n \"instance_status\": \u003cstatus\u003e\n}\n\"\"\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleEventRule = new Aws.CloudWatch.EventRule(\"example\");\n\n var example = new Aws.CloudWatch.EventTarget(\"example\", new()\n {\n Arn = exampleAwsLambdaFunction.Arn,\n Rule = exampleEventRule.Id,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"instance\", \"$.detail.instance\" },\n { \"status\", \"$.detail.status\" },\n },\n InputTemplate = @\"{\n \"\"instance_id\"\": \u003cinstance\u003e,\n \"\"instance_status\"\": \u003cstatus\u003e\n}\n\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleEventRule, err := cloudwatch.NewEventRule(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"example\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tRule: exampleEventRule.ID(),\n\t\t\tInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\n\t\t\t\tInputPaths: pulumi.StringMap{\n\t\t\t\t\t\"instance\": pulumi.String(\"$.detail.instance\"),\n\t\t\t\t\t\"status\": pulumi.String(\"$.detail.status\"),\n\t\t\t\t},\n\t\t\t\tInputTemplate: pulumi.String(\"{\\n \\\"instance_id\\\": \u003cinstance\u003e,\\n \\\"instance_status\\\": \u003cstatus\u003e\\n}\\n\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleEventRule = new EventRule(\"exampleEventRule\");\n\n var example = new EventTarget(\"example\", EventTargetArgs.builder()\n .arn(exampleAwsLambdaFunction.arn())\n .rule(exampleEventRule.id())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.ofEntries(\n Map.entry(\"instance\", \"$.detail.instance\"),\n Map.entry(\"status\", \"$.detail.status\")\n ))\n .inputTemplate(\"\"\"\n{\n \"instance_id\": \u003cinstance\u003e,\n \"instance_status\": \u003cstatus\u003e\n}\n \"\"\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:EventTarget\n properties:\n arn: ${exampleAwsLambdaFunction.arn}\n rule: ${exampleEventRule.id}\n inputTransformer:\n inputPaths:\n instance: $.detail.instance\n status: $.detail.status\n inputTemplate: |\n {\n \"instance_id\": \u003cinstance\u003e,\n \"instance_status\": \u003cstatus\u003e\n }\n exampleEventRule:\n type: aws:cloudwatch:EventRule\n name: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Input Transformer Usage - Simple String\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleEventRule = new aws.cloudwatch.EventRule(\"example\", {});\nconst example = new aws.cloudwatch.EventTarget(\"example\", {\n arn: exampleAwsLambdaFunction.arn,\n rule: exampleEventRule.id,\n inputTransformer: {\n inputPaths: {\n instance: \"$.detail.instance\",\n status: \"$.detail.status\",\n },\n inputTemplate: \"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_event_rule = aws.cloudwatch.EventRule(\"example\")\nexample = aws.cloudwatch.EventTarget(\"example\",\n arn=example_aws_lambda_function[\"arn\"],\n rule=example_event_rule.id,\n input_transformer={\n \"input_paths\": {\n \"instance\": \"$.detail.instance\",\n \"status\": \"$.detail.status\",\n },\n \"input_template\": \"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleEventRule = new Aws.CloudWatch.EventRule(\"example\");\n\n var example = new Aws.CloudWatch.EventTarget(\"example\", new()\n {\n Arn = exampleAwsLambdaFunction.Arn,\n Rule = exampleEventRule.Id,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"instance\", \"$.detail.instance\" },\n { \"status\", \"$.detail.status\" },\n },\n InputTemplate = \"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleEventRule, err := cloudwatch.NewEventRule(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"example\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tRule: exampleEventRule.ID(),\n\t\t\tInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\n\t\t\t\tInputPaths: pulumi.StringMap{\n\t\t\t\t\t\"instance\": pulumi.String(\"$.detail.instance\"),\n\t\t\t\t\t\"status\": pulumi.String(\"$.detail.status\"),\n\t\t\t\t},\n\t\t\t\tInputTemplate: pulumi.String(\"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleEventRule = new EventRule(\"exampleEventRule\");\n\n var example = new EventTarget(\"example\", EventTargetArgs.builder()\n .arn(exampleAwsLambdaFunction.arn())\n .rule(exampleEventRule.id())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.ofEntries(\n Map.entry(\"instance\", \"$.detail.instance\"),\n Map.entry(\"status\", \"$.detail.status\")\n ))\n .inputTemplate(\"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:EventTarget\n properties:\n arn: ${exampleAwsLambdaFunction.arn}\n rule: ${exampleEventRule.id}\n inputTransformer:\n inputPaths:\n instance: $.detail.instance\n status: $.detail.status\n inputTemplate: '\"\u003cinstance\u003e is in state \u003cstatus\u003e\"'\n exampleEventRule:\n type: aws:cloudwatch:EventRule\n name: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Cloudwatch Log Group Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudwatch.LogGroup(\"example\", {\n name: \"/aws/events/guardduty/logs\",\n retentionInDays: 1,\n});\nconst exampleEventRule = new aws.cloudwatch.EventRule(\"example\", {\n name: \"guard-duty_event_rule\",\n description: \"GuardDuty Findings\",\n eventPattern: JSON.stringify({\n source: [\"aws.guardduty\"],\n }),\n tags: {\n Environment: \"example\",\n },\n});\nconst exampleLogPolicy = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n actions: [\"logs:CreateLogStream\"],\n resources: [pulumi.interpolate`${example.arn}:*`],\n principals: [{\n type: \"Service\",\n identifiers: [\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n ],\n }],\n },\n {\n effect: \"Allow\",\n actions: [\"logs:PutLogEvents\"],\n resources: [pulumi.interpolate`${example.arn}:*:*`],\n principals: [{\n type: \"Service\",\n identifiers: [\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n ],\n }],\n conditions: [{\n test: \"ArnEquals\",\n values: [exampleEventRule.arn],\n variable: \"aws:SourceArn\",\n }],\n },\n ],\n});\nconst exampleLogResourcePolicy = new aws.cloudwatch.LogResourcePolicy(\"example\", {\n policyDocument: exampleLogPolicy.apply(exampleLogPolicy =\u003e exampleLogPolicy.json),\n policyName: \"guardduty-log-publishing-policy\",\n});\nconst exampleEventTarget = new aws.cloudwatch.EventTarget(\"example\", {\n rule: exampleEventRule.name,\n arn: example.arn,\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\",\n name=\"/aws/events/guardduty/logs\",\n retention_in_days=1)\nexample_event_rule = aws.cloudwatch.EventRule(\"example\",\n name=\"guard-duty_event_rule\",\n description=\"GuardDuty Findings\",\n event_pattern=json.dumps({\n \"source\": [\"aws.guardduty\"],\n }),\n tags={\n \"Environment\": \"example\",\n })\nexample_log_policy = aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\"logs:CreateLogStream\"],\n \"resources\": [example.arn.apply(lambda arn: f\"{arn}:*\")],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n ],\n }],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"logs:PutLogEvents\"],\n \"resources\": [example.arn.apply(lambda arn: f\"{arn}:*:*\")],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n ],\n }],\n \"conditions\": [{\n \"test\": \"ArnEquals\",\n \"values\": [example_event_rule.arn],\n \"variable\": \"aws:SourceArn\",\n }],\n },\n])\nexample_log_resource_policy = aws.cloudwatch.LogResourcePolicy(\"example\",\n policy_document=example_log_policy.json,\n policy_name=\"guardduty-log-publishing-policy\")\nexample_event_target = aws.cloudwatch.EventTarget(\"example\",\n rule=example_event_rule.name,\n arn=example.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"/aws/events/guardduty/logs\",\n RetentionInDays = 1,\n });\n\n var exampleEventRule = new Aws.CloudWatch.EventRule(\"example\", new()\n {\n Name = \"guard-duty_event_rule\",\n Description = \"GuardDuty Findings\",\n EventPattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"source\"] = new[]\n {\n \"aws.guardduty\",\n },\n }),\n Tags = \n {\n { \"Environment\", \"example\" },\n },\n });\n\n var exampleLogPolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"logs:CreateLogStream\",\n },\n Resources = new[]\n {\n $\"{example.Arn}:*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"logs:PutLogEvents\",\n },\n Resources = new[]\n {\n $\"{example.Arn}:*:*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n },\n },\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"ArnEquals\",\n Values = new[]\n {\n exampleEventRule.Arn,\n },\n Variable = \"aws:SourceArn\",\n },\n },\n },\n },\n });\n\n var exampleLogResourcePolicy = new Aws.CloudWatch.LogResourcePolicy(\"example\", new()\n {\n PolicyDocument = exampleLogPolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n PolicyName = \"guardduty-log-publishing-policy\",\n });\n\n var exampleEventTarget = new Aws.CloudWatch.EventTarget(\"example\", new()\n {\n Rule = exampleEventRule.Name,\n Arn = example.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"/aws/events/guardduty/logs\"),\n\t\t\tRetentionInDays: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"source\": []string{\n\t\t\t\t\"aws.guardduty\",\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texampleEventRule, err := cloudwatch.NewEventRule(ctx, \"example\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"guard-duty_event_rule\"),\n\t\t\tDescription: pulumi.String(\"GuardDuty Findings\"),\n\t\t\tEventPattern: pulumi.String(json0),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Environment\": pulumi.String(\"example\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleLogPolicy := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"logs:CreateLogStream\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texample.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v:*\", arn), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"events.amazonaws.com\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"delivery.logs.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"logs:PutLogEvents\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texample.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v:*:*\", arn), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"events.amazonaws.com\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"delivery.logs.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"ArnEquals\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\texampleEventRule.Arn,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVariable: pulumi.String(\"aws:SourceArn\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\t_, err = cloudwatch.NewLogResourcePolicy(ctx, \"example\", \u0026cloudwatch.LogResourcePolicyArgs{\n\t\t\tPolicyDocument: pulumi.String(exampleLogPolicy.ApplyT(func(exampleLogPolicy iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026exampleLogPolicy.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tPolicyName: pulumi.String(\"guardduty-log-publishing-policy\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"example\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tRule: exampleEventRule.Name,\n\t\t\tArn: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicy;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicyArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new LogGroup(\"example\", LogGroupArgs.builder()\n .name(\"/aws/events/guardduty/logs\")\n .retentionInDays(1)\n .build());\n\n var exampleEventRule = new EventRule(\"exampleEventRule\", EventRuleArgs.builder()\n .name(\"guard-duty_event_rule\")\n .description(\"GuardDuty Findings\")\n .eventPattern(serializeJson(\n jsonObject(\n jsonProperty(\"source\", jsonArray(\"aws.guardduty\"))\n )))\n .tags(Map.of(\"Environment\", \"example\"))\n .build());\n\n final var exampleLogPolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"logs:CreateLogStream\")\n .resources(example.arn().applyValue(arn -\u003e String.format(\"%s:*\", arn)))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers( \n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\")\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"logs:PutLogEvents\")\n .resources(example.arn().applyValue(arn -\u003e String.format(\"%s:*:*\", arn)))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers( \n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\")\n .build())\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"ArnEquals\")\n .values(exampleEventRule.arn())\n .variable(\"aws:SourceArn\")\n .build())\n .build())\n .build());\n\n var exampleLogResourcePolicy = new LogResourcePolicy(\"exampleLogResourcePolicy\", LogResourcePolicyArgs.builder()\n .policyDocument(exampleLogPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(exampleLogPolicy -\u003e exampleLogPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .policyName(\"guardduty-log-publishing-policy\")\n .build());\n\n var exampleEventTarget = new EventTarget(\"exampleEventTarget\", EventTargetArgs.builder()\n .rule(exampleEventRule.name())\n .arn(example.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: /aws/events/guardduty/logs\n retentionInDays: 1\n exampleLogResourcePolicy:\n type: aws:cloudwatch:LogResourcePolicy\n name: example\n properties:\n policyDocument: ${exampleLogPolicy.json}\n policyName: guardduty-log-publishing-policy\n exampleEventRule:\n type: aws:cloudwatch:EventRule\n name: example\n properties:\n name: guard-duty_event_rule\n description: GuardDuty Findings\n eventPattern:\n fn::toJSON:\n source:\n - aws.guardduty\n tags:\n Environment: example\n exampleEventTarget:\n type: aws:cloudwatch:EventTarget\n name: example\n properties:\n rule: ${exampleEventRule.name}\n arn: ${example.arn}\nvariables:\n exampleLogPolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - logs:CreateLogStream\n resources:\n - ${example.arn}:*\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n - delivery.logs.amazonaws.com\n - effect: Allow\n actions:\n - logs:PutLogEvents\n resources:\n - ${example.arn}:*:*\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n - delivery.logs.amazonaws.com\n conditions:\n - test: ArnEquals\n values:\n - ${exampleEventRule.arn}\n variable: aws:SourceArn\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import EventBridge Targets using `event_bus_name/rule-name/target-id` (if you omit `event_bus_name`, the `default` event bus will be used). For example:\n\n```sh\n$ pulumi import aws:cloudwatch/eventTarget:EventTarget test-event-target rule-name/target-id\n```\n", + "description": "Provides an EventBridge Target resource.\n\n\u003e **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical.\n\n## Example Usage\n\n### Kinesis Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst console = new aws.cloudwatch.EventRule(\"console\", {\n name: \"capture-ec2-scaling-events\",\n description: \"Capture all EC2 scaling events\",\n eventPattern: JSON.stringify({\n source: [\"aws.autoscaling\"],\n \"detail-type\": [\n \"EC2 Instance Launch Successful\",\n \"EC2 Instance Terminate Successful\",\n \"EC2 Instance Launch Unsuccessful\",\n \"EC2 Instance Terminate Unsuccessful\",\n ],\n }),\n});\nconst testStream = new aws.kinesis.Stream(\"test_stream\", {\n name: \"kinesis-test\",\n shardCount: 1,\n});\nconst yada = new aws.cloudwatch.EventTarget(\"yada\", {\n targetId: \"Yada\",\n rule: console.name,\n arn: testStream.arn,\n runCommandTargets: [\n {\n key: \"tag:Name\",\n values: [\"FooBar\"],\n },\n {\n key: \"InstanceIds\",\n values: [\"i-162058cd308bffec2\"],\n },\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nconsole = aws.cloudwatch.EventRule(\"console\",\n name=\"capture-ec2-scaling-events\",\n description=\"Capture all EC2 scaling events\",\n event_pattern=json.dumps({\n \"source\": [\"aws.autoscaling\"],\n \"detail-type\": [\n \"EC2 Instance Launch Successful\",\n \"EC2 Instance Terminate Successful\",\n \"EC2 Instance Launch Unsuccessful\",\n \"EC2 Instance Terminate Unsuccessful\",\n ],\n }))\ntest_stream = aws.kinesis.Stream(\"test_stream\",\n name=\"kinesis-test\",\n shard_count=1)\nyada = aws.cloudwatch.EventTarget(\"yada\",\n target_id=\"Yada\",\n rule=console.name,\n arn=test_stream.arn,\n run_command_targets=[\n {\n \"key\": \"tag:Name\",\n \"values\": [\"FooBar\"],\n },\n {\n \"key\": \"InstanceIds\",\n \"values\": [\"i-162058cd308bffec2\"],\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var console = new Aws.CloudWatch.EventRule(\"console\", new()\n {\n Name = \"capture-ec2-scaling-events\",\n Description = \"Capture all EC2 scaling events\",\n EventPattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"source\"] = new[]\n {\n \"aws.autoscaling\",\n },\n [\"detail-type\"] = new[]\n {\n \"EC2 Instance Launch Successful\",\n \"EC2 Instance Terminate Successful\",\n \"EC2 Instance Launch Unsuccessful\",\n \"EC2 Instance Terminate Unsuccessful\",\n },\n }),\n });\n\n var testStream = new Aws.Kinesis.Stream(\"test_stream\", new()\n {\n Name = \"kinesis-test\",\n ShardCount = 1,\n });\n\n var yada = new Aws.CloudWatch.EventTarget(\"yada\", new()\n {\n TargetId = \"Yada\",\n Rule = console.Name,\n Arn = testStream.Arn,\n RunCommandTargets = new[]\n {\n new Aws.CloudWatch.Inputs.EventTargetRunCommandTargetArgs\n {\n Key = \"tag:Name\",\n Values = new[]\n {\n \"FooBar\",\n },\n },\n new Aws.CloudWatch.Inputs.EventTargetRunCommandTargetArgs\n {\n Key = \"InstanceIds\",\n Values = new[]\n {\n \"i-162058cd308bffec2\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"source\": []string{\n\t\t\t\t\"aws.autoscaling\",\n\t\t\t},\n\t\t\t\"detail-type\": []string{\n\t\t\t\t\"EC2 Instance Launch Successful\",\n\t\t\t\t\"EC2 Instance Terminate Successful\",\n\t\t\t\t\"EC2 Instance Launch Unsuccessful\",\n\t\t\t\t\"EC2 Instance Terminate Unsuccessful\",\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\tconsole, err := cloudwatch.NewEventRule(ctx, \"console\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"capture-ec2-scaling-events\"),\n\t\t\tDescription: pulumi.String(\"Capture all EC2 scaling events\"),\n\t\t\tEventPattern: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestStream, err := kinesis.NewStream(ctx, \"test_stream\", \u0026kinesis.StreamArgs{\n\t\t\tName: pulumi.String(\"kinesis-test\"),\n\t\t\tShardCount: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"yada\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tTargetId: pulumi.String(\"Yada\"),\n\t\t\tRule: console.Name,\n\t\t\tArn: testStream.Arn,\n\t\t\tRunCommandTargets: cloudwatch.EventTargetRunCommandTargetArray{\n\t\t\t\t\u0026cloudwatch.EventTargetRunCommandTargetArgs{\n\t\t\t\t\tKey: pulumi.String(\"tag:Name\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"FooBar\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026cloudwatch.EventTargetRunCommandTargetArgs{\n\t\t\t\t\tKey: pulumi.String(\"InstanceIds\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"i-162058cd308bffec2\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.kinesis.Stream;\nimport com.pulumi.aws.kinesis.StreamArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetRunCommandTargetArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var console = new EventRule(\"console\", EventRuleArgs.builder()\n .name(\"capture-ec2-scaling-events\")\n .description(\"Capture all EC2 scaling events\")\n .eventPattern(serializeJson(\n jsonObject(\n jsonProperty(\"source\", jsonArray(\"aws.autoscaling\")),\n jsonProperty(\"detail-type\", jsonArray(\n \"EC2 Instance Launch Successful\", \n \"EC2 Instance Terminate Successful\", \n \"EC2 Instance Launch Unsuccessful\", \n \"EC2 Instance Terminate Unsuccessful\"\n ))\n )))\n .build());\n\n var testStream = new Stream(\"testStream\", StreamArgs.builder()\n .name(\"kinesis-test\")\n .shardCount(1)\n .build());\n\n var yada = new EventTarget(\"yada\", EventTargetArgs.builder()\n .targetId(\"Yada\")\n .rule(console.name())\n .arn(testStream.arn())\n .runCommandTargets( \n EventTargetRunCommandTargetArgs.builder()\n .key(\"tag:Name\")\n .values(\"FooBar\")\n .build(),\n EventTargetRunCommandTargetArgs.builder()\n .key(\"InstanceIds\")\n .values(\"i-162058cd308bffec2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n yada:\n type: aws:cloudwatch:EventTarget\n properties:\n targetId: Yada\n rule: ${console.name}\n arn: ${testStream.arn}\n runCommandTargets:\n - key: tag:Name\n values:\n - FooBar\n - key: InstanceIds\n values:\n - i-162058cd308bffec2\n console:\n type: aws:cloudwatch:EventRule\n properties:\n name: capture-ec2-scaling-events\n description: Capture all EC2 scaling events\n eventPattern:\n fn::toJSON:\n source:\n - aws.autoscaling\n detail-type:\n - EC2 Instance Launch Successful\n - EC2 Instance Terminate Successful\n - EC2 Instance Launch Unsuccessful\n - EC2 Instance Terminate Unsuccessful\n testStream:\n type: aws:kinesis:Stream\n name: test_stream\n properties:\n name: kinesis-test\n shardCount: 1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SSM Document Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ssmLifecycleTrust = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n }],\n});\nconst stopInstance = new aws.ssm.Document(\"stop_instance\", {\n name: \"stop_instance\",\n documentType: \"Command\",\n content: JSON.stringify({\n schemaVersion: \"1.2\",\n description: \"Stop an instance\",\n parameters: {},\n runtimeConfig: {\n \"aws:runShellScript\": {\n properties: [{\n id: \"0.aws:runShellScript\",\n runCommand: [\"halt\"],\n }],\n },\n },\n }),\n});\nconst ssmLifecycle = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n actions: [\"ssm:SendCommand\"],\n resources: [\"arn:aws:ec2:eu-west-1:1234567890:instance/*\"],\n conditions: [{\n test: \"StringEquals\",\n variable: \"ec2:ResourceTag/Terminate\",\n values: [\"*\"],\n }],\n },\n {\n effect: \"Allow\",\n actions: [\"ssm:SendCommand\"],\n resources: [stopInstance.arn],\n },\n ],\n});\nconst ssmLifecycleRole = new aws.iam.Role(\"ssm_lifecycle\", {\n name: \"SSMLifecycle\",\n assumeRolePolicy: ssmLifecycleTrust.then(ssmLifecycleTrust =\u003e ssmLifecycleTrust.json),\n});\nconst ssmLifecyclePolicy = new aws.iam.Policy(\"ssm_lifecycle\", {\n name: \"SSMLifecycle\",\n policy: ssmLifecycle.apply(ssmLifecycle =\u003e ssmLifecycle.json),\n});\nconst ssmLifecycleRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"ssm_lifecycle\", {\n policyArn: ssmLifecyclePolicy.arn,\n role: ssmLifecycleRole.name,\n});\nconst stopInstances = new aws.cloudwatch.EventRule(\"stop_instances\", {\n name: \"StopInstance\",\n description: \"Stop instances nightly\",\n scheduleExpression: \"cron(0 0 * * ? *)\",\n});\nconst stopInstancesEventTarget = new aws.cloudwatch.EventTarget(\"stop_instances\", {\n targetId: \"StopInstance\",\n arn: stopInstance.arn,\n rule: stopInstances.name,\n roleArn: ssmLifecycleRole.arn,\n runCommandTargets: [{\n key: \"tag:Terminate\",\n values: [\"midnight\"],\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nssm_lifecycle_trust = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n}])\nstop_instance = aws.ssm.Document(\"stop_instance\",\n name=\"stop_instance\",\n document_type=\"Command\",\n content=json.dumps({\n \"schemaVersion\": \"1.2\",\n \"description\": \"Stop an instance\",\n \"parameters\": {},\n \"runtimeConfig\": {\n \"aws:runShellScript\": {\n \"properties\": [{\n \"id\": \"0.aws:runShellScript\",\n \"runCommand\": [\"halt\"],\n }],\n },\n },\n }))\nssm_lifecycle = aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\"ssm:SendCommand\"],\n \"resources\": [\"arn:aws:ec2:eu-west-1:1234567890:instance/*\"],\n \"conditions\": [{\n \"test\": \"StringEquals\",\n \"variable\": \"ec2:ResourceTag/Terminate\",\n \"values\": [\"*\"],\n }],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"ssm:SendCommand\"],\n \"resources\": [stop_instance.arn],\n },\n])\nssm_lifecycle_role = aws.iam.Role(\"ssm_lifecycle\",\n name=\"SSMLifecycle\",\n assume_role_policy=ssm_lifecycle_trust.json)\nssm_lifecycle_policy = aws.iam.Policy(\"ssm_lifecycle\",\n name=\"SSMLifecycle\",\n policy=ssm_lifecycle.json)\nssm_lifecycle_role_policy_attachment = aws.iam.RolePolicyAttachment(\"ssm_lifecycle\",\n policy_arn=ssm_lifecycle_policy.arn,\n role=ssm_lifecycle_role.name)\nstop_instances = aws.cloudwatch.EventRule(\"stop_instances\",\n name=\"StopInstance\",\n description=\"Stop instances nightly\",\n schedule_expression=\"cron(0 0 * * ? *)\")\nstop_instances_event_target = aws.cloudwatch.EventTarget(\"stop_instances\",\n target_id=\"StopInstance\",\n arn=stop_instance.arn,\n rule=stop_instances.name,\n role_arn=ssm_lifecycle_role.arn,\n run_command_targets=[{\n \"key\": \"tag:Terminate\",\n \"values\": [\"midnight\"],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ssmLifecycleTrust = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n },\n },\n },\n },\n },\n });\n\n var stopInstance = new Aws.Ssm.Document(\"stop_instance\", new()\n {\n Name = \"stop_instance\",\n DocumentType = \"Command\",\n Content = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"schemaVersion\"] = \"1.2\",\n [\"description\"] = \"Stop an instance\",\n [\"parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n [\"runtimeConfig\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:runShellScript\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"properties\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"id\"] = \"0.aws:runShellScript\",\n [\"runCommand\"] = new[]\n {\n \"halt\",\n },\n },\n },\n },\n },\n }),\n });\n\n var ssmLifecycle = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ssm:SendCommand\",\n },\n Resources = new[]\n {\n \"arn:aws:ec2:eu-west-1:1234567890:instance/*\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"ec2:ResourceTag/Terminate\",\n Values = new[]\n {\n \"*\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ssm:SendCommand\",\n },\n Resources = new[]\n {\n stopInstance.Arn,\n },\n },\n },\n });\n\n var ssmLifecycleRole = new Aws.Iam.Role(\"ssm_lifecycle\", new()\n {\n Name = \"SSMLifecycle\",\n AssumeRolePolicy = ssmLifecycleTrust.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var ssmLifecyclePolicy = new Aws.Iam.Policy(\"ssm_lifecycle\", new()\n {\n Name = \"SSMLifecycle\",\n PolicyDocument = ssmLifecycle.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var ssmLifecycleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"ssm_lifecycle\", new()\n {\n PolicyArn = ssmLifecyclePolicy.Arn,\n Role = ssmLifecycleRole.Name,\n });\n\n var stopInstances = new Aws.CloudWatch.EventRule(\"stop_instances\", new()\n {\n Name = \"StopInstance\",\n Description = \"Stop instances nightly\",\n ScheduleExpression = \"cron(0 0 * * ? *)\",\n });\n\n var stopInstancesEventTarget = new Aws.CloudWatch.EventTarget(\"stop_instances\", new()\n {\n TargetId = \"StopInstance\",\n Arn = stopInstance.Arn,\n Rule = stopInstances.Name,\n RoleArn = ssmLifecycleRole.Arn,\n RunCommandTargets = new[]\n {\n new Aws.CloudWatch.Inputs.EventTargetRunCommandTargetArgs\n {\n Key = \"tag:Terminate\",\n Values = new[]\n {\n \"midnight\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tssmLifecycleTrust, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"events.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"schemaVersion\": \"1.2\",\n\t\t\t\"description\": \"Stop an instance\",\n\t\t\t\"parameters\": map[string]interface{}{},\n\t\t\t\"runtimeConfig\": map[string]interface{}{\n\t\t\t\t\"aws:runShellScript\": map[string]interface{}{\n\t\t\t\t\t\"properties\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"id\": \"0.aws:runShellScript\",\n\t\t\t\t\t\t\t\"runCommand\": []string{\n\t\t\t\t\t\t\t\t\"halt\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\tstopInstance, err := ssm.NewDocument(ctx, \"stop_instance\", \u0026ssm.DocumentArgs{\n\t\t\tName: pulumi.String(\"stop_instance\"),\n\t\t\tDocumentType: pulumi.String(\"Command\"),\n\t\t\tContent: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tssmLifecycle := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"ssm:SendCommand\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"arn:aws:ec2:eu-west-1:1234567890:instance/*\"),\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"StringEquals\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"ec2:ResourceTag/Terminate\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"*\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"ssm:SendCommand\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tstopInstance.Arn,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tssmLifecycleRole, err := iam.NewRole(ctx, \"ssm_lifecycle\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"SSMLifecycle\"),\n\t\t\tAssumeRolePolicy: pulumi.String(ssmLifecycleTrust.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tssmLifecyclePolicy, err := iam.NewPolicy(ctx, \"ssm_lifecycle\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"SSMLifecycle\"),\n\t\t\tPolicy: pulumi.String(ssmLifecycle.ApplyT(func(ssmLifecycle iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026ssmLifecycle.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicyAttachment(ctx, \"ssm_lifecycle\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tPolicyArn: ssmLifecyclePolicy.Arn,\n\t\t\tRole: ssmLifecycleRole.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tstopInstances, err := cloudwatch.NewEventRule(ctx, \"stop_instances\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"StopInstance\"),\n\t\t\tDescription: pulumi.String(\"Stop instances nightly\"),\n\t\t\tScheduleExpression: pulumi.String(\"cron(0 0 * * ? *)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"stop_instances\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tTargetId: pulumi.String(\"StopInstance\"),\n\t\t\tArn: stopInstance.Arn,\n\t\t\tRule: stopInstances.Name,\n\t\t\tRoleArn: ssmLifecycleRole.Arn,\n\t\t\tRunCommandTargets: cloudwatch.EventTargetRunCommandTargetArray{\n\t\t\t\t\u0026cloudwatch.EventTargetRunCommandTargetArgs{\n\t\t\t\t\tKey: pulumi.String(\"tag:Terminate\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"midnight\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.ssm.Document;\nimport com.pulumi.aws.ssm.DocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetRunCommandTargetArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var ssmLifecycleTrust = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"sts:AssumeRole\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .build())\n .build());\n\n var stopInstance = new Document(\"stopInstance\", DocumentArgs.builder()\n .name(\"stop_instance\")\n .documentType(\"Command\")\n .content(serializeJson(\n jsonObject(\n jsonProperty(\"schemaVersion\", \"1.2\"),\n jsonProperty(\"description\", \"Stop an instance\"),\n jsonProperty(\"parameters\", jsonObject(\n\n )),\n jsonProperty(\"runtimeConfig\", jsonObject(\n jsonProperty(\"aws:runShellScript\", jsonObject(\n jsonProperty(\"properties\", jsonArray(jsonObject(\n jsonProperty(\"id\", \"0.aws:runShellScript\"),\n jsonProperty(\"runCommand\", jsonArray(\"halt\"))\n )))\n ))\n ))\n )))\n .build());\n\n final var ssmLifecycle = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ssm:SendCommand\")\n .resources(\"arn:aws:ec2:eu-west-1:1234567890:instance/*\")\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"ec2:ResourceTag/Terminate\")\n .values(\"*\")\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ssm:SendCommand\")\n .resources(stopInstance.arn())\n .build())\n .build());\n\n var ssmLifecycleRole = new Role(\"ssmLifecycleRole\", RoleArgs.builder()\n .name(\"SSMLifecycle\")\n .assumeRolePolicy(ssmLifecycleTrust.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var ssmLifecyclePolicy = new Policy(\"ssmLifecyclePolicy\", PolicyArgs.builder()\n .name(\"SSMLifecycle\")\n .policy(ssmLifecycle.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(ssmLifecycle -\u003e ssmLifecycle.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var ssmLifecycleRolePolicyAttachment = new RolePolicyAttachment(\"ssmLifecycleRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .policyArn(ssmLifecyclePolicy.arn())\n .role(ssmLifecycleRole.name())\n .build());\n\n var stopInstances = new EventRule(\"stopInstances\", EventRuleArgs.builder()\n .name(\"StopInstance\")\n .description(\"Stop instances nightly\")\n .scheduleExpression(\"cron(0 0 * * ? *)\")\n .build());\n\n var stopInstancesEventTarget = new EventTarget(\"stopInstancesEventTarget\", EventTargetArgs.builder()\n .targetId(\"StopInstance\")\n .arn(stopInstance.arn())\n .rule(stopInstances.name())\n .roleArn(ssmLifecycleRole.arn())\n .runCommandTargets(EventTargetRunCommandTargetArgs.builder()\n .key(\"tag:Terminate\")\n .values(\"midnight\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ssmLifecycleRole:\n type: aws:iam:Role\n name: ssm_lifecycle\n properties:\n name: SSMLifecycle\n assumeRolePolicy: ${ssmLifecycleTrust.json}\n ssmLifecyclePolicy:\n type: aws:iam:Policy\n name: ssm_lifecycle\n properties:\n name: SSMLifecycle\n policy: ${ssmLifecycle.json}\n ssmLifecycleRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: ssm_lifecycle\n properties:\n policyArn: ${ssmLifecyclePolicy.arn}\n role: ${ssmLifecycleRole.name}\n stopInstance:\n type: aws:ssm:Document\n name: stop_instance\n properties:\n name: stop_instance\n documentType: Command\n content:\n fn::toJSON:\n schemaVersion: '1.2'\n description: Stop an instance\n parameters: {}\n runtimeConfig:\n aws:runShellScript:\n properties:\n - id: 0.aws:runShellScript\n runCommand:\n - halt\n stopInstances:\n type: aws:cloudwatch:EventRule\n name: stop_instances\n properties:\n name: StopInstance\n description: Stop instances nightly\n scheduleExpression: cron(0 0 * * ? *)\n stopInstancesEventTarget:\n type: aws:cloudwatch:EventTarget\n name: stop_instances\n properties:\n targetId: StopInstance\n arn: ${stopInstance.arn}\n rule: ${stopInstances.name}\n roleArn: ${ssmLifecycleRole.arn}\n runCommandTargets:\n - key: tag:Terminate\n values:\n - midnight\nvariables:\n ssmLifecycleTrust:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - sts:AssumeRole\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n ssmLifecycle:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - ssm:SendCommand\n resources:\n - arn:aws:ec2:eu-west-1:1234567890:instance/*\n conditions:\n - test: StringEquals\n variable: ec2:ResourceTag/Terminate\n values:\n - '*'\n - effect: Allow\n actions:\n - ssm:SendCommand\n resources:\n - ${stopInstance.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### RunCommand Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst stopInstances = new aws.cloudwatch.EventRule(\"stop_instances\", {\n name: \"StopInstance\",\n description: \"Stop instances nightly\",\n scheduleExpression: \"cron(0 0 * * ? *)\",\n});\nconst stopInstancesEventTarget = new aws.cloudwatch.EventTarget(\"stop_instances\", {\n targetId: \"StopInstance\",\n arn: `arn:aws:ssm:${awsRegion}::document/AWS-RunShellScript`,\n input: \"{\\\"commands\\\":[\\\"halt\\\"]}\",\n rule: stopInstances.name,\n roleArn: ssmLifecycle.arn,\n runCommandTargets: [{\n key: \"tag:Terminate\",\n values: [\"midnight\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nstop_instances = aws.cloudwatch.EventRule(\"stop_instances\",\n name=\"StopInstance\",\n description=\"Stop instances nightly\",\n schedule_expression=\"cron(0 0 * * ? *)\")\nstop_instances_event_target = aws.cloudwatch.EventTarget(\"stop_instances\",\n target_id=\"StopInstance\",\n arn=f\"arn:aws:ssm:{aws_region}::document/AWS-RunShellScript\",\n input=\"{\\\"commands\\\":[\\\"halt\\\"]}\",\n rule=stop_instances.name,\n role_arn=ssm_lifecycle[\"arn\"],\n run_command_targets=[{\n \"key\": \"tag:Terminate\",\n \"values\": [\"midnight\"],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var stopInstances = new Aws.CloudWatch.EventRule(\"stop_instances\", new()\n {\n Name = \"StopInstance\",\n Description = \"Stop instances nightly\",\n ScheduleExpression = \"cron(0 0 * * ? *)\",\n });\n\n var stopInstancesEventTarget = new Aws.CloudWatch.EventTarget(\"stop_instances\", new()\n {\n TargetId = \"StopInstance\",\n Arn = $\"arn:aws:ssm:{awsRegion}::document/AWS-RunShellScript\",\n Input = \"{\\\"commands\\\":[\\\"halt\\\"]}\",\n Rule = stopInstances.Name,\n RoleArn = ssmLifecycle.Arn,\n RunCommandTargets = new[]\n {\n new Aws.CloudWatch.Inputs.EventTargetRunCommandTargetArgs\n {\n Key = \"tag:Terminate\",\n Values = new[]\n {\n \"midnight\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tstopInstances, err := cloudwatch.NewEventRule(ctx, \"stop_instances\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"StopInstance\"),\n\t\t\tDescription: pulumi.String(\"Stop instances nightly\"),\n\t\t\tScheduleExpression: pulumi.String(\"cron(0 0 * * ? *)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"stop_instances\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tTargetId: pulumi.String(\"StopInstance\"),\n\t\t\tArn: pulumi.Sprintf(\"arn:aws:ssm:%v::document/AWS-RunShellScript\", awsRegion),\n\t\t\tInput: pulumi.String(\"{\\\"commands\\\":[\\\"halt\\\"]}\"),\n\t\t\tRule: stopInstances.Name,\n\t\t\tRoleArn: pulumi.Any(ssmLifecycle.Arn),\n\t\t\tRunCommandTargets: cloudwatch.EventTargetRunCommandTargetArray{\n\t\t\t\t\u0026cloudwatch.EventTargetRunCommandTargetArgs{\n\t\t\t\t\tKey: pulumi.String(\"tag:Terminate\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"midnight\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetRunCommandTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var stopInstances = new EventRule(\"stopInstances\", EventRuleArgs.builder()\n .name(\"StopInstance\")\n .description(\"Stop instances nightly\")\n .scheduleExpression(\"cron(0 0 * * ? *)\")\n .build());\n\n var stopInstancesEventTarget = new EventTarget(\"stopInstancesEventTarget\", EventTargetArgs.builder()\n .targetId(\"StopInstance\")\n .arn(String.format(\"arn:aws:ssm:%s::document/AWS-RunShellScript\", awsRegion))\n .input(\"{\\\"commands\\\":[\\\"halt\\\"]}\")\n .rule(stopInstances.name())\n .roleArn(ssmLifecycle.arn())\n .runCommandTargets(EventTargetRunCommandTargetArgs.builder()\n .key(\"tag:Terminate\")\n .values(\"midnight\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n stopInstances:\n type: aws:cloudwatch:EventRule\n name: stop_instances\n properties:\n name: StopInstance\n description: Stop instances nightly\n scheduleExpression: cron(0 0 * * ? *)\n stopInstancesEventTarget:\n type: aws:cloudwatch:EventTarget\n name: stop_instances\n properties:\n targetId: StopInstance\n arn: arn:aws:ssm:${awsRegion}::document/AWS-RunShellScript\n input: '{\"commands\":[\"halt\"]}'\n rule: ${stopInstances.name}\n roleArn: ${ssmLifecycle.arn}\n runCommandTargets:\n - key: tag:Terminate\n values:\n - midnight\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### ECS Run Task with Role and Task Override Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst ecsEvents = new aws.iam.Role(\"ecs_events\", {\n name: \"ecs_events\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst ecsEventsRunTaskWithAnyRole = std.replace({\n text: taskName.arn,\n search: \"/:\\\\d+$/\",\n replace: \":*\",\n}).then(invoke =\u003e aws.iam.getPolicyDocument({\n statements: [\n {\n effect: \"Allow\",\n actions: [\"iam:PassRole\"],\n resources: [\"*\"],\n },\n {\n effect: \"Allow\",\n actions: [\"ecs:RunTask\"],\n resources: [invoke.result],\n },\n ],\n}));\nconst ecsEventsRunTaskWithAnyRoleRolePolicy = new aws.iam.RolePolicy(\"ecs_events_run_task_with_any_role\", {\n name: \"ecs_events_run_task_with_any_role\",\n role: ecsEvents.id,\n policy: ecsEventsRunTaskWithAnyRole.then(ecsEventsRunTaskWithAnyRole =\u003e ecsEventsRunTaskWithAnyRole.json),\n});\nconst ecsScheduledTask = new aws.cloudwatch.EventTarget(\"ecs_scheduled_task\", {\n targetId: \"run-scheduled-task-every-hour\",\n arn: clusterName.arn,\n rule: everyHour.name,\n roleArn: ecsEvents.arn,\n ecsTarget: {\n taskCount: 1,\n taskDefinitionArn: taskName.arn,\n },\n input: JSON.stringify({\n containerOverrides: [{\n name: \"name-of-container-to-override\",\n command: [\n \"bin/console\",\n \"scheduled-task\",\n ],\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\necs_events = aws.iam.Role(\"ecs_events\",\n name=\"ecs_events\",\n assume_role_policy=assume_role.json)\necs_events_run_task_with_any_role = aws.iam.get_policy_document(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\"iam:PassRole\"],\n \"resources\": [\"*\"],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"ecs:RunTask\"],\n \"resources\": [std.replace(text=task_name[\"arn\"],\n search=\"/:\\\\d+$/\",\n replace=\":*\").result],\n },\n])\necs_events_run_task_with_any_role_role_policy = aws.iam.RolePolicy(\"ecs_events_run_task_with_any_role\",\n name=\"ecs_events_run_task_with_any_role\",\n role=ecs_events.id,\n policy=ecs_events_run_task_with_any_role.json)\necs_scheduled_task = aws.cloudwatch.EventTarget(\"ecs_scheduled_task\",\n target_id=\"run-scheduled-task-every-hour\",\n arn=cluster_name[\"arn\"],\n rule=every_hour[\"name\"],\n role_arn=ecs_events.arn,\n ecs_target={\n \"task_count\": 1,\n \"task_definition_arn\": task_name[\"arn\"],\n },\n input=json.dumps({\n \"containerOverrides\": [{\n \"name\": \"name-of-container-to-override\",\n \"command\": [\n \"bin/console\",\n \"scheduled-task\",\n ],\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var ecsEvents = new Aws.Iam.Role(\"ecs_events\", new()\n {\n Name = \"ecs_events\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var ecsEventsRunTaskWithAnyRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"iam:PassRole\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ecs:RunTask\",\n },\n Resources = new[]\n {\n Std.Replace.Invoke(new()\n {\n Text = taskName.Arn,\n Search = \"/:\\\\d+$/\",\n Replace = \":*\",\n }).Result,\n },\n },\n },\n });\n\n var ecsEventsRunTaskWithAnyRoleRolePolicy = new Aws.Iam.RolePolicy(\"ecs_events_run_task_with_any_role\", new()\n {\n Name = \"ecs_events_run_task_with_any_role\",\n Role = ecsEvents.Id,\n Policy = ecsEventsRunTaskWithAnyRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var ecsScheduledTask = new Aws.CloudWatch.EventTarget(\"ecs_scheduled_task\", new()\n {\n TargetId = \"run-scheduled-task-every-hour\",\n Arn = clusterName.Arn,\n Rule = everyHour.Name,\n RoleArn = ecsEvents.Arn,\n EcsTarget = new Aws.CloudWatch.Inputs.EventTargetEcsTargetArgs\n {\n TaskCount = 1,\n TaskDefinitionArn = taskName.Arn,\n },\n Input = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"containerOverrides\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = \"name-of-container-to-override\",\n [\"command\"] = new[]\n {\n \"bin/console\",\n \"scheduled-task\",\n },\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: pulumi.StringRef(\"Allow\"),\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"Service\",\nIdentifiers: []string{\n\"events.amazonaws.com\",\n},\n},\n},\nActions: []string{\n\"sts:AssumeRole\",\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\necsEvents, err := iam.NewRole(ctx, \"ecs_events\", \u0026iam.RoleArgs{\nName: pulumi.String(\"ecs_events\"),\nAssumeRolePolicy: pulumi.String(assumeRole.Json),\n})\nif err != nil {\nreturn err\n}\necsEventsRunTaskWithAnyRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: pulumi.StringRef(\"Allow\"),\nActions: []string{\n\"iam:PassRole\",\n},\nResources: []string{\n\"*\",\n},\n},\n{\nEffect: pulumi.StringRef(\"Allow\"),\nActions: []string{\n\"ecs:RunTask\",\n},\nResources: interface{}{\nstd.Replace(ctx, {\nText: taskName.Arn,\nSearch: \"/:\\\\d+$/\",\nReplace: \":*\",\n}, nil).Result,\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\n_, err = iam.NewRolePolicy(ctx, \"ecs_events_run_task_with_any_role\", \u0026iam.RolePolicyArgs{\nName: pulumi.String(\"ecs_events_run_task_with_any_role\"),\nRole: ecsEvents.ID(),\nPolicy: pulumi.String(ecsEventsRunTaskWithAnyRole.Json),\n})\nif err != nil {\nreturn err\n}\ntmpJSON0, err := json.Marshal(map[string]interface{}{\n\"containerOverrides\": []map[string]interface{}{\nmap[string]interface{}{\n\"name\": \"name-of-container-to-override\",\n\"command\": []string{\n\"bin/console\",\n\"scheduled-task\",\n},\n},\n},\n})\nif err != nil {\nreturn err\n}\njson0 := string(tmpJSON0)\n_, err = cloudwatch.NewEventTarget(ctx, \"ecs_scheduled_task\", \u0026cloudwatch.EventTargetArgs{\nTargetId: pulumi.String(\"run-scheduled-task-every-hour\"),\nArn: pulumi.Any(clusterName.Arn),\nRule: pulumi.Any(everyHour.Name),\nRoleArn: ecsEvents.Arn,\nEcsTarget: \u0026cloudwatch.EventTargetEcsTargetArgs{\nTaskCount: pulumi.Int(1),\nTaskDefinitionArn: pulumi.Any(taskName.Arn),\n},\nInput: pulumi.String(json0),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetEcsTargetArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var ecsEvents = new Role(\"ecsEvents\", RoleArgs.builder()\n .name(\"ecs_events\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var ecsEventsRunTaskWithAnyRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"iam:PassRole\")\n .resources(\"*\")\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ecs:RunTask\")\n .resources(StdFunctions.replace(ReplaceArgs.builder()\n .text(taskName.arn())\n .search(\"/:\\\\d+$/\")\n .replace(\":*\")\n .build()).result())\n .build())\n .build());\n\n var ecsEventsRunTaskWithAnyRoleRolePolicy = new RolePolicy(\"ecsEventsRunTaskWithAnyRoleRolePolicy\", RolePolicyArgs.builder()\n .name(\"ecs_events_run_task_with_any_role\")\n .role(ecsEvents.id())\n .policy(ecsEventsRunTaskWithAnyRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var ecsScheduledTask = new EventTarget(\"ecsScheduledTask\", EventTargetArgs.builder()\n .targetId(\"run-scheduled-task-every-hour\")\n .arn(clusterName.arn())\n .rule(everyHour.name())\n .roleArn(ecsEvents.arn())\n .ecsTarget(EventTargetEcsTargetArgs.builder()\n .taskCount(1)\n .taskDefinitionArn(taskName.arn())\n .build())\n .input(serializeJson(\n jsonObject(\n jsonProperty(\"containerOverrides\", jsonArray(jsonObject(\n jsonProperty(\"name\", \"name-of-container-to-override\"),\n jsonProperty(\"command\", jsonArray(\n \"bin/console\", \n \"scheduled-task\"\n ))\n )))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ecsEvents:\n type: aws:iam:Role\n name: ecs_events\n properties:\n name: ecs_events\n assumeRolePolicy: ${assumeRole.json}\n ecsEventsRunTaskWithAnyRoleRolePolicy:\n type: aws:iam:RolePolicy\n name: ecs_events_run_task_with_any_role\n properties:\n name: ecs_events_run_task_with_any_role\n role: ${ecsEvents.id}\n policy: ${ecsEventsRunTaskWithAnyRole.json}\n ecsScheduledTask:\n type: aws:cloudwatch:EventTarget\n name: ecs_scheduled_task\n properties:\n targetId: run-scheduled-task-every-hour\n arn: ${clusterName.arn}\n rule: ${everyHour.name}\n roleArn: ${ecsEvents.arn}\n ecsTarget:\n taskCount: 1\n taskDefinitionArn: ${taskName.arn}\n input:\n fn::toJSON:\n containerOverrides:\n - name: name-of-container-to-override\n command:\n - bin/console\n - scheduled-task\nvariables:\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n actions:\n - sts:AssumeRole\n ecsEventsRunTaskWithAnyRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - iam:PassRole\n resources:\n - '*'\n - effect: Allow\n actions:\n - ecs:RunTask\n resources:\n - fn::invoke:\n Function: std:replace\n Arguments:\n text: ${taskName.arn}\n search: /:\\d+$/\n replace: :*\n Return: result\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### API Gateway target\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleEventRule = new aws.cloudwatch.EventRule(\"example\", {});\nconst exampleDeployment = new aws.apigateway.Deployment(\"example\", {restApi: exampleAwsApiGatewayRestApi.id});\nconst exampleStage = new aws.apigateway.Stage(\"example\", {\n restApi: exampleAwsApiGatewayRestApi.id,\n deployment: exampleDeployment.id,\n});\nconst example = new aws.cloudwatch.EventTarget(\"example\", {\n arn: pulumi.interpolate`${exampleStage.executionArn}/GET`,\n rule: exampleEventRule.id,\n httpTarget: {\n queryStringParameters: {\n Body: \"$.detail.body\",\n },\n headerParameters: {\n Env: \"Test\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_event_rule = aws.cloudwatch.EventRule(\"example\")\nexample_deployment = aws.apigateway.Deployment(\"example\", rest_api=example_aws_api_gateway_rest_api[\"id\"])\nexample_stage = aws.apigateway.Stage(\"example\",\n rest_api=example_aws_api_gateway_rest_api[\"id\"],\n deployment=example_deployment.id)\nexample = aws.cloudwatch.EventTarget(\"example\",\n arn=example_stage.execution_arn.apply(lambda execution_arn: f\"{execution_arn}/GET\"),\n rule=example_event_rule.id,\n http_target={\n \"query_string_parameters\": {\n \"body\": \"$.detail.body\",\n },\n \"header_parameters\": {\n \"env\": \"Test\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleEventRule = new Aws.CloudWatch.EventRule(\"example\");\n\n var exampleDeployment = new Aws.ApiGateway.Deployment(\"example\", new()\n {\n RestApi = exampleAwsApiGatewayRestApi.Id,\n });\n\n var exampleStage = new Aws.ApiGateway.Stage(\"example\", new()\n {\n RestApi = exampleAwsApiGatewayRestApi.Id,\n Deployment = exampleDeployment.Id,\n });\n\n var example = new Aws.CloudWatch.EventTarget(\"example\", new()\n {\n Arn = exampleStage.ExecutionArn.Apply(executionArn =\u003e $\"{executionArn}/GET\"),\n Rule = exampleEventRule.Id,\n HttpTarget = new Aws.CloudWatch.Inputs.EventTargetHttpTargetArgs\n {\n QueryStringParameters = \n {\n { \"Body\", \"$.detail.body\" },\n },\n HeaderParameters = \n {\n { \"Env\", \"Test\" },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleEventRule, err := cloudwatch.NewEventRule(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleDeployment, err := apigateway.NewDeployment(ctx, \"example\", \u0026apigateway.DeploymentArgs{\n\t\t\tRestApi: pulumi.Any(exampleAwsApiGatewayRestApi.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleStage, err := apigateway.NewStage(ctx, \"example\", \u0026apigateway.StageArgs{\n\t\t\tRestApi: pulumi.Any(exampleAwsApiGatewayRestApi.Id),\n\t\t\tDeployment: exampleDeployment.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"example\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: exampleStage.ExecutionArn.ApplyT(func(executionArn string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"%v/GET\", executionArn), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t\tRule: exampleEventRule.ID(),\n\t\t\tHttpTarget: \u0026cloudwatch.EventTargetHttpTargetArgs{\n\t\t\t\tQueryStringParameters: pulumi.StringMap{\n\t\t\t\t\t\"Body\": pulumi.String(\"$.detail.body\"),\n\t\t\t\t},\n\t\t\t\tHeaderParameters: pulumi.StringMap{\n\t\t\t\t\t\"Env\": pulumi.String(\"Test\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.apigateway.Deployment;\nimport com.pulumi.aws.apigateway.DeploymentArgs;\nimport com.pulumi.aws.apigateway.Stage;\nimport com.pulumi.aws.apigateway.StageArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetHttpTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleEventRule = new EventRule(\"exampleEventRule\");\n\n var exampleDeployment = new Deployment(\"exampleDeployment\", DeploymentArgs.builder()\n .restApi(exampleAwsApiGatewayRestApi.id())\n .build());\n\n var exampleStage = new Stage(\"exampleStage\", StageArgs.builder()\n .restApi(exampleAwsApiGatewayRestApi.id())\n .deployment(exampleDeployment.id())\n .build());\n\n var example = new EventTarget(\"example\", EventTargetArgs.builder()\n .arn(exampleStage.executionArn().applyValue(executionArn -\u003e String.format(\"%s/GET\", executionArn)))\n .rule(exampleEventRule.id())\n .httpTarget(EventTargetHttpTargetArgs.builder()\n .queryStringParameters(Map.of(\"Body\", \"$.detail.body\"))\n .headerParameters(Map.of(\"Env\", \"Test\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:EventTarget\n properties:\n arn: ${exampleStage.executionArn}/GET\n rule: ${exampleEventRule.id}\n httpTarget:\n queryStringParameters:\n Body: $.detail.body\n headerParameters:\n Env: Test\n exampleEventRule:\n type: aws:cloudwatch:EventRule\n name: example\n exampleDeployment:\n type: aws:apigateway:Deployment\n name: example\n properties:\n restApi: ${exampleAwsApiGatewayRestApi.id}\n exampleStage:\n type: aws:apigateway:Stage\n name: example\n properties:\n restApi: ${exampleAwsApiGatewayRestApi.id}\n deployment: ${exampleDeployment.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Cross-Account Event Bus target\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"events.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst eventBusInvokeRemoteEventBusRole = new aws.iam.Role(\"event_bus_invoke_remote_event_bus\", {\n name: \"event-bus-invoke-remote-event-bus\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst eventBusInvokeRemoteEventBus = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n actions: [\"events:PutEvents\"],\n resources: [\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\"],\n }],\n});\nconst eventBusInvokeRemoteEventBusPolicy = new aws.iam.Policy(\"event_bus_invoke_remote_event_bus\", {\n name: \"event_bus_invoke_remote_event_bus\",\n policy: eventBusInvokeRemoteEventBus.then(eventBusInvokeRemoteEventBus =\u003e eventBusInvokeRemoteEventBus.json),\n});\nconst eventBusInvokeRemoteEventBusRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"event_bus_invoke_remote_event_bus\", {\n role: eventBusInvokeRemoteEventBusRole.name,\n policyArn: eventBusInvokeRemoteEventBusPolicy.arn,\n});\nconst stopInstances = new aws.cloudwatch.EventRule(\"stop_instances\", {\n name: \"StopInstance\",\n description: \"Stop instances nightly\",\n scheduleExpression: \"cron(0 0 * * ? *)\",\n});\nconst stopInstancesEventTarget = new aws.cloudwatch.EventTarget(\"stop_instances\", {\n targetId: \"StopInstance\",\n arn: \"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n rule: stopInstances.name,\n roleArn: eventBusInvokeRemoteEventBusRole.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"events.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\nevent_bus_invoke_remote_event_bus_role = aws.iam.Role(\"event_bus_invoke_remote_event_bus\",\n name=\"event-bus-invoke-remote-event-bus\",\n assume_role_policy=assume_role.json)\nevent_bus_invoke_remote_event_bus = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"actions\": [\"events:PutEvents\"],\n \"resources\": [\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\"],\n}])\nevent_bus_invoke_remote_event_bus_policy = aws.iam.Policy(\"event_bus_invoke_remote_event_bus\",\n name=\"event_bus_invoke_remote_event_bus\",\n policy=event_bus_invoke_remote_event_bus.json)\nevent_bus_invoke_remote_event_bus_role_policy_attachment = aws.iam.RolePolicyAttachment(\"event_bus_invoke_remote_event_bus\",\n role=event_bus_invoke_remote_event_bus_role.name,\n policy_arn=event_bus_invoke_remote_event_bus_policy.arn)\nstop_instances = aws.cloudwatch.EventRule(\"stop_instances\",\n name=\"StopInstance\",\n description=\"Stop instances nightly\",\n schedule_expression=\"cron(0 0 * * ? *)\")\nstop_instances_event_target = aws.cloudwatch.EventTarget(\"stop_instances\",\n target_id=\"StopInstance\",\n arn=\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n rule=stop_instances.name,\n role_arn=event_bus_invoke_remote_event_bus_role.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var eventBusInvokeRemoteEventBusRole = new Aws.Iam.Role(\"event_bus_invoke_remote_event_bus\", new()\n {\n Name = \"event-bus-invoke-remote-event-bus\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var eventBusInvokeRemoteEventBus = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"events:PutEvents\",\n },\n Resources = new[]\n {\n \"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n },\n },\n },\n });\n\n var eventBusInvokeRemoteEventBusPolicy = new Aws.Iam.Policy(\"event_bus_invoke_remote_event_bus\", new()\n {\n Name = \"event_bus_invoke_remote_event_bus\",\n PolicyDocument = eventBusInvokeRemoteEventBus.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var eventBusInvokeRemoteEventBusRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"event_bus_invoke_remote_event_bus\", new()\n {\n Role = eventBusInvokeRemoteEventBusRole.Name,\n PolicyArn = eventBusInvokeRemoteEventBusPolicy.Arn,\n });\n\n var stopInstances = new Aws.CloudWatch.EventRule(\"stop_instances\", new()\n {\n Name = \"StopInstance\",\n Description = \"Stop instances nightly\",\n ScheduleExpression = \"cron(0 0 * * ? *)\",\n });\n\n var stopInstancesEventTarget = new Aws.CloudWatch.EventTarget(\"stop_instances\", new()\n {\n TargetId = \"StopInstance\",\n Arn = \"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n Rule = stopInstances.Name,\n RoleArn = eventBusInvokeRemoteEventBusRole.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"events.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\teventBusInvokeRemoteEventBusRole, err := iam.NewRole(ctx, \"event_bus_invoke_remote_event_bus\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"event-bus-invoke-remote-event-bus\"),\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\teventBusInvokeRemoteEventBus, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"events:PutEvents\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\teventBusInvokeRemoteEventBusPolicy, err := iam.NewPolicy(ctx, \"event_bus_invoke_remote_event_bus\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"event_bus_invoke_remote_event_bus\"),\n\t\t\tPolicy: pulumi.String(eventBusInvokeRemoteEventBus.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicyAttachment(ctx, \"event_bus_invoke_remote_event_bus\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tRole: eventBusInvokeRemoteEventBusRole.Name,\n\t\t\tPolicyArn: eventBusInvokeRemoteEventBusPolicy.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tstopInstances, err := cloudwatch.NewEventRule(ctx, \"stop_instances\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"StopInstance\"),\n\t\t\tDescription: pulumi.String(\"Stop instances nightly\"),\n\t\t\tScheduleExpression: pulumi.String(\"cron(0 0 * * ? *)\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"stop_instances\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tTargetId: pulumi.String(\"StopInstance\"),\n\t\t\tArn: pulumi.String(\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\"),\n\t\t\tRule: stopInstances.Name,\n\t\t\tRoleArn: eventBusInvokeRemoteEventBusRole.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"events.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var eventBusInvokeRemoteEventBusRole = new Role(\"eventBusInvokeRemoteEventBusRole\", RoleArgs.builder()\n .name(\"event-bus-invoke-remote-event-bus\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var eventBusInvokeRemoteEventBus = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"events:PutEvents\")\n .resources(\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\")\n .build())\n .build());\n\n var eventBusInvokeRemoteEventBusPolicy = new Policy(\"eventBusInvokeRemoteEventBusPolicy\", PolicyArgs.builder()\n .name(\"event_bus_invoke_remote_event_bus\")\n .policy(eventBusInvokeRemoteEventBus.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var eventBusInvokeRemoteEventBusRolePolicyAttachment = new RolePolicyAttachment(\"eventBusInvokeRemoteEventBusRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .role(eventBusInvokeRemoteEventBusRole.name())\n .policyArn(eventBusInvokeRemoteEventBusPolicy.arn())\n .build());\n\n var stopInstances = new EventRule(\"stopInstances\", EventRuleArgs.builder()\n .name(\"StopInstance\")\n .description(\"Stop instances nightly\")\n .scheduleExpression(\"cron(0 0 * * ? *)\")\n .build());\n\n var stopInstancesEventTarget = new EventTarget(\"stopInstancesEventTarget\", EventTargetArgs.builder()\n .targetId(\"StopInstance\")\n .arn(\"arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\")\n .rule(stopInstances.name())\n .roleArn(eventBusInvokeRemoteEventBusRole.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n eventBusInvokeRemoteEventBusRole:\n type: aws:iam:Role\n name: event_bus_invoke_remote_event_bus\n properties:\n name: event-bus-invoke-remote-event-bus\n assumeRolePolicy: ${assumeRole.json}\n eventBusInvokeRemoteEventBusPolicy:\n type: aws:iam:Policy\n name: event_bus_invoke_remote_event_bus\n properties:\n name: event_bus_invoke_remote_event_bus\n policy: ${eventBusInvokeRemoteEventBus.json}\n eventBusInvokeRemoteEventBusRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: event_bus_invoke_remote_event_bus\n properties:\n role: ${eventBusInvokeRemoteEventBusRole.name}\n policyArn: ${eventBusInvokeRemoteEventBusPolicy.arn}\n stopInstances:\n type: aws:cloudwatch:EventRule\n name: stop_instances\n properties:\n name: StopInstance\n description: Stop instances nightly\n scheduleExpression: cron(0 0 * * ? *)\n stopInstancesEventTarget:\n type: aws:cloudwatch:EventTarget\n name: stop_instances\n properties:\n targetId: StopInstance\n arn: arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\n rule: ${stopInstances.name}\n roleArn: ${eventBusInvokeRemoteEventBusRole.arn}\nvariables:\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n actions:\n - sts:AssumeRole\n eventBusInvokeRemoteEventBus:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - events:PutEvents\n resources:\n - arn:aws:events:eu-west-1:1234567890:event-bus/My-Event-Bus\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Input Transformer Usage - JSON Object\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleEventRule = new aws.cloudwatch.EventRule(\"example\", {});\nconst example = new aws.cloudwatch.EventTarget(\"example\", {\n arn: exampleAwsLambdaFunction.arn,\n rule: exampleEventRule.id,\n inputTransformer: {\n inputPaths: {\n instance: \"$.detail.instance\",\n status: \"$.detail.status\",\n },\n inputTemplate: `{\n \"instance_id\": \u003cinstance\u003e,\n \"instance_status\": \u003cstatus\u003e\n}\n`,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_event_rule = aws.cloudwatch.EventRule(\"example\")\nexample = aws.cloudwatch.EventTarget(\"example\",\n arn=example_aws_lambda_function[\"arn\"],\n rule=example_event_rule.id,\n input_transformer={\n \"input_paths\": {\n \"instance\": \"$.detail.instance\",\n \"status\": \"$.detail.status\",\n },\n \"input_template\": \"\"\"{\n \"instance_id\": \u003cinstance\u003e,\n \"instance_status\": \u003cstatus\u003e\n}\n\"\"\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleEventRule = new Aws.CloudWatch.EventRule(\"example\");\n\n var example = new Aws.CloudWatch.EventTarget(\"example\", new()\n {\n Arn = exampleAwsLambdaFunction.Arn,\n Rule = exampleEventRule.Id,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"instance\", \"$.detail.instance\" },\n { \"status\", \"$.detail.status\" },\n },\n InputTemplate = @\"{\n \"\"instance_id\"\": \u003cinstance\u003e,\n \"\"instance_status\"\": \u003cstatus\u003e\n}\n\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleEventRule, err := cloudwatch.NewEventRule(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"example\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tRule: exampleEventRule.ID(),\n\t\t\tInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\n\t\t\t\tInputPaths: pulumi.StringMap{\n\t\t\t\t\t\"instance\": pulumi.String(\"$.detail.instance\"),\n\t\t\t\t\t\"status\": pulumi.String(\"$.detail.status\"),\n\t\t\t\t},\n\t\t\t\tInputTemplate: pulumi.String(\"{\\n \\\"instance_id\\\": \u003cinstance\u003e,\\n \\\"instance_status\\\": \u003cstatus\u003e\\n}\\n\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleEventRule = new EventRule(\"exampleEventRule\");\n\n var example = new EventTarget(\"example\", EventTargetArgs.builder()\n .arn(exampleAwsLambdaFunction.arn())\n .rule(exampleEventRule.id())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.ofEntries(\n Map.entry(\"instance\", \"$.detail.instance\"),\n Map.entry(\"status\", \"$.detail.status\")\n ))\n .inputTemplate(\"\"\"\n{\n \"instance_id\": \u003cinstance\u003e,\n \"instance_status\": \u003cstatus\u003e\n}\n \"\"\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:EventTarget\n properties:\n arn: ${exampleAwsLambdaFunction.arn}\n rule: ${exampleEventRule.id}\n inputTransformer:\n inputPaths:\n instance: $.detail.instance\n status: $.detail.status\n inputTemplate: |\n {\n \"instance_id\": \u003cinstance\u003e,\n \"instance_status\": \u003cstatus\u003e\n }\n exampleEventRule:\n type: aws:cloudwatch:EventRule\n name: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Input Transformer Usage - Simple String\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleEventRule = new aws.cloudwatch.EventRule(\"example\", {});\nconst example = new aws.cloudwatch.EventTarget(\"example\", {\n arn: exampleAwsLambdaFunction.arn,\n rule: exampleEventRule.id,\n inputTransformer: {\n inputPaths: {\n instance: \"$.detail.instance\",\n status: \"$.detail.status\",\n },\n inputTemplate: \"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_event_rule = aws.cloudwatch.EventRule(\"example\")\nexample = aws.cloudwatch.EventTarget(\"example\",\n arn=example_aws_lambda_function[\"arn\"],\n rule=example_event_rule.id,\n input_transformer={\n \"input_paths\": {\n \"instance\": \"$.detail.instance\",\n \"status\": \"$.detail.status\",\n },\n \"input_template\": \"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleEventRule = new Aws.CloudWatch.EventRule(\"example\");\n\n var example = new Aws.CloudWatch.EventTarget(\"example\", new()\n {\n Arn = exampleAwsLambdaFunction.Arn,\n Rule = exampleEventRule.Id,\n InputTransformer = new Aws.CloudWatch.Inputs.EventTargetInputTransformerArgs\n {\n InputPaths = \n {\n { \"instance\", \"$.detail.instance\" },\n { \"status\", \"$.detail.status\" },\n },\n InputTemplate = \"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleEventRule, err := cloudwatch.NewEventRule(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"example\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tArn: pulumi.Any(exampleAwsLambdaFunction.Arn),\n\t\t\tRule: exampleEventRule.ID(),\n\t\t\tInputTransformer: \u0026cloudwatch.EventTargetInputTransformerArgs{\n\t\t\t\tInputPaths: pulumi.StringMap{\n\t\t\t\t\t\"instance\": pulumi.String(\"$.detail.instance\"),\n\t\t\t\t\t\"status\": pulumi.String(\"$.detail.status\"),\n\t\t\t\t},\n\t\t\t\tInputTemplate: pulumi.String(\"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport com.pulumi.aws.cloudwatch.inputs.EventTargetInputTransformerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleEventRule = new EventRule(\"exampleEventRule\");\n\n var example = new EventTarget(\"example\", EventTargetArgs.builder()\n .arn(exampleAwsLambdaFunction.arn())\n .rule(exampleEventRule.id())\n .inputTransformer(EventTargetInputTransformerArgs.builder()\n .inputPaths(Map.ofEntries(\n Map.entry(\"instance\", \"$.detail.instance\"),\n Map.entry(\"status\", \"$.detail.status\")\n ))\n .inputTemplate(\"\\\"\u003cinstance\u003e is in state \u003cstatus\u003e\\\"\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:EventTarget\n properties:\n arn: ${exampleAwsLambdaFunction.arn}\n rule: ${exampleEventRule.id}\n inputTransformer:\n inputPaths:\n instance: $.detail.instance\n status: $.detail.status\n inputTemplate: '\"\u003cinstance\u003e is in state \u003cstatus\u003e\"'\n exampleEventRule:\n type: aws:cloudwatch:EventRule\n name: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Cloudwatch Log Group Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudwatch.LogGroup(\"example\", {\n name: \"/aws/events/guardduty/logs\",\n retentionInDays: 1,\n});\nconst exampleEventRule = new aws.cloudwatch.EventRule(\"example\", {\n name: \"guard-duty_event_rule\",\n description: \"GuardDuty Findings\",\n eventPattern: JSON.stringify({\n source: [\"aws.guardduty\"],\n }),\n tags: {\n Environment: \"example\",\n },\n});\nconst exampleLogPolicy = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n actions: [\"logs:CreateLogStream\"],\n resources: [pulumi.interpolate`${example.arn}:*`],\n principals: [{\n type: \"Service\",\n identifiers: [\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n ],\n }],\n },\n {\n effect: \"Allow\",\n actions: [\"logs:PutLogEvents\"],\n resources: [pulumi.interpolate`${example.arn}:*:*`],\n principals: [{\n type: \"Service\",\n identifiers: [\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n ],\n }],\n conditions: [{\n test: \"ArnEquals\",\n values: [exampleEventRule.arn],\n variable: \"aws:SourceArn\",\n }],\n },\n ],\n});\nconst exampleLogResourcePolicy = new aws.cloudwatch.LogResourcePolicy(\"example\", {\n policyDocument: exampleLogPolicy.apply(exampleLogPolicy =\u003e exampleLogPolicy.json),\n policyName: \"guardduty-log-publishing-policy\",\n});\nconst exampleEventTarget = new aws.cloudwatch.EventTarget(\"example\", {\n rule: exampleEventRule.name,\n arn: example.arn,\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\",\n name=\"/aws/events/guardduty/logs\",\n retention_in_days=1)\nexample_event_rule = aws.cloudwatch.EventRule(\"example\",\n name=\"guard-duty_event_rule\",\n description=\"GuardDuty Findings\",\n event_pattern=json.dumps({\n \"source\": [\"aws.guardduty\"],\n }),\n tags={\n \"Environment\": \"example\",\n })\nexample_log_policy = aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\"logs:CreateLogStream\"],\n \"resources\": [example.arn.apply(lambda arn: f\"{arn}:*\")],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n ],\n }],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"logs:PutLogEvents\"],\n \"resources\": [example.arn.apply(lambda arn: f\"{arn}:*:*\")],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n ],\n }],\n \"conditions\": [{\n \"test\": \"ArnEquals\",\n \"values\": [example_event_rule.arn],\n \"variable\": \"aws:SourceArn\",\n }],\n },\n])\nexample_log_resource_policy = aws.cloudwatch.LogResourcePolicy(\"example\",\n policy_document=example_log_policy.json,\n policy_name=\"guardduty-log-publishing-policy\")\nexample_event_target = aws.cloudwatch.EventTarget(\"example\",\n rule=example_event_rule.name,\n arn=example.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"/aws/events/guardduty/logs\",\n RetentionInDays = 1,\n });\n\n var exampleEventRule = new Aws.CloudWatch.EventRule(\"example\", new()\n {\n Name = \"guard-duty_event_rule\",\n Description = \"GuardDuty Findings\",\n EventPattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"source\"] = new[]\n {\n \"aws.guardduty\",\n },\n }),\n Tags = \n {\n { \"Environment\", \"example\" },\n },\n });\n\n var exampleLogPolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"logs:CreateLogStream\",\n },\n Resources = new[]\n {\n $\"{example.Arn}:*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"logs:PutLogEvents\",\n },\n Resources = new[]\n {\n $\"{example.Arn}:*:*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\",\n },\n },\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"ArnEquals\",\n Values = new[]\n {\n exampleEventRule.Arn,\n },\n Variable = \"aws:SourceArn\",\n },\n },\n },\n },\n });\n\n var exampleLogResourcePolicy = new Aws.CloudWatch.LogResourcePolicy(\"example\", new()\n {\n PolicyDocument = exampleLogPolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n PolicyName = \"guardduty-log-publishing-policy\",\n });\n\n var exampleEventTarget = new Aws.CloudWatch.EventTarget(\"example\", new()\n {\n Rule = exampleEventRule.Name,\n Arn = example.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"/aws/events/guardduty/logs\"),\n\t\t\tRetentionInDays: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"source\": []string{\n\t\t\t\t\"aws.guardduty\",\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texampleEventRule, err := cloudwatch.NewEventRule(ctx, \"example\", \u0026cloudwatch.EventRuleArgs{\n\t\t\tName: pulumi.String(\"guard-duty_event_rule\"),\n\t\t\tDescription: pulumi.String(\"GuardDuty Findings\"),\n\t\t\tEventPattern: pulumi.String(json0),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Environment\": pulumi.String(\"example\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleLogPolicy := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"logs:CreateLogStream\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texample.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v:*\", arn), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"events.amazonaws.com\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"delivery.logs.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"logs:PutLogEvents\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texample.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v:*:*\", arn), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"events.amazonaws.com\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"delivery.logs.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"ArnEquals\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\texampleEventRule.Arn,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tVariable: pulumi.String(\"aws:SourceArn\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\t_, err = cloudwatch.NewLogResourcePolicy(ctx, \"example\", \u0026cloudwatch.LogResourcePolicyArgs{\n\t\t\tPolicyDocument: pulumi.String(exampleLogPolicy.ApplyT(func(exampleLogPolicy iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026exampleLogPolicy.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tPolicyName: pulumi.String(\"guardduty-log-publishing-policy\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewEventTarget(ctx, \"example\", \u0026cloudwatch.EventTargetArgs{\n\t\t\tRule: exampleEventRule.Name,\n\t\t\tArn: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.cloudwatch.EventRule;\nimport com.pulumi.aws.cloudwatch.EventRuleArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicy;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicyArgs;\nimport com.pulumi.aws.cloudwatch.EventTarget;\nimport com.pulumi.aws.cloudwatch.EventTargetArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new LogGroup(\"example\", LogGroupArgs.builder()\n .name(\"/aws/events/guardduty/logs\")\n .retentionInDays(1)\n .build());\n\n var exampleEventRule = new EventRule(\"exampleEventRule\", EventRuleArgs.builder()\n .name(\"guard-duty_event_rule\")\n .description(\"GuardDuty Findings\")\n .eventPattern(serializeJson(\n jsonObject(\n jsonProperty(\"source\", jsonArray(\"aws.guardduty\"))\n )))\n .tags(Map.of(\"Environment\", \"example\"))\n .build());\n\n final var exampleLogPolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"logs:CreateLogStream\")\n .resources(example.arn().applyValue(arn -\u003e String.format(\"%s:*\", arn)))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers( \n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\")\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"logs:PutLogEvents\")\n .resources(example.arn().applyValue(arn -\u003e String.format(\"%s:*:*\", arn)))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers( \n \"events.amazonaws.com\",\n \"delivery.logs.amazonaws.com\")\n .build())\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"ArnEquals\")\n .values(exampleEventRule.arn())\n .variable(\"aws:SourceArn\")\n .build())\n .build())\n .build());\n\n var exampleLogResourcePolicy = new LogResourcePolicy(\"exampleLogResourcePolicy\", LogResourcePolicyArgs.builder()\n .policyDocument(exampleLogPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(exampleLogPolicy -\u003e exampleLogPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .policyName(\"guardduty-log-publishing-policy\")\n .build());\n\n var exampleEventTarget = new EventTarget(\"exampleEventTarget\", EventTargetArgs.builder()\n .rule(exampleEventRule.name())\n .arn(example.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: /aws/events/guardduty/logs\n retentionInDays: 1\n exampleLogResourcePolicy:\n type: aws:cloudwatch:LogResourcePolicy\n name: example\n properties:\n policyDocument: ${exampleLogPolicy.json}\n policyName: guardduty-log-publishing-policy\n exampleEventRule:\n type: aws:cloudwatch:EventRule\n name: example\n properties:\n name: guard-duty_event_rule\n description: GuardDuty Findings\n eventPattern:\n fn::toJSON:\n source:\n - aws.guardduty\n tags:\n Environment: example\n exampleEventTarget:\n type: aws:cloudwatch:EventTarget\n name: example\n properties:\n rule: ${exampleEventRule.name}\n arn: ${example.arn}\nvariables:\n exampleLogPolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - logs:CreateLogStream\n resources:\n - ${example.arn}:*\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n - delivery.logs.amazonaws.com\n - effect: Allow\n actions:\n - logs:PutLogEvents\n resources:\n - ${example.arn}:*:*\n principals:\n - type: Service\n identifiers:\n - events.amazonaws.com\n - delivery.logs.amazonaws.com\n conditions:\n - test: ArnEquals\n values:\n - ${exampleEventRule.arn}\n variable: aws:SourceArn\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import EventBridge Targets using `event_bus_name/rule-name/target-id` (if you omit `event_bus_name`, the `default` event bus will be used). For example:\n\n```sh\n$ pulumi import aws:cloudwatch/eventTarget:EventTarget test-event-target rule-name/target-id\n```\n", "properties": { "arn": { "type": "string", @@ -200936,7 +200936,7 @@ } }, "aws:cloudwatch/logAccountPolicy:LogAccountPolicy": { - "description": "Provides a CloudWatch Log Account Policy resource.\n\n## Example Usage\n\n### Account Data Protection Policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst dataProtection = new aws.cloudwatch.LogAccountPolicy(\"data_protection\", {\n policyName: \"data-protection\",\n policyType: \"DATA_PROTECTION_POLICY\",\n policyDocument: JSON.stringify({\n Name: \"DataProtection\",\n Version: \"2021-06-01\",\n Statement: [\n {\n Sid: \"Audit\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Audit: {\n FindingsDestination: {},\n },\n },\n },\n {\n Sid: \"Redact\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Deidentify: {\n MaskConfig: {},\n },\n },\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ndata_protection = aws.cloudwatch.LogAccountPolicy(\"data_protection\",\n policy_name=\"data-protection\",\n policy_type=\"DATA_PROTECTION_POLICY\",\n policy_document=json.dumps({\n \"Name\": \"DataProtection\",\n \"Version\": \"2021-06-01\",\n \"Statement\": [\n {\n \"Sid\": \"Audit\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Audit\": {\n \"FindingsDestination\": {},\n },\n },\n },\n {\n \"Sid\": \"Redact\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Deidentify\": {\n \"MaskConfig\": {},\n },\n },\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dataProtection = new Aws.CloudWatch.LogAccountPolicy(\"data_protection\", new()\n {\n PolicyName = \"data-protection\",\n PolicyType = \"DATA_PROTECTION_POLICY\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Name\"] = \"DataProtection\",\n [\"Version\"] = \"2021-06-01\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Audit\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Audit\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"FindingsDestination\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Redact\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Deidentify\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"MaskConfig\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Name\": \"DataProtection\",\n\t\t\t\"Version\": \"2021-06-01\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Audit\",\n\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\"Audit\": map[string]interface{}{\n\t\t\t\t\t\t\t\"FindingsDestination\": nil,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Redact\",\n\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\"Deidentify\": map[string]interface{}{\n\t\t\t\t\t\t\t\"MaskConfig\": nil,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = cloudwatch.NewLogAccountPolicy(ctx, \"data_protection\", \u0026cloudwatch.LogAccountPolicyArgs{\n\t\t\tPolicyName: pulumi.String(\"data-protection\"),\n\t\t\tPolicyType: pulumi.String(\"DATA_PROTECTION_POLICY\"),\n\t\t\tPolicyDocument: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogAccountPolicy;\nimport com.pulumi.aws.cloudwatch.LogAccountPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var dataProtection = new LogAccountPolicy(\"dataProtection\", LogAccountPolicyArgs.builder()\n .policyName(\"data-protection\")\n .policyType(\"DATA_PROTECTION_POLICY\")\n .policyDocument(serializeJson(\n jsonObject(\n jsonProperty(\"Name\", \"DataProtection\"),\n jsonProperty(\"Version\", \"2021-06-01\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Audit\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Audit\", jsonObject(\n jsonProperty(\"FindingsDestination\", jsonObject(\n\n ))\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Redact\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Deidentify\", jsonObject(\n jsonProperty(\"MaskConfig\", jsonObject(\n\n ))\n ))\n ))\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dataProtection:\n type: aws:cloudwatch:LogAccountPolicy\n name: data_protection\n properties:\n policyName: data-protection\n policyType: DATA_PROTECTION_POLICY\n policyDocument:\n fn::toJSON:\n Name: DataProtection\n Version: 2021-06-01\n Statement:\n - Sid: Audit\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Audit:\n FindingsDestination: {}\n - Sid: Redact\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Deidentify:\n MaskConfig: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Subscription Filter Policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst subscriptionFilter = new aws.cloudwatch.LogAccountPolicy(\"subscription_filter\", {\n policyName: \"subscription-filter\",\n policyType: \"SUBSCRIPTION_FILTER_POLICY\",\n policyDocument: JSON.stringify({\n DestinationArn: test.arn,\n FilterPattern: \"test\",\n }),\n selectionCriteria: \"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nsubscription_filter = aws.cloudwatch.LogAccountPolicy(\"subscription_filter\",\n policy_name=\"subscription-filter\",\n policy_type=\"SUBSCRIPTION_FILTER_POLICY\",\n policy_document=json.dumps({\n \"DestinationArn\": test[\"arn\"],\n \"FilterPattern\": \"test\",\n }),\n selection_criteria=\"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var subscriptionFilter = new Aws.CloudWatch.LogAccountPolicy(\"subscription_filter\", new()\n {\n PolicyName = \"subscription-filter\",\n PolicyType = \"SUBSCRIPTION_FILTER_POLICY\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"DestinationArn\"] = test.Arn,\n [\"FilterPattern\"] = \"test\",\n }),\n SelectionCriteria = \"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"DestinationArn\": test.Arn,\n\t\t\t\"FilterPattern\": \"test\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = cloudwatch.NewLogAccountPolicy(ctx, \"subscription_filter\", \u0026cloudwatch.LogAccountPolicyArgs{\n\t\t\tPolicyName: pulumi.String(\"subscription-filter\"),\n\t\t\tPolicyType: pulumi.String(\"SUBSCRIPTION_FILTER_POLICY\"),\n\t\t\tPolicyDocument: pulumi.String(json0),\n\t\t\tSelectionCriteria: pulumi.String(\"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogAccountPolicy;\nimport com.pulumi.aws.cloudwatch.LogAccountPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var subscriptionFilter = new LogAccountPolicy(\"subscriptionFilter\", LogAccountPolicyArgs.builder()\n .policyName(\"subscription-filter\")\n .policyType(\"SUBSCRIPTION_FILTER_POLICY\")\n .policyDocument(serializeJson(\n jsonObject(\n jsonProperty(\"DestinationArn\", test.arn()),\n jsonProperty(\"FilterPattern\", \"test\")\n )))\n .selectionCriteria(\"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n subscriptionFilter:\n type: aws:cloudwatch:LogAccountPolicy\n name: subscription_filter\n properties:\n policyName: subscription-filter\n policyType: SUBSCRIPTION_FILTER_POLICY\n policyDocument:\n fn::toJSON:\n DestinationArn: ${test.arn}\n FilterPattern: test\n selectionCriteria: LogGroupName NOT IN [\"excluded_log_group_name\"]\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import this resource using the `policy_name` and `policy_type` separated by `:`. For example:\n\n```sh\n$ pulumi import aws:cloudwatch/logAccountPolicy:LogAccountPolicy example \"my-account-policy:SUBSCRIPTION_FILTER_POLICY\"\n```\n", + "description": "Provides a CloudWatch Log Account Policy resource.\n\n## Example Usage\n\n### Account Data Protection Policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst dataProtection = new aws.cloudwatch.LogAccountPolicy(\"data_protection\", {\n policyName: \"data-protection\",\n policyType: \"DATA_PROTECTION_POLICY\",\n policyDocument: JSON.stringify({\n Name: \"DataProtection\",\n Version: \"2021-06-01\",\n Statement: [\n {\n Sid: \"Audit\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Audit: {\n FindingsDestination: {},\n },\n },\n },\n {\n Sid: \"Redact\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Deidentify: {\n MaskConfig: {},\n },\n },\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ndata_protection = aws.cloudwatch.LogAccountPolicy(\"data_protection\",\n policy_name=\"data-protection\",\n policy_type=\"DATA_PROTECTION_POLICY\",\n policy_document=json.dumps({\n \"Name\": \"DataProtection\",\n \"Version\": \"2021-06-01\",\n \"Statement\": [\n {\n \"Sid\": \"Audit\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Audit\": {\n \"FindingsDestination\": {},\n },\n },\n },\n {\n \"Sid\": \"Redact\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Deidentify\": {\n \"MaskConfig\": {},\n },\n },\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dataProtection = new Aws.CloudWatch.LogAccountPolicy(\"data_protection\", new()\n {\n PolicyName = \"data-protection\",\n PolicyType = \"DATA_PROTECTION_POLICY\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Name\"] = \"DataProtection\",\n [\"Version\"] = \"2021-06-01\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Audit\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Audit\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"FindingsDestination\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Redact\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Deidentify\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"MaskConfig\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Name\": \"DataProtection\",\n\t\t\t\"Version\": \"2021-06-01\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Audit\",\n\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\"Audit\": map[string]interface{}{\n\t\t\t\t\t\t\t\"FindingsDestination\": map[string]interface{}{},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Redact\",\n\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\"Deidentify\": map[string]interface{}{\n\t\t\t\t\t\t\t\"MaskConfig\": map[string]interface{}{},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = cloudwatch.NewLogAccountPolicy(ctx, \"data_protection\", \u0026cloudwatch.LogAccountPolicyArgs{\n\t\t\tPolicyName: pulumi.String(\"data-protection\"),\n\t\t\tPolicyType: pulumi.String(\"DATA_PROTECTION_POLICY\"),\n\t\t\tPolicyDocument: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogAccountPolicy;\nimport com.pulumi.aws.cloudwatch.LogAccountPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var dataProtection = new LogAccountPolicy(\"dataProtection\", LogAccountPolicyArgs.builder()\n .policyName(\"data-protection\")\n .policyType(\"DATA_PROTECTION_POLICY\")\n .policyDocument(serializeJson(\n jsonObject(\n jsonProperty(\"Name\", \"DataProtection\"),\n jsonProperty(\"Version\", \"2021-06-01\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Audit\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Audit\", jsonObject(\n jsonProperty(\"FindingsDestination\", jsonObject(\n\n ))\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Redact\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Deidentify\", jsonObject(\n jsonProperty(\"MaskConfig\", jsonObject(\n\n ))\n ))\n ))\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dataProtection:\n type: aws:cloudwatch:LogAccountPolicy\n name: data_protection\n properties:\n policyName: data-protection\n policyType: DATA_PROTECTION_POLICY\n policyDocument:\n fn::toJSON:\n Name: DataProtection\n Version: 2021-06-01\n Statement:\n - Sid: Audit\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Audit:\n FindingsDestination: {}\n - Sid: Redact\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Deidentify:\n MaskConfig: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Subscription Filter Policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst subscriptionFilter = new aws.cloudwatch.LogAccountPolicy(\"subscription_filter\", {\n policyName: \"subscription-filter\",\n policyType: \"SUBSCRIPTION_FILTER_POLICY\",\n policyDocument: JSON.stringify({\n DestinationArn: test.arn,\n FilterPattern: \"test\",\n }),\n selectionCriteria: \"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\",\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nsubscription_filter = aws.cloudwatch.LogAccountPolicy(\"subscription_filter\",\n policy_name=\"subscription-filter\",\n policy_type=\"SUBSCRIPTION_FILTER_POLICY\",\n policy_document=json.dumps({\n \"DestinationArn\": test[\"arn\"],\n \"FilterPattern\": \"test\",\n }),\n selection_criteria=\"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var subscriptionFilter = new Aws.CloudWatch.LogAccountPolicy(\"subscription_filter\", new()\n {\n PolicyName = \"subscription-filter\",\n PolicyType = \"SUBSCRIPTION_FILTER_POLICY\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"DestinationArn\"] = test.Arn,\n [\"FilterPattern\"] = \"test\",\n }),\n SelectionCriteria = \"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"DestinationArn\": test.Arn,\n\t\t\t\"FilterPattern\": \"test\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = cloudwatch.NewLogAccountPolicy(ctx, \"subscription_filter\", \u0026cloudwatch.LogAccountPolicyArgs{\n\t\t\tPolicyName: pulumi.String(\"subscription-filter\"),\n\t\t\tPolicyType: pulumi.String(\"SUBSCRIPTION_FILTER_POLICY\"),\n\t\t\tPolicyDocument: pulumi.String(json0),\n\t\t\tSelectionCriteria: pulumi.String(\"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogAccountPolicy;\nimport com.pulumi.aws.cloudwatch.LogAccountPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var subscriptionFilter = new LogAccountPolicy(\"subscriptionFilter\", LogAccountPolicyArgs.builder()\n .policyName(\"subscription-filter\")\n .policyType(\"SUBSCRIPTION_FILTER_POLICY\")\n .policyDocument(serializeJson(\n jsonObject(\n jsonProperty(\"DestinationArn\", test.arn()),\n jsonProperty(\"FilterPattern\", \"test\")\n )))\n .selectionCriteria(\"LogGroupName NOT IN [\\\"excluded_log_group_name\\\"]\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n subscriptionFilter:\n type: aws:cloudwatch:LogAccountPolicy\n name: subscription_filter\n properties:\n policyName: subscription-filter\n policyType: SUBSCRIPTION_FILTER_POLICY\n policyDocument:\n fn::toJSON:\n DestinationArn: ${test.arn}\n FilterPattern: test\n selectionCriteria: LogGroupName NOT IN [\"excluded_log_group_name\"]\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import this resource using the `policy_name` and `policy_type` separated by `:`. For example:\n\n```sh\n$ pulumi import aws:cloudwatch/logAccountPolicy:LogAccountPolicy example \"my-account-policy:SUBSCRIPTION_FILTER_POLICY\"\n```\n", "properties": { "policyDocument": { "type": "string", @@ -201025,7 +201025,7 @@ } }, "aws:cloudwatch/logDataProtectionPolicy:LogDataProtectionPolicy": { - "description": "Provides a CloudWatch Log Data Protection Policy resource.\n\nRead more about protecting sensitive user data in the [User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudwatch.LogGroup(\"example\", {name: \"example\"});\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {bucket: \"example\"});\nconst exampleLogDataProtectionPolicy = new aws.cloudwatch.LogDataProtectionPolicy(\"example\", {\n logGroupName: example.name,\n policyDocument: pulumi.jsonStringify({\n Name: \"Example\",\n Version: \"2021-06-01\",\n Statement: [\n {\n Sid: \"Audit\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Audit: {\n FindingsDestination: {\n S3: {\n Bucket: exampleBucketV2.bucket,\n },\n },\n },\n },\n },\n {\n Sid: \"Redact\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Deidentify: {\n MaskConfig: {},\n },\n },\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"example\")\nexample_bucket_v2 = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_log_data_protection_policy = aws.cloudwatch.LogDataProtectionPolicy(\"example\",\n log_group_name=example.name,\n policy_document=pulumi.Output.json_dumps({\n \"Name\": \"Example\",\n \"Version\": \"2021-06-01\",\n \"Statement\": [\n {\n \"Sid\": \"Audit\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Audit\": {\n \"FindingsDestination\": {\n \"S3\": {\n \"Bucket\": example_bucket_v2.bucket,\n },\n },\n },\n },\n },\n {\n \"Sid\": \"Redact\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Deidentify\": {\n \"MaskConfig\": {},\n },\n },\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example\",\n });\n\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var exampleLogDataProtectionPolicy = new Aws.CloudWatch.LogDataProtectionPolicy(\"example\", new()\n {\n LogGroupName = example.Name,\n PolicyDocument = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Name\"] = \"Example\",\n [\"Version\"] = \"2021-06-01\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Audit\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Audit\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"FindingsDestination\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"S3\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Bucket\"] = exampleBucketV2.Bucket,\n },\n },\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Redact\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Deidentify\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"MaskConfig\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n },\n },\n })),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewLogDataProtectionPolicy(ctx, \"example\", \u0026cloudwatch.LogDataProtectionPolicyArgs{\n\t\t\tLogGroupName: example.Name,\n\t\t\tPolicyDocument: exampleBucketV2.Bucket.ApplyT(func(bucket string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Name\": \"Example\",\n\t\t\t\t\t\"Version\": \"2021-06-01\",\n\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Sid\": \"Audit\",\n\t\t\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"Audit\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"FindingsDestination\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\t\"S3\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\t\t\"Bucket\": bucket,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Sid\": \"Redact\",\n\t\t\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"Deidentify\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"MaskConfig\": nil,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.cloudwatch.LogDataProtectionPolicy;\nimport com.pulumi.aws.cloudwatch.LogDataProtectionPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new LogGroup(\"example\", LogGroupArgs.builder()\n .name(\"example\")\n .build());\n\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"example\")\n .build());\n\n var exampleLogDataProtectionPolicy = new LogDataProtectionPolicy(\"exampleLogDataProtectionPolicy\", LogDataProtectionPolicyArgs.builder()\n .logGroupName(example.name())\n .policyDocument(exampleBucketV2.bucket().applyValue(bucket -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Name\", \"Example\"),\n jsonProperty(\"Version\", \"2021-06-01\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Audit\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Audit\", jsonObject(\n jsonProperty(\"FindingsDestination\", jsonObject(\n jsonProperty(\"S3\", jsonObject(\n jsonProperty(\"Bucket\", bucket)\n ))\n ))\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Redact\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Deidentify\", jsonObject(\n jsonProperty(\"MaskConfig\", jsonObject(\n\n ))\n ))\n ))\n )\n ))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: example\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: example\n exampleLogDataProtectionPolicy:\n type: aws:cloudwatch:LogDataProtectionPolicy\n name: example\n properties:\n logGroupName: ${example.name}\n policyDocument:\n fn::toJSON:\n Name: Example\n Version: 2021-06-01\n Statement:\n - Sid: Audit\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Audit:\n FindingsDestination:\n S3:\n Bucket: ${exampleBucketV2.bucket}\n - Sid: Redact\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Deidentify:\n MaskConfig: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import this resource using the `log_group_name`. For example:\n\n```sh\n$ pulumi import aws:cloudwatch/logDataProtectionPolicy:LogDataProtectionPolicy example my-log-group\n```\n", + "description": "Provides a CloudWatch Log Data Protection Policy resource.\n\nRead more about protecting sensitive user data in the [User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudwatch.LogGroup(\"example\", {name: \"example\"});\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {bucket: \"example\"});\nconst exampleLogDataProtectionPolicy = new aws.cloudwatch.LogDataProtectionPolicy(\"example\", {\n logGroupName: example.name,\n policyDocument: pulumi.jsonStringify({\n Name: \"Example\",\n Version: \"2021-06-01\",\n Statement: [\n {\n Sid: \"Audit\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Audit: {\n FindingsDestination: {\n S3: {\n Bucket: exampleBucketV2.bucket,\n },\n },\n },\n },\n },\n {\n Sid: \"Redact\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Deidentify: {\n MaskConfig: {},\n },\n },\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"example\")\nexample_bucket_v2 = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_log_data_protection_policy = aws.cloudwatch.LogDataProtectionPolicy(\"example\",\n log_group_name=example.name,\n policy_document=pulumi.Output.json_dumps({\n \"Name\": \"Example\",\n \"Version\": \"2021-06-01\",\n \"Statement\": [\n {\n \"Sid\": \"Audit\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Audit\": {\n \"FindingsDestination\": {\n \"S3\": {\n \"Bucket\": example_bucket_v2.bucket,\n },\n },\n },\n },\n },\n {\n \"Sid\": \"Redact\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Deidentify\": {\n \"MaskConfig\": {},\n },\n },\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example\",\n });\n\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var exampleLogDataProtectionPolicy = new Aws.CloudWatch.LogDataProtectionPolicy(\"example\", new()\n {\n LogGroupName = example.Name,\n PolicyDocument = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Name\"] = \"Example\",\n [\"Version\"] = \"2021-06-01\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Audit\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Audit\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"FindingsDestination\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"S3\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Bucket\"] = exampleBucketV2.Bucket,\n },\n },\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Redact\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Deidentify\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"MaskConfig\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n },\n },\n })),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewLogDataProtectionPolicy(ctx, \"example\", \u0026cloudwatch.LogDataProtectionPolicyArgs{\n\t\t\tLogGroupName: example.Name,\n\t\t\tPolicyDocument: exampleBucketV2.Bucket.ApplyT(func(bucket string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Name\": \"Example\",\n\t\t\t\t\t\"Version\": \"2021-06-01\",\n\t\t\t\t\t\"Statement\": []interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Sid\": \"Audit\",\n\t\t\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"Audit\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"FindingsDestination\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\t\"S3\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\t\t\"Bucket\": bucket,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Sid\": \"Redact\",\n\t\t\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"Deidentify\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"MaskConfig\": map[string]interface{}{},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.cloudwatch.LogDataProtectionPolicy;\nimport com.pulumi.aws.cloudwatch.LogDataProtectionPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new LogGroup(\"example\", LogGroupArgs.builder()\n .name(\"example\")\n .build());\n\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"example\")\n .build());\n\n var exampleLogDataProtectionPolicy = new LogDataProtectionPolicy(\"exampleLogDataProtectionPolicy\", LogDataProtectionPolicyArgs.builder()\n .logGroupName(example.name())\n .policyDocument(exampleBucketV2.bucket().applyValue(bucket -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Name\", \"Example\"),\n jsonProperty(\"Version\", \"2021-06-01\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Audit\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Audit\", jsonObject(\n jsonProperty(\"FindingsDestination\", jsonObject(\n jsonProperty(\"S3\", jsonObject(\n jsonProperty(\"Bucket\", bucket)\n ))\n ))\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Redact\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Deidentify\", jsonObject(\n jsonProperty(\"MaskConfig\", jsonObject(\n\n ))\n ))\n ))\n )\n ))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: example\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: example\n exampleLogDataProtectionPolicy:\n type: aws:cloudwatch:LogDataProtectionPolicy\n name: example\n properties:\n logGroupName: ${example.name}\n policyDocument:\n fn::toJSON:\n Name: Example\n Version: 2021-06-01\n Statement:\n - Sid: Audit\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Audit:\n FindingsDestination:\n S3:\n Bucket: ${exampleBucketV2.bucket}\n - Sid: Redact\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Deidentify:\n MaskConfig: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import this resource using the `log_group_name`. For example:\n\n```sh\n$ pulumi import aws:cloudwatch/logDataProtectionPolicy:LogDataProtectionPolicy example my-log-group\n```\n", "properties": { "logGroupName": { "type": "string", @@ -203571,7 +203571,7 @@ } }, "aws:codebuild/reportGroup:ReportGroup": { - "description": "Provides a CodeBuild Report Groups Resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"Enable IAM User Permissions\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current.accountId}:root`],\n }],\n actions: [\"kms:*\"],\n resources: [\"*\"],\n }],\n}));\nconst exampleKey = new aws.kms.Key(\"example\", {\n description: \"my test kms key\",\n deletionWindowInDays: 7,\n policy: example.then(example =\u003e example.json),\n});\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {bucket: \"my-test\"});\nconst exampleReportGroup = new aws.codebuild.ReportGroup(\"example\", {\n name: \"my test report group\",\n type: \"TEST\",\n exportConfig: {\n type: \"S3\",\n s3Destination: {\n bucket: exampleBucketV2.id,\n encryptionDisabled: false,\n encryptionKey: exampleKey.arn,\n packaging: \"NONE\",\n path: \"/some\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.iam.get_policy_document(statements=[{\n \"sid\": \"Enable IAM User Permissions\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n \"actions\": [\"kms:*\"],\n \"resources\": [\"*\"],\n}])\nexample_key = aws.kms.Key(\"example\",\n description=\"my test kms key\",\n deletion_window_in_days=7,\n policy=example.json)\nexample_bucket_v2 = aws.s3.BucketV2(\"example\", bucket=\"my-test\")\nexample_report_group = aws.codebuild.ReportGroup(\"example\",\n name=\"my test report group\",\n type=\"TEST\",\n export_config={\n \"type\": \"S3\",\n \"s3_destination\": {\n \"bucket\": example_bucket_v2.id,\n \"encryption_disabled\": False,\n \"encryption_key\": example_key.arn,\n \"packaging\": \"NONE\",\n \"path\": \"/some\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Enable IAM User Permissions\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var exampleKey = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"my test kms key\",\n DeletionWindowInDays = 7,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-test\",\n });\n\n var exampleReportGroup = new Aws.CodeBuild.ReportGroup(\"example\", new()\n {\n Name = \"my test report group\",\n Type = \"TEST\",\n ExportConfig = new Aws.CodeBuild.Inputs.ReportGroupExportConfigArgs\n {\n Type = \"S3\",\n S3Destination = new Aws.CodeBuild.Inputs.ReportGroupExportConfigS3DestinationArgs\n {\n Bucket = exampleBucketV2.Id,\n EncryptionDisabled = false,\n EncryptionKey = exampleKey.Arn,\n Packaging = \"NONE\",\n Path = \"/some\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Enable IAM User Permissions\"),\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKey, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"my test kms key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-test\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codebuild.NewReportGroup(ctx, \"example\", \u0026codebuild.ReportGroupArgs{\n\t\t\tName: pulumi.String(\"my test report group\"),\n\t\t\tType: pulumi.String(\"TEST\"),\n\t\t\tExportConfig: \u0026codebuild.ReportGroupExportConfigArgs{\n\t\t\t\tType: pulumi.String(\"S3\"),\n\t\t\t\tS3Destination: \u0026codebuild.ReportGroupExportConfigS3DestinationArgs{\n\t\t\t\t\tBucket: exampleBucketV2.ID(),\n\t\t\t\t\tEncryptionDisabled: pulumi.Bool(false),\n\t\t\t\t\tEncryptionKey: exampleKey.Arn,\n\t\t\t\t\tPackaging: pulumi.String(\"NONE\"),\n\t\t\t\t\tPath: pulumi.String(\"/some\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.codebuild.ReportGroup;\nimport com.pulumi.aws.codebuild.ReportGroupArgs;\nimport com.pulumi.aws.codebuild.inputs.ReportGroupExportConfigArgs;\nimport com.pulumi.aws.codebuild.inputs.ReportGroupExportConfigS3DestinationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"Enable IAM User Permissions\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .actions(\"kms:*\")\n .resources(\"*\")\n .build())\n .build());\n\n var exampleKey = new Key(\"exampleKey\", KeyArgs.builder()\n .description(\"my test kms key\")\n .deletionWindowInDays(7)\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"my-test\")\n .build());\n\n var exampleReportGroup = new ReportGroup(\"exampleReportGroup\", ReportGroupArgs.builder()\n .name(\"my test report group\")\n .type(\"TEST\")\n .exportConfig(ReportGroupExportConfigArgs.builder()\n .type(\"S3\")\n .s3Destination(ReportGroupExportConfigS3DestinationArgs.builder()\n .bucket(exampleBucketV2.id())\n .encryptionDisabled(false)\n .encryptionKey(exampleKey.arn())\n .packaging(\"NONE\")\n .path(\"/some\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleKey:\n type: aws:kms:Key\n name: example\n properties:\n description: my test kms key\n deletionWindowInDays: 7\n policy: ${example.json}\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: my-test\n exampleReportGroup:\n type: aws:codebuild:ReportGroup\n name: example\n properties:\n name: my test report group\n type: TEST\n exportConfig:\n type: S3\n s3Destination:\n bucket: ${exampleBucketV2.id}\n encryptionDisabled: false\n encryptionKey: ${exampleKey.arn}\n packaging: NONE\n path: /some\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Enable IAM User Permissions\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n actions:\n - kms:*\n resources:\n - '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodeBuild Report Group using the CodeBuild Report Group arn. For example:\n\n```sh\n$ pulumi import aws:codebuild/reportGroup:ReportGroup example arn:aws:codebuild:us-west-2:123456789:report-group/report-group-name\n```\n", + "description": "Provides a CodeBuild Report Groups Resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"Enable IAM User Permissions\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current.accountId}:root`],\n }],\n actions: [\"kms:*\"],\n resources: [\"*\"],\n }],\n}));\nconst exampleKey = new aws.kms.Key(\"example\", {\n description: \"my test kms key\",\n deletionWindowInDays: 7,\n policy: example.then(example =\u003e example.json),\n});\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {bucket: \"my-test\"});\nconst exampleReportGroup = new aws.codebuild.ReportGroup(\"example\", {\n name: \"my test report group\",\n type: \"TEST\",\n exportConfig: {\n type: \"S3\",\n s3Destination: {\n bucket: exampleBucketV2.id,\n encryptionDisabled: false,\n encryptionKey: exampleKey.arn,\n packaging: \"NONE\",\n path: \"/some\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.iam.get_policy_document(statements=[{\n \"sid\": \"Enable IAM User Permissions\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n \"actions\": [\"kms:*\"],\n \"resources\": [\"*\"],\n}])\nexample_key = aws.kms.Key(\"example\",\n description=\"my test kms key\",\n deletion_window_in_days=7,\n policy=example.json)\nexample_bucket_v2 = aws.s3.BucketV2(\"example\", bucket=\"my-test\")\nexample_report_group = aws.codebuild.ReportGroup(\"example\",\n name=\"my test report group\",\n type=\"TEST\",\n export_config={\n \"type\": \"S3\",\n \"s3_destination\": {\n \"bucket\": example_bucket_v2.id,\n \"encryption_disabled\": False,\n \"encryption_key\": example_key.arn,\n \"packaging\": \"NONE\",\n \"path\": \"/some\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Enable IAM User Permissions\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var exampleKey = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"my test kms key\",\n DeletionWindowInDays = 7,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-test\",\n });\n\n var exampleReportGroup = new Aws.CodeBuild.ReportGroup(\"example\", new()\n {\n Name = \"my test report group\",\n Type = \"TEST\",\n ExportConfig = new Aws.CodeBuild.Inputs.ReportGroupExportConfigArgs\n {\n Type = \"S3\",\n S3Destination = new Aws.CodeBuild.Inputs.ReportGroupExportConfigS3DestinationArgs\n {\n Bucket = exampleBucketV2.Id,\n EncryptionDisabled = false,\n EncryptionKey = exampleKey.Arn,\n Packaging = \"NONE\",\n Path = \"/some\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Enable IAM User Permissions\"),\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKey, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"my test kms key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-test\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codebuild.NewReportGroup(ctx, \"example\", \u0026codebuild.ReportGroupArgs{\n\t\t\tName: pulumi.String(\"my test report group\"),\n\t\t\tType: pulumi.String(\"TEST\"),\n\t\t\tExportConfig: \u0026codebuild.ReportGroupExportConfigArgs{\n\t\t\t\tType: pulumi.String(\"S3\"),\n\t\t\t\tS3Destination: \u0026codebuild.ReportGroupExportConfigS3DestinationArgs{\n\t\t\t\t\tBucket: exampleBucketV2.ID(),\n\t\t\t\t\tEncryptionDisabled: pulumi.Bool(false),\n\t\t\t\t\tEncryptionKey: exampleKey.Arn,\n\t\t\t\t\tPackaging: pulumi.String(\"NONE\"),\n\t\t\t\t\tPath: pulumi.String(\"/some\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.codebuild.ReportGroup;\nimport com.pulumi.aws.codebuild.ReportGroupArgs;\nimport com.pulumi.aws.codebuild.inputs.ReportGroupExportConfigArgs;\nimport com.pulumi.aws.codebuild.inputs.ReportGroupExportConfigS3DestinationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"Enable IAM User Permissions\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .actions(\"kms:*\")\n .resources(\"*\")\n .build())\n .build());\n\n var exampleKey = new Key(\"exampleKey\", KeyArgs.builder()\n .description(\"my test kms key\")\n .deletionWindowInDays(7)\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"my-test\")\n .build());\n\n var exampleReportGroup = new ReportGroup(\"exampleReportGroup\", ReportGroupArgs.builder()\n .name(\"my test report group\")\n .type(\"TEST\")\n .exportConfig(ReportGroupExportConfigArgs.builder()\n .type(\"S3\")\n .s3Destination(ReportGroupExportConfigS3DestinationArgs.builder()\n .bucket(exampleBucketV2.id())\n .encryptionDisabled(false)\n .encryptionKey(exampleKey.arn())\n .packaging(\"NONE\")\n .path(\"/some\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleKey:\n type: aws:kms:Key\n name: example\n properties:\n description: my test kms key\n deletionWindowInDays: 7\n policy: ${example.json}\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: my-test\n exampleReportGroup:\n type: aws:codebuild:ReportGroup\n name: example\n properties:\n name: my test report group\n type: TEST\n exportConfig:\n type: S3\n s3Destination:\n bucket: ${exampleBucketV2.id}\n encryptionDisabled: false\n encryptionKey: ${exampleKey.arn}\n packaging: NONE\n path: /some\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Enable IAM User Permissions\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n actions:\n - kms:*\n resources:\n - '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodeBuild Report Group using the CodeBuild Report Group arn. For example:\n\n```sh\n$ pulumi import aws:codebuild/reportGroup:ReportGroup example arn:aws:codebuild:us-west-2:123456789:report-group/report-group-name\n```\n", "properties": { "arn": { "type": "string", @@ -203701,7 +203701,7 @@ } }, "aws:codebuild/resourcePolicy:ResourcePolicy": { - "description": "Provides a CodeBuild Resource Policy Resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.codebuild.ReportGroup(\"example\", {\n name: \"example\",\n type: \"TEST\",\n exportConfig: {\n type: \"NO_EXPORT\",\n },\n});\nconst current = aws.getPartition({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst exampleResourcePolicy = new aws.codebuild.ResourcePolicy(\"example\", {\n resourceArn: example.arn,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Id: \"default\",\n Statement: [{\n Sid: \"default\",\n Effect: \"Allow\",\n Principal: {\n AWS: Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e `arn:${current.partition}:iam::${currentGetCallerIdentity.accountId}:root`),\n },\n Action: [\n \"codebuild:BatchGetReportGroups\",\n \"codebuild:BatchGetReports\",\n \"codebuild:ListReportsForReportGroup\",\n \"codebuild:DescribeTestCases\",\n ],\n Resource: example.arn,\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.codebuild.ReportGroup(\"example\",\n name=\"example\",\n type=\"TEST\",\n export_config={\n \"type\": \"NO_EXPORT\",\n })\ncurrent = aws.get_partition()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample_resource_policy = aws.codebuild.ResourcePolicy(\"example\",\n resource_arn=example.arn,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"default\",\n \"Statement\": [{\n \"Sid\": \"default\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:{current.partition}:iam::{current_get_caller_identity.account_id}:root\",\n },\n \"Action\": [\n \"codebuild:BatchGetReportGroups\",\n \"codebuild:BatchGetReports\",\n \"codebuild:ListReportsForReportGroup\",\n \"codebuild:DescribeTestCases\",\n ],\n \"Resource\": example.arn,\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CodeBuild.ReportGroup(\"example\", new()\n {\n Name = \"example\",\n Type = \"TEST\",\n ExportConfig = new Aws.CodeBuild.Inputs.ReportGroupExportConfigArgs\n {\n Type = \"NO_EXPORT\",\n },\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var exampleResourcePolicy = new Aws.CodeBuild.ResourcePolicy(\"example\", new()\n {\n ResourceArn = example.Arn,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"default\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"default\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = Output.Tuple(current, currentGetCallerIdentity).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n return $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\";\n }),\n },\n [\"Action\"] = new[]\n {\n \"codebuild:BatchGetReportGroups\",\n \"codebuild:BatchGetReports\",\n \"codebuild:ListReportsForReportGroup\",\n \"codebuild:DescribeTestCases\",\n },\n [\"Resource\"] = example.Arn,\n },\n },\n })),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := codebuild.NewReportGroup(ctx, \"example\", \u0026codebuild.ReportGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tType: pulumi.String(\"TEST\"),\n\t\t\tExportConfig: \u0026codebuild.ReportGroupExportConfigArgs{\n\t\t\t\tType: pulumi.String(\"NO_EXPORT\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codebuild.NewResourcePolicy(ctx, \"example\", \u0026codebuild.ResourcePolicyArgs{\n\t\t\tResourceArn: example.Arn,\n\t\t\tPolicy: example.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Id\": \"default\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Sid\": \"default\",\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:%v:iam::%v:root\", current.Partition, currentGetCallerIdentity.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\"codebuild:BatchGetReportGroups\",\n\t\t\t\t\t\t\t\t\"codebuild:BatchGetReports\",\n\t\t\t\t\t\t\t\t\"codebuild:ListReportsForReportGroup\",\n\t\t\t\t\t\t\t\t\"codebuild:DescribeTestCases\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": arn,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.codebuild.ReportGroup;\nimport com.pulumi.aws.codebuild.ReportGroupArgs;\nimport com.pulumi.aws.codebuild.inputs.ReportGroupExportConfigArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.codebuild.ResourcePolicy;\nimport com.pulumi.aws.codebuild.ResourcePolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ReportGroup(\"example\", ReportGroupArgs.builder()\n .name(\"example\")\n .type(\"TEST\")\n .exportConfig(ReportGroupExportConfigArgs.builder()\n .type(\"NO_EXPORT\")\n .build())\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var exampleResourcePolicy = new ResourcePolicy(\"exampleResourcePolicy\", ResourcePolicyArgs.builder()\n .resourceArn(example.arn())\n .policy(example.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"default\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"default\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:%s:iam::%s:root\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"codebuild:BatchGetReportGroups\", \n \"codebuild:BatchGetReports\", \n \"codebuild:ListReportsForReportGroup\", \n \"codebuild:DescribeTestCases\"\n )),\n jsonProperty(\"Resource\", arn)\n )))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:codebuild:ReportGroup\n properties:\n name: example\n type: TEST\n exportConfig:\n type: NO_EXPORT\n exampleResourcePolicy:\n type: aws:codebuild:ResourcePolicy\n name: example\n properties:\n resourceArn: ${example.arn}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: default\n Statement:\n - Sid: default\n Effect: Allow\n Principal:\n AWS: arn:${current.partition}:iam::${currentGetCallerIdentity.accountId}:root\n Action:\n - codebuild:BatchGetReportGroups\n - codebuild:BatchGetReports\n - codebuild:ListReportsForReportGroup\n - codebuild:DescribeTestCases\n Resource: ${example.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodeBuild Resource Policy using the CodeBuild Resource Policy arn. For example:\n\n```sh\n$ pulumi import aws:codebuild/resourcePolicy:ResourcePolicy example arn:aws:codebuild:us-west-2:123456789:report-group/report-group-name\n```\n", + "description": "Provides a CodeBuild Resource Policy Resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.codebuild.ReportGroup(\"example\", {\n name: \"example\",\n type: \"TEST\",\n exportConfig: {\n type: \"NO_EXPORT\",\n },\n});\nconst current = aws.getPartition({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst exampleResourcePolicy = new aws.codebuild.ResourcePolicy(\"example\", {\n resourceArn: example.arn,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Id: \"default\",\n Statement: [{\n Sid: \"default\",\n Effect: \"Allow\",\n Principal: {\n AWS: Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e `arn:${current.partition}:iam::${currentGetCallerIdentity.accountId}:root`),\n },\n Action: [\n \"codebuild:BatchGetReportGroups\",\n \"codebuild:BatchGetReports\",\n \"codebuild:ListReportsForReportGroup\",\n \"codebuild:DescribeTestCases\",\n ],\n Resource: example.arn,\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.codebuild.ReportGroup(\"example\",\n name=\"example\",\n type=\"TEST\",\n export_config={\n \"type\": \"NO_EXPORT\",\n })\ncurrent = aws.get_partition()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample_resource_policy = aws.codebuild.ResourcePolicy(\"example\",\n resource_arn=example.arn,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"default\",\n \"Statement\": [{\n \"Sid\": \"default\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:{current.partition}:iam::{current_get_caller_identity.account_id}:root\",\n },\n \"Action\": [\n \"codebuild:BatchGetReportGroups\",\n \"codebuild:BatchGetReports\",\n \"codebuild:ListReportsForReportGroup\",\n \"codebuild:DescribeTestCases\",\n ],\n \"Resource\": example.arn,\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CodeBuild.ReportGroup(\"example\", new()\n {\n Name = \"example\",\n Type = \"TEST\",\n ExportConfig = new Aws.CodeBuild.Inputs.ReportGroupExportConfigArgs\n {\n Type = \"NO_EXPORT\",\n },\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var exampleResourcePolicy = new Aws.CodeBuild.ResourcePolicy(\"example\", new()\n {\n ResourceArn = example.Arn,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"default\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"default\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = Output.Tuple(current, currentGetCallerIdentity).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n return $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\";\n }),\n },\n [\"Action\"] = new[]\n {\n \"codebuild:BatchGetReportGroups\",\n \"codebuild:BatchGetReports\",\n \"codebuild:ListReportsForReportGroup\",\n \"codebuild:DescribeTestCases\",\n },\n [\"Resource\"] = example.Arn,\n },\n },\n })),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := codebuild.NewReportGroup(ctx, \"example\", \u0026codebuild.ReportGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tType: pulumi.String(\"TEST\"),\n\t\t\tExportConfig: \u0026codebuild.ReportGroupExportConfigArgs{\n\t\t\t\tType: pulumi.String(\"NO_EXPORT\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codebuild.NewResourcePolicy(ctx, \"example\", \u0026codebuild.ResourcePolicyArgs{\n\t\t\tResourceArn: example.Arn,\n\t\t\tPolicy: example.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Id\": \"default\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Sid\": \"default\",\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:%v:iam::%v:root\", current.Partition, currentGetCallerIdentity.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\"codebuild:BatchGetReportGroups\",\n\t\t\t\t\t\t\t\t\"codebuild:BatchGetReports\",\n\t\t\t\t\t\t\t\t\"codebuild:ListReportsForReportGroup\",\n\t\t\t\t\t\t\t\t\"codebuild:DescribeTestCases\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": arn,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.codebuild.ReportGroup;\nimport com.pulumi.aws.codebuild.ReportGroupArgs;\nimport com.pulumi.aws.codebuild.inputs.ReportGroupExportConfigArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.codebuild.ResourcePolicy;\nimport com.pulumi.aws.codebuild.ResourcePolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ReportGroup(\"example\", ReportGroupArgs.builder()\n .name(\"example\")\n .type(\"TEST\")\n .exportConfig(ReportGroupExportConfigArgs.builder()\n .type(\"NO_EXPORT\")\n .build())\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var exampleResourcePolicy = new ResourcePolicy(\"exampleResourcePolicy\", ResourcePolicyArgs.builder()\n .resourceArn(example.arn())\n .policy(example.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"default\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"default\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:%s:iam::%s:root\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"codebuild:BatchGetReportGroups\", \n \"codebuild:BatchGetReports\", \n \"codebuild:ListReportsForReportGroup\", \n \"codebuild:DescribeTestCases\"\n )),\n jsonProperty(\"Resource\", arn)\n )))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:codebuild:ReportGroup\n properties:\n name: example\n type: TEST\n exportConfig:\n type: NO_EXPORT\n exampleResourcePolicy:\n type: aws:codebuild:ResourcePolicy\n name: example\n properties:\n resourceArn: ${example.arn}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: default\n Statement:\n - Sid: default\n Effect: Allow\n Principal:\n AWS: arn:${current.partition}:iam::${currentGetCallerIdentity.accountId}:root\n Action:\n - codebuild:BatchGetReportGroups\n - codebuild:BatchGetReports\n - codebuild:ListReportsForReportGroup\n - codebuild:DescribeTestCases\n Resource: ${example.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodeBuild Resource Policy using the CodeBuild Resource Policy arn. For example:\n\n```sh\n$ pulumi import aws:codebuild/resourcePolicy:ResourcePolicy example arn:aws:codebuild:us-west-2:123456789:report-group/report-group-name\n```\n", "properties": { "policy": { "type": "string", @@ -205930,7 +205930,7 @@ } }, "aws:codestarconnections/connection:Connection": { - "description": "Provides a CodeStar Connection.\n\n\u003e **NOTE:** The `aws.codestarconnections.Connection` resource is created in the state `PENDING`. Authentication with the connection provider must be completed in the AWS Console. See the [AWS documentation](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-update.html) for details.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.codestarconnections.Connection(\"example\", {\n name: \"example-connection\",\n providerType: \"Bitbucket\",\n});\nconst examplePipeline = new aws.codepipeline.Pipeline(\"example\", {\n artifactStores: [{}],\n stages: [\n {\n name: \"Source\",\n actions: [{\n name: \"Source\",\n category: \"Source\",\n owner: \"AWS\",\n provider: \"CodeStarSourceConnection\",\n version: \"1\",\n outputArtifacts: [\"source_output\"],\n configuration: {\n ConnectionArn: example.arn,\n FullRepositoryId: \"my-organization/test\",\n BranchName: \"main\",\n },\n }],\n },\n {\n actions: [{}],\n name: \"Build\",\n },\n {\n actions: [{}],\n name: \"Deploy\",\n },\n ],\n name: \"tf-test-pipeline\",\n roleArn: codepipelineRole.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.codestarconnections.Connection(\"example\",\n name=\"example-connection\",\n provider_type=\"Bitbucket\")\nexample_pipeline = aws.codepipeline.Pipeline(\"example\",\n artifact_stores=[{}],\n stages=[\n {\n \"name\": \"Source\",\n \"actions\": [{\n \"name\": \"Source\",\n \"category\": \"Source\",\n \"owner\": \"AWS\",\n \"provider\": \"CodeStarSourceConnection\",\n \"version\": \"1\",\n \"output_artifacts\": [\"source_output\"],\n \"configuration\": {\n \"connection_arn\": example.arn,\n \"full_repository_id\": \"my-organization/test\",\n \"branch_name\": \"main\",\n },\n }],\n },\n {\n \"actions\": [{}],\n \"name\": \"Build\",\n },\n {\n \"actions\": [{}],\n \"name\": \"Deploy\",\n },\n ],\n name=\"tf-test-pipeline\",\n role_arn=codepipeline_role[\"arn\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CodeStarConnections.Connection(\"example\", new()\n {\n Name = \"example-connection\",\n ProviderType = \"Bitbucket\",\n });\n\n var examplePipeline = new Aws.CodePipeline.Pipeline(\"example\", new()\n {\n ArtifactStores = new[]\n {\n null,\n },\n Stages = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Source\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Source\",\n Category = \"Source\",\n Owner = \"AWS\",\n Provider = \"CodeStarSourceConnection\",\n Version = \"1\",\n OutputArtifacts = new[]\n {\n \"source_output\",\n },\n Configuration = \n {\n { \"ConnectionArn\", example.Arn },\n { \"FullRepositoryId\", \"my-organization/test\" },\n { \"BranchName\", \"main\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Actions = new[]\n {\n null,\n },\n Name = \"Build\",\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Actions = new[]\n {\n null,\n },\n Name = \"Deploy\",\n },\n },\n Name = \"tf-test-pipeline\",\n RoleArn = codepipelineRole.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codepipeline\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codestarconnections\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := codestarconnections.NewConnection(ctx, \"example\", \u0026codestarconnections.ConnectionArgs{\n\t\t\tName: pulumi.String(\"example-connection\"),\n\t\t\tProviderType: pulumi.String(\"Bitbucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codepipeline.NewPipeline(ctx, \"example\", \u0026codepipeline.PipelineArgs{\n\t\t\tArtifactStores: codepipeline.PipelineArtifactStoreArray{\n\t\t\t\tnil,\n\t\t\t},\n\t\t\tStages: codepipeline.PipelineStageArray{\n\t\t\t\t\u0026codepipeline.PipelineStageArgs{\n\t\t\t\t\tName: pulumi.String(\"Source\"),\n\t\t\t\t\tActions: codepipeline.PipelineStageActionArray{\n\t\t\t\t\t\t\u0026codepipeline.PipelineStageActionArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"Source\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Source\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CodeStarSourceConnection\"),\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tOutputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"source_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ConnectionArn\": example.Arn,\n\t\t\t\t\t\t\t\t\"FullRepositoryId\": pulumi.String(\"my-organization/test\"),\n\t\t\t\t\t\t\t\t\"BranchName\": pulumi.String(\"main\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026codepipeline.PipelineStageArgs{\n\t\t\t\t\tActions: codepipeline.PipelineStageActionArray{\n\t\t\t\t\t\tnil,\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"Build\"),\n\t\t\t\t},\n\t\t\t\t\u0026codepipeline.PipelineStageArgs{\n\t\t\t\t\tActions: codepipeline.PipelineStageActionArray{\n\t\t\t\t\t\tnil,\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"Deploy\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tName: pulumi.String(\"tf-test-pipeline\"),\n\t\t\tRoleArn: pulumi.Any(codepipelineRole.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.codestarconnections.Connection;\nimport com.pulumi.aws.codestarconnections.ConnectionArgs;\nimport com.pulumi.aws.codepipeline.Pipeline;\nimport com.pulumi.aws.codepipeline.PipelineArgs;\nimport com.pulumi.aws.codepipeline.inputs.PipelineArtifactStoreArgs;\nimport com.pulumi.aws.codepipeline.inputs.PipelineStageArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Connection(\"example\", ConnectionArgs.builder()\n .name(\"example-connection\")\n .providerType(\"Bitbucket\")\n .build());\n\n var examplePipeline = new Pipeline(\"examplePipeline\", PipelineArgs.builder()\n .artifactStores()\n .stages( \n PipelineStageArgs.builder()\n .name(\"Source\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Source\")\n .category(\"Source\")\n .owner(\"AWS\")\n .provider(\"CodeStarSourceConnection\")\n .version(\"1\")\n .outputArtifacts(\"source_output\")\n .configuration(Map.ofEntries(\n Map.entry(\"ConnectionArn\", example.arn()),\n Map.entry(\"FullRepositoryId\", \"my-organization/test\"),\n Map.entry(\"BranchName\", \"main\")\n ))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .actions()\n .name(\"Build\")\n .build(),\n PipelineStageArgs.builder()\n .actions()\n .name(\"Deploy\")\n .build())\n .name(\"tf-test-pipeline\")\n .roleArn(codepipelineRole.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:codestarconnections:Connection\n properties:\n name: example-connection\n providerType: Bitbucket\n examplePipeline:\n type: aws:codepipeline:Pipeline\n name: example\n properties:\n artifactStores:\n - {}\n stages:\n - name: Source\n actions:\n - name: Source\n category: Source\n owner: AWS\n provider: CodeStarSourceConnection\n version: '1'\n outputArtifacts:\n - source_output\n configuration:\n ConnectionArn: ${example.arn}\n FullRepositoryId: my-organization/test\n BranchName: main\n - actions:\n - {}\n name: Build\n - actions:\n - {}\n name: Deploy\n name: tf-test-pipeline\n roleArn: ${codepipelineRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodeStar connections using the ARN. For example:\n\n```sh\n$ pulumi import aws:codestarconnections/connection:Connection test-connection arn:aws:codestar-connections:us-west-1:0123456789:connection/79d4d357-a2ee-41e4-b350-2fe39ae59448\n```\n", + "description": "Provides a CodeStar Connection.\n\n\u003e **NOTE:** The `aws.codestarconnections.Connection` resource is created in the state `PENDING`. Authentication with the connection provider must be completed in the AWS Console. See the [AWS documentation](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-update.html) for details.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.codestarconnections.Connection(\"example\", {\n name: \"example-connection\",\n providerType: \"Bitbucket\",\n});\nconst examplePipeline = new aws.codepipeline.Pipeline(\"example\", {\n artifactStores: [{}],\n stages: [\n {\n name: \"Source\",\n actions: [{\n name: \"Source\",\n category: \"Source\",\n owner: \"AWS\",\n provider: \"CodeStarSourceConnection\",\n version: \"1\",\n outputArtifacts: [\"source_output\"],\n configuration: {\n ConnectionArn: example.arn,\n FullRepositoryId: \"my-organization/test\",\n BranchName: \"main\",\n },\n }],\n },\n {\n actions: [{}],\n name: \"Build\",\n },\n {\n actions: [{}],\n name: \"Deploy\",\n },\n ],\n name: \"tf-test-pipeline\",\n roleArn: codepipelineRole.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.codestarconnections.Connection(\"example\",\n name=\"example-connection\",\n provider_type=\"Bitbucket\")\nexample_pipeline = aws.codepipeline.Pipeline(\"example\",\n artifact_stores=[{}],\n stages=[\n {\n \"name\": \"Source\",\n \"actions\": [{\n \"name\": \"Source\",\n \"category\": \"Source\",\n \"owner\": \"AWS\",\n \"provider\": \"CodeStarSourceConnection\",\n \"version\": \"1\",\n \"output_artifacts\": [\"source_output\"],\n \"configuration\": {\n \"connection_arn\": example.arn,\n \"full_repository_id\": \"my-organization/test\",\n \"branch_name\": \"main\",\n },\n }],\n },\n {\n \"actions\": [{}],\n \"name\": \"Build\",\n },\n {\n \"actions\": [{}],\n \"name\": \"Deploy\",\n },\n ],\n name=\"tf-test-pipeline\",\n role_arn=codepipeline_role[\"arn\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CodeStarConnections.Connection(\"example\", new()\n {\n Name = \"example-connection\",\n ProviderType = \"Bitbucket\",\n });\n\n var examplePipeline = new Aws.CodePipeline.Pipeline(\"example\", new()\n {\n ArtifactStores = new[]\n {\n null,\n },\n Stages = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Name = \"Source\",\n Actions = new[]\n {\n new Aws.CodePipeline.Inputs.PipelineStageActionArgs\n {\n Name = \"Source\",\n Category = \"Source\",\n Owner = \"AWS\",\n Provider = \"CodeStarSourceConnection\",\n Version = \"1\",\n OutputArtifacts = new[]\n {\n \"source_output\",\n },\n Configuration = \n {\n { \"ConnectionArn\", example.Arn },\n { \"FullRepositoryId\", \"my-organization/test\" },\n { \"BranchName\", \"main\" },\n },\n },\n },\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Actions = new[]\n {\n null,\n },\n Name = \"Build\",\n },\n new Aws.CodePipeline.Inputs.PipelineStageArgs\n {\n Actions = new[]\n {\n null,\n },\n Name = \"Deploy\",\n },\n },\n Name = \"tf-test-pipeline\",\n RoleArn = codepipelineRole.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codepipeline\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codestarconnections\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := codestarconnections.NewConnection(ctx, \"example\", \u0026codestarconnections.ConnectionArgs{\n\t\t\tName: pulumi.String(\"example-connection\"),\n\t\t\tProviderType: pulumi.String(\"Bitbucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = codepipeline.NewPipeline(ctx, \"example\", \u0026codepipeline.PipelineArgs{\n\t\t\tArtifactStores: codepipeline.PipelineArtifactStoreArray{\n\t\t\t\t\u0026codepipeline.PipelineArtifactStoreArgs{},\n\t\t\t},\n\t\t\tStages: codepipeline.PipelineStageArray{\n\t\t\t\t\u0026codepipeline.PipelineStageArgs{\n\t\t\t\t\tName: pulumi.String(\"Source\"),\n\t\t\t\t\tActions: codepipeline.PipelineStageActionArray{\n\t\t\t\t\t\t\u0026codepipeline.PipelineStageActionArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"Source\"),\n\t\t\t\t\t\t\tCategory: pulumi.String(\"Source\"),\n\t\t\t\t\t\t\tOwner: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tProvider: pulumi.String(\"CodeStarSourceConnection\"),\n\t\t\t\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t\t\t\t\tOutputArtifacts: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"source_output\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tConfiguration: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"ConnectionArn\": example.Arn,\n\t\t\t\t\t\t\t\t\"FullRepositoryId\": pulumi.String(\"my-organization/test\"),\n\t\t\t\t\t\t\t\t\"BranchName\": pulumi.String(\"main\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026codepipeline.PipelineStageArgs{\n\t\t\t\t\tActions: codepipeline.PipelineStageActionArray{\n\t\t\t\t\t\t\u0026codepipeline.PipelineStageActionArgs{},\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"Build\"),\n\t\t\t\t},\n\t\t\t\t\u0026codepipeline.PipelineStageArgs{\n\t\t\t\t\tActions: codepipeline.PipelineStageActionArray{\n\t\t\t\t\t\t\u0026codepipeline.PipelineStageActionArgs{},\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"Deploy\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tName: pulumi.String(\"tf-test-pipeline\"),\n\t\t\tRoleArn: pulumi.Any(codepipelineRole.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.codestarconnections.Connection;\nimport com.pulumi.aws.codestarconnections.ConnectionArgs;\nimport com.pulumi.aws.codepipeline.Pipeline;\nimport com.pulumi.aws.codepipeline.PipelineArgs;\nimport com.pulumi.aws.codepipeline.inputs.PipelineArtifactStoreArgs;\nimport com.pulumi.aws.codepipeline.inputs.PipelineStageArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Connection(\"example\", ConnectionArgs.builder()\n .name(\"example-connection\")\n .providerType(\"Bitbucket\")\n .build());\n\n var examplePipeline = new Pipeline(\"examplePipeline\", PipelineArgs.builder()\n .artifactStores()\n .stages( \n PipelineStageArgs.builder()\n .name(\"Source\")\n .actions(PipelineStageActionArgs.builder()\n .name(\"Source\")\n .category(\"Source\")\n .owner(\"AWS\")\n .provider(\"CodeStarSourceConnection\")\n .version(\"1\")\n .outputArtifacts(\"source_output\")\n .configuration(Map.ofEntries(\n Map.entry(\"ConnectionArn\", example.arn()),\n Map.entry(\"FullRepositoryId\", \"my-organization/test\"),\n Map.entry(\"BranchName\", \"main\")\n ))\n .build())\n .build(),\n PipelineStageArgs.builder()\n .actions()\n .name(\"Build\")\n .build(),\n PipelineStageArgs.builder()\n .actions()\n .name(\"Deploy\")\n .build())\n .name(\"tf-test-pipeline\")\n .roleArn(codepipelineRole.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:codestarconnections:Connection\n properties:\n name: example-connection\n providerType: Bitbucket\n examplePipeline:\n type: aws:codepipeline:Pipeline\n name: example\n properties:\n artifactStores:\n - {}\n stages:\n - name: Source\n actions:\n - name: Source\n category: Source\n owner: AWS\n provider: CodeStarSourceConnection\n version: '1'\n outputArtifacts:\n - source_output\n configuration:\n ConnectionArn: ${example.arn}\n FullRepositoryId: my-organization/test\n BranchName: main\n - actions:\n - {}\n name: Build\n - actions:\n - {}\n name: Deploy\n name: tf-test-pipeline\n roleArn: ${codepipelineRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import CodeStar connections using the ARN. For example:\n\n```sh\n$ pulumi import aws:codestarconnections/connection:Connection test-connection arn:aws:codestar-connections:us-west-1:0123456789:connection/79d4d357-a2ee-41e4-b350-2fe39ae59448\n```\n", "properties": { "arn": { "type": "string", @@ -206794,7 +206794,7 @@ } }, "aws:cognito/managedUserPoolClient:ManagedUserPoolClient": { - "description": "Use the `aws.cognito.UserPoolClient` resource to manage a Cognito User Pool Client.\n\n**This resource is advanced** and has special caveats to consider before use. Please read this document completely before using the resource.\n\nUse the `aws.cognito.ManagedUserPoolClient` resource to manage a Cognito User Pool Client that is automatically created by an AWS service. For instance, when [configuring an OpenSearch Domain to use Cognito authentication](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html), the OpenSearch service creates the User Pool Client during setup and removes it when it is no longer required. As a result, the `aws.cognito.ManagedUserPoolClient` resource does not create or delete this resource, but instead assumes management of it.\n\nUse the `aws.cognito.UserPoolClient` resource to manage Cognito User Pool Clients for normal use cases.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleUserPool = new aws.cognito.UserPool(\"example\", {name: \"example\"});\nconst exampleIdentityPool = new aws.cognito.IdentityPool(\"example\", {identityPoolName: \"example\"});\nconst current = aws.getPartition({});\nconst example = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"\",\n actions: [\"sts:AssumeRole\"],\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [`es.${current.dnsSuffix}`],\n }],\n }],\n}));\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n path: \"/service-role/\",\n assumeRolePolicy: example.then(example =\u003e example.json),\n});\nconst exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"example\", {\n role: exampleRole.name,\n policyArn: current.then(current =\u003e `arn:${current.partition}:iam::aws:policy/AmazonESCognitoAccess`),\n});\nconst exampleDomain = new aws.opensearch.Domain(\"example\", {\n domainName: \"example\",\n cognitoOptions: {\n enabled: true,\n userPoolId: exampleUserPool.id,\n identityPoolId: exampleIdentityPool.id,\n roleArn: exampleRole.arn,\n },\n ebsOptions: {\n ebsEnabled: true,\n volumeSize: 10,\n },\n}, {\n dependsOn: [\n exampleAwsCognitoUserPoolDomain,\n exampleRolePolicyAttachment,\n ],\n});\nconst exampleManagedUserPoolClient = new aws.cognito.ManagedUserPoolClient(\"example\", {\n namePrefix: \"AmazonOpenSearchService-example\",\n userPoolId: exampleUserPool.id,\n}, {\n dependsOn: [exampleDomain],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_user_pool = aws.cognito.UserPool(\"example\", name=\"example\")\nexample_identity_pool = aws.cognito.IdentityPool(\"example\", identity_pool_name=\"example\")\ncurrent = aws.get_partition()\nexample = aws.iam.get_policy_document(statements=[{\n \"sid\": \"\",\n \"actions\": [\"sts:AssumeRole\"],\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [f\"es.{current.dns_suffix}\"],\n }],\n}])\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n path=\"/service-role/\",\n assume_role_policy=example.json)\nexample_role_policy_attachment = aws.iam.RolePolicyAttachment(\"example\",\n role=example_role.name,\n policy_arn=f\"arn:{current.partition}:iam::aws:policy/AmazonESCognitoAccess\")\nexample_domain = aws.opensearch.Domain(\"example\",\n domain_name=\"example\",\n cognito_options={\n \"enabled\": True,\n \"user_pool_id\": example_user_pool.id,\n \"identity_pool_id\": example_identity_pool.id,\n \"role_arn\": example_role.arn,\n },\n ebs_options={\n \"ebs_enabled\": True,\n \"volume_size\": 10,\n },\n opts = pulumi.ResourceOptions(depends_on=[\n example_aws_cognito_user_pool_domain,\n example_role_policy_attachment,\n ]))\nexample_managed_user_pool_client = aws.cognito.ManagedUserPoolClient(\"example\",\n name_prefix=\"AmazonOpenSearchService-example\",\n user_pool_id=example_user_pool.id,\n opts = pulumi.ResourceOptions(depends_on=[example_domain]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleUserPool = new Aws.Cognito.UserPool(\"example\", new()\n {\n Name = \"example\",\n });\n\n var exampleIdentityPool = new Aws.Cognito.IdentityPool(\"example\", new()\n {\n IdentityPoolName = \"example\",\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"\",\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n $\"es.{current.Apply(getPartitionResult =\u003e getPartitionResult.DnsSuffix)}\",\n },\n },\n },\n },\n },\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n Path = \"/service-role/\",\n AssumeRolePolicy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"example\", new()\n {\n Role = exampleRole.Name,\n PolicyArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::aws:policy/AmazonESCognitoAccess\",\n });\n\n var exampleDomain = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = \"example\",\n CognitoOptions = new Aws.OpenSearch.Inputs.DomainCognitoOptionsArgs\n {\n Enabled = true,\n UserPoolId = exampleUserPool.Id,\n IdentityPoolId = exampleIdentityPool.Id,\n RoleArn = exampleRole.Arn,\n },\n EbsOptions = new Aws.OpenSearch.Inputs.DomainEbsOptionsArgs\n {\n EbsEnabled = true,\n VolumeSize = 10,\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsCognitoUserPoolDomain,\n exampleRolePolicyAttachment,\n },\n });\n\n var exampleManagedUserPoolClient = new Aws.Cognito.ManagedUserPoolClient(\"example\", new()\n {\n NamePrefix = \"AmazonOpenSearchService-example\",\n UserPoolId = exampleUserPool.Id,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleDomain,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleUserPool, err := cognito.NewUserPool(ctx, \"example\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleIdentityPool, err := cognito.NewIdentityPool(ctx, \"example\", \u0026cognito.IdentityPoolArgs{\n\t\t\tIdentityPoolName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"es.%v\", current.DnsSuffix),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tPath: pulumi.String(\"/service-role/\"),\n\t\t\tAssumeRolePolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleRolePolicyAttachment, err := iam.NewRolePolicyAttachment(ctx, \"example\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tRole: exampleRole.Name,\n\t\t\tPolicyArn: pulumi.Sprintf(\"arn:%v:iam::aws:policy/AmazonESCognitoAccess\", current.Partition),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleDomain, err := opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"example\"),\n\t\t\tCognitoOptions: \u0026opensearch.DomainCognitoOptionsArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\tUserPoolId: exampleUserPool.ID(),\n\t\t\t\tIdentityPoolId: exampleIdentityPool.ID(),\n\t\t\t\tRoleArn: exampleRole.Arn,\n\t\t\t},\n\t\t\tEbsOptions: \u0026opensearch.DomainEbsOptionsArgs{\n\t\t\t\tEbsEnabled: pulumi.Bool(true),\n\t\t\t\tVolumeSize: pulumi.Int(10),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsCognitoUserPoolDomain,\n\t\t\texampleRolePolicyAttachment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewManagedUserPoolClient(ctx, \"example\", \u0026cognito.ManagedUserPoolClientArgs{\n\t\t\tNamePrefix: pulumi.String(\"AmazonOpenSearchService-example\"),\n\t\t\tUserPoolId: exampleUserPool.ID(),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleDomain,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.IdentityPool;\nimport com.pulumi.aws.cognito.IdentityPoolArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainCognitoOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEbsOptionsArgs;\nimport com.pulumi.aws.cognito.ManagedUserPoolClient;\nimport com.pulumi.aws.cognito.ManagedUserPoolClientArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleUserPool = new UserPool(\"exampleUserPool\", UserPoolArgs.builder()\n .name(\"example\")\n .build());\n\n var exampleIdentityPool = new IdentityPool(\"exampleIdentityPool\", IdentityPoolArgs.builder()\n .identityPoolName(\"example\")\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"\")\n .actions(\"sts:AssumeRole\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(String.format(\"es.%s\", current.applyValue(getPartitionResult -\u003e getPartitionResult.dnsSuffix())))\n .build())\n .build())\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .path(\"/service-role/\")\n .assumeRolePolicy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleRolePolicyAttachment = new RolePolicyAttachment(\"exampleRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .role(exampleRole.name())\n .policyArn(String.format(\"arn:%s:iam::aws:policy/AmazonESCognitoAccess\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .domainName(\"example\")\n .cognitoOptions(DomainCognitoOptionsArgs.builder()\n .enabled(true)\n .userPoolId(exampleUserPool.id())\n .identityPoolId(exampleIdentityPool.id())\n .roleArn(exampleRole.arn())\n .build())\n .ebsOptions(DomainEbsOptionsArgs.builder()\n .ebsEnabled(true)\n .volumeSize(10)\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn( \n exampleAwsCognitoUserPoolDomain,\n exampleRolePolicyAttachment)\n .build());\n\n var exampleManagedUserPoolClient = new ManagedUserPoolClient(\"exampleManagedUserPoolClient\", ManagedUserPoolClientArgs.builder()\n .namePrefix(\"AmazonOpenSearchService-example\")\n .userPoolId(exampleUserPool.id())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleDomain)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleManagedUserPoolClient:\n type: aws:cognito:ManagedUserPoolClient\n name: example\n properties:\n namePrefix: AmazonOpenSearchService-example\n userPoolId: ${exampleUserPool.id}\n options:\n dependson:\n - ${exampleDomain}\n exampleUserPool:\n type: aws:cognito:UserPool\n name: example\n properties:\n name: example\n exampleIdentityPool:\n type: aws:cognito:IdentityPool\n name: example\n properties:\n identityPoolName: example\n exampleDomain:\n type: aws:opensearch:Domain\n name: example\n properties:\n domainName: example\n cognitoOptions:\n enabled: true\n userPoolId: ${exampleUserPool.id}\n identityPoolId: ${exampleIdentityPool.id}\n roleArn: ${exampleRole.arn}\n ebsOptions:\n ebsEnabled: true\n volumeSize: 10\n options:\n dependson:\n - ${exampleAwsCognitoUserPoolDomain}\n - ${exampleRolePolicyAttachment}\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n path: /service-role/\n assumeRolePolicy: ${example.json}\n exampleRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: example\n properties:\n role: ${exampleRole.name}\n policyArn: arn:${current.partition}:iam::aws:policy/AmazonESCognitoAccess\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid:\n actions:\n - sts:AssumeRole\n effect: Allow\n principals:\n - type: Service\n identifiers:\n - es.${current.dnsSuffix}\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Cognito User Pool Clients using the `id` of the Cognito User Pool and the `id` of the Cognito User Pool Client. For example:\n\n```sh\n$ pulumi import aws:cognito/managedUserPoolClient:ManagedUserPoolClient client us-west-2_abc123/3ho4ek12345678909nh3fmhpko\n```\n", + "description": "Use the `aws.cognito.UserPoolClient` resource to manage a Cognito User Pool Client.\n\n**This resource is advanced** and has special caveats to consider before use. Please read this document completely before using the resource.\n\nUse the `aws.cognito.ManagedUserPoolClient` resource to manage a Cognito User Pool Client that is automatically created by an AWS service. For instance, when [configuring an OpenSearch Domain to use Cognito authentication](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html), the OpenSearch service creates the User Pool Client during setup and removes it when it is no longer required. As a result, the `aws.cognito.ManagedUserPoolClient` resource does not create or delete this resource, but instead assumes management of it.\n\nUse the `aws.cognito.UserPoolClient` resource to manage Cognito User Pool Clients for normal use cases.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleUserPool = new aws.cognito.UserPool(\"example\", {name: \"example\"});\nconst exampleIdentityPool = new aws.cognito.IdentityPool(\"example\", {identityPoolName: \"example\"});\nconst current = aws.getPartition({});\nconst example = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"\",\n actions: [\"sts:AssumeRole\"],\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [`es.${current.dnsSuffix}`],\n }],\n }],\n}));\nconst exampleRole = new aws.iam.Role(\"example\", {\n name: \"example-role\",\n path: \"/service-role/\",\n assumeRolePolicy: example.then(example =\u003e example.json),\n});\nconst exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"example\", {\n role: exampleRole.name,\n policyArn: current.then(current =\u003e `arn:${current.partition}:iam::aws:policy/AmazonESCognitoAccess`),\n});\nconst exampleDomain = new aws.opensearch.Domain(\"example\", {\n domainName: \"example\",\n cognitoOptions: {\n enabled: true,\n userPoolId: exampleUserPool.id,\n identityPoolId: exampleIdentityPool.id,\n roleArn: exampleRole.arn,\n },\n ebsOptions: {\n ebsEnabled: true,\n volumeSize: 10,\n },\n}, {\n dependsOn: [\n exampleAwsCognitoUserPoolDomain,\n exampleRolePolicyAttachment,\n ],\n});\nconst exampleManagedUserPoolClient = new aws.cognito.ManagedUserPoolClient(\"example\", {\n namePrefix: \"AmazonOpenSearchService-example\",\n userPoolId: exampleUserPool.id,\n}, {\n dependsOn: [exampleDomain],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_user_pool = aws.cognito.UserPool(\"example\", name=\"example\")\nexample_identity_pool = aws.cognito.IdentityPool(\"example\", identity_pool_name=\"example\")\ncurrent = aws.get_partition()\nexample = aws.iam.get_policy_document(statements=[{\n \"sid\": \"\",\n \"actions\": [\"sts:AssumeRole\"],\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [f\"es.{current.dns_suffix}\"],\n }],\n}])\nexample_role = aws.iam.Role(\"example\",\n name=\"example-role\",\n path=\"/service-role/\",\n assume_role_policy=example.json)\nexample_role_policy_attachment = aws.iam.RolePolicyAttachment(\"example\",\n role=example_role.name,\n policy_arn=f\"arn:{current.partition}:iam::aws:policy/AmazonESCognitoAccess\")\nexample_domain = aws.opensearch.Domain(\"example\",\n domain_name=\"example\",\n cognito_options={\n \"enabled\": True,\n \"user_pool_id\": example_user_pool.id,\n \"identity_pool_id\": example_identity_pool.id,\n \"role_arn\": example_role.arn,\n },\n ebs_options={\n \"ebs_enabled\": True,\n \"volume_size\": 10,\n },\n opts = pulumi.ResourceOptions(depends_on=[\n example_aws_cognito_user_pool_domain,\n example_role_policy_attachment,\n ]))\nexample_managed_user_pool_client = aws.cognito.ManagedUserPoolClient(\"example\",\n name_prefix=\"AmazonOpenSearchService-example\",\n user_pool_id=example_user_pool.id,\n opts = pulumi.ResourceOptions(depends_on=[example_domain]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleUserPool = new Aws.Cognito.UserPool(\"example\", new()\n {\n Name = \"example\",\n });\n\n var exampleIdentityPool = new Aws.Cognito.IdentityPool(\"example\", new()\n {\n IdentityPoolName = \"example\",\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"\",\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n $\"es.{current.Apply(getPartitionResult =\u003e getPartitionResult.DnsSuffix)}\",\n },\n },\n },\n },\n },\n });\n\n var exampleRole = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"example-role\",\n Path = \"/service-role/\",\n AssumeRolePolicy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"example\", new()\n {\n Role = exampleRole.Name,\n PolicyArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::aws:policy/AmazonESCognitoAccess\",\n });\n\n var exampleDomain = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = \"example\",\n CognitoOptions = new Aws.OpenSearch.Inputs.DomainCognitoOptionsArgs\n {\n Enabled = true,\n UserPoolId = exampleUserPool.Id,\n IdentityPoolId = exampleIdentityPool.Id,\n RoleArn = exampleRole.Arn,\n },\n EbsOptions = new Aws.OpenSearch.Inputs.DomainEbsOptionsArgs\n {\n EbsEnabled = true,\n VolumeSize = 10,\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsCognitoUserPoolDomain,\n exampleRolePolicyAttachment,\n },\n });\n\n var exampleManagedUserPoolClient = new Aws.Cognito.ManagedUserPoolClient(\"example\", new()\n {\n NamePrefix = \"AmazonOpenSearchService-example\",\n UserPoolId = exampleUserPool.Id,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleDomain,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleUserPool, err := cognito.NewUserPool(ctx, \"example\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleIdentityPool, err := cognito.NewIdentityPool(ctx, \"example\", \u0026cognito.IdentityPoolArgs{\n\t\t\tIdentityPoolName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"es.%v\", current.DnsSuffix),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleRole, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-role\"),\n\t\t\tPath: pulumi.String(\"/service-role/\"),\n\t\t\tAssumeRolePolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleRolePolicyAttachment, err := iam.NewRolePolicyAttachment(ctx, \"example\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tRole: exampleRole.Name,\n\t\t\tPolicyArn: pulumi.Sprintf(\"arn:%v:iam::aws:policy/AmazonESCognitoAccess\", current.Partition),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleDomain, err := opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"example\"),\n\t\t\tCognitoOptions: \u0026opensearch.DomainCognitoOptionsArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\tUserPoolId: exampleUserPool.ID(),\n\t\t\t\tIdentityPoolId: exampleIdentityPool.ID(),\n\t\t\t\tRoleArn: exampleRole.Arn,\n\t\t\t},\n\t\t\tEbsOptions: \u0026opensearch.DomainEbsOptionsArgs{\n\t\t\t\tEbsEnabled: pulumi.Bool(true),\n\t\t\t\tVolumeSize: pulumi.Int(10),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsCognitoUserPoolDomain,\n\t\t\texampleRolePolicyAttachment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewManagedUserPoolClient(ctx, \"example\", \u0026cognito.ManagedUserPoolClientArgs{\n\t\t\tNamePrefix: pulumi.String(\"AmazonOpenSearchService-example\"),\n\t\t\tUserPoolId: exampleUserPool.ID(),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleDomain,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.IdentityPool;\nimport com.pulumi.aws.cognito.IdentityPoolArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainCognitoOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEbsOptionsArgs;\nimport com.pulumi.aws.cognito.ManagedUserPoolClient;\nimport com.pulumi.aws.cognito.ManagedUserPoolClientArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleUserPool = new UserPool(\"exampleUserPool\", UserPoolArgs.builder()\n .name(\"example\")\n .build());\n\n var exampleIdentityPool = new IdentityPool(\"exampleIdentityPool\", IdentityPoolArgs.builder()\n .identityPoolName(\"example\")\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"\")\n .actions(\"sts:AssumeRole\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(String.format(\"es.%s\", current.applyValue(getPartitionResult -\u003e getPartitionResult.dnsSuffix())))\n .build())\n .build())\n .build());\n\n var exampleRole = new Role(\"exampleRole\", RoleArgs.builder()\n .name(\"example-role\")\n .path(\"/service-role/\")\n .assumeRolePolicy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleRolePolicyAttachment = new RolePolicyAttachment(\"exampleRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .role(exampleRole.name())\n .policyArn(String.format(\"arn:%s:iam::aws:policy/AmazonESCognitoAccess\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .domainName(\"example\")\n .cognitoOptions(DomainCognitoOptionsArgs.builder()\n .enabled(true)\n .userPoolId(exampleUserPool.id())\n .identityPoolId(exampleIdentityPool.id())\n .roleArn(exampleRole.arn())\n .build())\n .ebsOptions(DomainEbsOptionsArgs.builder()\n .ebsEnabled(true)\n .volumeSize(10)\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn( \n exampleAwsCognitoUserPoolDomain,\n exampleRolePolicyAttachment)\n .build());\n\n var exampleManagedUserPoolClient = new ManagedUserPoolClient(\"exampleManagedUserPoolClient\", ManagedUserPoolClientArgs.builder()\n .namePrefix(\"AmazonOpenSearchService-example\")\n .userPoolId(exampleUserPool.id())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleDomain)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleManagedUserPoolClient:\n type: aws:cognito:ManagedUserPoolClient\n name: example\n properties:\n namePrefix: AmazonOpenSearchService-example\n userPoolId: ${exampleUserPool.id}\n options:\n dependson:\n - ${exampleDomain}\n exampleUserPool:\n type: aws:cognito:UserPool\n name: example\n properties:\n name: example\n exampleIdentityPool:\n type: aws:cognito:IdentityPool\n name: example\n properties:\n identityPoolName: example\n exampleDomain:\n type: aws:opensearch:Domain\n name: example\n properties:\n domainName: example\n cognitoOptions:\n enabled: true\n userPoolId: ${exampleUserPool.id}\n identityPoolId: ${exampleIdentityPool.id}\n roleArn: ${exampleRole.arn}\n ebsOptions:\n ebsEnabled: true\n volumeSize: 10\n options:\n dependson:\n - ${exampleAwsCognitoUserPoolDomain}\n - ${exampleRolePolicyAttachment}\n exampleRole:\n type: aws:iam:Role\n name: example\n properties:\n name: example-role\n path: /service-role/\n assumeRolePolicy: ${example.json}\n exampleRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: example\n properties:\n role: ${exampleRole.name}\n policyArn: arn:${current.partition}:iam::aws:policy/AmazonESCognitoAccess\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid:\n actions:\n - sts:AssumeRole\n effect: Allow\n principals:\n - type: Service\n identifiers:\n - es.${current.dnsSuffix}\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Cognito User Pool Clients using the `id` of the Cognito User Pool and the `id` of the Cognito User Pool Client. For example:\n\n```sh\n$ pulumi import aws:cognito/managedUserPoolClient:ManagedUserPoolClient client us-west-2_abc123/3ho4ek12345678909nh3fmhpko\n```\n", "properties": { "accessTokenValidity": { "type": "integer", @@ -207369,7 +207369,7 @@ } }, "aws:cognito/user:User": { - "description": "Provides a Cognito User Resource.\n\n## Example Usage\n\n### Basic configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cognito.UserPool(\"example\", {name: \"MyExamplePool\"});\nconst exampleUser = new aws.cognito.User(\"example\", {\n userPoolId: example.id,\n username: \"example\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cognito.UserPool(\"example\", name=\"MyExamplePool\")\nexample_user = aws.cognito.User(\"example\",\n user_pool_id=example.id,\n username=\"example\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Cognito.UserPool(\"example\", new()\n {\n Name = \"MyExamplePool\",\n });\n\n var exampleUser = new Aws.Cognito.User(\"example\", new()\n {\n UserPoolId = example.Id,\n Username = \"example\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cognito.NewUserPool(ctx, \"example\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"MyExamplePool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUser(ctx, \"example\", \u0026cognito.UserArgs{\n\t\t\tUserPoolId: example.ID(),\n\t\t\tUsername: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.User;\nimport com.pulumi.aws.cognito.UserArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new UserPool(\"example\", UserPoolArgs.builder()\n .name(\"MyExamplePool\")\n .build());\n\n var exampleUser = new User(\"exampleUser\", UserArgs.builder()\n .userPoolId(example.id())\n .username(\"example\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cognito:UserPool\n properties:\n name: MyExamplePool\n exampleUser:\n type: aws:cognito:User\n name: example\n properties:\n userPoolId: ${example.id}\n username: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Setting user attributes\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cognito.UserPool(\"example\", {\n name: \"mypool\",\n schemas: [\n {\n name: \"example\",\n attributeDataType: \"Boolean\",\n mutable: false,\n required: false,\n developerOnlyAttribute: false,\n },\n {\n name: \"foo\",\n attributeDataType: \"String\",\n mutable: false,\n required: false,\n developerOnlyAttribute: false,\n stringAttributeConstraints: {},\n },\n ],\n});\nconst exampleUser = new aws.cognito.User(\"example\", {\n userPoolId: example.id,\n username: \"example\",\n attributes: {\n example: \"true\",\n foo: \"bar\",\n email: \"no-reply@example.com\",\n email_verified: \"true\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cognito.UserPool(\"example\",\n name=\"mypool\",\n schemas=[\n {\n \"name\": \"example\",\n \"attribute_data_type\": \"Boolean\",\n \"mutable\": False,\n \"required\": False,\n \"developer_only_attribute\": False,\n },\n {\n \"name\": \"foo\",\n \"attribute_data_type\": \"String\",\n \"mutable\": False,\n \"required\": False,\n \"developer_only_attribute\": False,\n \"string_attribute_constraints\": {},\n },\n ])\nexample_user = aws.cognito.User(\"example\",\n user_pool_id=example.id,\n username=\"example\",\n attributes={\n \"example\": \"true\",\n \"foo\": \"bar\",\n \"email\": \"no-reply@example.com\",\n \"email_verified\": \"true\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Cognito.UserPool(\"example\", new()\n {\n Name = \"mypool\",\n Schemas = new[]\n {\n new Aws.Cognito.Inputs.UserPoolSchemaArgs\n {\n Name = \"example\",\n AttributeDataType = \"Boolean\",\n Mutable = false,\n Required = false,\n DeveloperOnlyAttribute = false,\n },\n new Aws.Cognito.Inputs.UserPoolSchemaArgs\n {\n Name = \"foo\",\n AttributeDataType = \"String\",\n Mutable = false,\n Required = false,\n DeveloperOnlyAttribute = false,\n StringAttributeConstraints = null,\n },\n },\n });\n\n var exampleUser = new Aws.Cognito.User(\"example\", new()\n {\n UserPoolId = example.Id,\n Username = \"example\",\n Attributes = \n {\n { \"example\", \"true\" },\n { \"foo\", \"bar\" },\n { \"email\", \"no-reply@example.com\" },\n { \"email_verified\", \"true\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cognito.NewUserPool(ctx, \"example\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"mypool\"),\n\t\t\tSchemas: cognito.UserPoolSchemaArray{\n\t\t\t\t\u0026cognito.UserPoolSchemaArgs{\n\t\t\t\t\tName: pulumi.String(\"example\"),\n\t\t\t\t\tAttributeDataType: pulumi.String(\"Boolean\"),\n\t\t\t\t\tMutable: pulumi.Bool(false),\n\t\t\t\t\tRequired: pulumi.Bool(false),\n\t\t\t\t\tDeveloperOnlyAttribute: pulumi.Bool(false),\n\t\t\t\t},\n\t\t\t\t\u0026cognito.UserPoolSchemaArgs{\n\t\t\t\t\tName: pulumi.String(\"foo\"),\n\t\t\t\t\tAttributeDataType: pulumi.String(\"String\"),\n\t\t\t\t\tMutable: pulumi.Bool(false),\n\t\t\t\t\tRequired: pulumi.Bool(false),\n\t\t\t\t\tDeveloperOnlyAttribute: pulumi.Bool(false),\n\t\t\t\t\tStringAttributeConstraints: nil,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUser(ctx, \"example\", \u0026cognito.UserArgs{\n\t\t\tUserPoolId: example.ID(),\n\t\t\tUsername: pulumi.String(\"example\"),\n\t\t\tAttributes: pulumi.StringMap{\n\t\t\t\t\"example\": pulumi.String(\"true\"),\n\t\t\t\t\"foo\": pulumi.String(\"bar\"),\n\t\t\t\t\"email\": pulumi.String(\"no-reply@example.com\"),\n\t\t\t\t\"email_verified\": pulumi.String(\"true\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.inputs.UserPoolSchemaArgs;\nimport com.pulumi.aws.cognito.inputs.UserPoolSchemaStringAttributeConstraintsArgs;\nimport com.pulumi.aws.cognito.User;\nimport com.pulumi.aws.cognito.UserArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new UserPool(\"example\", UserPoolArgs.builder()\n .name(\"mypool\")\n .schemas( \n UserPoolSchemaArgs.builder()\n .name(\"example\")\n .attributeDataType(\"Boolean\")\n .mutable(false)\n .required(false)\n .developerOnlyAttribute(false)\n .build(),\n UserPoolSchemaArgs.builder()\n .name(\"foo\")\n .attributeDataType(\"String\")\n .mutable(false)\n .required(false)\n .developerOnlyAttribute(false)\n .stringAttributeConstraints()\n .build())\n .build());\n\n var exampleUser = new User(\"exampleUser\", UserArgs.builder()\n .userPoolId(example.id())\n .username(\"example\")\n .attributes(Map.ofEntries(\n Map.entry(\"example\", true),\n Map.entry(\"foo\", \"bar\"),\n Map.entry(\"email\", \"no-reply@example.com\"),\n Map.entry(\"email_verified\", true)\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cognito:UserPool\n properties:\n name: mypool\n schemas:\n - name: example\n attributeDataType: Boolean\n mutable: false\n required: false\n developerOnlyAttribute: false\n - name: foo\n attributeDataType: String\n mutable: false\n required: false\n developerOnlyAttribute: false\n stringAttributeConstraints: {}\n exampleUser:\n type: aws:cognito:User\n name: example\n properties:\n userPoolId: ${example.id}\n username: example\n attributes:\n example: true\n foo: bar\n email: no-reply@example.com\n email_verified: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Cognito User using the `user_pool_id`/`name` attributes concatenated. For example:\n\n```sh\n$ pulumi import aws:cognito/user:User user us-east-1_vG78M4goG/user\n```\n", + "description": "Provides a Cognito User Resource.\n\n## Example Usage\n\n### Basic configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cognito.UserPool(\"example\", {name: \"MyExamplePool\"});\nconst exampleUser = new aws.cognito.User(\"example\", {\n userPoolId: example.id,\n username: \"example\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cognito.UserPool(\"example\", name=\"MyExamplePool\")\nexample_user = aws.cognito.User(\"example\",\n user_pool_id=example.id,\n username=\"example\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Cognito.UserPool(\"example\", new()\n {\n Name = \"MyExamplePool\",\n });\n\n var exampleUser = new Aws.Cognito.User(\"example\", new()\n {\n UserPoolId = example.Id,\n Username = \"example\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cognito.NewUserPool(ctx, \"example\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"MyExamplePool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUser(ctx, \"example\", \u0026cognito.UserArgs{\n\t\t\tUserPoolId: example.ID(),\n\t\t\tUsername: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.User;\nimport com.pulumi.aws.cognito.UserArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new UserPool(\"example\", UserPoolArgs.builder()\n .name(\"MyExamplePool\")\n .build());\n\n var exampleUser = new User(\"exampleUser\", UserArgs.builder()\n .userPoolId(example.id())\n .username(\"example\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cognito:UserPool\n properties:\n name: MyExamplePool\n exampleUser:\n type: aws:cognito:User\n name: example\n properties:\n userPoolId: ${example.id}\n username: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Setting user attributes\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cognito.UserPool(\"example\", {\n name: \"mypool\",\n schemas: [\n {\n name: \"example\",\n attributeDataType: \"Boolean\",\n mutable: false,\n required: false,\n developerOnlyAttribute: false,\n },\n {\n name: \"foo\",\n attributeDataType: \"String\",\n mutable: false,\n required: false,\n developerOnlyAttribute: false,\n stringAttributeConstraints: {},\n },\n ],\n});\nconst exampleUser = new aws.cognito.User(\"example\", {\n userPoolId: example.id,\n username: \"example\",\n attributes: {\n example: \"true\",\n foo: \"bar\",\n email: \"no-reply@example.com\",\n email_verified: \"true\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cognito.UserPool(\"example\",\n name=\"mypool\",\n schemas=[\n {\n \"name\": \"example\",\n \"attribute_data_type\": \"Boolean\",\n \"mutable\": False,\n \"required\": False,\n \"developer_only_attribute\": False,\n },\n {\n \"name\": \"foo\",\n \"attribute_data_type\": \"String\",\n \"mutable\": False,\n \"required\": False,\n \"developer_only_attribute\": False,\n \"string_attribute_constraints\": {},\n },\n ])\nexample_user = aws.cognito.User(\"example\",\n user_pool_id=example.id,\n username=\"example\",\n attributes={\n \"example\": \"true\",\n \"foo\": \"bar\",\n \"email\": \"no-reply@example.com\",\n \"email_verified\": \"true\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Cognito.UserPool(\"example\", new()\n {\n Name = \"mypool\",\n Schemas = new[]\n {\n new Aws.Cognito.Inputs.UserPoolSchemaArgs\n {\n Name = \"example\",\n AttributeDataType = \"Boolean\",\n Mutable = false,\n Required = false,\n DeveloperOnlyAttribute = false,\n },\n new Aws.Cognito.Inputs.UserPoolSchemaArgs\n {\n Name = \"foo\",\n AttributeDataType = \"String\",\n Mutable = false,\n Required = false,\n DeveloperOnlyAttribute = false,\n StringAttributeConstraints = null,\n },\n },\n });\n\n var exampleUser = new Aws.Cognito.User(\"example\", new()\n {\n UserPoolId = example.Id,\n Username = \"example\",\n Attributes = \n {\n { \"example\", \"true\" },\n { \"foo\", \"bar\" },\n { \"email\", \"no-reply@example.com\" },\n { \"email_verified\", \"true\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cognito.NewUserPool(ctx, \"example\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"mypool\"),\n\t\t\tSchemas: cognito.UserPoolSchemaArray{\n\t\t\t\t\u0026cognito.UserPoolSchemaArgs{\n\t\t\t\t\tName: pulumi.String(\"example\"),\n\t\t\t\t\tAttributeDataType: pulumi.String(\"Boolean\"),\n\t\t\t\t\tMutable: pulumi.Bool(false),\n\t\t\t\t\tRequired: pulumi.Bool(false),\n\t\t\t\t\tDeveloperOnlyAttribute: pulumi.Bool(false),\n\t\t\t\t},\n\t\t\t\t\u0026cognito.UserPoolSchemaArgs{\n\t\t\t\t\tName: pulumi.String(\"foo\"),\n\t\t\t\t\tAttributeDataType: pulumi.String(\"String\"),\n\t\t\t\t\tMutable: pulumi.Bool(false),\n\t\t\t\t\tRequired: pulumi.Bool(false),\n\t\t\t\t\tDeveloperOnlyAttribute: pulumi.Bool(false),\n\t\t\t\t\tStringAttributeConstraints: \u0026cognito.UserPoolSchemaStringAttributeConstraintsArgs{},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUser(ctx, \"example\", \u0026cognito.UserArgs{\n\t\t\tUserPoolId: example.ID(),\n\t\t\tUsername: pulumi.String(\"example\"),\n\t\t\tAttributes: pulumi.StringMap{\n\t\t\t\t\"example\": pulumi.String(\"true\"),\n\t\t\t\t\"foo\": pulumi.String(\"bar\"),\n\t\t\t\t\"email\": pulumi.String(\"no-reply@example.com\"),\n\t\t\t\t\"email_verified\": pulumi.String(\"true\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.inputs.UserPoolSchemaArgs;\nimport com.pulumi.aws.cognito.inputs.UserPoolSchemaStringAttributeConstraintsArgs;\nimport com.pulumi.aws.cognito.User;\nimport com.pulumi.aws.cognito.UserArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new UserPool(\"example\", UserPoolArgs.builder()\n .name(\"mypool\")\n .schemas( \n UserPoolSchemaArgs.builder()\n .name(\"example\")\n .attributeDataType(\"Boolean\")\n .mutable(false)\n .required(false)\n .developerOnlyAttribute(false)\n .build(),\n UserPoolSchemaArgs.builder()\n .name(\"foo\")\n .attributeDataType(\"String\")\n .mutable(false)\n .required(false)\n .developerOnlyAttribute(false)\n .stringAttributeConstraints()\n .build())\n .build());\n\n var exampleUser = new User(\"exampleUser\", UserArgs.builder()\n .userPoolId(example.id())\n .username(\"example\")\n .attributes(Map.ofEntries(\n Map.entry(\"example\", true),\n Map.entry(\"foo\", \"bar\"),\n Map.entry(\"email\", \"no-reply@example.com\"),\n Map.entry(\"email_verified\", true)\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cognito:UserPool\n properties:\n name: mypool\n schemas:\n - name: example\n attributeDataType: Boolean\n mutable: false\n required: false\n developerOnlyAttribute: false\n - name: foo\n attributeDataType: String\n mutable: false\n required: false\n developerOnlyAttribute: false\n stringAttributeConstraints: {}\n exampleUser:\n type: aws:cognito:User\n name: example\n properties:\n userPoolId: ${example.id}\n username: example\n attributes:\n example: true\n foo: bar\n email: no-reply@example.com\n email_verified: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Cognito User using the `user_pool_id`/`name` attributes concatenated. For example:\n\n```sh\n$ pulumi import aws:cognito/user:User user us-east-1_vG78M4goG/user\n```\n", "properties": { "attributes": { "type": "object", @@ -208211,7 +208211,7 @@ } }, "aws:cognito/userPoolClient:UserPoolClient": { - "description": "Provides a Cognito User Pool Client resource.\n\nTo manage a User Pool Client created by another service, such as when [configuring an OpenSearch Domain to use Cognito authentication](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html),\nuse the `aws.cognito.ManagedUserPoolClient` resource instead.\n\n## Example Usage\n\n### Create a basic user pool client\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst pool = new aws.cognito.UserPool(\"pool\", {name: \"pool\"});\nconst client = new aws.cognito.UserPoolClient(\"client\", {\n name: \"client\",\n userPoolId: pool.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\npool = aws.cognito.UserPool(\"pool\", name=\"pool\")\nclient = aws.cognito.UserPoolClient(\"client\",\n name=\"client\",\n user_pool_id=pool.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var pool = new Aws.Cognito.UserPool(\"pool\", new()\n {\n Name = \"pool\",\n });\n\n var client = new Aws.Cognito.UserPoolClient(\"client\", new()\n {\n Name = \"client\",\n UserPoolId = pool.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpool, err := cognito.NewUserPool(ctx, \"pool\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"pool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUserPoolClient(ctx, \"client\", \u0026cognito.UserPoolClientArgs{\n\t\t\tName: pulumi.String(\"client\"),\n\t\t\tUserPoolId: pool.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.UserPoolClient;\nimport com.pulumi.aws.cognito.UserPoolClientArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var pool = new UserPool(\"pool\", UserPoolArgs.builder()\n .name(\"pool\")\n .build());\n\n var client = new UserPoolClient(\"client\", UserPoolClientArgs.builder()\n .name(\"client\")\n .userPoolId(pool.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n client:\n type: aws:cognito:UserPoolClient\n properties:\n name: client\n userPoolId: ${pool.id}\n pool:\n type: aws:cognito:UserPool\n properties:\n name: pool\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create a user pool client with no SRP authentication\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst pool = new aws.cognito.UserPool(\"pool\", {name: \"pool\"});\nconst client = new aws.cognito.UserPoolClient(\"client\", {\n name: \"client\",\n userPoolId: pool.id,\n generateSecret: true,\n explicitAuthFlows: [\"ADMIN_NO_SRP_AUTH\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\npool = aws.cognito.UserPool(\"pool\", name=\"pool\")\nclient = aws.cognito.UserPoolClient(\"client\",\n name=\"client\",\n user_pool_id=pool.id,\n generate_secret=True,\n explicit_auth_flows=[\"ADMIN_NO_SRP_AUTH\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var pool = new Aws.Cognito.UserPool(\"pool\", new()\n {\n Name = \"pool\",\n });\n\n var client = new Aws.Cognito.UserPoolClient(\"client\", new()\n {\n Name = \"client\",\n UserPoolId = pool.Id,\n GenerateSecret = true,\n ExplicitAuthFlows = new[]\n {\n \"ADMIN_NO_SRP_AUTH\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpool, err := cognito.NewUserPool(ctx, \"pool\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"pool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUserPoolClient(ctx, \"client\", \u0026cognito.UserPoolClientArgs{\n\t\t\tName: pulumi.String(\"client\"),\n\t\t\tUserPoolId: pool.ID(),\n\t\t\tGenerateSecret: pulumi.Bool(true),\n\t\t\tExplicitAuthFlows: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"ADMIN_NO_SRP_AUTH\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.UserPoolClient;\nimport com.pulumi.aws.cognito.UserPoolClientArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var pool = new UserPool(\"pool\", UserPoolArgs.builder()\n .name(\"pool\")\n .build());\n\n var client = new UserPoolClient(\"client\", UserPoolClientArgs.builder()\n .name(\"client\")\n .userPoolId(pool.id())\n .generateSecret(true)\n .explicitAuthFlows(\"ADMIN_NO_SRP_AUTH\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n client:\n type: aws:cognito:UserPoolClient\n properties:\n name: client\n userPoolId: ${pool.id}\n generateSecret: true\n explicitAuthFlows:\n - ADMIN_NO_SRP_AUTH\n pool:\n type: aws:cognito:UserPool\n properties:\n name: pool\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create a user pool client with pinpoint analytics\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst testUserPool = new aws.cognito.UserPool(\"test\", {name: \"pool\"});\nconst testApp = new aws.pinpoint.App(\"test\", {name: \"pinpoint\"});\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"cognito-idp.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst testRole = new aws.iam.Role(\"test\", {\n name: \"role\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst testUserPoolClient = new aws.cognito.UserPoolClient(\"test\", {\n name: \"pool_client\",\n userPoolId: testUserPool.id,\n analyticsConfiguration: {\n applicationId: testApp.applicationId,\n externalId: \"some_id\",\n roleArn: testRole.arn,\n userDataShared: true,\n },\n});\nconst current = aws.getCallerIdentity({});\nconst test = aws.iam.getPolicyDocumentOutput({\n statements: [{\n effect: \"Allow\",\n actions: [\n \"mobiletargeting:UpdateEndpoint\",\n \"mobiletargeting:PutEvents\",\n ],\n resources: [pulumi.all([current, testApp.applicationId]).apply(([current, applicationId]) =\u003e `arn:aws:mobiletargeting:*:${current.accountId}:apps/${applicationId}*`)],\n }],\n});\nconst testRolePolicy = new aws.iam.RolePolicy(\"test\", {\n name: \"role_policy\",\n role: testRole.id,\n policy: test.apply(test =\u003e test.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest_user_pool = aws.cognito.UserPool(\"test\", name=\"pool\")\ntest_app = aws.pinpoint.App(\"test\", name=\"pinpoint\")\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"cognito-idp.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\ntest_role = aws.iam.Role(\"test\",\n name=\"role\",\n assume_role_policy=assume_role.json)\ntest_user_pool_client = aws.cognito.UserPoolClient(\"test\",\n name=\"pool_client\",\n user_pool_id=test_user_pool.id,\n analytics_configuration={\n \"application_id\": test_app.application_id,\n \"external_id\": \"some_id\",\n \"role_arn\": test_role.arn,\n \"user_data_shared\": True,\n })\ncurrent = aws.get_caller_identity()\ntest = aws.iam.get_policy_document_output(statements=[{\n \"effect\": \"Allow\",\n \"actions\": [\n \"mobiletargeting:UpdateEndpoint\",\n \"mobiletargeting:PutEvents\",\n ],\n \"resources\": [test_app.application_id.apply(lambda application_id: f\"arn:aws:mobiletargeting:*:{current.account_id}:apps/{application_id}*\")],\n}])\ntest_role_policy = aws.iam.RolePolicy(\"test\",\n name=\"role_policy\",\n role=test_role.id,\n policy=test.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var testUserPool = new Aws.Cognito.UserPool(\"test\", new()\n {\n Name = \"pool\",\n });\n\n var testApp = new Aws.Pinpoint.App(\"test\", new()\n {\n Name = \"pinpoint\",\n });\n\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"cognito-idp.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var testRole = new Aws.Iam.Role(\"test\", new()\n {\n Name = \"role\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var testUserPoolClient = new Aws.Cognito.UserPoolClient(\"test\", new()\n {\n Name = \"pool_client\",\n UserPoolId = testUserPool.Id,\n AnalyticsConfiguration = new Aws.Cognito.Inputs.UserPoolClientAnalyticsConfigurationArgs\n {\n ApplicationId = testApp.ApplicationId,\n ExternalId = \"some_id\",\n RoleArn = testRole.Arn,\n UserDataShared = true,\n },\n });\n\n var current = Aws.GetCallerIdentity.Invoke();\n\n var test = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"mobiletargeting:UpdateEndpoint\",\n \"mobiletargeting:PutEvents\",\n },\n Resources = new[]\n {\n $\"arn:aws:mobiletargeting:*:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:apps/{testApp.ApplicationId}*\",\n },\n },\n },\n });\n\n var testRolePolicy = new Aws.Iam.RolePolicy(\"test\", new()\n {\n Name = \"role_policy\",\n Role = testRole.Id,\n Policy = test.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pinpoint\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttestUserPool, err := cognito.NewUserPool(ctx, \"test\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"pool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestApp, err := pinpoint.NewApp(ctx, \"test\", \u0026pinpoint.AppArgs{\n\t\t\tName: pulumi.String(\"pinpoint\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"cognito-idp.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestRole, err := iam.NewRole(ctx, \"test\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUserPoolClient(ctx, \"test\", \u0026cognito.UserPoolClientArgs{\n\t\t\tName: pulumi.String(\"pool_client\"),\n\t\t\tUserPoolId: testUserPool.ID(),\n\t\t\tAnalyticsConfiguration: \u0026cognito.UserPoolClientAnalyticsConfigurationArgs{\n\t\t\t\tApplicationId: testApp.ApplicationId,\n\t\t\t\tExternalId: pulumi.String(\"some_id\"),\n\t\t\t\tRoleArn: testRole.Arn,\n\t\t\t\tUserDataShared: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttest := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"mobiletargeting:UpdateEndpoint\"),\n\t\t\t\t\t\tpulumi.String(\"mobiletargeting:PutEvents\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\ttestApp.ApplicationId.ApplyT(func(applicationId string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"arn:aws:mobiletargeting:*:%v:apps/%v*\", current.AccountId, applicationId), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\t_, err = iam.NewRolePolicy(ctx, \"test\", \u0026iam.RolePolicyArgs{\n\t\t\tName: pulumi.String(\"role_policy\"),\n\t\t\tRole: testRole.ID(),\n\t\t\tPolicy: pulumi.String(test.ApplyT(func(test iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026test.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.pinpoint.App;\nimport com.pulumi.aws.pinpoint.AppArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.cognito.UserPoolClient;\nimport com.pulumi.aws.cognito.UserPoolClientArgs;\nimport com.pulumi.aws.cognito.inputs.UserPoolClientAnalyticsConfigurationArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testUserPool = new UserPool(\"testUserPool\", UserPoolArgs.builder()\n .name(\"pool\")\n .build());\n\n var testApp = new App(\"testApp\", AppArgs.builder()\n .name(\"pinpoint\")\n .build());\n\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"cognito-idp.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var testRole = new Role(\"testRole\", RoleArgs.builder()\n .name(\"role\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var testUserPoolClient = new UserPoolClient(\"testUserPoolClient\", UserPoolClientArgs.builder()\n .name(\"pool_client\")\n .userPoolId(testUserPool.id())\n .analyticsConfiguration(UserPoolClientAnalyticsConfigurationArgs.builder()\n .applicationId(testApp.applicationId())\n .externalId(\"some_id\")\n .roleArn(testRole.arn())\n .userDataShared(true)\n .build())\n .build());\n\n final var current = AwsFunctions.getCallerIdentity();\n\n final var test = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"mobiletargeting:UpdateEndpoint\",\n \"mobiletargeting:PutEvents\")\n .resources(testApp.applicationId().applyValue(applicationId -\u003e String.format(\"arn:aws:mobiletargeting:*:%s:apps/%s*\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),applicationId)))\n .build())\n .build());\n\n var testRolePolicy = new RolePolicy(\"testRolePolicy\", RolePolicyArgs.builder()\n .name(\"role_policy\")\n .role(testRole.id())\n .policy(test.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(test -\u003e test.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testUserPoolClient:\n type: aws:cognito:UserPoolClient\n name: test\n properties:\n name: pool_client\n userPoolId: ${testUserPool.id}\n analyticsConfiguration:\n applicationId: ${testApp.applicationId}\n externalId: some_id\n roleArn: ${testRole.arn}\n userDataShared: true\n testUserPool:\n type: aws:cognito:UserPool\n name: test\n properties:\n name: pool\n testApp:\n type: aws:pinpoint:App\n name: test\n properties:\n name: pinpoint\n testRole:\n type: aws:iam:Role\n name: test\n properties:\n name: role\n assumeRolePolicy: ${assumeRole.json}\n testRolePolicy:\n type: aws:iam:RolePolicy\n name: test\n properties:\n name: role_policy\n role: ${testRole.id}\n policy: ${test.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - cognito-idp.amazonaws.com\n actions:\n - sts:AssumeRole\n test:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - mobiletargeting:UpdateEndpoint\n - mobiletargeting:PutEvents\n resources:\n - arn:aws:mobiletargeting:*:${current.accountId}:apps/${testApp.applicationId}*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create a user pool client with Cognito as the identity provider\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst pool = new aws.cognito.UserPool(\"pool\", {name: \"pool\"});\nconst userpoolClient = new aws.cognito.UserPoolClient(\"userpool_client\", {\n name: \"client\",\n userPoolId: pool.id,\n callbackUrls: [\"https://example.com\"],\n allowedOauthFlowsUserPoolClient: true,\n allowedOauthFlows: [\n \"code\",\n \"implicit\",\n ],\n allowedOauthScopes: [\n \"email\",\n \"openid\",\n ],\n supportedIdentityProviders: [\"COGNITO\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\npool = aws.cognito.UserPool(\"pool\", name=\"pool\")\nuserpool_client = aws.cognito.UserPoolClient(\"userpool_client\",\n name=\"client\",\n user_pool_id=pool.id,\n callback_urls=[\"https://example.com\"],\n allowed_oauth_flows_user_pool_client=True,\n allowed_oauth_flows=[\n \"code\",\n \"implicit\",\n ],\n allowed_oauth_scopes=[\n \"email\",\n \"openid\",\n ],\n supported_identity_providers=[\"COGNITO\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var pool = new Aws.Cognito.UserPool(\"pool\", new()\n {\n Name = \"pool\",\n });\n\n var userpoolClient = new Aws.Cognito.UserPoolClient(\"userpool_client\", new()\n {\n Name = \"client\",\n UserPoolId = pool.Id,\n CallbackUrls = new[]\n {\n \"https://example.com\",\n },\n AllowedOauthFlowsUserPoolClient = true,\n AllowedOauthFlows = new[]\n {\n \"code\",\n \"implicit\",\n },\n AllowedOauthScopes = new[]\n {\n \"email\",\n \"openid\",\n },\n SupportedIdentityProviders = new[]\n {\n \"COGNITO\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpool, err := cognito.NewUserPool(ctx, \"pool\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"pool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUserPoolClient(ctx, \"userpool_client\", \u0026cognito.UserPoolClientArgs{\n\t\t\tName: pulumi.String(\"client\"),\n\t\t\tUserPoolId: pool.ID(),\n\t\t\tCallbackUrls: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"https://example.com\"),\n\t\t\t},\n\t\t\tAllowedOauthFlowsUserPoolClient: pulumi.Bool(true),\n\t\t\tAllowedOauthFlows: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"code\"),\n\t\t\t\tpulumi.String(\"implicit\"),\n\t\t\t},\n\t\t\tAllowedOauthScopes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"email\"),\n\t\t\t\tpulumi.String(\"openid\"),\n\t\t\t},\n\t\t\tSupportedIdentityProviders: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"COGNITO\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.UserPoolClient;\nimport com.pulumi.aws.cognito.UserPoolClientArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var pool = new UserPool(\"pool\", UserPoolArgs.builder()\n .name(\"pool\")\n .build());\n\n var userpoolClient = new UserPoolClient(\"userpoolClient\", UserPoolClientArgs.builder()\n .name(\"client\")\n .userPoolId(pool.id())\n .callbackUrls(\"https://example.com\")\n .allowedOauthFlowsUserPoolClient(true)\n .allowedOauthFlows( \n \"code\",\n \"implicit\")\n .allowedOauthScopes( \n \"email\",\n \"openid\")\n .supportedIdentityProviders(\"COGNITO\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n userpoolClient:\n type: aws:cognito:UserPoolClient\n name: userpool_client\n properties:\n name: client\n userPoolId: ${pool.id}\n callbackUrls:\n - https://example.com\n allowedOauthFlowsUserPoolClient: true\n allowedOauthFlows:\n - code\n - implicit\n allowedOauthScopes:\n - email\n - openid\n supportedIdentityProviders:\n - COGNITO\n pool:\n type: aws:cognito:UserPool\n properties:\n name: pool\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Cognito User Pool Clients using the `id` of the Cognito User Pool, and the `id` of the Cognito User Pool Client. For example:\n\n```sh\n$ pulumi import aws:cognito/userPoolClient:UserPoolClient client us-west-2_abc123/3ho4ek12345678909nh3fmhpko\n```\n", + "description": "Provides a Cognito User Pool Client resource.\n\nTo manage a User Pool Client created by another service, such as when [configuring an OpenSearch Domain to use Cognito authentication](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html),\nuse the `aws.cognito.ManagedUserPoolClient` resource instead.\n\n## Example Usage\n\n### Create a basic user pool client\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst pool = new aws.cognito.UserPool(\"pool\", {name: \"pool\"});\nconst client = new aws.cognito.UserPoolClient(\"client\", {\n name: \"client\",\n userPoolId: pool.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\npool = aws.cognito.UserPool(\"pool\", name=\"pool\")\nclient = aws.cognito.UserPoolClient(\"client\",\n name=\"client\",\n user_pool_id=pool.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var pool = new Aws.Cognito.UserPool(\"pool\", new()\n {\n Name = \"pool\",\n });\n\n var client = new Aws.Cognito.UserPoolClient(\"client\", new()\n {\n Name = \"client\",\n UserPoolId = pool.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpool, err := cognito.NewUserPool(ctx, \"pool\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"pool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUserPoolClient(ctx, \"client\", \u0026cognito.UserPoolClientArgs{\n\t\t\tName: pulumi.String(\"client\"),\n\t\t\tUserPoolId: pool.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.UserPoolClient;\nimport com.pulumi.aws.cognito.UserPoolClientArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var pool = new UserPool(\"pool\", UserPoolArgs.builder()\n .name(\"pool\")\n .build());\n\n var client = new UserPoolClient(\"client\", UserPoolClientArgs.builder()\n .name(\"client\")\n .userPoolId(pool.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n client:\n type: aws:cognito:UserPoolClient\n properties:\n name: client\n userPoolId: ${pool.id}\n pool:\n type: aws:cognito:UserPool\n properties:\n name: pool\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create a user pool client with no SRP authentication\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst pool = new aws.cognito.UserPool(\"pool\", {name: \"pool\"});\nconst client = new aws.cognito.UserPoolClient(\"client\", {\n name: \"client\",\n userPoolId: pool.id,\n generateSecret: true,\n explicitAuthFlows: [\"ADMIN_NO_SRP_AUTH\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\npool = aws.cognito.UserPool(\"pool\", name=\"pool\")\nclient = aws.cognito.UserPoolClient(\"client\",\n name=\"client\",\n user_pool_id=pool.id,\n generate_secret=True,\n explicit_auth_flows=[\"ADMIN_NO_SRP_AUTH\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var pool = new Aws.Cognito.UserPool(\"pool\", new()\n {\n Name = \"pool\",\n });\n\n var client = new Aws.Cognito.UserPoolClient(\"client\", new()\n {\n Name = \"client\",\n UserPoolId = pool.Id,\n GenerateSecret = true,\n ExplicitAuthFlows = new[]\n {\n \"ADMIN_NO_SRP_AUTH\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpool, err := cognito.NewUserPool(ctx, \"pool\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"pool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUserPoolClient(ctx, \"client\", \u0026cognito.UserPoolClientArgs{\n\t\t\tName: pulumi.String(\"client\"),\n\t\t\tUserPoolId: pool.ID(),\n\t\t\tGenerateSecret: pulumi.Bool(true),\n\t\t\tExplicitAuthFlows: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"ADMIN_NO_SRP_AUTH\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.UserPoolClient;\nimport com.pulumi.aws.cognito.UserPoolClientArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var pool = new UserPool(\"pool\", UserPoolArgs.builder()\n .name(\"pool\")\n .build());\n\n var client = new UserPoolClient(\"client\", UserPoolClientArgs.builder()\n .name(\"client\")\n .userPoolId(pool.id())\n .generateSecret(true)\n .explicitAuthFlows(\"ADMIN_NO_SRP_AUTH\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n client:\n type: aws:cognito:UserPoolClient\n properties:\n name: client\n userPoolId: ${pool.id}\n generateSecret: true\n explicitAuthFlows:\n - ADMIN_NO_SRP_AUTH\n pool:\n type: aws:cognito:UserPool\n properties:\n name: pool\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create a user pool client with pinpoint analytics\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst testUserPool = new aws.cognito.UserPool(\"test\", {name: \"pool\"});\nconst testApp = new aws.pinpoint.App(\"test\", {name: \"pinpoint\"});\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"cognito-idp.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst testRole = new aws.iam.Role(\"test\", {\n name: \"role\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst testUserPoolClient = new aws.cognito.UserPoolClient(\"test\", {\n name: \"pool_client\",\n userPoolId: testUserPool.id,\n analyticsConfiguration: {\n applicationId: testApp.applicationId,\n externalId: \"some_id\",\n roleArn: testRole.arn,\n userDataShared: true,\n },\n});\nconst current = aws.getCallerIdentity({});\nconst test = aws.iam.getPolicyDocumentOutput({\n statements: [{\n effect: \"Allow\",\n actions: [\n \"mobiletargeting:UpdateEndpoint\",\n \"mobiletargeting:PutEvents\",\n ],\n resources: [pulumi.all([current, testApp.applicationId]).apply(([current, applicationId]) =\u003e `arn:aws:mobiletargeting:*:${current.accountId}:apps/${applicationId}*`)],\n }],\n});\nconst testRolePolicy = new aws.iam.RolePolicy(\"test\", {\n name: \"role_policy\",\n role: testRole.id,\n policy: test.apply(test =\u003e test.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest_user_pool = aws.cognito.UserPool(\"test\", name=\"pool\")\ntest_app = aws.pinpoint.App(\"test\", name=\"pinpoint\")\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"cognito-idp.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\ntest_role = aws.iam.Role(\"test\",\n name=\"role\",\n assume_role_policy=assume_role.json)\ntest_user_pool_client = aws.cognito.UserPoolClient(\"test\",\n name=\"pool_client\",\n user_pool_id=test_user_pool.id,\n analytics_configuration={\n \"application_id\": test_app.application_id,\n \"external_id\": \"some_id\",\n \"role_arn\": test_role.arn,\n \"user_data_shared\": True,\n })\ncurrent = aws.get_caller_identity()\ntest = aws.iam.get_policy_document_output(statements=[{\n \"effect\": \"Allow\",\n \"actions\": [\n \"mobiletargeting:UpdateEndpoint\",\n \"mobiletargeting:PutEvents\",\n ],\n \"resources\": [test_app.application_id.apply(lambda application_id: f\"arn:aws:mobiletargeting:*:{current.account_id}:apps/{application_id}*\")],\n}])\ntest_role_policy = aws.iam.RolePolicy(\"test\",\n name=\"role_policy\",\n role=test_role.id,\n policy=test.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var testUserPool = new Aws.Cognito.UserPool(\"test\", new()\n {\n Name = \"pool\",\n });\n\n var testApp = new Aws.Pinpoint.App(\"test\", new()\n {\n Name = \"pinpoint\",\n });\n\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"cognito-idp.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var testRole = new Aws.Iam.Role(\"test\", new()\n {\n Name = \"role\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var testUserPoolClient = new Aws.Cognito.UserPoolClient(\"test\", new()\n {\n Name = \"pool_client\",\n UserPoolId = testUserPool.Id,\n AnalyticsConfiguration = new Aws.Cognito.Inputs.UserPoolClientAnalyticsConfigurationArgs\n {\n ApplicationId = testApp.ApplicationId,\n ExternalId = \"some_id\",\n RoleArn = testRole.Arn,\n UserDataShared = true,\n },\n });\n\n var current = Aws.GetCallerIdentity.Invoke();\n\n var test = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"mobiletargeting:UpdateEndpoint\",\n \"mobiletargeting:PutEvents\",\n },\n Resources = new[]\n {\n $\"arn:aws:mobiletargeting:*:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:apps/{testApp.ApplicationId}*\",\n },\n },\n },\n });\n\n var testRolePolicy = new Aws.Iam.RolePolicy(\"test\", new()\n {\n Name = \"role_policy\",\n Role = testRole.Id,\n Policy = test.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pinpoint\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttestUserPool, err := cognito.NewUserPool(ctx, \"test\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"pool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestApp, err := pinpoint.NewApp(ctx, \"test\", \u0026pinpoint.AppArgs{\n\t\t\tName: pulumi.String(\"pinpoint\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"cognito-idp.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestRole, err := iam.NewRole(ctx, \"test\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUserPoolClient(ctx, \"test\", \u0026cognito.UserPoolClientArgs{\n\t\t\tName: pulumi.String(\"pool_client\"),\n\t\t\tUserPoolId: testUserPool.ID(),\n\t\t\tAnalyticsConfiguration: \u0026cognito.UserPoolClientAnalyticsConfigurationArgs{\n\t\t\t\tApplicationId: testApp.ApplicationId,\n\t\t\t\tExternalId: pulumi.String(\"some_id\"),\n\t\t\t\tRoleArn: testRole.Arn,\n\t\t\t\tUserDataShared: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttest := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"mobiletargeting:UpdateEndpoint\"),\n\t\t\t\t\t\tpulumi.String(\"mobiletargeting:PutEvents\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\ttestApp.ApplicationId.ApplyT(func(applicationId string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"arn:aws:mobiletargeting:*:%v:apps/%v*\", current.AccountId, applicationId), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\t_, err = iam.NewRolePolicy(ctx, \"test\", \u0026iam.RolePolicyArgs{\n\t\t\tName: pulumi.String(\"role_policy\"),\n\t\t\tRole: testRole.ID(),\n\t\t\tPolicy: pulumi.String(test.ApplyT(func(test iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026test.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.pinpoint.App;\nimport com.pulumi.aws.pinpoint.AppArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.cognito.UserPoolClient;\nimport com.pulumi.aws.cognito.UserPoolClientArgs;\nimport com.pulumi.aws.cognito.inputs.UserPoolClientAnalyticsConfigurationArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testUserPool = new UserPool(\"testUserPool\", UserPoolArgs.builder()\n .name(\"pool\")\n .build());\n\n var testApp = new App(\"testApp\", AppArgs.builder()\n .name(\"pinpoint\")\n .build());\n\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"cognito-idp.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var testRole = new Role(\"testRole\", RoleArgs.builder()\n .name(\"role\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var testUserPoolClient = new UserPoolClient(\"testUserPoolClient\", UserPoolClientArgs.builder()\n .name(\"pool_client\")\n .userPoolId(testUserPool.id())\n .analyticsConfiguration(UserPoolClientAnalyticsConfigurationArgs.builder()\n .applicationId(testApp.applicationId())\n .externalId(\"some_id\")\n .roleArn(testRole.arn())\n .userDataShared(true)\n .build())\n .build());\n\n final var current = AwsFunctions.getCallerIdentity();\n\n final var test = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"mobiletargeting:UpdateEndpoint\",\n \"mobiletargeting:PutEvents\")\n .resources(testApp.applicationId().applyValue(applicationId -\u003e String.format(\"arn:aws:mobiletargeting:*:%s:apps/%s*\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),applicationId)))\n .build())\n .build());\n\n var testRolePolicy = new RolePolicy(\"testRolePolicy\", RolePolicyArgs.builder()\n .name(\"role_policy\")\n .role(testRole.id())\n .policy(test.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(test -\u003e test.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testUserPoolClient:\n type: aws:cognito:UserPoolClient\n name: test\n properties:\n name: pool_client\n userPoolId: ${testUserPool.id}\n analyticsConfiguration:\n applicationId: ${testApp.applicationId}\n externalId: some_id\n roleArn: ${testRole.arn}\n userDataShared: true\n testUserPool:\n type: aws:cognito:UserPool\n name: test\n properties:\n name: pool\n testApp:\n type: aws:pinpoint:App\n name: test\n properties:\n name: pinpoint\n testRole:\n type: aws:iam:Role\n name: test\n properties:\n name: role\n assumeRolePolicy: ${assumeRole.json}\n testRolePolicy:\n type: aws:iam:RolePolicy\n name: test\n properties:\n name: role_policy\n role: ${testRole.id}\n policy: ${test.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - cognito-idp.amazonaws.com\n actions:\n - sts:AssumeRole\n test:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - mobiletargeting:UpdateEndpoint\n - mobiletargeting:PutEvents\n resources:\n - arn:aws:mobiletargeting:*:${current.accountId}:apps/${testApp.applicationId}*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create a user pool client with Cognito as the identity provider\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst pool = new aws.cognito.UserPool(\"pool\", {name: \"pool\"});\nconst userpoolClient = new aws.cognito.UserPoolClient(\"userpool_client\", {\n name: \"client\",\n userPoolId: pool.id,\n callbackUrls: [\"https://example.com\"],\n allowedOauthFlowsUserPoolClient: true,\n allowedOauthFlows: [\n \"code\",\n \"implicit\",\n ],\n allowedOauthScopes: [\n \"email\",\n \"openid\",\n ],\n supportedIdentityProviders: [\"COGNITO\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\npool = aws.cognito.UserPool(\"pool\", name=\"pool\")\nuserpool_client = aws.cognito.UserPoolClient(\"userpool_client\",\n name=\"client\",\n user_pool_id=pool.id,\n callback_urls=[\"https://example.com\"],\n allowed_oauth_flows_user_pool_client=True,\n allowed_oauth_flows=[\n \"code\",\n \"implicit\",\n ],\n allowed_oauth_scopes=[\n \"email\",\n \"openid\",\n ],\n supported_identity_providers=[\"COGNITO\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var pool = new Aws.Cognito.UserPool(\"pool\", new()\n {\n Name = \"pool\",\n });\n\n var userpoolClient = new Aws.Cognito.UserPoolClient(\"userpool_client\", new()\n {\n Name = \"client\",\n UserPoolId = pool.Id,\n CallbackUrls = new[]\n {\n \"https://example.com\",\n },\n AllowedOauthFlowsUserPoolClient = true,\n AllowedOauthFlows = new[]\n {\n \"code\",\n \"implicit\",\n },\n AllowedOauthScopes = new[]\n {\n \"email\",\n \"openid\",\n },\n SupportedIdentityProviders = new[]\n {\n \"COGNITO\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpool, err := cognito.NewUserPool(ctx, \"pool\", \u0026cognito.UserPoolArgs{\n\t\t\tName: pulumi.String(\"pool\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cognito.NewUserPoolClient(ctx, \"userpool_client\", \u0026cognito.UserPoolClientArgs{\n\t\t\tName: pulumi.String(\"client\"),\n\t\t\tUserPoolId: pool.ID(),\n\t\t\tCallbackUrls: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"https://example.com\"),\n\t\t\t},\n\t\t\tAllowedOauthFlowsUserPoolClient: pulumi.Bool(true),\n\t\t\tAllowedOauthFlows: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"code\"),\n\t\t\t\tpulumi.String(\"implicit\"),\n\t\t\t},\n\t\t\tAllowedOauthScopes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"email\"),\n\t\t\t\tpulumi.String(\"openid\"),\n\t\t\t},\n\t\t\tSupportedIdentityProviders: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"COGNITO\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cognito.UserPool;\nimport com.pulumi.aws.cognito.UserPoolArgs;\nimport com.pulumi.aws.cognito.UserPoolClient;\nimport com.pulumi.aws.cognito.UserPoolClientArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var pool = new UserPool(\"pool\", UserPoolArgs.builder()\n .name(\"pool\")\n .build());\n\n var userpoolClient = new UserPoolClient(\"userpoolClient\", UserPoolClientArgs.builder()\n .name(\"client\")\n .userPoolId(pool.id())\n .callbackUrls(\"https://example.com\")\n .allowedOauthFlowsUserPoolClient(true)\n .allowedOauthFlows( \n \"code\",\n \"implicit\")\n .allowedOauthScopes( \n \"email\",\n \"openid\")\n .supportedIdentityProviders(\"COGNITO\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n userpoolClient:\n type: aws:cognito:UserPoolClient\n name: userpool_client\n properties:\n name: client\n userPoolId: ${pool.id}\n callbackUrls:\n - https://example.com\n allowedOauthFlowsUserPoolClient: true\n allowedOauthFlows:\n - code\n - implicit\n allowedOauthScopes:\n - email\n - openid\n supportedIdentityProviders:\n - COGNITO\n pool:\n type: aws:cognito:UserPool\n properties:\n name: pool\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Cognito User Pool Clients using the `id` of the Cognito User Pool, and the `id` of the Cognito User Pool Client. For example:\n\n```sh\n$ pulumi import aws:cognito/userPoolClient:UserPoolClient client us-west-2_abc123/3ho4ek12345678909nh3fmhpko\n```\n", "properties": { "accessTokenValidity": { "type": "integer", @@ -209408,7 +209408,7 @@ } }, "aws:connect/botAssociation:BotAssociation": { - "description": "Allows the specified Amazon Connect instance to access the specified Amazon Lex (V1) bot. For more information see\n[Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html) and [Add an Amazon Lex bot](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-lex.html).\n\n\u003e **NOTE:** This resource only currently supports Amazon Lex (V1) Associations.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.connect.BotAssociation(\"example\", {\n instanceId: exampleAwsConnectInstance.id,\n lexBot: {\n lexRegion: \"us-west-2\",\n name: \"Test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.connect.BotAssociation(\"example\",\n instance_id=example_aws_connect_instance[\"id\"],\n lex_bot={\n \"lex_region\": \"us-west-2\",\n \"name\": \"Test\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Connect.BotAssociation(\"example\", new()\n {\n InstanceId = exampleAwsConnectInstance.Id,\n LexBot = new Aws.Connect.Inputs.BotAssociationLexBotArgs\n {\n LexRegion = \"us-west-2\",\n Name = \"Test\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := connect.NewBotAssociation(ctx, \"example\", \u0026connect.BotAssociationArgs{\n\t\t\tInstanceId: pulumi.Any(exampleAwsConnectInstance.Id),\n\t\t\tLexBot: \u0026connect.BotAssociationLexBotArgs{\n\t\t\t\tLexRegion: pulumi.String(\"us-west-2\"),\n\t\t\t\tName: pulumi.String(\"Test\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.BotAssociation;\nimport com.pulumi.aws.connect.BotAssociationArgs;\nimport com.pulumi.aws.connect.inputs.BotAssociationLexBotArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BotAssociation(\"example\", BotAssociationArgs.builder()\n .instanceId(exampleAwsConnectInstance.id())\n .lexBot(BotAssociationLexBotArgs.builder()\n .lexRegion(\"us-west-2\")\n .name(\"Test\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:connect:BotAssociation\n properties:\n instanceId: ${exampleAwsConnectInstance.id}\n lexBot:\n lexRegion: us-west-2\n name: Test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Including a sample Lex bot\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.lex.Intent(\"example\", {\n createVersion: true,\n name: \"connect_lex_intent\",\n fulfillmentActivity: {\n type: \"ReturnIntent\",\n },\n sampleUtterances: [\"I would like to pick up flowers.\"],\n});\nconst exampleBot = new aws.lex.Bot(\"example\", {\n abortStatement: {\n messages: [{\n content: \"Sorry, I am not able to assist at this time.\",\n contentType: \"PlainText\",\n }],\n },\n clarificationPrompt: {\n maxAttempts: 2,\n messages: [{\n content: \"I didn't understand you, what would you like to do?\",\n contentType: \"PlainText\",\n }],\n },\n intents: [{\n intentName: example.name,\n intentVersion: \"1\",\n }],\n childDirected: false,\n name: \"connect_lex_bot\",\n processBehavior: \"BUILD\",\n});\nconst exampleBotAssociation = new aws.connect.BotAssociation(\"example\", {\n instanceId: exampleAwsConnectInstance.id,\n lexBot: {\n lexRegion: current.then(current =\u003e current.name),\n name: exampleBot.name,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.lex.Intent(\"example\",\n create_version=True,\n name=\"connect_lex_intent\",\n fulfillment_activity={\n \"type\": \"ReturnIntent\",\n },\n sample_utterances=[\"I would like to pick up flowers.\"])\nexample_bot = aws.lex.Bot(\"example\",\n abort_statement={\n \"messages\": [{\n \"content\": \"Sorry, I am not able to assist at this time.\",\n \"content_type\": \"PlainText\",\n }],\n },\n clarification_prompt={\n \"max_attempts\": 2,\n \"messages\": [{\n \"content\": \"I didn't understand you, what would you like to do?\",\n \"content_type\": \"PlainText\",\n }],\n },\n intents=[{\n \"intent_name\": example.name,\n \"intent_version\": \"1\",\n }],\n child_directed=False,\n name=\"connect_lex_bot\",\n process_behavior=\"BUILD\")\nexample_bot_association = aws.connect.BotAssociation(\"example\",\n instance_id=example_aws_connect_instance[\"id\"],\n lex_bot={\n \"lex_region\": current.name,\n \"name\": example_bot.name,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Lex.Intent(\"example\", new()\n {\n CreateVersion = true,\n Name = \"connect_lex_intent\",\n FulfillmentActivity = new Aws.Lex.Inputs.IntentFulfillmentActivityArgs\n {\n Type = \"ReturnIntent\",\n },\n SampleUtterances = new[]\n {\n \"I would like to pick up flowers.\",\n },\n });\n\n var exampleBot = new Aws.Lex.Bot(\"example\", new()\n {\n AbortStatement = new Aws.Lex.Inputs.BotAbortStatementArgs\n {\n Messages = new[]\n {\n new Aws.Lex.Inputs.BotAbortStatementMessageArgs\n {\n Content = \"Sorry, I am not able to assist at this time.\",\n ContentType = \"PlainText\",\n },\n },\n },\n ClarificationPrompt = new Aws.Lex.Inputs.BotClarificationPromptArgs\n {\n MaxAttempts = 2,\n Messages = new[]\n {\n new Aws.Lex.Inputs.BotClarificationPromptMessageArgs\n {\n Content = \"I didn't understand you, what would you like to do?\",\n ContentType = \"PlainText\",\n },\n },\n },\n Intents = new[]\n {\n new Aws.Lex.Inputs.BotIntentArgs\n {\n IntentName = example.Name,\n IntentVersion = \"1\",\n },\n },\n ChildDirected = false,\n Name = \"connect_lex_bot\",\n ProcessBehavior = \"BUILD\",\n });\n\n var exampleBotAssociation = new Aws.Connect.BotAssociation(\"example\", new()\n {\n InstanceId = exampleAwsConnectInstance.Id,\n LexBot = new Aws.Connect.Inputs.BotAssociationLexBotArgs\n {\n LexRegion = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n Name = exampleBot.Name,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := lex.NewIntent(ctx, \"example\", \u0026lex.IntentArgs{\n\t\t\tCreateVersion: pulumi.Bool(true),\n\t\t\tName: pulumi.String(\"connect_lex_intent\"),\n\t\t\tFulfillmentActivity: \u0026lex.IntentFulfillmentActivityArgs{\n\t\t\t\tType: pulumi.String(\"ReturnIntent\"),\n\t\t\t},\n\t\t\tSampleUtterances: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"I would like to pick up flowers.\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBot, err := lex.NewBot(ctx, \"example\", \u0026lex.BotArgs{\n\t\t\tAbortStatement: \u0026lex.BotAbortStatementArgs{\n\t\t\t\tMessages: lex.BotAbortStatementMessageArray{\n\t\t\t\t\t\u0026lex.BotAbortStatementMessageArgs{\n\t\t\t\t\t\tContent: pulumi.String(\"Sorry, I am not able to assist at this time.\"),\n\t\t\t\t\t\tContentType: pulumi.String(\"PlainText\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tClarificationPrompt: \u0026lex.BotClarificationPromptArgs{\n\t\t\t\tMaxAttempts: pulumi.Int(2),\n\t\t\t\tMessages: lex.BotClarificationPromptMessageArray{\n\t\t\t\t\t\u0026lex.BotClarificationPromptMessageArgs{\n\t\t\t\t\t\tContent: pulumi.String(\"I didn't understand you, what would you like to do?\"),\n\t\t\t\t\t\tContentType: pulumi.String(\"PlainText\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tIntents: lex.BotIntentArray{\n\t\t\t\t\u0026lex.BotIntentArgs{\n\t\t\t\t\tIntentName: example.Name,\n\t\t\t\t\tIntentVersion: pulumi.String(\"1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tChildDirected: pulumi.Bool(false),\n\t\t\tName: pulumi.String(\"connect_lex_bot\"),\n\t\t\tProcessBehavior: pulumi.String(\"BUILD\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = connect.NewBotAssociation(ctx, \"example\", \u0026connect.BotAssociationArgs{\n\t\t\tInstanceId: pulumi.Any(exampleAwsConnectInstance.Id),\n\t\t\tLexBot: \u0026connect.BotAssociationLexBotArgs{\n\t\t\t\tLexRegion: pulumi.String(current.Name),\n\t\t\t\tName: exampleBot.Name,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.lex.Intent;\nimport com.pulumi.aws.lex.IntentArgs;\nimport com.pulumi.aws.lex.inputs.IntentFulfillmentActivityArgs;\nimport com.pulumi.aws.lex.Bot;\nimport com.pulumi.aws.lex.BotArgs;\nimport com.pulumi.aws.lex.inputs.BotAbortStatementArgs;\nimport com.pulumi.aws.lex.inputs.BotClarificationPromptArgs;\nimport com.pulumi.aws.lex.inputs.BotIntentArgs;\nimport com.pulumi.aws.connect.BotAssociation;\nimport com.pulumi.aws.connect.BotAssociationArgs;\nimport com.pulumi.aws.connect.inputs.BotAssociationLexBotArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new Intent(\"example\", IntentArgs.builder()\n .createVersion(true)\n .name(\"connect_lex_intent\")\n .fulfillmentActivity(IntentFulfillmentActivityArgs.builder()\n .type(\"ReturnIntent\")\n .build())\n .sampleUtterances(\"I would like to pick up flowers.\")\n .build());\n\n var exampleBot = new Bot(\"exampleBot\", BotArgs.builder()\n .abortStatement(BotAbortStatementArgs.builder()\n .messages(BotAbortStatementMessageArgs.builder()\n .content(\"Sorry, I am not able to assist at this time.\")\n .contentType(\"PlainText\")\n .build())\n .build())\n .clarificationPrompt(BotClarificationPromptArgs.builder()\n .maxAttempts(2)\n .messages(BotClarificationPromptMessageArgs.builder()\n .content(\"I didn't understand you, what would you like to do?\")\n .contentType(\"PlainText\")\n .build())\n .build())\n .intents(BotIntentArgs.builder()\n .intentName(example.name())\n .intentVersion(\"1\")\n .build())\n .childDirected(false)\n .name(\"connect_lex_bot\")\n .processBehavior(\"BUILD\")\n .build());\n\n var exampleBotAssociation = new BotAssociation(\"exampleBotAssociation\", BotAssociationArgs.builder()\n .instanceId(exampleAwsConnectInstance.id())\n .lexBot(BotAssociationLexBotArgs.builder()\n .lexRegion(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .name(exampleBot.name())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lex:Intent\n properties:\n createVersion: true\n name: connect_lex_intent\n fulfillmentActivity:\n type: ReturnIntent\n sampleUtterances:\n - I would like to pick up flowers.\n exampleBot:\n type: aws:lex:Bot\n name: example\n properties:\n abortStatement:\n messages:\n - content: Sorry, I am not able to assist at this time.\n contentType: PlainText\n clarificationPrompt:\n maxAttempts: 2\n messages:\n - content: I didn't understand you, what would you like to do?\n contentType: PlainText\n intents:\n - intentName: ${example.name}\n intentVersion: '1'\n childDirected: false\n name: connect_lex_bot\n processBehavior: BUILD\n exampleBotAssociation:\n type: aws:connect:BotAssociation\n name: example\n properties:\n instanceId: ${exampleAwsConnectInstance.id}\n lexBot:\n lexRegion: ${current.name}\n name: ${exampleBot.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_connect_bot_association` using the Amazon Connect instance ID, Lex (V1) bot name, and Lex (V1) bot region separated by colons (`:`). For example:\n\n```sh\n$ pulumi import aws:connect/botAssociation:BotAssociation example aaaaaaaa-bbbb-cccc-dddd-111111111111:Example:us-west-2\n```\n", + "description": "Allows the specified Amazon Connect instance to access the specified Amazon Lex (V1) bot. For more information see\n[Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html) and [Add an Amazon Lex bot](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-lex.html).\n\n\u003e **NOTE:** This resource only currently supports Amazon Lex (V1) Associations.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.connect.BotAssociation(\"example\", {\n instanceId: exampleAwsConnectInstance.id,\n lexBot: {\n lexRegion: \"us-west-2\",\n name: \"Test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.connect.BotAssociation(\"example\",\n instance_id=example_aws_connect_instance[\"id\"],\n lex_bot={\n \"lex_region\": \"us-west-2\",\n \"name\": \"Test\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Connect.BotAssociation(\"example\", new()\n {\n InstanceId = exampleAwsConnectInstance.Id,\n LexBot = new Aws.Connect.Inputs.BotAssociationLexBotArgs\n {\n LexRegion = \"us-west-2\",\n Name = \"Test\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := connect.NewBotAssociation(ctx, \"example\", \u0026connect.BotAssociationArgs{\n\t\t\tInstanceId: pulumi.Any(exampleAwsConnectInstance.Id),\n\t\t\tLexBot: \u0026connect.BotAssociationLexBotArgs{\n\t\t\t\tLexRegion: pulumi.String(\"us-west-2\"),\n\t\t\t\tName: pulumi.String(\"Test\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.BotAssociation;\nimport com.pulumi.aws.connect.BotAssociationArgs;\nimport com.pulumi.aws.connect.inputs.BotAssociationLexBotArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BotAssociation(\"example\", BotAssociationArgs.builder()\n .instanceId(exampleAwsConnectInstance.id())\n .lexBot(BotAssociationLexBotArgs.builder()\n .lexRegion(\"us-west-2\")\n .name(\"Test\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:connect:BotAssociation\n properties:\n instanceId: ${exampleAwsConnectInstance.id}\n lexBot:\n lexRegion: us-west-2\n name: Test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Including a sample Lex bot\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.lex.Intent(\"example\", {\n createVersion: true,\n name: \"connect_lex_intent\",\n fulfillmentActivity: {\n type: \"ReturnIntent\",\n },\n sampleUtterances: [\"I would like to pick up flowers.\"],\n});\nconst exampleBot = new aws.lex.Bot(\"example\", {\n abortStatement: {\n messages: [{\n content: \"Sorry, I am not able to assist at this time.\",\n contentType: \"PlainText\",\n }],\n },\n clarificationPrompt: {\n maxAttempts: 2,\n messages: [{\n content: \"I didn't understand you, what would you like to do?\",\n contentType: \"PlainText\",\n }],\n },\n intents: [{\n intentName: example.name,\n intentVersion: \"1\",\n }],\n childDirected: false,\n name: \"connect_lex_bot\",\n processBehavior: \"BUILD\",\n});\nconst exampleBotAssociation = new aws.connect.BotAssociation(\"example\", {\n instanceId: exampleAwsConnectInstance.id,\n lexBot: {\n lexRegion: current.then(current =\u003e current.name),\n name: exampleBot.name,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.lex.Intent(\"example\",\n create_version=True,\n name=\"connect_lex_intent\",\n fulfillment_activity={\n \"type\": \"ReturnIntent\",\n },\n sample_utterances=[\"I would like to pick up flowers.\"])\nexample_bot = aws.lex.Bot(\"example\",\n abort_statement={\n \"messages\": [{\n \"content\": \"Sorry, I am not able to assist at this time.\",\n \"content_type\": \"PlainText\",\n }],\n },\n clarification_prompt={\n \"max_attempts\": 2,\n \"messages\": [{\n \"content\": \"I didn't understand you, what would you like to do?\",\n \"content_type\": \"PlainText\",\n }],\n },\n intents=[{\n \"intent_name\": example.name,\n \"intent_version\": \"1\",\n }],\n child_directed=False,\n name=\"connect_lex_bot\",\n process_behavior=\"BUILD\")\nexample_bot_association = aws.connect.BotAssociation(\"example\",\n instance_id=example_aws_connect_instance[\"id\"],\n lex_bot={\n \"lex_region\": current.name,\n \"name\": example_bot.name,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Lex.Intent(\"example\", new()\n {\n CreateVersion = true,\n Name = \"connect_lex_intent\",\n FulfillmentActivity = new Aws.Lex.Inputs.IntentFulfillmentActivityArgs\n {\n Type = \"ReturnIntent\",\n },\n SampleUtterances = new[]\n {\n \"I would like to pick up flowers.\",\n },\n });\n\n var exampleBot = new Aws.Lex.Bot(\"example\", new()\n {\n AbortStatement = new Aws.Lex.Inputs.BotAbortStatementArgs\n {\n Messages = new[]\n {\n new Aws.Lex.Inputs.BotAbortStatementMessageArgs\n {\n Content = \"Sorry, I am not able to assist at this time.\",\n ContentType = \"PlainText\",\n },\n },\n },\n ClarificationPrompt = new Aws.Lex.Inputs.BotClarificationPromptArgs\n {\n MaxAttempts = 2,\n Messages = new[]\n {\n new Aws.Lex.Inputs.BotClarificationPromptMessageArgs\n {\n Content = \"I didn't understand you, what would you like to do?\",\n ContentType = \"PlainText\",\n },\n },\n },\n Intents = new[]\n {\n new Aws.Lex.Inputs.BotIntentArgs\n {\n IntentName = example.Name,\n IntentVersion = \"1\",\n },\n },\n ChildDirected = false,\n Name = \"connect_lex_bot\",\n ProcessBehavior = \"BUILD\",\n });\n\n var exampleBotAssociation = new Aws.Connect.BotAssociation(\"example\", new()\n {\n InstanceId = exampleAwsConnectInstance.Id,\n LexBot = new Aws.Connect.Inputs.BotAssociationLexBotArgs\n {\n LexRegion = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n Name = exampleBot.Name,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := lex.NewIntent(ctx, \"example\", \u0026lex.IntentArgs{\n\t\t\tCreateVersion: pulumi.Bool(true),\n\t\t\tName: pulumi.String(\"connect_lex_intent\"),\n\t\t\tFulfillmentActivity: \u0026lex.IntentFulfillmentActivityArgs{\n\t\t\t\tType: pulumi.String(\"ReturnIntent\"),\n\t\t\t},\n\t\t\tSampleUtterances: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"I would like to pick up flowers.\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBot, err := lex.NewBot(ctx, \"example\", \u0026lex.BotArgs{\n\t\t\tAbortStatement: \u0026lex.BotAbortStatementArgs{\n\t\t\t\tMessages: lex.BotAbortStatementMessageArray{\n\t\t\t\t\t\u0026lex.BotAbortStatementMessageArgs{\n\t\t\t\t\t\tContent: pulumi.String(\"Sorry, I am not able to assist at this time.\"),\n\t\t\t\t\t\tContentType: pulumi.String(\"PlainText\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tClarificationPrompt: \u0026lex.BotClarificationPromptArgs{\n\t\t\t\tMaxAttempts: pulumi.Int(2),\n\t\t\t\tMessages: lex.BotClarificationPromptMessageArray{\n\t\t\t\t\t\u0026lex.BotClarificationPromptMessageArgs{\n\t\t\t\t\t\tContent: pulumi.String(\"I didn't understand you, what would you like to do?\"),\n\t\t\t\t\t\tContentType: pulumi.String(\"PlainText\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tIntents: lex.BotIntentArray{\n\t\t\t\t\u0026lex.BotIntentArgs{\n\t\t\t\t\tIntentName: example.Name,\n\t\t\t\t\tIntentVersion: pulumi.String(\"1\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tChildDirected: pulumi.Bool(false),\n\t\t\tName: pulumi.String(\"connect_lex_bot\"),\n\t\t\tProcessBehavior: pulumi.String(\"BUILD\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = connect.NewBotAssociation(ctx, \"example\", \u0026connect.BotAssociationArgs{\n\t\t\tInstanceId: pulumi.Any(exampleAwsConnectInstance.Id),\n\t\t\tLexBot: \u0026connect.BotAssociationLexBotArgs{\n\t\t\t\tLexRegion: pulumi.String(current.Name),\n\t\t\t\tName: exampleBot.Name,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.lex.Intent;\nimport com.pulumi.aws.lex.IntentArgs;\nimport com.pulumi.aws.lex.inputs.IntentFulfillmentActivityArgs;\nimport com.pulumi.aws.lex.Bot;\nimport com.pulumi.aws.lex.BotArgs;\nimport com.pulumi.aws.lex.inputs.BotAbortStatementArgs;\nimport com.pulumi.aws.lex.inputs.BotClarificationPromptArgs;\nimport com.pulumi.aws.lex.inputs.BotIntentArgs;\nimport com.pulumi.aws.connect.BotAssociation;\nimport com.pulumi.aws.connect.BotAssociationArgs;\nimport com.pulumi.aws.connect.inputs.BotAssociationLexBotArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new Intent(\"example\", IntentArgs.builder()\n .createVersion(true)\n .name(\"connect_lex_intent\")\n .fulfillmentActivity(IntentFulfillmentActivityArgs.builder()\n .type(\"ReturnIntent\")\n .build())\n .sampleUtterances(\"I would like to pick up flowers.\")\n .build());\n\n var exampleBot = new Bot(\"exampleBot\", BotArgs.builder()\n .abortStatement(BotAbortStatementArgs.builder()\n .messages(BotAbortStatementMessageArgs.builder()\n .content(\"Sorry, I am not able to assist at this time.\")\n .contentType(\"PlainText\")\n .build())\n .build())\n .clarificationPrompt(BotClarificationPromptArgs.builder()\n .maxAttempts(2)\n .messages(BotClarificationPromptMessageArgs.builder()\n .content(\"I didn't understand you, what would you like to do?\")\n .contentType(\"PlainText\")\n .build())\n .build())\n .intents(BotIntentArgs.builder()\n .intentName(example.name())\n .intentVersion(\"1\")\n .build())\n .childDirected(false)\n .name(\"connect_lex_bot\")\n .processBehavior(\"BUILD\")\n .build());\n\n var exampleBotAssociation = new BotAssociation(\"exampleBotAssociation\", BotAssociationArgs.builder()\n .instanceId(exampleAwsConnectInstance.id())\n .lexBot(BotAssociationLexBotArgs.builder()\n .lexRegion(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .name(exampleBot.name())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lex:Intent\n properties:\n createVersion: true\n name: connect_lex_intent\n fulfillmentActivity:\n type: ReturnIntent\n sampleUtterances:\n - I would like to pick up flowers.\n exampleBot:\n type: aws:lex:Bot\n name: example\n properties:\n abortStatement:\n messages:\n - content: Sorry, I am not able to assist at this time.\n contentType: PlainText\n clarificationPrompt:\n maxAttempts: 2\n messages:\n - content: I didn't understand you, what would you like to do?\n contentType: PlainText\n intents:\n - intentName: ${example.name}\n intentVersion: '1'\n childDirected: false\n name: connect_lex_bot\n processBehavior: BUILD\n exampleBotAssociation:\n type: aws:connect:BotAssociation\n name: example\n properties:\n instanceId: ${exampleAwsConnectInstance.id}\n lexBot:\n lexRegion: ${current.name}\n name: ${exampleBot.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_connect_bot_association` using the Amazon Connect instance ID, Lex (V1) bot name, and Lex (V1) bot region separated by colons (`:`). For example:\n\n```sh\n$ pulumi import aws:connect/botAssociation:BotAssociation example aaaaaaaa-bbbb-cccc-dddd-111111111111:Example:us-west-2\n```\n", "properties": { "instanceId": { "type": "string", @@ -209457,7 +209457,7 @@ } }, "aws:connect/contactFlow:ContactFlow": { - "description": "Provides an Amazon Connect Contact Flow resource. For more information see\n[Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)\n\nThis resource embeds or references Contact Flows specified in Amazon Connect Contact Flow Language. For more information see\n[Amazon Connect Flow language](https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.html)\n\n!\u003e **WARN:** Contact Flows exported from the Console [Contact Flow import/export](https://docs.aws.amazon.com/connect/latest/adminguide/contact-flow-import-export.html) are not in the Amazon Connect Contact Flow Language and can not be used with this resource. Instead, the recommendation is to use the AWS CLI [`describe-contact-flow`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/connect/describe-contact-flow.html).\nSee example below which uses `jq` to extract the `Content` attribute and saves it to a local file.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = new aws.connect.ContactFlow(\"test\", {\n instanceId: \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name: \"Test\",\n description: \"Test Contact Flow Description\",\n type: \"CONTACT_FLOW\",\n content: JSON.stringify({\n Version: \"2019-10-30\",\n StartAction: \"12345678-1234-1234-1234-123456789012\",\n Actions: [\n {\n Identifier: \"12345678-1234-1234-1234-123456789012\",\n Type: \"MessageParticipant\",\n Transitions: {\n NextAction: \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n Errors: [],\n Conditions: [],\n },\n Parameters: {\n Text: \"Thanks for calling the sample flow!\",\n },\n },\n {\n Identifier: \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n Type: \"DisconnectParticipant\",\n Transitions: {},\n Parameters: {},\n },\n ],\n }),\n tags: {\n Name: \"Test Contact Flow\",\n Application: \"Example\",\n Method: \"Create\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ntest = aws.connect.ContactFlow(\"test\",\n instance_id=\"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name=\"Test\",\n description=\"Test Contact Flow Description\",\n type=\"CONTACT_FLOW\",\n content=json.dumps({\n \"Version\": \"2019-10-30\",\n \"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n \"Actions\": [\n {\n \"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n \"Type\": \"MessageParticipant\",\n \"Transitions\": {\n \"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n \"Errors\": [],\n \"Conditions\": [],\n },\n \"Parameters\": {\n \"Text\": \"Thanks for calling the sample flow!\",\n },\n },\n {\n \"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n \"Type\": \"DisconnectParticipant\",\n \"Transitions\": {},\n \"Parameters\": {},\n },\n ],\n }),\n tags={\n \"Name\": \"Test Contact Flow\",\n \"Application\": \"Example\",\n \"Method\": \"Create\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.Connect.ContactFlow(\"test\", new()\n {\n InstanceId = \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n Name = \"Test\",\n Description = \"Test Contact Flow Description\",\n Type = \"CONTACT_FLOW\",\n Content = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2019-10-30\",\n [\"StartAction\"] = \"12345678-1234-1234-1234-123456789012\",\n [\"Actions\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Identifier\"] = \"12345678-1234-1234-1234-123456789012\",\n [\"Type\"] = \"MessageParticipant\",\n [\"Transitions\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"NextAction\"] = \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n [\"Errors\"] = new[]\n {\n },\n [\"Conditions\"] = new[]\n {\n },\n },\n [\"Parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Text\"] = \"Thanks for calling the sample flow!\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Identifier\"] = \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n [\"Type\"] = \"DisconnectParticipant\",\n [\"Transitions\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n [\"Parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n }),\n Tags = \n {\n { \"Name\", \"Test Contact Flow\" },\n { \"Application\", \"Example\" },\n { \"Method\", \"Create\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2019-10-30\",\n\t\t\t\"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\"Actions\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\t\t\"Type\": \"MessageParticipant\",\n\t\t\t\t\t\"Transitions\": map[string]interface{}{\n\t\t\t\t\t\t\"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\t\"Errors\": []interface{}{},\n\t\t\t\t\t\t\"Conditions\": []interface{}{},\n\t\t\t\t\t},\n\t\t\t\t\t\"Parameters\": map[string]interface{}{\n\t\t\t\t\t\t\"Text\": \"Thanks for calling the sample flow!\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\"Type\": \"DisconnectParticipant\",\n\t\t\t\t\t\"Transitions\": nil,\n\t\t\t\t\t\"Parameters\": nil,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = connect.NewContactFlow(ctx, \"test\", \u0026connect.ContactFlowArgs{\n\t\t\tInstanceId: pulumi.String(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\"),\n\t\t\tName: pulumi.String(\"Test\"),\n\t\t\tDescription: pulumi.String(\"Test Contact Flow Description\"),\n\t\t\tType: pulumi.String(\"CONTACT_FLOW\"),\n\t\t\tContent: pulumi.String(json0),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Test Contact Flow\"),\n\t\t\t\t\"Application\": pulumi.String(\"Example\"),\n\t\t\t\t\"Method\": pulumi.String(\"Create\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.ContactFlow;\nimport com.pulumi.aws.connect.ContactFlowArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new ContactFlow(\"test\", ContactFlowArgs.builder()\n .instanceId(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\")\n .name(\"Test\")\n .description(\"Test Contact Flow Description\")\n .type(\"CONTACT_FLOW\")\n .content(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2019-10-30\"),\n jsonProperty(\"StartAction\", \"12345678-1234-1234-1234-123456789012\"),\n jsonProperty(\"Actions\", jsonArray(\n jsonObject(\n jsonProperty(\"Identifier\", \"12345678-1234-1234-1234-123456789012\"),\n jsonProperty(\"Type\", \"MessageParticipant\"),\n jsonProperty(\"Transitions\", jsonObject(\n jsonProperty(\"NextAction\", \"abcdef-abcd-abcd-abcd-abcdefghijkl\"),\n jsonProperty(\"Errors\", jsonArray(\n )),\n jsonProperty(\"Conditions\", jsonArray(\n ))\n )),\n jsonProperty(\"Parameters\", jsonObject(\n jsonProperty(\"Text\", \"Thanks for calling the sample flow!\")\n ))\n ), \n jsonObject(\n jsonProperty(\"Identifier\", \"abcdef-abcd-abcd-abcd-abcdefghijkl\"),\n jsonProperty(\"Type\", \"DisconnectParticipant\"),\n jsonProperty(\"Transitions\", jsonObject(\n\n )),\n jsonProperty(\"Parameters\", jsonObject(\n\n ))\n )\n ))\n )))\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"Test Contact Flow\"),\n Map.entry(\"Application\", \"Example\"),\n Map.entry(\"Method\", \"Create\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:connect:ContactFlow\n properties:\n instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111\n name: Test\n description: Test Contact Flow Description\n type: CONTACT_FLOW\n content:\n fn::toJSON:\n Version: 2019-10-30\n StartAction: 12345678-1234-1234-1234-123456789012\n Actions:\n - Identifier: 12345678-1234-1234-1234-123456789012\n Type: MessageParticipant\n Transitions:\n NextAction: abcdef-abcd-abcd-abcd-abcdefghijkl\n Errors: []\n Conditions: []\n Parameters:\n Text: Thanks for calling the sample flow!\n - Identifier: abcdef-abcd-abcd-abcd-abcdefghijkl\n Type: DisconnectParticipant\n Transitions: {}\n Parameters: {}\n tags:\n Name: Test Contact Flow\n Application: Example\n Method: Create\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With External Content\n\nUse the AWS CLI to extract Contact Flow Content:\n\n```console\n% aws connect describe-contact-flow --instance-id 1b3c5d8-1b3c-1b3c-1b3c-1b3c5d81b3c5 --contact-flow-id c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5 --region us-west-2 | jq '.ContactFlow.Content | fromjson' \u003e contact_flow.json\n```\n\nUse the generated file as input:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst test = new aws.connect.ContactFlow(\"test\", {\n instanceId: \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name: \"Test\",\n description: \"Test Contact Flow Description\",\n type: \"CONTACT_FLOW\",\n filename: \"contact_flow.json\",\n contentHash: std.filebase64sha256({\n input: \"contact_flow.json\",\n }).then(invoke =\u003e invoke.result),\n tags: {\n Name: \"Test Contact Flow\",\n Application: \"Example\",\n Method: \"Create\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ntest = aws.connect.ContactFlow(\"test\",\n instance_id=\"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name=\"Test\",\n description=\"Test Contact Flow Description\",\n type=\"CONTACT_FLOW\",\n filename=\"contact_flow.json\",\n content_hash=std.filebase64sha256(input=\"contact_flow.json\").result,\n tags={\n \"Name\": \"Test Contact Flow\",\n \"Application\": \"Example\",\n \"Method\": \"Create\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.Connect.ContactFlow(\"test\", new()\n {\n InstanceId = \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n Name = \"Test\",\n Description = \"Test Contact Flow Description\",\n Type = \"CONTACT_FLOW\",\n Filename = \"contact_flow.json\",\n ContentHash = Std.Filebase64sha256.Invoke(new()\n {\n Input = \"contact_flow.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Tags = \n {\n { \"Name\", \"Test Contact Flow\" },\n { \"Application\", \"Example\" },\n { \"Method\", \"Create\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeFilebase64sha256, err := std.Filebase64sha256(ctx, \u0026std.Filebase64sha256Args{\n\t\t\tInput: \"contact_flow.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = connect.NewContactFlow(ctx, \"test\", \u0026connect.ContactFlowArgs{\n\t\t\tInstanceId: pulumi.String(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\"),\n\t\t\tName: pulumi.String(\"Test\"),\n\t\t\tDescription: pulumi.String(\"Test Contact Flow Description\"),\n\t\t\tType: pulumi.String(\"CONTACT_FLOW\"),\n\t\t\tFilename: pulumi.String(\"contact_flow.json\"),\n\t\t\tContentHash: pulumi.String(invokeFilebase64sha256.Result),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Test Contact Flow\"),\n\t\t\t\t\"Application\": pulumi.String(\"Example\"),\n\t\t\t\t\"Method\": pulumi.String(\"Create\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.ContactFlow;\nimport com.pulumi.aws.connect.ContactFlowArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new ContactFlow(\"test\", ContactFlowArgs.builder()\n .instanceId(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\")\n .name(\"Test\")\n .description(\"Test Contact Flow Description\")\n .type(\"CONTACT_FLOW\")\n .filename(\"contact_flow.json\")\n .contentHash(StdFunctions.filebase64sha256(Filebase64sha256Args.builder()\n .input(\"contact_flow.json\")\n .build()).result())\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"Test Contact Flow\"),\n Map.entry(\"Application\", \"Example\"),\n Map.entry(\"Method\", \"Create\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:connect:ContactFlow\n properties:\n instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111\n name: Test\n description: Test Contact Flow Description\n type: CONTACT_FLOW\n filename: contact_flow.json\n contentHash:\n fn::invoke:\n Function: std:filebase64sha256\n Arguments:\n input: contact_flow.json\n Return: result\n tags:\n Name: Test Contact Flow\n Application: Example\n Method: Create\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amazon Connect Contact Flows using the `instance_id` and `contact_flow_id` separated by a colon (`:`). For example:\n\n```sh\n$ pulumi import aws:connect/contactFlow:ContactFlow example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5\n```\n", + "description": "Provides an Amazon Connect Contact Flow resource. For more information see\n[Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)\n\nThis resource embeds or references Contact Flows specified in Amazon Connect Contact Flow Language. For more information see\n[Amazon Connect Flow language](https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.html)\n\n!\u003e **WARN:** Contact Flows exported from the Console [Contact Flow import/export](https://docs.aws.amazon.com/connect/latest/adminguide/contact-flow-import-export.html) are not in the Amazon Connect Contact Flow Language and can not be used with this resource. Instead, the recommendation is to use the AWS CLI [`describe-contact-flow`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/connect/describe-contact-flow.html).\nSee example below which uses `jq` to extract the `Content` attribute and saves it to a local file.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = new aws.connect.ContactFlow(\"test\", {\n instanceId: \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name: \"Test\",\n description: \"Test Contact Flow Description\",\n type: \"CONTACT_FLOW\",\n content: JSON.stringify({\n Version: \"2019-10-30\",\n StartAction: \"12345678-1234-1234-1234-123456789012\",\n Actions: [\n {\n Identifier: \"12345678-1234-1234-1234-123456789012\",\n Type: \"MessageParticipant\",\n Transitions: {\n NextAction: \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n Errors: [],\n Conditions: [],\n },\n Parameters: {\n Text: \"Thanks for calling the sample flow!\",\n },\n },\n {\n Identifier: \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n Type: \"DisconnectParticipant\",\n Transitions: {},\n Parameters: {},\n },\n ],\n }),\n tags: {\n Name: \"Test Contact Flow\",\n Application: \"Example\",\n Method: \"Create\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ntest = aws.connect.ContactFlow(\"test\",\n instance_id=\"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name=\"Test\",\n description=\"Test Contact Flow Description\",\n type=\"CONTACT_FLOW\",\n content=json.dumps({\n \"Version\": \"2019-10-30\",\n \"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n \"Actions\": [\n {\n \"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n \"Type\": \"MessageParticipant\",\n \"Transitions\": {\n \"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n \"Errors\": [],\n \"Conditions\": [],\n },\n \"Parameters\": {\n \"Text\": \"Thanks for calling the sample flow!\",\n },\n },\n {\n \"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n \"Type\": \"DisconnectParticipant\",\n \"Transitions\": {},\n \"Parameters\": {},\n },\n ],\n }),\n tags={\n \"Name\": \"Test Contact Flow\",\n \"Application\": \"Example\",\n \"Method\": \"Create\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.Connect.ContactFlow(\"test\", new()\n {\n InstanceId = \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n Name = \"Test\",\n Description = \"Test Contact Flow Description\",\n Type = \"CONTACT_FLOW\",\n Content = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2019-10-30\",\n [\"StartAction\"] = \"12345678-1234-1234-1234-123456789012\",\n [\"Actions\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Identifier\"] = \"12345678-1234-1234-1234-123456789012\",\n [\"Type\"] = \"MessageParticipant\",\n [\"Transitions\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"NextAction\"] = \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n [\"Errors\"] = new[]\n {\n },\n [\"Conditions\"] = new[]\n {\n },\n },\n [\"Parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Text\"] = \"Thanks for calling the sample flow!\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Identifier\"] = \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n [\"Type\"] = \"DisconnectParticipant\",\n [\"Transitions\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n [\"Parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n }),\n Tags = \n {\n { \"Name\", \"Test Contact Flow\" },\n { \"Application\", \"Example\" },\n { \"Method\", \"Create\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2019-10-30\",\n\t\t\t\"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\"Actions\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\t\t\"Type\": \"MessageParticipant\",\n\t\t\t\t\t\"Transitions\": map[string]interface{}{\n\t\t\t\t\t\t\"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\t\"Errors\": []interface{}{},\n\t\t\t\t\t\t\"Conditions\": []interface{}{},\n\t\t\t\t\t},\n\t\t\t\t\t\"Parameters\": map[string]interface{}{\n\t\t\t\t\t\t\"Text\": \"Thanks for calling the sample flow!\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\"Type\": \"DisconnectParticipant\",\n\t\t\t\t\t\"Transitions\": map[string]interface{}{},\n\t\t\t\t\t\"Parameters\": map[string]interface{}{},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = connect.NewContactFlow(ctx, \"test\", \u0026connect.ContactFlowArgs{\n\t\t\tInstanceId: pulumi.String(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\"),\n\t\t\tName: pulumi.String(\"Test\"),\n\t\t\tDescription: pulumi.String(\"Test Contact Flow Description\"),\n\t\t\tType: pulumi.String(\"CONTACT_FLOW\"),\n\t\t\tContent: pulumi.String(json0),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Test Contact Flow\"),\n\t\t\t\t\"Application\": pulumi.String(\"Example\"),\n\t\t\t\t\"Method\": pulumi.String(\"Create\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.ContactFlow;\nimport com.pulumi.aws.connect.ContactFlowArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new ContactFlow(\"test\", ContactFlowArgs.builder()\n .instanceId(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\")\n .name(\"Test\")\n .description(\"Test Contact Flow Description\")\n .type(\"CONTACT_FLOW\")\n .content(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2019-10-30\"),\n jsonProperty(\"StartAction\", \"12345678-1234-1234-1234-123456789012\"),\n jsonProperty(\"Actions\", jsonArray(\n jsonObject(\n jsonProperty(\"Identifier\", \"12345678-1234-1234-1234-123456789012\"),\n jsonProperty(\"Type\", \"MessageParticipant\"),\n jsonProperty(\"Transitions\", jsonObject(\n jsonProperty(\"NextAction\", \"abcdef-abcd-abcd-abcd-abcdefghijkl\"),\n jsonProperty(\"Errors\", jsonArray(\n )),\n jsonProperty(\"Conditions\", jsonArray(\n ))\n )),\n jsonProperty(\"Parameters\", jsonObject(\n jsonProperty(\"Text\", \"Thanks for calling the sample flow!\")\n ))\n ), \n jsonObject(\n jsonProperty(\"Identifier\", \"abcdef-abcd-abcd-abcd-abcdefghijkl\"),\n jsonProperty(\"Type\", \"DisconnectParticipant\"),\n jsonProperty(\"Transitions\", jsonObject(\n\n )),\n jsonProperty(\"Parameters\", jsonObject(\n\n ))\n )\n ))\n )))\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"Test Contact Flow\"),\n Map.entry(\"Application\", \"Example\"),\n Map.entry(\"Method\", \"Create\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:connect:ContactFlow\n properties:\n instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111\n name: Test\n description: Test Contact Flow Description\n type: CONTACT_FLOW\n content:\n fn::toJSON:\n Version: 2019-10-30\n StartAction: 12345678-1234-1234-1234-123456789012\n Actions:\n - Identifier: 12345678-1234-1234-1234-123456789012\n Type: MessageParticipant\n Transitions:\n NextAction: abcdef-abcd-abcd-abcd-abcdefghijkl\n Errors: []\n Conditions: []\n Parameters:\n Text: Thanks for calling the sample flow!\n - Identifier: abcdef-abcd-abcd-abcd-abcdefghijkl\n Type: DisconnectParticipant\n Transitions: {}\n Parameters: {}\n tags:\n Name: Test Contact Flow\n Application: Example\n Method: Create\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With External Content\n\nUse the AWS CLI to extract Contact Flow Content:\n\n```console\n% aws connect describe-contact-flow --instance-id 1b3c5d8-1b3c-1b3c-1b3c-1b3c5d81b3c5 --contact-flow-id c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5 --region us-west-2 | jq '.ContactFlow.Content | fromjson' \u003e contact_flow.json\n```\n\nUse the generated file as input:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst test = new aws.connect.ContactFlow(\"test\", {\n instanceId: \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name: \"Test\",\n description: \"Test Contact Flow Description\",\n type: \"CONTACT_FLOW\",\n filename: \"contact_flow.json\",\n contentHash: std.filebase64sha256({\n input: \"contact_flow.json\",\n }).then(invoke =\u003e invoke.result),\n tags: {\n Name: \"Test Contact Flow\",\n Application: \"Example\",\n Method: \"Create\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ntest = aws.connect.ContactFlow(\"test\",\n instance_id=\"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name=\"Test\",\n description=\"Test Contact Flow Description\",\n type=\"CONTACT_FLOW\",\n filename=\"contact_flow.json\",\n content_hash=std.filebase64sha256(input=\"contact_flow.json\").result,\n tags={\n \"Name\": \"Test Contact Flow\",\n \"Application\": \"Example\",\n \"Method\": \"Create\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.Connect.ContactFlow(\"test\", new()\n {\n InstanceId = \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n Name = \"Test\",\n Description = \"Test Contact Flow Description\",\n Type = \"CONTACT_FLOW\",\n Filename = \"contact_flow.json\",\n ContentHash = Std.Filebase64sha256.Invoke(new()\n {\n Input = \"contact_flow.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Tags = \n {\n { \"Name\", \"Test Contact Flow\" },\n { \"Application\", \"Example\" },\n { \"Method\", \"Create\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeFilebase64sha256, err := std.Filebase64sha256(ctx, \u0026std.Filebase64sha256Args{\n\t\t\tInput: \"contact_flow.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = connect.NewContactFlow(ctx, \"test\", \u0026connect.ContactFlowArgs{\n\t\t\tInstanceId: pulumi.String(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\"),\n\t\t\tName: pulumi.String(\"Test\"),\n\t\t\tDescription: pulumi.String(\"Test Contact Flow Description\"),\n\t\t\tType: pulumi.String(\"CONTACT_FLOW\"),\n\t\t\tFilename: pulumi.String(\"contact_flow.json\"),\n\t\t\tContentHash: pulumi.String(invokeFilebase64sha256.Result),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Test Contact Flow\"),\n\t\t\t\t\"Application\": pulumi.String(\"Example\"),\n\t\t\t\t\"Method\": pulumi.String(\"Create\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.ContactFlow;\nimport com.pulumi.aws.connect.ContactFlowArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new ContactFlow(\"test\", ContactFlowArgs.builder()\n .instanceId(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\")\n .name(\"Test\")\n .description(\"Test Contact Flow Description\")\n .type(\"CONTACT_FLOW\")\n .filename(\"contact_flow.json\")\n .contentHash(StdFunctions.filebase64sha256(Filebase64sha256Args.builder()\n .input(\"contact_flow.json\")\n .build()).result())\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"Test Contact Flow\"),\n Map.entry(\"Application\", \"Example\"),\n Map.entry(\"Method\", \"Create\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:connect:ContactFlow\n properties:\n instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111\n name: Test\n description: Test Contact Flow Description\n type: CONTACT_FLOW\n filename: contact_flow.json\n contentHash:\n fn::invoke:\n Function: std:filebase64sha256\n Arguments:\n input: contact_flow.json\n Return: result\n tags:\n Name: Test Contact Flow\n Application: Example\n Method: Create\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amazon Connect Contact Flows using the `instance_id` and `contact_flow_id` separated by a colon (`:`). For example:\n\n```sh\n$ pulumi import aws:connect/contactFlow:ContactFlow example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5\n```\n", "properties": { "arn": { "type": "string", @@ -209620,7 +209620,7 @@ } }, "aws:connect/contactFlowModule:ContactFlowModule": { - "description": "Provides an Amazon Connect Contact Flow Module resource. For more information see\n[Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)\n\nThis resource embeds or references Contact Flows Modules specified in Amazon Connect Contact Flow Language. For more information see\n[Amazon Connect Flow language](https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.html)\n\n!\u003e **WARN:** Contact Flow Modules exported from the Console [See Contact Flow import/export which is the same for Contact Flow Modules](https://docs.aws.amazon.com/connect/latest/adminguide/contact-flow-import-export.html) are not in the Amazon Connect Contact Flow Language and can not be used with this resource. Instead, the recommendation is to use the AWS CLI [`describe-contact-flow-module`](https://docs.aws.amazon.com/cli/latest/reference/connect/describe-contact-flow-module.html).\nSee example below which uses `jq` to extract the `Content` attribute and saves it to a local file.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.connect.ContactFlowModule(\"example\", {\n instanceId: \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name: \"Example\",\n description: \"Example Contact Flow Module Description\",\n content: JSON.stringify({\n Version: \"2019-10-30\",\n StartAction: \"12345678-1234-1234-1234-123456789012\",\n Actions: [\n {\n Identifier: \"12345678-1234-1234-1234-123456789012\",\n Parameters: {\n Text: \"Hello contact flow module\",\n },\n Transitions: {\n NextAction: \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n Errors: [],\n Conditions: [],\n },\n Type: \"MessageParticipant\",\n },\n {\n Identifier: \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n Type: \"DisconnectParticipant\",\n Parameters: {},\n Transitions: {},\n },\n ],\n Settings: {\n InputParameters: [],\n OutputParameters: [],\n Transitions: [\n {\n DisplayName: \"Success\",\n ReferenceName: \"Success\",\n Description: \"\",\n },\n {\n DisplayName: \"Error\",\n ReferenceName: \"Error\",\n Description: \"\",\n },\n ],\n },\n }),\n tags: {\n Name: \"Example Contact Flow Module\",\n Application: \"Example\",\n Method: \"Create\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.connect.ContactFlowModule(\"example\",\n instance_id=\"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name=\"Example\",\n description=\"Example Contact Flow Module Description\",\n content=json.dumps({\n \"Version\": \"2019-10-30\",\n \"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n \"Actions\": [\n {\n \"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n \"Parameters\": {\n \"Text\": \"Hello contact flow module\",\n },\n \"Transitions\": {\n \"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n \"Errors\": [],\n \"Conditions\": [],\n },\n \"Type\": \"MessageParticipant\",\n },\n {\n \"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n \"Type\": \"DisconnectParticipant\",\n \"Parameters\": {},\n \"Transitions\": {},\n },\n ],\n \"Settings\": {\n \"InputParameters\": [],\n \"OutputParameters\": [],\n \"Transitions\": [\n {\n \"DisplayName\": \"Success\",\n \"ReferenceName\": \"Success\",\n \"Description\": \"\",\n },\n {\n \"DisplayName\": \"Error\",\n \"ReferenceName\": \"Error\",\n \"Description\": \"\",\n },\n ],\n },\n }),\n tags={\n \"Name\": \"Example Contact Flow Module\",\n \"Application\": \"Example\",\n \"Method\": \"Create\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Connect.ContactFlowModule(\"example\", new()\n {\n InstanceId = \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n Name = \"Example\",\n Description = \"Example Contact Flow Module Description\",\n Content = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2019-10-30\",\n [\"StartAction\"] = \"12345678-1234-1234-1234-123456789012\",\n [\"Actions\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Identifier\"] = \"12345678-1234-1234-1234-123456789012\",\n [\"Parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Text\"] = \"Hello contact flow module\",\n },\n [\"Transitions\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"NextAction\"] = \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n [\"Errors\"] = new[]\n {\n },\n [\"Conditions\"] = new[]\n {\n },\n },\n [\"Type\"] = \"MessageParticipant\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Identifier\"] = \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n [\"Type\"] = \"DisconnectParticipant\",\n [\"Parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n [\"Transitions\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n [\"Settings\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"InputParameters\"] = new[]\n {\n },\n [\"OutputParameters\"] = new[]\n {\n },\n [\"Transitions\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"DisplayName\"] = \"Success\",\n [\"ReferenceName\"] = \"Success\",\n [\"Description\"] = \"\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"DisplayName\"] = \"Error\",\n [\"ReferenceName\"] = \"Error\",\n [\"Description\"] = \"\",\n },\n },\n },\n }),\n Tags = \n {\n { \"Name\", \"Example Contact Flow Module\" },\n { \"Application\", \"Example\" },\n { \"Method\", \"Create\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2019-10-30\",\n\t\t\t\"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\"Actions\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\t\t\"Parameters\": map[string]interface{}{\n\t\t\t\t\t\t\"Text\": \"Hello contact flow module\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Transitions\": map[string]interface{}{\n\t\t\t\t\t\t\"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\t\"Errors\": []interface{}{},\n\t\t\t\t\t\t\"Conditions\": []interface{}{},\n\t\t\t\t\t},\n\t\t\t\t\t\"Type\": \"MessageParticipant\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\"Type\": \"DisconnectParticipant\",\n\t\t\t\t\t\"Parameters\": nil,\n\t\t\t\t\t\"Transitions\": nil,\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Settings\": map[string]interface{}{\n\t\t\t\t\"InputParameters\": []interface{}{},\n\t\t\t\t\"OutputParameters\": []interface{}{},\n\t\t\t\t\"Transitions\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"DisplayName\": \"Success\",\n\t\t\t\t\t\t\"ReferenceName\": \"Success\",\n\t\t\t\t\t\t\"Description\": \"\",\n\t\t\t\t\t},\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"DisplayName\": \"Error\",\n\t\t\t\t\t\t\"ReferenceName\": \"Error\",\n\t\t\t\t\t\t\"Description\": \"\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = connect.NewContactFlowModule(ctx, \"example\", \u0026connect.ContactFlowModuleArgs{\n\t\t\tInstanceId: pulumi.String(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\"),\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tDescription: pulumi.String(\"Example Contact Flow Module Description\"),\n\t\t\tContent: pulumi.String(json0),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Example Contact Flow Module\"),\n\t\t\t\t\"Application\": pulumi.String(\"Example\"),\n\t\t\t\t\"Method\": pulumi.String(\"Create\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.ContactFlowModule;\nimport com.pulumi.aws.connect.ContactFlowModuleArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ContactFlowModule(\"example\", ContactFlowModuleArgs.builder()\n .instanceId(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\")\n .name(\"Example\")\n .description(\"Example Contact Flow Module Description\")\n .content(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2019-10-30\"),\n jsonProperty(\"StartAction\", \"12345678-1234-1234-1234-123456789012\"),\n jsonProperty(\"Actions\", jsonArray(\n jsonObject(\n jsonProperty(\"Identifier\", \"12345678-1234-1234-1234-123456789012\"),\n jsonProperty(\"Parameters\", jsonObject(\n jsonProperty(\"Text\", \"Hello contact flow module\")\n )),\n jsonProperty(\"Transitions\", jsonObject(\n jsonProperty(\"NextAction\", \"abcdef-abcd-abcd-abcd-abcdefghijkl\"),\n jsonProperty(\"Errors\", jsonArray(\n )),\n jsonProperty(\"Conditions\", jsonArray(\n ))\n )),\n jsonProperty(\"Type\", \"MessageParticipant\")\n ), \n jsonObject(\n jsonProperty(\"Identifier\", \"abcdef-abcd-abcd-abcd-abcdefghijkl\"),\n jsonProperty(\"Type\", \"DisconnectParticipant\"),\n jsonProperty(\"Parameters\", jsonObject(\n\n )),\n jsonProperty(\"Transitions\", jsonObject(\n\n ))\n )\n )),\n jsonProperty(\"Settings\", jsonObject(\n jsonProperty(\"InputParameters\", jsonArray(\n )),\n jsonProperty(\"OutputParameters\", jsonArray(\n )),\n jsonProperty(\"Transitions\", jsonArray(\n jsonObject(\n jsonProperty(\"DisplayName\", \"Success\"),\n jsonProperty(\"ReferenceName\", \"Success\"),\n jsonProperty(\"Description\", \"\")\n ), \n jsonObject(\n jsonProperty(\"DisplayName\", \"Error\"),\n jsonProperty(\"ReferenceName\", \"Error\"),\n jsonProperty(\"Description\", \"\")\n )\n ))\n ))\n )))\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"Example Contact Flow Module\"),\n Map.entry(\"Application\", \"Example\"),\n Map.entry(\"Method\", \"Create\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:connect:ContactFlowModule\n properties:\n instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111\n name: Example\n description: Example Contact Flow Module Description\n content:\n fn::toJSON:\n Version: 2019-10-30\n StartAction: 12345678-1234-1234-1234-123456789012\n Actions:\n - Identifier: 12345678-1234-1234-1234-123456789012\n Parameters:\n Text: Hello contact flow module\n Transitions:\n NextAction: abcdef-abcd-abcd-abcd-abcdefghijkl\n Errors: []\n Conditions: []\n Type: MessageParticipant\n - Identifier: abcdef-abcd-abcd-abcd-abcdefghijkl\n Type: DisconnectParticipant\n Parameters: {}\n Transitions: {}\n Settings:\n InputParameters: []\n OutputParameters: []\n Transitions:\n - DisplayName: Success\n ReferenceName: Success\n Description:\n - DisplayName: Error\n ReferenceName: Error\n Description:\n tags:\n Name: Example Contact Flow Module\n Application: Example\n Method: Create\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With External Content\n\nUse the AWS CLI to extract Contact Flow Content:\n\n```console\n% aws connect describe-contact-flow-module --instance-id 1b3c5d8-1b3c-1b3c-1b3c-1b3c5d81b3c5 --contact-flow-module-id c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5 --region us-west-2 | jq '.ContactFlowModule.Content | fromjson' \u003e contact_flow_module.json\n```\n\nUse the generated file as input:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst example = new aws.connect.ContactFlowModule(\"example\", {\n instanceId: \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name: \"Example\",\n description: \"Example Contact Flow Module Description\",\n filename: \"contact_flow_module.json\",\n contentHash: std.filebase64sha256({\n input: \"contact_flow_module.json\",\n }).then(invoke =\u003e invoke.result),\n tags: {\n Name: \"Example Contact Flow Module\",\n Application: \"Example\",\n Method: \"Create\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.connect.ContactFlowModule(\"example\",\n instance_id=\"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name=\"Example\",\n description=\"Example Contact Flow Module Description\",\n filename=\"contact_flow_module.json\",\n content_hash=std.filebase64sha256(input=\"contact_flow_module.json\").result,\n tags={\n \"Name\": \"Example Contact Flow Module\",\n \"Application\": \"Example\",\n \"Method\": \"Create\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Connect.ContactFlowModule(\"example\", new()\n {\n InstanceId = \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n Name = \"Example\",\n Description = \"Example Contact Flow Module Description\",\n Filename = \"contact_flow_module.json\",\n ContentHash = Std.Filebase64sha256.Invoke(new()\n {\n Input = \"contact_flow_module.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Tags = \n {\n { \"Name\", \"Example Contact Flow Module\" },\n { \"Application\", \"Example\" },\n { \"Method\", \"Create\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeFilebase64sha256, err := std.Filebase64sha256(ctx, \u0026std.Filebase64sha256Args{\n\t\t\tInput: \"contact_flow_module.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = connect.NewContactFlowModule(ctx, \"example\", \u0026connect.ContactFlowModuleArgs{\n\t\t\tInstanceId: pulumi.String(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\"),\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tDescription: pulumi.String(\"Example Contact Flow Module Description\"),\n\t\t\tFilename: pulumi.String(\"contact_flow_module.json\"),\n\t\t\tContentHash: pulumi.String(invokeFilebase64sha256.Result),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Example Contact Flow Module\"),\n\t\t\t\t\"Application\": pulumi.String(\"Example\"),\n\t\t\t\t\"Method\": pulumi.String(\"Create\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.ContactFlowModule;\nimport com.pulumi.aws.connect.ContactFlowModuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ContactFlowModule(\"example\", ContactFlowModuleArgs.builder()\n .instanceId(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\")\n .name(\"Example\")\n .description(\"Example Contact Flow Module Description\")\n .filename(\"contact_flow_module.json\")\n .contentHash(StdFunctions.filebase64sha256(Filebase64sha256Args.builder()\n .input(\"contact_flow_module.json\")\n .build()).result())\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"Example Contact Flow Module\"),\n Map.entry(\"Application\", \"Example\"),\n Map.entry(\"Method\", \"Create\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:connect:ContactFlowModule\n properties:\n instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111\n name: Example\n description: Example Contact Flow Module Description\n filename: contact_flow_module.json\n contentHash:\n fn::invoke:\n Function: std:filebase64sha256\n Arguments:\n input: contact_flow_module.json\n Return: result\n tags:\n Name: Example Contact Flow Module\n Application: Example\n Method: Create\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amazon Connect Contact Flow Modules using the `instance_id` and `contact_flow_module_id` separated by a colon (`:`). For example:\n\n```sh\n$ pulumi import aws:connect/contactFlowModule:ContactFlowModule example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5\n```\n", + "description": "Provides an Amazon Connect Contact Flow Module resource. For more information see\n[Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)\n\nThis resource embeds or references Contact Flows Modules specified in Amazon Connect Contact Flow Language. For more information see\n[Amazon Connect Flow language](https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.html)\n\n!\u003e **WARN:** Contact Flow Modules exported from the Console [See Contact Flow import/export which is the same for Contact Flow Modules](https://docs.aws.amazon.com/connect/latest/adminguide/contact-flow-import-export.html) are not in the Amazon Connect Contact Flow Language and can not be used with this resource. Instead, the recommendation is to use the AWS CLI [`describe-contact-flow-module`](https://docs.aws.amazon.com/cli/latest/reference/connect/describe-contact-flow-module.html).\nSee example below which uses `jq` to extract the `Content` attribute and saves it to a local file.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.connect.ContactFlowModule(\"example\", {\n instanceId: \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name: \"Example\",\n description: \"Example Contact Flow Module Description\",\n content: JSON.stringify({\n Version: \"2019-10-30\",\n StartAction: \"12345678-1234-1234-1234-123456789012\",\n Actions: [\n {\n Identifier: \"12345678-1234-1234-1234-123456789012\",\n Parameters: {\n Text: \"Hello contact flow module\",\n },\n Transitions: {\n NextAction: \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n Errors: [],\n Conditions: [],\n },\n Type: \"MessageParticipant\",\n },\n {\n Identifier: \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n Type: \"DisconnectParticipant\",\n Parameters: {},\n Transitions: {},\n },\n ],\n Settings: {\n InputParameters: [],\n OutputParameters: [],\n Transitions: [\n {\n DisplayName: \"Success\",\n ReferenceName: \"Success\",\n Description: \"\",\n },\n {\n DisplayName: \"Error\",\n ReferenceName: \"Error\",\n Description: \"\",\n },\n ],\n },\n }),\n tags: {\n Name: \"Example Contact Flow Module\",\n Application: \"Example\",\n Method: \"Create\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.connect.ContactFlowModule(\"example\",\n instance_id=\"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name=\"Example\",\n description=\"Example Contact Flow Module Description\",\n content=json.dumps({\n \"Version\": \"2019-10-30\",\n \"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n \"Actions\": [\n {\n \"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n \"Parameters\": {\n \"Text\": \"Hello contact flow module\",\n },\n \"Transitions\": {\n \"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n \"Errors\": [],\n \"Conditions\": [],\n },\n \"Type\": \"MessageParticipant\",\n },\n {\n \"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n \"Type\": \"DisconnectParticipant\",\n \"Parameters\": {},\n \"Transitions\": {},\n },\n ],\n \"Settings\": {\n \"InputParameters\": [],\n \"OutputParameters\": [],\n \"Transitions\": [\n {\n \"DisplayName\": \"Success\",\n \"ReferenceName\": \"Success\",\n \"Description\": \"\",\n },\n {\n \"DisplayName\": \"Error\",\n \"ReferenceName\": \"Error\",\n \"Description\": \"\",\n },\n ],\n },\n }),\n tags={\n \"Name\": \"Example Contact Flow Module\",\n \"Application\": \"Example\",\n \"Method\": \"Create\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Connect.ContactFlowModule(\"example\", new()\n {\n InstanceId = \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n Name = \"Example\",\n Description = \"Example Contact Flow Module Description\",\n Content = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2019-10-30\",\n [\"StartAction\"] = \"12345678-1234-1234-1234-123456789012\",\n [\"Actions\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Identifier\"] = \"12345678-1234-1234-1234-123456789012\",\n [\"Parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Text\"] = \"Hello contact flow module\",\n },\n [\"Transitions\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"NextAction\"] = \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n [\"Errors\"] = new[]\n {\n },\n [\"Conditions\"] = new[]\n {\n },\n },\n [\"Type\"] = \"MessageParticipant\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Identifier\"] = \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n [\"Type\"] = \"DisconnectParticipant\",\n [\"Parameters\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n [\"Transitions\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n },\n [\"Settings\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"InputParameters\"] = new[]\n {\n },\n [\"OutputParameters\"] = new[]\n {\n },\n [\"Transitions\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"DisplayName\"] = \"Success\",\n [\"ReferenceName\"] = \"Success\",\n [\"Description\"] = \"\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"DisplayName\"] = \"Error\",\n [\"ReferenceName\"] = \"Error\",\n [\"Description\"] = \"\",\n },\n },\n },\n }),\n Tags = \n {\n { \"Name\", \"Example Contact Flow Module\" },\n { \"Application\", \"Example\" },\n { \"Method\", \"Create\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2019-10-30\",\n\t\t\t\"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\"Actions\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\t\t\"Parameters\": map[string]interface{}{\n\t\t\t\t\t\t\"Text\": \"Hello contact flow module\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Transitions\": map[string]interface{}{\n\t\t\t\t\t\t\"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\t\"Errors\": []interface{}{},\n\t\t\t\t\t\t\"Conditions\": []interface{}{},\n\t\t\t\t\t},\n\t\t\t\t\t\"Type\": \"MessageParticipant\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\"Type\": \"DisconnectParticipant\",\n\t\t\t\t\t\"Parameters\": map[string]interface{}{},\n\t\t\t\t\t\"Transitions\": map[string]interface{}{},\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Settings\": map[string]interface{}{\n\t\t\t\t\"InputParameters\": []interface{}{},\n\t\t\t\t\"OutputParameters\": []interface{}{},\n\t\t\t\t\"Transitions\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"DisplayName\": \"Success\",\n\t\t\t\t\t\t\"ReferenceName\": \"Success\",\n\t\t\t\t\t\t\"Description\": \"\",\n\t\t\t\t\t},\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"DisplayName\": \"Error\",\n\t\t\t\t\t\t\"ReferenceName\": \"Error\",\n\t\t\t\t\t\t\"Description\": \"\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = connect.NewContactFlowModule(ctx, \"example\", \u0026connect.ContactFlowModuleArgs{\n\t\t\tInstanceId: pulumi.String(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\"),\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tDescription: pulumi.String(\"Example Contact Flow Module Description\"),\n\t\t\tContent: pulumi.String(json0),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Example Contact Flow Module\"),\n\t\t\t\t\"Application\": pulumi.String(\"Example\"),\n\t\t\t\t\"Method\": pulumi.String(\"Create\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.ContactFlowModule;\nimport com.pulumi.aws.connect.ContactFlowModuleArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ContactFlowModule(\"example\", ContactFlowModuleArgs.builder()\n .instanceId(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\")\n .name(\"Example\")\n .description(\"Example Contact Flow Module Description\")\n .content(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2019-10-30\"),\n jsonProperty(\"StartAction\", \"12345678-1234-1234-1234-123456789012\"),\n jsonProperty(\"Actions\", jsonArray(\n jsonObject(\n jsonProperty(\"Identifier\", \"12345678-1234-1234-1234-123456789012\"),\n jsonProperty(\"Parameters\", jsonObject(\n jsonProperty(\"Text\", \"Hello contact flow module\")\n )),\n jsonProperty(\"Transitions\", jsonObject(\n jsonProperty(\"NextAction\", \"abcdef-abcd-abcd-abcd-abcdefghijkl\"),\n jsonProperty(\"Errors\", jsonArray(\n )),\n jsonProperty(\"Conditions\", jsonArray(\n ))\n )),\n jsonProperty(\"Type\", \"MessageParticipant\")\n ), \n jsonObject(\n jsonProperty(\"Identifier\", \"abcdef-abcd-abcd-abcd-abcdefghijkl\"),\n jsonProperty(\"Type\", \"DisconnectParticipant\"),\n jsonProperty(\"Parameters\", jsonObject(\n\n )),\n jsonProperty(\"Transitions\", jsonObject(\n\n ))\n )\n )),\n jsonProperty(\"Settings\", jsonObject(\n jsonProperty(\"InputParameters\", jsonArray(\n )),\n jsonProperty(\"OutputParameters\", jsonArray(\n )),\n jsonProperty(\"Transitions\", jsonArray(\n jsonObject(\n jsonProperty(\"DisplayName\", \"Success\"),\n jsonProperty(\"ReferenceName\", \"Success\"),\n jsonProperty(\"Description\", \"\")\n ), \n jsonObject(\n jsonProperty(\"DisplayName\", \"Error\"),\n jsonProperty(\"ReferenceName\", \"Error\"),\n jsonProperty(\"Description\", \"\")\n )\n ))\n ))\n )))\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"Example Contact Flow Module\"),\n Map.entry(\"Application\", \"Example\"),\n Map.entry(\"Method\", \"Create\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:connect:ContactFlowModule\n properties:\n instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111\n name: Example\n description: Example Contact Flow Module Description\n content:\n fn::toJSON:\n Version: 2019-10-30\n StartAction: 12345678-1234-1234-1234-123456789012\n Actions:\n - Identifier: 12345678-1234-1234-1234-123456789012\n Parameters:\n Text: Hello contact flow module\n Transitions:\n NextAction: abcdef-abcd-abcd-abcd-abcdefghijkl\n Errors: []\n Conditions: []\n Type: MessageParticipant\n - Identifier: abcdef-abcd-abcd-abcd-abcdefghijkl\n Type: DisconnectParticipant\n Parameters: {}\n Transitions: {}\n Settings:\n InputParameters: []\n OutputParameters: []\n Transitions:\n - DisplayName: Success\n ReferenceName: Success\n Description:\n - DisplayName: Error\n ReferenceName: Error\n Description:\n tags:\n Name: Example Contact Flow Module\n Application: Example\n Method: Create\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With External Content\n\nUse the AWS CLI to extract Contact Flow Content:\n\n```console\n% aws connect describe-contact-flow-module --instance-id 1b3c5d8-1b3c-1b3c-1b3c-1b3c5d81b3c5 --contact-flow-module-id c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5 --region us-west-2 | jq '.ContactFlowModule.Content | fromjson' \u003e contact_flow_module.json\n```\n\nUse the generated file as input:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst example = new aws.connect.ContactFlowModule(\"example\", {\n instanceId: \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name: \"Example\",\n description: \"Example Contact Flow Module Description\",\n filename: \"contact_flow_module.json\",\n contentHash: std.filebase64sha256({\n input: \"contact_flow_module.json\",\n }).then(invoke =\u003e invoke.result),\n tags: {\n Name: \"Example Contact Flow Module\",\n Application: \"Example\",\n Method: \"Create\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.connect.ContactFlowModule(\"example\",\n instance_id=\"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n name=\"Example\",\n description=\"Example Contact Flow Module Description\",\n filename=\"contact_flow_module.json\",\n content_hash=std.filebase64sha256(input=\"contact_flow_module.json\").result,\n tags={\n \"Name\": \"Example Contact Flow Module\",\n \"Application\": \"Example\",\n \"Method\": \"Create\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Connect.ContactFlowModule(\"example\", new()\n {\n InstanceId = \"aaaaaaaa-bbbb-cccc-dddd-111111111111\",\n Name = \"Example\",\n Description = \"Example Contact Flow Module Description\",\n Filename = \"contact_flow_module.json\",\n ContentHash = Std.Filebase64sha256.Invoke(new()\n {\n Input = \"contact_flow_module.json\",\n }).Apply(invoke =\u003e invoke.Result),\n Tags = \n {\n { \"Name\", \"Example Contact Flow Module\" },\n { \"Application\", \"Example\" },\n { \"Method\", \"Create\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeFilebase64sha256, err := std.Filebase64sha256(ctx, \u0026std.Filebase64sha256Args{\n\t\t\tInput: \"contact_flow_module.json\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = connect.NewContactFlowModule(ctx, \"example\", \u0026connect.ContactFlowModuleArgs{\n\t\t\tInstanceId: pulumi.String(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\"),\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tDescription: pulumi.String(\"Example Contact Flow Module Description\"),\n\t\t\tFilename: pulumi.String(\"contact_flow_module.json\"),\n\t\t\tContentHash: pulumi.String(invokeFilebase64sha256.Result),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Example Contact Flow Module\"),\n\t\t\t\t\"Application\": pulumi.String(\"Example\"),\n\t\t\t\t\"Method\": pulumi.String(\"Create\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.connect.ContactFlowModule;\nimport com.pulumi.aws.connect.ContactFlowModuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ContactFlowModule(\"example\", ContactFlowModuleArgs.builder()\n .instanceId(\"aaaaaaaa-bbbb-cccc-dddd-111111111111\")\n .name(\"Example\")\n .description(\"Example Contact Flow Module Description\")\n .filename(\"contact_flow_module.json\")\n .contentHash(StdFunctions.filebase64sha256(Filebase64sha256Args.builder()\n .input(\"contact_flow_module.json\")\n .build()).result())\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"Example Contact Flow Module\"),\n Map.entry(\"Application\", \"Example\"),\n Map.entry(\"Method\", \"Create\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:connect:ContactFlowModule\n properties:\n instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111\n name: Example\n description: Example Contact Flow Module Description\n filename: contact_flow_module.json\n contentHash:\n fn::invoke:\n Function: std:filebase64sha256\n Arguments:\n input: contact_flow_module.json\n Return: result\n tags:\n Name: Example Contact Flow Module\n Application: Example\n Method: Create\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amazon Connect Contact Flow Modules using the `instance_id` and `contact_flow_module_id` separated by a colon (`:`). For example:\n\n```sh\n$ pulumi import aws:connect/contactFlowModule:ContactFlowModule example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5\n```\n", "properties": { "arn": { "type": "string", @@ -213457,7 +213457,7 @@ } }, "aws:datasync/agent:Agent": { - "description": "Manages an AWS DataSync Agent deployed on premises.\n\n\u003e **NOTE:** One of `activation_key` or `ip_address` must be provided for resource creation (agent activation). Neither is required for resource import. If using `ip_address`, this provider must be able to make an HTTP (port 80) GET request to the specified IP address from where it is running. The agent will turn off that HTTP server after activation.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.datasync.Agent(\"example\", {\n ipAddress: \"1.2.3.4\",\n name: \"example\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.datasync.Agent(\"example\",\n ip_address=\"1.2.3.4\",\n name=\"example\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DataSync.Agent(\"example\", new()\n {\n IpAddress = \"1.2.3.4\",\n Name = \"example\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datasync.NewAgent(ctx, \"example\", \u0026datasync.AgentArgs{\n\t\t\tIpAddress: pulumi.String(\"1.2.3.4\"),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datasync.Agent;\nimport com.pulumi.aws.datasync.AgentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Agent(\"example\", AgentArgs.builder()\n .ipAddress(\"1.2.3.4\")\n .name(\"example\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:datasync:Agent\n properties:\n ipAddress: 1.2.3.4\n name: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\n### With VPC Endpoints\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst exampleVpcEndpoint = new aws.ec2.VpcEndpoint(\"example\", {\n serviceName: current.then(current =\u003e `com.amazonaws.${current.name}.datasync`),\n vpcId: exampleAwsVpc.id,\n securityGroupIds: [exampleAwsSecurityGroup.id],\n subnetIds: [exampleAwsSubnet.id],\n vpcEndpointType: \"Interface\",\n});\nconst example = aws.ec2.getNetworkInterfaceOutput({\n id: exampleVpcEndpoint.networkInterfaceIds[0],\n});\nconst exampleAgent = new aws.datasync.Agent(\"example\", {\n ipAddress: \"1.2.3.4\",\n securityGroupArns: [exampleAwsSecurityGroup.arn],\n subnetArns: [exampleAwsSubnet.arn],\n vpcEndpointId: exampleVpcEndpoint.id,\n privateLinkEndpoint: example.apply(example =\u003e example.privateIp),\n name: \"example\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample_vpc_endpoint = aws.ec2.VpcEndpoint(\"example\",\n service_name=f\"com.amazonaws.{current.name}.datasync\",\n vpc_id=example_aws_vpc[\"id\"],\n security_group_ids=[example_aws_security_group[\"id\"]],\n subnet_ids=[example_aws_subnet[\"id\"]],\n vpc_endpoint_type=\"Interface\")\nexample = aws.ec2.get_network_interface_output(id=example_vpc_endpoint.network_interface_ids[0])\nexample_agent = aws.datasync.Agent(\"example\",\n ip_address=\"1.2.3.4\",\n security_group_arns=[example_aws_security_group[\"arn\"]],\n subnet_arns=[example_aws_subnet[\"arn\"]],\n vpc_endpoint_id=example_vpc_endpoint.id,\n private_link_endpoint=example.private_ip,\n name=\"example\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var exampleVpcEndpoint = new Aws.Ec2.VpcEndpoint(\"example\", new()\n {\n ServiceName = $\"com.amazonaws.{current.Apply(getRegionResult =\u003e getRegionResult.Name)}.datasync\",\n VpcId = exampleAwsVpc.Id,\n SecurityGroupIds = new[]\n {\n exampleAwsSecurityGroup.Id,\n },\n SubnetIds = new[]\n {\n exampleAwsSubnet.Id,\n },\n VpcEndpointType = \"Interface\",\n });\n\n var example = Aws.Ec2.GetNetworkInterface.Invoke(new()\n {\n Id = exampleVpcEndpoint.NetworkInterfaceIds[0],\n });\n\n var exampleAgent = new Aws.DataSync.Agent(\"example\", new()\n {\n IpAddress = \"1.2.3.4\",\n SecurityGroupArns = new[]\n {\n exampleAwsSecurityGroup.Arn,\n },\n SubnetArns = new[]\n {\n exampleAwsSubnet.Arn,\n },\n VpcEndpointId = exampleVpcEndpoint.Id,\n PrivateLinkEndpoint = example.Apply(getNetworkInterfaceResult =\u003e getNetworkInterfaceResult.PrivateIp),\n Name = \"example\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcEndpoint, err := ec2.NewVpcEndpoint(ctx, \"example\", \u0026ec2.VpcEndpointArgs{\n\t\t\tServiceName: pulumi.Sprintf(\"com.amazonaws.%v.datasync\", current.Name),\n\t\t\tVpcId: pulumi.Any(exampleAwsVpc.Id),\n\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\texampleAwsSecurityGroup.Id,\n\t\t\t},\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texampleAwsSubnet.Id,\n\t\t\t},\n\t\t\tVpcEndpointType: pulumi.String(\"Interface\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample := ec2.LookupNetworkInterfaceOutput(ctx, ec2.GetNetworkInterfaceOutputArgs{\n\t\t\tId: exampleVpcEndpoint.NetworkInterfaceIds.ApplyT(func(networkInterfaceIds []string) (string, error) {\n\t\t\t\treturn networkInterfaceIds[0], nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t}, nil)\n\t\t_, err = datasync.NewAgent(ctx, \"example\", \u0026datasync.AgentArgs{\n\t\t\tIpAddress: pulumi.String(\"1.2.3.4\"),\n\t\t\tSecurityGroupArns: pulumi.StringArray{\n\t\t\t\texampleAwsSecurityGroup.Arn,\n\t\t\t},\n\t\t\tSubnetArns: pulumi.StringArray{\n\t\t\t\texampleAwsSubnet.Arn,\n\t\t\t},\n\t\t\tVpcEndpointId: exampleVpcEndpoint.ID(),\n\t\t\tPrivateLinkEndpoint: pulumi.String(example.ApplyT(func(example ec2.GetNetworkInterfaceResult) (*string, error) {\n\t\t\t\treturn \u0026example.PrivateIp, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetNetworkInterfaceArgs;\nimport com.pulumi.aws.datasync.Agent;\nimport com.pulumi.aws.datasync.AgentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var exampleVpcEndpoint = new VpcEndpoint(\"exampleVpcEndpoint\", VpcEndpointArgs.builder()\n .serviceName(String.format(\"com.amazonaws.%s.datasync\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .vpcId(exampleAwsVpc.id())\n .securityGroupIds(exampleAwsSecurityGroup.id())\n .subnetIds(exampleAwsSubnet.id())\n .vpcEndpointType(\"Interface\")\n .build());\n\n final var example = Ec2Functions.getNetworkInterface(GetNetworkInterfaceArgs.builder()\n .id(exampleVpcEndpoint.networkInterfaceIds().applyValue(networkInterfaceIds -\u003e networkInterfaceIds[0]))\n .build());\n\n var exampleAgent = new Agent(\"exampleAgent\", AgentArgs.builder()\n .ipAddress(\"1.2.3.4\")\n .securityGroupArns(exampleAwsSecurityGroup.arn())\n .subnetArns(exampleAwsSubnet.arn())\n .vpcEndpointId(exampleVpcEndpoint.id())\n .privateLinkEndpoint(example.applyValue(getNetworkInterfaceResult -\u003e getNetworkInterfaceResult).applyValue(example -\u003e example.applyValue(getNetworkInterfaceResult -\u003e getNetworkInterfaceResult.privateIp())))\n .name(\"example\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleAgent:\n type: aws:datasync:Agent\n name: example\n properties:\n ipAddress: 1.2.3.4\n securityGroupArns:\n - ${exampleAwsSecurityGroup.arn}\n subnetArns:\n - ${exampleAwsSubnet.arn}\n vpcEndpointId: ${exampleVpcEndpoint.id}\n privateLinkEndpoint: ${example.privateIp}\n name: example\n exampleVpcEndpoint:\n type: aws:ec2:VpcEndpoint\n name: example\n properties:\n serviceName: com.amazonaws.${current.name}.datasync\n vpcId: ${exampleAwsVpc.id}\n securityGroupIds:\n - ${exampleAwsSecurityGroup.id}\n subnetIds:\n - ${exampleAwsSubnet.id}\n vpcEndpointType: Interface\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:ec2:getNetworkInterface\n Arguments:\n id: ${exampleVpcEndpoint.networkInterfaceIds[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_datasync_agent` using the DataSync Agent Amazon Resource Name (ARN). For example:\n\n```sh\n$ pulumi import aws:datasync/agent:Agent example arn:aws:datasync:us-east-1:123456789012:agent/agent-12345678901234567\n```\n", + "description": "Manages an AWS DataSync Agent deployed on premises.\n\n\u003e **NOTE:** One of `activation_key` or `ip_address` must be provided for resource creation (agent activation). Neither is required for resource import. If using `ip_address`, this provider must be able to make an HTTP (port 80) GET request to the specified IP address from where it is running. The agent will turn off that HTTP server after activation.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.datasync.Agent(\"example\", {\n ipAddress: \"1.2.3.4\",\n name: \"example\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.datasync.Agent(\"example\",\n ip_address=\"1.2.3.4\",\n name=\"example\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DataSync.Agent(\"example\", new()\n {\n IpAddress = \"1.2.3.4\",\n Name = \"example\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datasync.NewAgent(ctx, \"example\", \u0026datasync.AgentArgs{\n\t\t\tIpAddress: pulumi.String(\"1.2.3.4\"),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datasync.Agent;\nimport com.pulumi.aws.datasync.AgentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Agent(\"example\", AgentArgs.builder()\n .ipAddress(\"1.2.3.4\")\n .name(\"example\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:datasync:Agent\n properties:\n ipAddress: 1.2.3.4\n name: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\n### With VPC Endpoints\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst exampleVpcEndpoint = new aws.ec2.VpcEndpoint(\"example\", {\n serviceName: current.then(current =\u003e `com.amazonaws.${current.name}.datasync`),\n vpcId: exampleAwsVpc.id,\n securityGroupIds: [exampleAwsSecurityGroup.id],\n subnetIds: [exampleAwsSubnet.id],\n vpcEndpointType: \"Interface\",\n});\nconst example = aws.ec2.getNetworkInterfaceOutput({\n id: exampleVpcEndpoint.networkInterfaceIds[0],\n});\nconst exampleAgent = new aws.datasync.Agent(\"example\", {\n ipAddress: \"1.2.3.4\",\n securityGroupArns: [exampleAwsSecurityGroup.arn],\n subnetArns: [exampleAwsSubnet.arn],\n vpcEndpointId: exampleVpcEndpoint.id,\n privateLinkEndpoint: example.apply(example =\u003e example.privateIp),\n name: \"example\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample_vpc_endpoint = aws.ec2.VpcEndpoint(\"example\",\n service_name=f\"com.amazonaws.{current.name}.datasync\",\n vpc_id=example_aws_vpc[\"id\"],\n security_group_ids=[example_aws_security_group[\"id\"]],\n subnet_ids=[example_aws_subnet[\"id\"]],\n vpc_endpoint_type=\"Interface\")\nexample = aws.ec2.get_network_interface_output(id=example_vpc_endpoint.network_interface_ids[0])\nexample_agent = aws.datasync.Agent(\"example\",\n ip_address=\"1.2.3.4\",\n security_group_arns=[example_aws_security_group[\"arn\"]],\n subnet_arns=[example_aws_subnet[\"arn\"]],\n vpc_endpoint_id=example_vpc_endpoint.id,\n private_link_endpoint=example.private_ip,\n name=\"example\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var exampleVpcEndpoint = new Aws.Ec2.VpcEndpoint(\"example\", new()\n {\n ServiceName = $\"com.amazonaws.{current.Apply(getRegionResult =\u003e getRegionResult.Name)}.datasync\",\n VpcId = exampleAwsVpc.Id,\n SecurityGroupIds = new[]\n {\n exampleAwsSecurityGroup.Id,\n },\n SubnetIds = new[]\n {\n exampleAwsSubnet.Id,\n },\n VpcEndpointType = \"Interface\",\n });\n\n var example = Aws.Ec2.GetNetworkInterface.Invoke(new()\n {\n Id = exampleVpcEndpoint.NetworkInterfaceIds[0],\n });\n\n var exampleAgent = new Aws.DataSync.Agent(\"example\", new()\n {\n IpAddress = \"1.2.3.4\",\n SecurityGroupArns = new[]\n {\n exampleAwsSecurityGroup.Arn,\n },\n SubnetArns = new[]\n {\n exampleAwsSubnet.Arn,\n },\n VpcEndpointId = exampleVpcEndpoint.Id,\n PrivateLinkEndpoint = example.Apply(getNetworkInterfaceResult =\u003e getNetworkInterfaceResult.PrivateIp),\n Name = \"example\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcEndpoint, err := ec2.NewVpcEndpoint(ctx, \"example\", \u0026ec2.VpcEndpointArgs{\n\t\t\tServiceName: pulumi.Sprintf(\"com.amazonaws.%v.datasync\", current.Name),\n\t\t\tVpcId: pulumi.Any(exampleAwsVpc.Id),\n\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\texampleAwsSecurityGroup.Id,\n\t\t\t},\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texampleAwsSubnet.Id,\n\t\t\t},\n\t\t\tVpcEndpointType: pulumi.String(\"Interface\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample := ec2.LookupNetworkInterfaceOutput(ctx, ec2.GetNetworkInterfaceOutputArgs{\n\t\t\tId: exampleVpcEndpoint.NetworkInterfaceIds.ApplyT(func(networkInterfaceIds []string) (string, error) {\n\t\t\t\treturn networkInterfaceIds[0], nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t}, nil)\n\t\t_, err = datasync.NewAgent(ctx, \"example\", \u0026datasync.AgentArgs{\n\t\t\tIpAddress: pulumi.String(\"1.2.3.4\"),\n\t\t\tSecurityGroupArns: pulumi.StringArray{\n\t\t\t\texampleAwsSecurityGroup.Arn,\n\t\t\t},\n\t\t\tSubnetArns: pulumi.StringArray{\n\t\t\t\texampleAwsSubnet.Arn,\n\t\t\t},\n\t\t\tVpcEndpointId: exampleVpcEndpoint.ID(),\n\t\t\tPrivateLinkEndpoint: pulumi.String(example.ApplyT(func(example ec2.GetNetworkInterfaceResult) (*string, error) {\n\t\t\t\treturn \u0026example.PrivateIp, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetNetworkInterfaceArgs;\nimport com.pulumi.aws.datasync.Agent;\nimport com.pulumi.aws.datasync.AgentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var exampleVpcEndpoint = new VpcEndpoint(\"exampleVpcEndpoint\", VpcEndpointArgs.builder()\n .serviceName(String.format(\"com.amazonaws.%s.datasync\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .vpcId(exampleAwsVpc.id())\n .securityGroupIds(exampleAwsSecurityGroup.id())\n .subnetIds(exampleAwsSubnet.id())\n .vpcEndpointType(\"Interface\")\n .build());\n\n final var example = Ec2Functions.getNetworkInterface(GetNetworkInterfaceArgs.builder()\n .id(exampleVpcEndpoint.networkInterfaceIds().applyValue(networkInterfaceIds -\u003e networkInterfaceIds[0]))\n .build());\n\n var exampleAgent = new Agent(\"exampleAgent\", AgentArgs.builder()\n .ipAddress(\"1.2.3.4\")\n .securityGroupArns(exampleAwsSecurityGroup.arn())\n .subnetArns(exampleAwsSubnet.arn())\n .vpcEndpointId(exampleVpcEndpoint.id())\n .privateLinkEndpoint(example.applyValue(getNetworkInterfaceResult -\u003e getNetworkInterfaceResult).applyValue(example -\u003e example.applyValue(getNetworkInterfaceResult -\u003e getNetworkInterfaceResult.privateIp())))\n .name(\"example\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleAgent:\n type: aws:datasync:Agent\n name: example\n properties:\n ipAddress: 1.2.3.4\n securityGroupArns:\n - ${exampleAwsSecurityGroup.arn}\n subnetArns:\n - ${exampleAwsSubnet.arn}\n vpcEndpointId: ${exampleVpcEndpoint.id}\n privateLinkEndpoint: ${example.privateIp}\n name: example\n exampleVpcEndpoint:\n type: aws:ec2:VpcEndpoint\n name: example\n properties:\n serviceName: com.amazonaws.${current.name}.datasync\n vpcId: ${exampleAwsVpc.id}\n securityGroupIds:\n - ${exampleAwsSecurityGroup.id}\n subnetIds:\n - ${exampleAwsSubnet.id}\n vpcEndpointType: Interface\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:ec2:getNetworkInterface\n Arguments:\n id: ${exampleVpcEndpoint.networkInterfaceIds[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_datasync_agent` using the DataSync Agent Amazon Resource Name (ARN). For example:\n\n```sh\n$ pulumi import aws:datasync/agent:Agent example arn:aws:datasync:us-east-1:123456789012:agent/agent-12345678901234567\n```\n", "properties": { "activationKey": { "type": "string", @@ -215543,7 +215543,7 @@ } }, "aws:datasync/task:Task": { - "description": "Manages an AWS DataSync Task, which represents a configuration for synchronization. Starting an execution of these DataSync Tasks (actually synchronizing files) is performed outside of this resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.datasync.Task(\"example\", {\n destinationLocationArn: destination.arn,\n name: \"example\",\n sourceLocationArn: source.arn,\n options: {\n bytesPerSecond: -1,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.datasync.Task(\"example\",\n destination_location_arn=destination[\"arn\"],\n name=\"example\",\n source_location_arn=source[\"arn\"],\n options={\n \"bytes_per_second\": -1,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DataSync.Task(\"example\", new()\n {\n DestinationLocationArn = destination.Arn,\n Name = \"example\",\n SourceLocationArn = source.Arn,\n Options = new Aws.DataSync.Inputs.TaskOptionsArgs\n {\n BytesPerSecond = -1,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datasync.NewTask(ctx, \"example\", \u0026datasync.TaskArgs{\n\t\t\tDestinationLocationArn: pulumi.Any(destination.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tSourceLocationArn: pulumi.Any(source.Arn),\n\t\t\tOptions: \u0026datasync.TaskOptionsArgs{\n\t\t\t\tBytesPerSecond: int(-1),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n example:\n type: aws:datasync:Task\n properties:\n destinationLocationArn: ${destination.arn}\n name: example\n sourceLocationArn: ${source.arn}\n options:\n bytesPerSecond: -1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\n### With Scheduling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.datasync.Task(\"example\", {\n destinationLocationArn: destination.arn,\n name: \"example\",\n sourceLocationArn: source.arn,\n schedule: {\n scheduleExpression: \"cron(0 12 ? * SUN,WED *)\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.datasync.Task(\"example\",\n destination_location_arn=destination[\"arn\"],\n name=\"example\",\n source_location_arn=source[\"arn\"],\n schedule={\n \"schedule_expression\": \"cron(0 12 ? * SUN,WED *)\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DataSync.Task(\"example\", new()\n {\n DestinationLocationArn = destination.Arn,\n Name = \"example\",\n SourceLocationArn = source.Arn,\n Schedule = new Aws.DataSync.Inputs.TaskScheduleArgs\n {\n ScheduleExpression = \"cron(0 12 ? * SUN,WED *)\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datasync.NewTask(ctx, \"example\", \u0026datasync.TaskArgs{\n\t\t\tDestinationLocationArn: pulumi.Any(destination.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tSourceLocationArn: pulumi.Any(source.Arn),\n\t\t\tSchedule: \u0026datasync.TaskScheduleArgs{\n\t\t\t\tScheduleExpression: pulumi.String(\"cron(0 12 ? * SUN,WED *)\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datasync.Task;\nimport com.pulumi.aws.datasync.TaskArgs;\nimport com.pulumi.aws.datasync.inputs.TaskScheduleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Task(\"example\", TaskArgs.builder()\n .destinationLocationArn(destination.arn())\n .name(\"example\")\n .sourceLocationArn(source.arn())\n .schedule(TaskScheduleArgs.builder()\n .scheduleExpression(\"cron(0 12 ? * SUN,WED *)\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:datasync:Task\n properties:\n destinationLocationArn: ${destination.arn}\n name: example\n sourceLocationArn: ${source.arn}\n schedule:\n scheduleExpression: cron(0 12 ? * SUN,WED *)\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\n### With Filtering\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.datasync.Task(\"example\", {\n destinationLocationArn: destination.arn,\n name: \"example\",\n sourceLocationArn: source.arn,\n excludes: {\n filterType: \"SIMPLE_PATTERN\",\n value: \"/folder1|/folder2\",\n },\n includes: {\n filterType: \"SIMPLE_PATTERN\",\n value: \"/folder1|/folder2\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.datasync.Task(\"example\",\n destination_location_arn=destination[\"arn\"],\n name=\"example\",\n source_location_arn=source[\"arn\"],\n excludes={\n \"filter_type\": \"SIMPLE_PATTERN\",\n \"value\": \"/folder1|/folder2\",\n },\n includes={\n \"filter_type\": \"SIMPLE_PATTERN\",\n \"value\": \"/folder1|/folder2\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DataSync.Task(\"example\", new()\n {\n DestinationLocationArn = destination.Arn,\n Name = \"example\",\n SourceLocationArn = source.Arn,\n Excludes = new Aws.DataSync.Inputs.TaskExcludesArgs\n {\n FilterType = \"SIMPLE_PATTERN\",\n Value = \"/folder1|/folder2\",\n },\n Includes = new Aws.DataSync.Inputs.TaskIncludesArgs\n {\n FilterType = \"SIMPLE_PATTERN\",\n Value = \"/folder1|/folder2\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datasync.NewTask(ctx, \"example\", \u0026datasync.TaskArgs{\n\t\t\tDestinationLocationArn: pulumi.Any(destination.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tSourceLocationArn: pulumi.Any(source.Arn),\n\t\t\tExcludes: \u0026datasync.TaskExcludesArgs{\n\t\t\t\tFilterType: pulumi.String(\"SIMPLE_PATTERN\"),\n\t\t\t\tValue: pulumi.String(\"/folder1|/folder2\"),\n\t\t\t},\n\t\t\tIncludes: \u0026datasync.TaskIncludesArgs{\n\t\t\t\tFilterType: pulumi.String(\"SIMPLE_PATTERN\"),\n\t\t\t\tValue: pulumi.String(\"/folder1|/folder2\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datasync.Task;\nimport com.pulumi.aws.datasync.TaskArgs;\nimport com.pulumi.aws.datasync.inputs.TaskExcludesArgs;\nimport com.pulumi.aws.datasync.inputs.TaskIncludesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Task(\"example\", TaskArgs.builder()\n .destinationLocationArn(destination.arn())\n .name(\"example\")\n .sourceLocationArn(source.arn())\n .excludes(TaskExcludesArgs.builder()\n .filterType(\"SIMPLE_PATTERN\")\n .value(\"/folder1|/folder2\")\n .build())\n .includes(TaskIncludesArgs.builder()\n .filterType(\"SIMPLE_PATTERN\")\n .value(\"/folder1|/folder2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:datasync:Task\n properties:\n destinationLocationArn: ${destination.arn}\n name: example\n sourceLocationArn: ${source.arn}\n excludes:\n filterType: SIMPLE_PATTERN\n value: /folder1|/folder2\n includes:\n filterType: SIMPLE_PATTERN\n value: /folder1|/folder2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_datasync_task` using the DataSync Task Amazon Resource Name (ARN). For example:\n\n```sh\n$ pulumi import aws:datasync/task:Task example arn:aws:datasync:us-east-1:123456789012:task/task-12345678901234567\n```\n", + "description": "Manages an AWS DataSync Task, which represents a configuration for synchronization. Starting an execution of these DataSync Tasks (actually synchronizing files) is performed outside of this resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.datasync.Task(\"example\", {\n destinationLocationArn: destination.arn,\n name: \"example\",\n sourceLocationArn: source.arn,\n options: {\n bytesPerSecond: -1,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.datasync.Task(\"example\",\n destination_location_arn=destination[\"arn\"],\n name=\"example\",\n source_location_arn=source[\"arn\"],\n options={\n \"bytes_per_second\": -1,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DataSync.Task(\"example\", new()\n {\n DestinationLocationArn = destination.Arn,\n Name = \"example\",\n SourceLocationArn = source.Arn,\n Options = new Aws.DataSync.Inputs.TaskOptionsArgs\n {\n BytesPerSecond = -1,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datasync.NewTask(ctx, \"example\", \u0026datasync.TaskArgs{\n\t\t\tDestinationLocationArn: pulumi.Any(destination.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tSourceLocationArn: pulumi.Any(source.Arn),\n\t\t\tOptions: \u0026datasync.TaskOptionsArgs{\n\t\t\t\tBytesPerSecond: pulumi.Int(-1),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datasync.Task;\nimport com.pulumi.aws.datasync.TaskArgs;\nimport com.pulumi.aws.datasync.inputs.TaskOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Task(\"example\", TaskArgs.builder()\n .destinationLocationArn(destination.arn())\n .name(\"example\")\n .sourceLocationArn(source.arn())\n .options(TaskOptionsArgs.builder()\n .bytesPerSecond(-1)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:datasync:Task\n properties:\n destinationLocationArn: ${destination.arn}\n name: example\n sourceLocationArn: ${source.arn}\n options:\n bytesPerSecond: -1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\n### With Scheduling\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.datasync.Task(\"example\", {\n destinationLocationArn: destination.arn,\n name: \"example\",\n sourceLocationArn: source.arn,\n schedule: {\n scheduleExpression: \"cron(0 12 ? * SUN,WED *)\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.datasync.Task(\"example\",\n destination_location_arn=destination[\"arn\"],\n name=\"example\",\n source_location_arn=source[\"arn\"],\n schedule={\n \"schedule_expression\": \"cron(0 12 ? * SUN,WED *)\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DataSync.Task(\"example\", new()\n {\n DestinationLocationArn = destination.Arn,\n Name = \"example\",\n SourceLocationArn = source.Arn,\n Schedule = new Aws.DataSync.Inputs.TaskScheduleArgs\n {\n ScheduleExpression = \"cron(0 12 ? * SUN,WED *)\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datasync.NewTask(ctx, \"example\", \u0026datasync.TaskArgs{\n\t\t\tDestinationLocationArn: pulumi.Any(destination.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tSourceLocationArn: pulumi.Any(source.Arn),\n\t\t\tSchedule: \u0026datasync.TaskScheduleArgs{\n\t\t\t\tScheduleExpression: pulumi.String(\"cron(0 12 ? * SUN,WED *)\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datasync.Task;\nimport com.pulumi.aws.datasync.TaskArgs;\nimport com.pulumi.aws.datasync.inputs.TaskScheduleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Task(\"example\", TaskArgs.builder()\n .destinationLocationArn(destination.arn())\n .name(\"example\")\n .sourceLocationArn(source.arn())\n .schedule(TaskScheduleArgs.builder()\n .scheduleExpression(\"cron(0 12 ? * SUN,WED *)\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:datasync:Task\n properties:\n destinationLocationArn: ${destination.arn}\n name: example\n sourceLocationArn: ${source.arn}\n schedule:\n scheduleExpression: cron(0 12 ? * SUN,WED *)\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\n### With Filtering\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.datasync.Task(\"example\", {\n destinationLocationArn: destination.arn,\n name: \"example\",\n sourceLocationArn: source.arn,\n excludes: {\n filterType: \"SIMPLE_PATTERN\",\n value: \"/folder1|/folder2\",\n },\n includes: {\n filterType: \"SIMPLE_PATTERN\",\n value: \"/folder1|/folder2\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.datasync.Task(\"example\",\n destination_location_arn=destination[\"arn\"],\n name=\"example\",\n source_location_arn=source[\"arn\"],\n excludes={\n \"filter_type\": \"SIMPLE_PATTERN\",\n \"value\": \"/folder1|/folder2\",\n },\n includes={\n \"filter_type\": \"SIMPLE_PATTERN\",\n \"value\": \"/folder1|/folder2\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DataSync.Task(\"example\", new()\n {\n DestinationLocationArn = destination.Arn,\n Name = \"example\",\n SourceLocationArn = source.Arn,\n Excludes = new Aws.DataSync.Inputs.TaskExcludesArgs\n {\n FilterType = \"SIMPLE_PATTERN\",\n Value = \"/folder1|/folder2\",\n },\n Includes = new Aws.DataSync.Inputs.TaskIncludesArgs\n {\n FilterType = \"SIMPLE_PATTERN\",\n Value = \"/folder1|/folder2\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := datasync.NewTask(ctx, \"example\", \u0026datasync.TaskArgs{\n\t\t\tDestinationLocationArn: pulumi.Any(destination.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tSourceLocationArn: pulumi.Any(source.Arn),\n\t\t\tExcludes: \u0026datasync.TaskExcludesArgs{\n\t\t\t\tFilterType: pulumi.String(\"SIMPLE_PATTERN\"),\n\t\t\t\tValue: pulumi.String(\"/folder1|/folder2\"),\n\t\t\t},\n\t\t\tIncludes: \u0026datasync.TaskIncludesArgs{\n\t\t\t\tFilterType: pulumi.String(\"SIMPLE_PATTERN\"),\n\t\t\t\tValue: pulumi.String(\"/folder1|/folder2\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.datasync.Task;\nimport com.pulumi.aws.datasync.TaskArgs;\nimport com.pulumi.aws.datasync.inputs.TaskExcludesArgs;\nimport com.pulumi.aws.datasync.inputs.TaskIncludesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Task(\"example\", TaskArgs.builder()\n .destinationLocationArn(destination.arn())\n .name(\"example\")\n .sourceLocationArn(source.arn())\n .excludes(TaskExcludesArgs.builder()\n .filterType(\"SIMPLE_PATTERN\")\n .value(\"/folder1|/folder2\")\n .build())\n .includes(TaskIncludesArgs.builder()\n .filterType(\"SIMPLE_PATTERN\")\n .value(\"/folder1|/folder2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:datasync:Task\n properties:\n destinationLocationArn: ${destination.arn}\n name: example\n sourceLocationArn: ${source.arn}\n excludes:\n filterType: SIMPLE_PATTERN\n value: /folder1|/folder2\n includes:\n filterType: SIMPLE_PATTERN\n value: /folder1|/folder2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_datasync_task` using the DataSync Task Amazon Resource Name (ARN). For example:\n\n```sh\n$ pulumi import aws:datasync/task:Task example arn:aws:datasync:us-east-1:123456789012:task/task-12345678901234567\n```\n", "properties": { "arn": { "type": "string", @@ -216362,7 +216362,7 @@ } }, "aws:datazone/environmentProfile:EnvironmentProfile": { - "description": "Resource for managing an AWS DataZone Environment Profile.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst domainExecutionRole = new aws.iam.Role(\"domain_execution_role\", {\n name: \"example-name\",\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"datazone.amazonaws.com\",\n },\n },\n {\n Action: [\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"cloudformation.amazonaws.com\",\n },\n },\n ],\n }),\n inlinePolicies: [{\n name: \"example-name\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\n \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n ],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n }],\n});\nconst testDomain = new aws.datazone.Domain(\"test\", {\n name: \"example-name\",\n domainExecutionRole: domainExecutionRole.arn,\n});\nconst testSecurityGroup = new aws.ec2.SecurityGroup(\"test\", {name: \"example-name\"});\nconst testProject = new aws.datazone.Project(\"test\", {\n domainIdentifier: testDomain.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example-name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst test = aws.getCallerIdentity({});\nconst testGetRegion = aws.getRegion({});\nconst testGetEnvironmentBlueprint = aws.datazone.getEnvironmentBlueprintOutput({\n domainId: testDomain.id,\n name: \"DefaultDataLake\",\n managed: true,\n});\nconst testEnvironmentBlueprintConfiguration = new aws.datazone.EnvironmentBlueprintConfiguration(\"test\", {\n domainId: testDomain.id,\n environmentBlueprintId: testGetEnvironmentBlueprint.apply(testGetEnvironmentBlueprint =\u003e testGetEnvironmentBlueprint.id),\n provisioningRoleArn: domainExecutionRole.arn,\n enabledRegions: [testGetRegion.then(testGetRegion =\u003e testGetRegion.name)],\n});\nconst testEnvironmentProfile = new aws.datazone.EnvironmentProfile(\"test\", {\n awsAccountId: test.then(test =\u003e test.accountId),\n awsAccountRegion: testGetRegion.then(testGetRegion =\u003e testGetRegion.name),\n description: \"description\",\n environmentBlueprintIdentifier: testGetEnvironmentBlueprint.apply(testGetEnvironmentBlueprint =\u003e testGetEnvironmentBlueprint.id),\n name: \"example-name\",\n projectIdentifier: testProject.id,\n domainIdentifier: testDomain.id,\n userParameters: [{\n name: \"consumerGlueDbName\",\n value: \"value\",\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ndomain_execution_role = aws.iam.Role(\"domain_execution_role\",\n name=\"example-name\",\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"datazone.amazonaws.com\",\n },\n },\n {\n \"Action\": [\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"cloudformation.amazonaws.com\",\n },\n },\n ],\n }),\n inline_policies=[{\n \"name\": \"example-name\",\n \"policy\": json.dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [{\n \"action\": [\n \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n ],\n \"effect\": \"Allow\",\n \"resource\": \"*\",\n }],\n }),\n }])\ntest_domain = aws.datazone.Domain(\"test\",\n name=\"example-name\",\n domain_execution_role=domain_execution_role.arn)\ntest_security_group = aws.ec2.SecurityGroup(\"test\", name=\"example-name\")\ntest_project = aws.datazone.Project(\"test\",\n domain_identifier=test_domain.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example-name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest = aws.get_caller_identity()\ntest_get_region = aws.get_region()\ntest_get_environment_blueprint = aws.datazone.get_environment_blueprint_output(domain_id=test_domain.id,\n name=\"DefaultDataLake\",\n managed=True)\ntest_environment_blueprint_configuration = aws.datazone.EnvironmentBlueprintConfiguration(\"test\",\n domain_id=test_domain.id,\n environment_blueprint_id=test_get_environment_blueprint.id,\n provisioning_role_arn=domain_execution_role.arn,\n enabled_regions=[test_get_region.name])\ntest_environment_profile = aws.datazone.EnvironmentProfile(\"test\",\n aws_account_id=test.account_id,\n aws_account_region=test_get_region.name,\n description=\"description\",\n environment_blueprint_identifier=test_get_environment_blueprint.id,\n name=\"example-name\",\n project_identifier=test_project.id,\n domain_identifier=test_domain.id,\n user_parameters=[{\n \"name\": \"consumerGlueDbName\",\n \"value\": \"value\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"example-name\",\n AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"datazone.amazonaws.com\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"cloudformation.amazonaws.com\",\n },\n },\n },\n }),\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"example-name\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var testDomain = new Aws.DataZone.Domain(\"test\", new()\n {\n Name = \"example-name\",\n DomainExecutionRole = domainExecutionRole.Arn,\n });\n\n var testSecurityGroup = new Aws.Ec2.SecurityGroup(\"test\", new()\n {\n Name = \"example-name\",\n });\n\n var testProject = new Aws.DataZone.Project(\"test\", new()\n {\n DomainIdentifier = testDomain.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example-name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var test = Aws.GetCallerIdentity.Invoke();\n\n var testGetRegion = Aws.GetRegion.Invoke();\n\n var testGetEnvironmentBlueprint = Aws.DataZone.GetEnvironmentBlueprint.Invoke(new()\n {\n DomainId = testDomain.Id,\n Name = \"DefaultDataLake\",\n Managed = true,\n });\n\n var testEnvironmentBlueprintConfiguration = new Aws.DataZone.EnvironmentBlueprintConfiguration(\"test\", new()\n {\n DomainId = testDomain.Id,\n EnvironmentBlueprintId = testGetEnvironmentBlueprint.Apply(getEnvironmentBlueprintResult =\u003e getEnvironmentBlueprintResult.Id),\n ProvisioningRoleArn = domainExecutionRole.Arn,\n EnabledRegions = new[]\n {\n testGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n });\n\n var testEnvironmentProfile = new Aws.DataZone.EnvironmentProfile(\"test\", new()\n {\n AwsAccountId = test.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n AwsAccountRegion = testGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n Description = \"description\",\n EnvironmentBlueprintIdentifier = testGetEnvironmentBlueprint.Apply(getEnvironmentBlueprintResult =\u003e getEnvironmentBlueprintResult.Id),\n Name = \"example-name\",\n ProjectIdentifier = testProject.Id,\n DomainIdentifier = testDomain.Id,\n UserParameters = new[]\n {\n new Aws.DataZone.Inputs.EnvironmentProfileUserParameterArgs\n {\n Name = \"consumerGlueDbName\",\n Value = \"value\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datazone\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t\t\"sts:TagSession\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"datazone.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t\t\"sts:TagSession\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"cloudformation.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"datazone:*\",\n\t\t\t\t\t\t\"ram:*\",\n\t\t\t\t\t\t\"sso:*\",\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson1 := string(tmpJSON1)\n\t\tdomainExecutionRole, err := iam.NewRole(ctx, \"domain_execution_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\tAssumeRolePolicy: pulumi.String(json0),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\t\t\tPolicy: pulumi.String(json1),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestDomain, err := datazone.NewDomain(ctx, \"test\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\tDomainExecutionRole: domainExecutionRole.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroup(ctx, \"test\", \u0026ec2.SecurityGroupArgs{\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestProject, err := datazone.NewProject(ctx, \"test\", \u0026datazone.ProjectArgs{\n\t\t\tDomainIdentifier: testDomain.ID(),\n\t\t\tGlossaryTerms: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"2N8w6XJCwZf\"),\n\t\t\t},\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\tDescription: pulumi.String(\"desc\"),\n\t\t\tSkipDeletionCheck: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttest, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestGetRegion, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestGetEnvironmentBlueprint := datazone.GetEnvironmentBlueprintOutput(ctx, datazone.GetEnvironmentBlueprintOutputArgs{\n\t\t\tDomainId: testDomain.ID(),\n\t\t\tName: pulumi.String(\"DefaultDataLake\"),\n\t\t\tManaged: pulumi.Bool(true),\n\t\t}, nil)\n\t\t_, err = datazone.NewEnvironmentBlueprintConfiguration(ctx, \"test\", \u0026datazone.EnvironmentBlueprintConfigurationArgs{\n\t\t\tDomainId: testDomain.ID(),\n\t\t\tEnvironmentBlueprintId: pulumi.String(testGetEnvironmentBlueprint.ApplyT(func(testGetEnvironmentBlueprint datazone.GetEnvironmentBlueprintResult) (*string, error) {\n\t\t\t\treturn \u0026testGetEnvironmentBlueprint.Id, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tProvisioningRoleArn: domainExecutionRole.Arn,\n\t\t\tEnabledRegions: pulumi.StringArray{\n\t\t\t\tpulumi.String(testGetRegion.Name),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = datazone.NewEnvironmentProfile(ctx, \"test\", \u0026datazone.EnvironmentProfileArgs{\n\t\t\tAwsAccountId: pulumi.String(test.AccountId),\n\t\t\tAwsAccountRegion: pulumi.String(testGetRegion.Name),\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tEnvironmentBlueprintIdentifier: pulumi.String(testGetEnvironmentBlueprint.ApplyT(func(testGetEnvironmentBlueprint datazone.GetEnvironmentBlueprintResult) (*string, error) {\n\t\t\t\treturn \u0026testGetEnvironmentBlueprint.Id, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\tProjectIdentifier: testProject.ID(),\n\t\t\tDomainIdentifier: testDomain.ID(),\n\t\t\tUserParameters: datazone.EnvironmentProfileUserParameterArray{\n\t\t\t\t\u0026datazone.EnvironmentProfileUserParameterArgs{\n\t\t\t\t\tName: pulumi.String(\"consumerGlueDbName\"),\n\t\t\t\t\tValue: pulumi.String(\"value\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.datazone.Domain;\nimport com.pulumi.aws.datazone.DomainArgs;\nimport com.pulumi.aws.ec2.SecurityGroup;\nimport com.pulumi.aws.ec2.SecurityGroupArgs;\nimport com.pulumi.aws.datazone.Project;\nimport com.pulumi.aws.datazone.ProjectArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.datazone.DatazoneFunctions;\nimport com.pulumi.aws.datazone.inputs.GetEnvironmentBlueprintArgs;\nimport com.pulumi.aws.datazone.EnvironmentBlueprintConfiguration;\nimport com.pulumi.aws.datazone.EnvironmentBlueprintConfigurationArgs;\nimport com.pulumi.aws.datazone.EnvironmentProfile;\nimport com.pulumi.aws.datazone.EnvironmentProfileArgs;\nimport com.pulumi.aws.datazone.inputs.EnvironmentProfileUserParameterArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var domainExecutionRole = new Role(\"domainExecutionRole\", RoleArgs.builder()\n .name(\"example-name\")\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"sts:AssumeRole\", \n \"sts:TagSession\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"datazone.amazonaws.com\")\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"sts:AssumeRole\", \n \"sts:TagSession\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"cloudformation.amazonaws.com\")\n ))\n )\n ))\n )))\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"example-name\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"datazone:*\", \n \"ram:*\", \n \"sso:*\", \n \"kms:*\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build())\n .build());\n\n var testDomain = new Domain(\"testDomain\", DomainArgs.builder()\n .name(\"example-name\")\n .domainExecutionRole(domainExecutionRole.arn())\n .build());\n\n var testSecurityGroup = new SecurityGroup(\"testSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example-name\")\n .build());\n\n var testProject = new Project(\"testProject\", ProjectArgs.builder()\n .domainIdentifier(testDomain.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example-name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n final var test = AwsFunctions.getCallerIdentity();\n\n final var testGetRegion = AwsFunctions.getRegion();\n\n final var testGetEnvironmentBlueprint = DatazoneFunctions.getEnvironmentBlueprint(GetEnvironmentBlueprintArgs.builder()\n .domainId(testDomain.id())\n .name(\"DefaultDataLake\")\n .managed(true)\n .build());\n\n var testEnvironmentBlueprintConfiguration = new EnvironmentBlueprintConfiguration(\"testEnvironmentBlueprintConfiguration\", EnvironmentBlueprintConfigurationArgs.builder()\n .domainId(testDomain.id())\n .environmentBlueprintId(testGetEnvironmentBlueprint.applyValue(getEnvironmentBlueprintResult -\u003e getEnvironmentBlueprintResult).applyValue(testGetEnvironmentBlueprint -\u003e testGetEnvironmentBlueprint.applyValue(getEnvironmentBlueprintResult -\u003e getEnvironmentBlueprintResult.id())))\n .provisioningRoleArn(domainExecutionRole.arn())\n .enabledRegions(testGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var testEnvironmentProfile = new EnvironmentProfile(\"testEnvironmentProfile\", EnvironmentProfileArgs.builder()\n .awsAccountId(test.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .awsAccountRegion(testGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .description(\"description\")\n .environmentBlueprintIdentifier(testGetEnvironmentBlueprint.applyValue(getEnvironmentBlueprintResult -\u003e getEnvironmentBlueprintResult).applyValue(testGetEnvironmentBlueprint -\u003e testGetEnvironmentBlueprint.applyValue(getEnvironmentBlueprintResult -\u003e getEnvironmentBlueprintResult.id())))\n .name(\"example-name\")\n .projectIdentifier(testProject.id())\n .domainIdentifier(testDomain.id())\n .userParameters(EnvironmentProfileUserParameterArgs.builder()\n .name(\"consumerGlueDbName\")\n .value(\"value\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n domainExecutionRole:\n type: aws:iam:Role\n name: domain_execution_role\n properties:\n name: example-name\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - sts:AssumeRole\n - sts:TagSession\n Effect: Allow\n Principal:\n Service: datazone.amazonaws.com\n - Action:\n - sts:AssumeRole\n - sts:TagSession\n Effect: Allow\n Principal:\n Service: cloudformation.amazonaws.com\n inlinePolicies:\n - name: example-name\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - datazone:*\n - ram:*\n - sso:*\n - kms:*\n Effect: Allow\n Resource: '*'\n testDomain:\n type: aws:datazone:Domain\n name: test\n properties:\n name: example-name\n domainExecutionRole: ${domainExecutionRole.arn}\n testSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: test\n properties:\n name: example-name\n testProject:\n type: aws:datazone:Project\n name: test\n properties:\n domainIdentifier: ${testDomain.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example-name\n description: desc\n skipDeletionCheck: true\n testEnvironmentBlueprintConfiguration:\n type: aws:datazone:EnvironmentBlueprintConfiguration\n name: test\n properties:\n domainId: ${testDomain.id}\n environmentBlueprintId: ${testGetEnvironmentBlueprint.id}\n provisioningRoleArn: ${domainExecutionRole.arn}\n enabledRegions:\n - ${testGetRegion.name}\n testEnvironmentProfile:\n type: aws:datazone:EnvironmentProfile\n name: test\n properties:\n awsAccountId: ${test.accountId}\n awsAccountRegion: ${testGetRegion.name}\n description: description\n environmentBlueprintIdentifier: ${testGetEnvironmentBlueprint.id}\n name: example-name\n projectIdentifier: ${testProject.id}\n domainIdentifier: ${testDomain.id}\n userParameters:\n - name: consumerGlueDbName\n value: value\nvariables:\n test:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n testGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n testGetEnvironmentBlueprint:\n fn::invoke:\n Function: aws:datazone:getEnvironmentBlueprint\n Arguments:\n domainId: ${testDomain.id}\n name: DefaultDataLake\n managed: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Environment Profile using a comma-delimited string combining `id` and `domain_identifier`. For example:\n\n```sh\n$ pulumi import aws:datazone/environmentProfile:EnvironmentProfile example environment_profile-id-12345678,domain-id-12345678\n```\n", + "description": "Resource for managing an AWS DataZone Environment Profile.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst domainExecutionRole = new aws.iam.Role(\"domain_execution_role\", {\n name: \"example-name\",\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [\n {\n Action: [\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"datazone.amazonaws.com\",\n },\n },\n {\n Action: [\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"cloudformation.amazonaws.com\",\n },\n },\n ],\n }),\n inlinePolicies: [{\n name: \"example-name\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\n \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n ],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n }],\n});\nconst testDomain = new aws.datazone.Domain(\"test\", {\n name: \"example-name\",\n domainExecutionRole: domainExecutionRole.arn,\n});\nconst testSecurityGroup = new aws.ec2.SecurityGroup(\"test\", {name: \"example-name\"});\nconst testProject = new aws.datazone.Project(\"test\", {\n domainIdentifier: testDomain.id,\n glossaryTerms: [\"2N8w6XJCwZf\"],\n name: \"example-name\",\n description: \"desc\",\n skipDeletionCheck: true,\n});\nconst test = aws.getCallerIdentity({});\nconst testGetRegion = aws.getRegion({});\nconst testGetEnvironmentBlueprint = aws.datazone.getEnvironmentBlueprintOutput({\n domainId: testDomain.id,\n name: \"DefaultDataLake\",\n managed: true,\n});\nconst testEnvironmentBlueprintConfiguration = new aws.datazone.EnvironmentBlueprintConfiguration(\"test\", {\n domainId: testDomain.id,\n environmentBlueprintId: testGetEnvironmentBlueprint.apply(testGetEnvironmentBlueprint =\u003e testGetEnvironmentBlueprint.id),\n provisioningRoleArn: domainExecutionRole.arn,\n enabledRegions: [testGetRegion.then(testGetRegion =\u003e testGetRegion.name)],\n});\nconst testEnvironmentProfile = new aws.datazone.EnvironmentProfile(\"test\", {\n awsAccountId: test.then(test =\u003e test.accountId),\n awsAccountRegion: testGetRegion.then(testGetRegion =\u003e testGetRegion.name),\n description: \"description\",\n environmentBlueprintIdentifier: testGetEnvironmentBlueprint.apply(testGetEnvironmentBlueprint =\u003e testGetEnvironmentBlueprint.id),\n name: \"example-name\",\n projectIdentifier: testProject.id,\n domainIdentifier: testDomain.id,\n userParameters: [{\n name: \"consumerGlueDbName\",\n value: \"value\",\n }],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ndomain_execution_role = aws.iam.Role(\"domain_execution_role\",\n name=\"example-name\",\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": [\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"datazone.amazonaws.com\",\n },\n },\n {\n \"Action\": [\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"cloudformation.amazonaws.com\",\n },\n },\n ],\n }),\n inline_policies=[{\n \"name\": \"example-name\",\n \"policy\": json.dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [{\n \"action\": [\n \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n ],\n \"effect\": \"Allow\",\n \"resource\": \"*\",\n }],\n }),\n }])\ntest_domain = aws.datazone.Domain(\"test\",\n name=\"example-name\",\n domain_execution_role=domain_execution_role.arn)\ntest_security_group = aws.ec2.SecurityGroup(\"test\", name=\"example-name\")\ntest_project = aws.datazone.Project(\"test\",\n domain_identifier=test_domain.id,\n glossary_terms=[\"2N8w6XJCwZf\"],\n name=\"example-name\",\n description=\"desc\",\n skip_deletion_check=True)\ntest = aws.get_caller_identity()\ntest_get_region = aws.get_region()\ntest_get_environment_blueprint = aws.datazone.get_environment_blueprint_output(domain_id=test_domain.id,\n name=\"DefaultDataLake\",\n managed=True)\ntest_environment_blueprint_configuration = aws.datazone.EnvironmentBlueprintConfiguration(\"test\",\n domain_id=test_domain.id,\n environment_blueprint_id=test_get_environment_blueprint.id,\n provisioning_role_arn=domain_execution_role.arn,\n enabled_regions=[test_get_region.name])\ntest_environment_profile = aws.datazone.EnvironmentProfile(\"test\",\n aws_account_id=test.account_id,\n aws_account_region=test_get_region.name,\n description=\"description\",\n environment_blueprint_identifier=test_get_environment_blueprint.id,\n name=\"example-name\",\n project_identifier=test_project.id,\n domain_identifier=test_domain.id,\n user_parameters=[{\n \"name\": \"consumerGlueDbName\",\n \"value\": \"value\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var domainExecutionRole = new Aws.Iam.Role(\"domain_execution_role\", new()\n {\n Name = \"example-name\",\n AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"datazone.amazonaws.com\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"sts:AssumeRole\",\n \"sts:TagSession\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"cloudformation.amazonaws.com\",\n },\n },\n },\n }),\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"example-name\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"datazone:*\",\n \"ram:*\",\n \"sso:*\",\n \"kms:*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n },\n });\n\n var testDomain = new Aws.DataZone.Domain(\"test\", new()\n {\n Name = \"example-name\",\n DomainExecutionRole = domainExecutionRole.Arn,\n });\n\n var testSecurityGroup = new Aws.Ec2.SecurityGroup(\"test\", new()\n {\n Name = \"example-name\",\n });\n\n var testProject = new Aws.DataZone.Project(\"test\", new()\n {\n DomainIdentifier = testDomain.Id,\n GlossaryTerms = new[]\n {\n \"2N8w6XJCwZf\",\n },\n Name = \"example-name\",\n Description = \"desc\",\n SkipDeletionCheck = true,\n });\n\n var test = Aws.GetCallerIdentity.Invoke();\n\n var testGetRegion = Aws.GetRegion.Invoke();\n\n var testGetEnvironmentBlueprint = Aws.DataZone.GetEnvironmentBlueprint.Invoke(new()\n {\n DomainId = testDomain.Id,\n Name = \"DefaultDataLake\",\n Managed = true,\n });\n\n var testEnvironmentBlueprintConfiguration = new Aws.DataZone.EnvironmentBlueprintConfiguration(\"test\", new()\n {\n DomainId = testDomain.Id,\n EnvironmentBlueprintId = testGetEnvironmentBlueprint.Apply(getEnvironmentBlueprintResult =\u003e getEnvironmentBlueprintResult.Id),\n ProvisioningRoleArn = domainExecutionRole.Arn,\n EnabledRegions = new[]\n {\n testGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n });\n\n var testEnvironmentProfile = new Aws.DataZone.EnvironmentProfile(\"test\", new()\n {\n AwsAccountId = test.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n AwsAccountRegion = testGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n Description = \"description\",\n EnvironmentBlueprintIdentifier = testGetEnvironmentBlueprint.Apply(getEnvironmentBlueprintResult =\u003e getEnvironmentBlueprintResult.Id),\n Name = \"example-name\",\n ProjectIdentifier = testProject.Id,\n DomainIdentifier = testDomain.Id,\n UserParameters = new[]\n {\n new Aws.DataZone.Inputs.EnvironmentProfileUserParameterArgs\n {\n Name = \"consumerGlueDbName\",\n Value = \"value\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datazone\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t\t\"sts:TagSession\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"datazone.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t\t\"sts:TagSession\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"cloudformation.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"datazone:*\",\n\t\t\t\t\t\t\"ram:*\",\n\t\t\t\t\t\t\"sso:*\",\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson1 := string(tmpJSON1)\n\t\tdomainExecutionRole, err := iam.NewRole(ctx, \"domain_execution_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\tAssumeRolePolicy: pulumi.String(json0),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\t\t\tPolicy: pulumi.String(json1),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestDomain, err := datazone.NewDomain(ctx, \"test\", \u0026datazone.DomainArgs{\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\tDomainExecutionRole: domainExecutionRole.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroup(ctx, \"test\", \u0026ec2.SecurityGroupArgs{\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestProject, err := datazone.NewProject(ctx, \"test\", \u0026datazone.ProjectArgs{\n\t\t\tDomainIdentifier: testDomain.ID(),\n\t\t\tGlossaryTerms: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"2N8w6XJCwZf\"),\n\t\t\t},\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\tDescription: pulumi.String(\"desc\"),\n\t\t\tSkipDeletionCheck: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttest, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestGetRegion, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestGetEnvironmentBlueprint := datazone.GetEnvironmentBlueprintOutput(ctx, datazone.GetEnvironmentBlueprintOutputArgs{\n\t\t\tDomainId: testDomain.ID(),\n\t\t\tName: pulumi.String(\"DefaultDataLake\"),\n\t\t\tManaged: pulumi.Bool(true),\n\t\t}, nil)\n\t\t_, err = datazone.NewEnvironmentBlueprintConfiguration(ctx, \"test\", \u0026datazone.EnvironmentBlueprintConfigurationArgs{\n\t\t\tDomainId: testDomain.ID(),\n\t\t\tEnvironmentBlueprintId: pulumi.String(testGetEnvironmentBlueprint.ApplyT(func(testGetEnvironmentBlueprint datazone.GetEnvironmentBlueprintResult) (*string, error) {\n\t\t\t\treturn \u0026testGetEnvironmentBlueprint.Id, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tProvisioningRoleArn: domainExecutionRole.Arn,\n\t\t\tEnabledRegions: pulumi.StringArray{\n\t\t\t\tpulumi.String(testGetRegion.Name),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = datazone.NewEnvironmentProfile(ctx, \"test\", \u0026datazone.EnvironmentProfileArgs{\n\t\t\tAwsAccountId: pulumi.String(test.AccountId),\n\t\t\tAwsAccountRegion: pulumi.String(testGetRegion.Name),\n\t\t\tDescription: pulumi.String(\"description\"),\n\t\t\tEnvironmentBlueprintIdentifier: pulumi.String(testGetEnvironmentBlueprint.ApplyT(func(testGetEnvironmentBlueprint datazone.GetEnvironmentBlueprintResult) (*string, error) {\n\t\t\t\treturn \u0026testGetEnvironmentBlueprint.Id, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tName: pulumi.String(\"example-name\"),\n\t\t\tProjectIdentifier: testProject.ID(),\n\t\t\tDomainIdentifier: testDomain.ID(),\n\t\t\tUserParameters: datazone.EnvironmentProfileUserParameterArray{\n\t\t\t\t\u0026datazone.EnvironmentProfileUserParameterArgs{\n\t\t\t\t\tName: pulumi.String(\"consumerGlueDbName\"),\n\t\t\t\t\tValue: pulumi.String(\"value\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport com.pulumi.aws.datazone.Domain;\nimport com.pulumi.aws.datazone.DomainArgs;\nimport com.pulumi.aws.ec2.SecurityGroup;\nimport com.pulumi.aws.ec2.SecurityGroupArgs;\nimport com.pulumi.aws.datazone.Project;\nimport com.pulumi.aws.datazone.ProjectArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.datazone.DatazoneFunctions;\nimport com.pulumi.aws.datazone.inputs.GetEnvironmentBlueprintArgs;\nimport com.pulumi.aws.datazone.EnvironmentBlueprintConfiguration;\nimport com.pulumi.aws.datazone.EnvironmentBlueprintConfigurationArgs;\nimport com.pulumi.aws.datazone.EnvironmentProfile;\nimport com.pulumi.aws.datazone.EnvironmentProfileArgs;\nimport com.pulumi.aws.datazone.inputs.EnvironmentProfileUserParameterArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var domainExecutionRole = new Role(\"domainExecutionRole\", RoleArgs.builder()\n .name(\"example-name\")\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"sts:AssumeRole\", \n \"sts:TagSession\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"datazone.amazonaws.com\")\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"sts:AssumeRole\", \n \"sts:TagSession\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"cloudformation.amazonaws.com\")\n ))\n )\n ))\n )))\n .inlinePolicies(RoleInlinePolicyArgs.builder()\n .name(\"example-name\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"datazone:*\", \n \"ram:*\", \n \"sso:*\", \n \"kms:*\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build())\n .build());\n\n var testDomain = new Domain(\"testDomain\", DomainArgs.builder()\n .name(\"example-name\")\n .domainExecutionRole(domainExecutionRole.arn())\n .build());\n\n var testSecurityGroup = new SecurityGroup(\"testSecurityGroup\", SecurityGroupArgs.builder()\n .name(\"example-name\")\n .build());\n\n var testProject = new Project(\"testProject\", ProjectArgs.builder()\n .domainIdentifier(testDomain.id())\n .glossaryTerms(\"2N8w6XJCwZf\")\n .name(\"example-name\")\n .description(\"desc\")\n .skipDeletionCheck(true)\n .build());\n\n final var test = AwsFunctions.getCallerIdentity();\n\n final var testGetRegion = AwsFunctions.getRegion();\n\n final var testGetEnvironmentBlueprint = DatazoneFunctions.getEnvironmentBlueprint(GetEnvironmentBlueprintArgs.builder()\n .domainId(testDomain.id())\n .name(\"DefaultDataLake\")\n .managed(true)\n .build());\n\n var testEnvironmentBlueprintConfiguration = new EnvironmentBlueprintConfiguration(\"testEnvironmentBlueprintConfiguration\", EnvironmentBlueprintConfigurationArgs.builder()\n .domainId(testDomain.id())\n .environmentBlueprintId(testGetEnvironmentBlueprint.applyValue(getEnvironmentBlueprintResult -\u003e getEnvironmentBlueprintResult).applyValue(testGetEnvironmentBlueprint -\u003e testGetEnvironmentBlueprint.applyValue(getEnvironmentBlueprintResult -\u003e getEnvironmentBlueprintResult.id())))\n .provisioningRoleArn(domainExecutionRole.arn())\n .enabledRegions(testGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var testEnvironmentProfile = new EnvironmentProfile(\"testEnvironmentProfile\", EnvironmentProfileArgs.builder()\n .awsAccountId(test.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .awsAccountRegion(testGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .description(\"description\")\n .environmentBlueprintIdentifier(testGetEnvironmentBlueprint.applyValue(getEnvironmentBlueprintResult -\u003e getEnvironmentBlueprintResult).applyValue(testGetEnvironmentBlueprint -\u003e testGetEnvironmentBlueprint.applyValue(getEnvironmentBlueprintResult -\u003e getEnvironmentBlueprintResult.id())))\n .name(\"example-name\")\n .projectIdentifier(testProject.id())\n .domainIdentifier(testDomain.id())\n .userParameters(EnvironmentProfileUserParameterArgs.builder()\n .name(\"consumerGlueDbName\")\n .value(\"value\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n domainExecutionRole:\n type: aws:iam:Role\n name: domain_execution_role\n properties:\n name: example-name\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - sts:AssumeRole\n - sts:TagSession\n Effect: Allow\n Principal:\n Service: datazone.amazonaws.com\n - Action:\n - sts:AssumeRole\n - sts:TagSession\n Effect: Allow\n Principal:\n Service: cloudformation.amazonaws.com\n inlinePolicies:\n - name: example-name\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - datazone:*\n - ram:*\n - sso:*\n - kms:*\n Effect: Allow\n Resource: '*'\n testDomain:\n type: aws:datazone:Domain\n name: test\n properties:\n name: example-name\n domainExecutionRole: ${domainExecutionRole.arn}\n testSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: test\n properties:\n name: example-name\n testProject:\n type: aws:datazone:Project\n name: test\n properties:\n domainIdentifier: ${testDomain.id}\n glossaryTerms:\n - 2N8w6XJCwZf\n name: example-name\n description: desc\n skipDeletionCheck: true\n testEnvironmentBlueprintConfiguration:\n type: aws:datazone:EnvironmentBlueprintConfiguration\n name: test\n properties:\n domainId: ${testDomain.id}\n environmentBlueprintId: ${testGetEnvironmentBlueprint.id}\n provisioningRoleArn: ${domainExecutionRole.arn}\n enabledRegions:\n - ${testGetRegion.name}\n testEnvironmentProfile:\n type: aws:datazone:EnvironmentProfile\n name: test\n properties:\n awsAccountId: ${test.accountId}\n awsAccountRegion: ${testGetRegion.name}\n description: description\n environmentBlueprintIdentifier: ${testGetEnvironmentBlueprint.id}\n name: example-name\n projectIdentifier: ${testProject.id}\n domainIdentifier: ${testDomain.id}\n userParameters:\n - name: consumerGlueDbName\n value: value\nvariables:\n test:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n testGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n testGetEnvironmentBlueprint:\n fn::invoke:\n Function: aws:datazone:getEnvironmentBlueprint\n Arguments:\n domainId: ${testDomain.id}\n name: DefaultDataLake\n managed: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DataZone Environment Profile using a comma-delimited string combining `id` and `domain_identifier`. For example:\n\n```sh\n$ pulumi import aws:datazone/environmentProfile:EnvironmentProfile example environment_profile-id-12345678,domain-id-12345678\n```\n", "properties": { "awsAccountId": { "type": "string", @@ -219917,7 +219917,7 @@ } }, "aws:directconnect/hostedPrivateVirtualInterfaceAccepter:HostedPrivateVirtualInterfaceAccepter": { - "description": "Provides a resource to manage the accepter's side of a Direct Connect hosted private virtual interface.\nThis resource accepts ownership of a private virtual interface created by another AWS account.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst accepter = aws.getCallerIdentity({});\n// Accepter's side of the VIF.\nconst vpnGw = new aws.ec2.VpnGateway(\"vpn_gw\", {});\n// Creator's side of the VIF\nconst creator = new aws.directconnect.HostedPrivateVirtualInterface(\"creator\", {\n connectionId: \"dxcon-zzzzzzzz\",\n ownerAccountId: accepter.then(accepter =\u003e accepter.accountId),\n name: \"vif-foo\",\n vlan: 4094,\n addressFamily: \"ipv4\",\n bgpAsn: 65352,\n}, {\n dependsOn: [vpnGw],\n});\nconst accepterHostedPrivateVirtualInterfaceAccepter = new aws.directconnect.HostedPrivateVirtualInterfaceAccepter(\"accepter\", {\n virtualInterfaceId: creator.id,\n vpnGatewayId: vpnGw.id,\n tags: {\n Side: \"Accepter\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naccepter = aws.get_caller_identity()\n# Accepter's side of the VIF.\nvpn_gw = aws.ec2.VpnGateway(\"vpn_gw\")\n# Creator's side of the VIF\ncreator = aws.directconnect.HostedPrivateVirtualInterface(\"creator\",\n connection_id=\"dxcon-zzzzzzzz\",\n owner_account_id=accepter.account_id,\n name=\"vif-foo\",\n vlan=4094,\n address_family=\"ipv4\",\n bgp_asn=65352,\n opts = pulumi.ResourceOptions(depends_on=[vpn_gw]))\naccepter_hosted_private_virtual_interface_accepter = aws.directconnect.HostedPrivateVirtualInterfaceAccepter(\"accepter\",\n virtual_interface_id=creator.id,\n vpn_gateway_id=vpn_gw.id,\n tags={\n \"Side\": \"Accepter\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var accepter = Aws.GetCallerIdentity.Invoke();\n\n // Accepter's side of the VIF.\n var vpnGw = new Aws.Ec2.VpnGateway(\"vpn_gw\");\n\n // Creator's side of the VIF\n var creator = new Aws.DirectConnect.HostedPrivateVirtualInterface(\"creator\", new()\n {\n ConnectionId = \"dxcon-zzzzzzzz\",\n OwnerAccountId = accepter.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Name = \"vif-foo\",\n Vlan = 4094,\n AddressFamily = \"ipv4\",\n BgpAsn = 65352,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n vpnGw,\n },\n });\n\n var accepterHostedPrivateVirtualInterfaceAccepter = new Aws.DirectConnect.HostedPrivateVirtualInterfaceAccepter(\"accepter\", new()\n {\n VirtualInterfaceId = creator.Id,\n VpnGatewayId = vpnGw.Id,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taccepter, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the VIF.\n\t\tvpnGw, err := ec2.NewVpnGateway(ctx, \"vpn_gw\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Creator's side of the VIF\n\t\tcreator, err := directconnect.NewHostedPrivateVirtualInterface(ctx, \"creator\", \u0026directconnect.HostedPrivateVirtualInterfaceArgs{\n\t\t\tConnectionId: pulumi.String(\"dxcon-zzzzzzzz\"),\n\t\t\tOwnerAccountId: pulumi.String(accepter.AccountId),\n\t\t\tName: pulumi.String(\"vif-foo\"),\n\t\t\tVlan: pulumi.Int(4094),\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tBgpAsn: pulumi.Int(65352),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tvpnGw,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = directconnect.NewHostedPrivateVirtualInterfaceAccepter(ctx, \"accepter\", \u0026directconnect.HostedPrivateVirtualInterfaceAccepterArgs{\n\t\t\tVirtualInterfaceId: creator.ID(),\n\t\t\tVpnGatewayId: vpnGw.ID(),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpnGateway;\nimport com.pulumi.aws.directconnect.HostedPrivateVirtualInterface;\nimport com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceArgs;\nimport com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceAccepter;\nimport com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceAccepterArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var accepter = AwsFunctions.getCallerIdentity();\n\n // Accepter's side of the VIF.\n var vpnGw = new VpnGateway(\"vpnGw\");\n\n // Creator's side of the VIF\n var creator = new HostedPrivateVirtualInterface(\"creator\", HostedPrivateVirtualInterfaceArgs.builder()\n .connectionId(\"dxcon-zzzzzzzz\")\n .ownerAccountId(accepter.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .name(\"vif-foo\")\n .vlan(4094)\n .addressFamily(\"ipv4\")\n .bgpAsn(65352)\n .build(), CustomResourceOptions.builder()\n .dependsOn(vpnGw)\n .build());\n\n var accepterHostedPrivateVirtualInterfaceAccepter = new HostedPrivateVirtualInterfaceAccepter(\"accepterHostedPrivateVirtualInterfaceAccepter\", HostedPrivateVirtualInterfaceAccepterArgs.builder()\n .virtualInterfaceId(creator.id())\n .vpnGatewayId(vpnGw.id())\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Creator's side of the VIF\n creator:\n type: aws:directconnect:HostedPrivateVirtualInterface\n properties:\n connectionId: dxcon-zzzzzzzz\n ownerAccountId: ${accepter.accountId}\n name: vif-foo\n vlan: 4094\n addressFamily: ipv4\n bgpAsn: 65352 # The aws_dx_hosted_private_virtual_interface\n # # must be destroyed before the aws_vpn_gateway.\n options:\n dependson:\n - ${vpnGw}\n # Accepter's side of the VIF.\n vpnGw:\n type: aws:ec2:VpnGateway\n name: vpn_gw\n accepterHostedPrivateVirtualInterfaceAccepter:\n type: aws:directconnect:HostedPrivateVirtualInterfaceAccepter\n name: accepter\n properties:\n virtualInterfaceId: ${creator.id}\n vpnGatewayId: ${vpnGw.id}\n tags:\n Side: Accepter\nvariables:\n accepter:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Direct Connect hosted private virtual interfaces using the VIF `id`. For example:\n\n```sh\n$ pulumi import aws:directconnect/hostedPrivateVirtualInterfaceAccepter:HostedPrivateVirtualInterfaceAccepter test dxvif-33cc44dd\n```\n", + "description": "Provides a resource to manage the accepter's side of a Direct Connect hosted private virtual interface.\nThis resource accepts ownership of a private virtual interface created by another AWS account.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst accepter = aws.getCallerIdentity({});\n// Accepter's side of the VIF.\nconst vpnGw = new aws.ec2.VpnGateway(\"vpn_gw\", {});\n// Creator's side of the VIF\nconst creator = new aws.directconnect.HostedPrivateVirtualInterface(\"creator\", {\n connectionId: \"dxcon-zzzzzzzz\",\n ownerAccountId: accepter.then(accepter =\u003e accepter.accountId),\n name: \"vif-foo\",\n vlan: 4094,\n addressFamily: \"ipv4\",\n bgpAsn: 65352,\n}, {\n dependsOn: [vpnGw],\n});\nconst accepterHostedPrivateVirtualInterfaceAccepter = new aws.directconnect.HostedPrivateVirtualInterfaceAccepter(\"accepter\", {\n virtualInterfaceId: creator.id,\n vpnGatewayId: vpnGw.id,\n tags: {\n Side: \"Accepter\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naccepter = aws.get_caller_identity()\n# Accepter's side of the VIF.\nvpn_gw = aws.ec2.VpnGateway(\"vpn_gw\")\n# Creator's side of the VIF\ncreator = aws.directconnect.HostedPrivateVirtualInterface(\"creator\",\n connection_id=\"dxcon-zzzzzzzz\",\n owner_account_id=accepter.account_id,\n name=\"vif-foo\",\n vlan=4094,\n address_family=\"ipv4\",\n bgp_asn=65352,\n opts = pulumi.ResourceOptions(depends_on=[vpn_gw]))\naccepter_hosted_private_virtual_interface_accepter = aws.directconnect.HostedPrivateVirtualInterfaceAccepter(\"accepter\",\n virtual_interface_id=creator.id,\n vpn_gateway_id=vpn_gw.id,\n tags={\n \"Side\": \"Accepter\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var accepter = Aws.GetCallerIdentity.Invoke();\n\n // Accepter's side of the VIF.\n var vpnGw = new Aws.Ec2.VpnGateway(\"vpn_gw\");\n\n // Creator's side of the VIF\n var creator = new Aws.DirectConnect.HostedPrivateVirtualInterface(\"creator\", new()\n {\n ConnectionId = \"dxcon-zzzzzzzz\",\n OwnerAccountId = accepter.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Name = \"vif-foo\",\n Vlan = 4094,\n AddressFamily = \"ipv4\",\n BgpAsn = 65352,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n vpnGw,\n },\n });\n\n var accepterHostedPrivateVirtualInterfaceAccepter = new Aws.DirectConnect.HostedPrivateVirtualInterfaceAccepter(\"accepter\", new()\n {\n VirtualInterfaceId = creator.Id,\n VpnGatewayId = vpnGw.Id,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taccepter, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the VIF.\n\t\tvpnGw, err := ec2.NewVpnGateway(ctx, \"vpn_gw\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Creator's side of the VIF\n\t\tcreator, err := directconnect.NewHostedPrivateVirtualInterface(ctx, \"creator\", \u0026directconnect.HostedPrivateVirtualInterfaceArgs{\n\t\t\tConnectionId: pulumi.String(\"dxcon-zzzzzzzz\"),\n\t\t\tOwnerAccountId: pulumi.String(accepter.AccountId),\n\t\t\tName: pulumi.String(\"vif-foo\"),\n\t\t\tVlan: pulumi.Int(4094),\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tBgpAsn: pulumi.Int(65352),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tvpnGw,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = directconnect.NewHostedPrivateVirtualInterfaceAccepter(ctx, \"accepter\", \u0026directconnect.HostedPrivateVirtualInterfaceAccepterArgs{\n\t\t\tVirtualInterfaceId: creator.ID(),\n\t\t\tVpnGatewayId: vpnGw.ID(),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpnGateway;\nimport com.pulumi.aws.directconnect.HostedPrivateVirtualInterface;\nimport com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceArgs;\nimport com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceAccepter;\nimport com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceAccepterArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var accepter = AwsFunctions.getCallerIdentity();\n\n // Accepter's side of the VIF.\n var vpnGw = new VpnGateway(\"vpnGw\");\n\n // Creator's side of the VIF\n var creator = new HostedPrivateVirtualInterface(\"creator\", HostedPrivateVirtualInterfaceArgs.builder()\n .connectionId(\"dxcon-zzzzzzzz\")\n .ownerAccountId(accepter.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .name(\"vif-foo\")\n .vlan(4094)\n .addressFamily(\"ipv4\")\n .bgpAsn(65352)\n .build(), CustomResourceOptions.builder()\n .dependsOn(vpnGw)\n .build());\n\n var accepterHostedPrivateVirtualInterfaceAccepter = new HostedPrivateVirtualInterfaceAccepter(\"accepterHostedPrivateVirtualInterfaceAccepter\", HostedPrivateVirtualInterfaceAccepterArgs.builder()\n .virtualInterfaceId(creator.id())\n .vpnGatewayId(vpnGw.id())\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Creator's side of the VIF\n creator:\n type: aws:directconnect:HostedPrivateVirtualInterface\n properties:\n connectionId: dxcon-zzzzzzzz\n ownerAccountId: ${accepter.accountId}\n name: vif-foo\n vlan: 4094\n addressFamily: ipv4\n bgpAsn: 65352 # The aws_dx_hosted_private_virtual_interface\n # # must be destroyed before the aws_vpn_gateway.\n options:\n dependson:\n - ${vpnGw}\n # Accepter's side of the VIF.\n vpnGw:\n type: aws:ec2:VpnGateway\n name: vpn_gw\n accepterHostedPrivateVirtualInterfaceAccepter:\n type: aws:directconnect:HostedPrivateVirtualInterfaceAccepter\n name: accepter\n properties:\n virtualInterfaceId: ${creator.id}\n vpnGatewayId: ${vpnGw.id}\n tags:\n Side: Accepter\nvariables:\n accepter:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Direct Connect hosted private virtual interfaces using the VIF `id`. For example:\n\n```sh\n$ pulumi import aws:directconnect/hostedPrivateVirtualInterfaceAccepter:HostedPrivateVirtualInterfaceAccepter test dxvif-33cc44dd\n```\n", "properties": { "arn": { "type": "string", @@ -220232,7 +220232,7 @@ } }, "aws:directconnect/hostedPublicVirtualInterfaceAccepter:HostedPublicVirtualInterfaceAccepter": { - "description": "Provides a resource to manage the accepter's side of a Direct Connect hosted public virtual interface.\nThis resource accepts ownership of a public virtual interface created by another AWS account.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst accepter = aws.getCallerIdentity({});\n// Creator's side of the VIF\nconst creator = new aws.directconnect.HostedPublicVirtualInterface(\"creator\", {\n connectionId: \"dxcon-zzzzzzzz\",\n ownerAccountId: accepter.then(accepter =\u003e accepter.accountId),\n name: \"vif-foo\",\n vlan: 4094,\n addressFamily: \"ipv4\",\n bgpAsn: 65352,\n customerAddress: \"175.45.176.1/30\",\n amazonAddress: \"175.45.176.2/30\",\n routeFilterPrefixes: [\n \"210.52.109.0/24\",\n \"175.45.176.0/22\",\n ],\n});\n// Accepter's side of the VIF.\nconst accepterHostedPublicVirtualInterfaceAccepter = new aws.directconnect.HostedPublicVirtualInterfaceAccepter(\"accepter\", {\n virtualInterfaceId: creator.id,\n tags: {\n Side: \"Accepter\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naccepter = aws.get_caller_identity()\n# Creator's side of the VIF\ncreator = aws.directconnect.HostedPublicVirtualInterface(\"creator\",\n connection_id=\"dxcon-zzzzzzzz\",\n owner_account_id=accepter.account_id,\n name=\"vif-foo\",\n vlan=4094,\n address_family=\"ipv4\",\n bgp_asn=65352,\n customer_address=\"175.45.176.1/30\",\n amazon_address=\"175.45.176.2/30\",\n route_filter_prefixes=[\n \"210.52.109.0/24\",\n \"175.45.176.0/22\",\n ])\n# Accepter's side of the VIF.\naccepter_hosted_public_virtual_interface_accepter = aws.directconnect.HostedPublicVirtualInterfaceAccepter(\"accepter\",\n virtual_interface_id=creator.id,\n tags={\n \"Side\": \"Accepter\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var accepter = Aws.GetCallerIdentity.Invoke();\n\n // Creator's side of the VIF\n var creator = new Aws.DirectConnect.HostedPublicVirtualInterface(\"creator\", new()\n {\n ConnectionId = \"dxcon-zzzzzzzz\",\n OwnerAccountId = accepter.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Name = \"vif-foo\",\n Vlan = 4094,\n AddressFamily = \"ipv4\",\n BgpAsn = 65352,\n CustomerAddress = \"175.45.176.1/30\",\n AmazonAddress = \"175.45.176.2/30\",\n RouteFilterPrefixes = new[]\n {\n \"210.52.109.0/24\",\n \"175.45.176.0/22\",\n },\n });\n\n // Accepter's side of the VIF.\n var accepterHostedPublicVirtualInterfaceAccepter = new Aws.DirectConnect.HostedPublicVirtualInterfaceAccepter(\"accepter\", new()\n {\n VirtualInterfaceId = creator.Id,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taccepter, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Creator's side of the VIF\n\t\tcreator, err := directconnect.NewHostedPublicVirtualInterface(ctx, \"creator\", \u0026directconnect.HostedPublicVirtualInterfaceArgs{\n\t\t\tConnectionId: pulumi.String(\"dxcon-zzzzzzzz\"),\n\t\t\tOwnerAccountId: pulumi.String(accepter.AccountId),\n\t\t\tName: pulumi.String(\"vif-foo\"),\n\t\t\tVlan: pulumi.Int(4094),\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tBgpAsn: pulumi.Int(65352),\n\t\t\tCustomerAddress: pulumi.String(\"175.45.176.1/30\"),\n\t\t\tAmazonAddress: pulumi.String(\"175.45.176.2/30\"),\n\t\t\tRouteFilterPrefixes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"210.52.109.0/24\"),\n\t\t\t\tpulumi.String(\"175.45.176.0/22\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the VIF.\n\t\t_, err = directconnect.NewHostedPublicVirtualInterfaceAccepter(ctx, \"accepter\", \u0026directconnect.HostedPublicVirtualInterfaceAccepterArgs{\n\t\t\tVirtualInterfaceId: creator.ID(),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.directconnect.HostedPublicVirtualInterface;\nimport com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceArgs;\nimport com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceAccepter;\nimport com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var accepter = AwsFunctions.getCallerIdentity();\n\n // Creator's side of the VIF\n var creator = new HostedPublicVirtualInterface(\"creator\", HostedPublicVirtualInterfaceArgs.builder()\n .connectionId(\"dxcon-zzzzzzzz\")\n .ownerAccountId(accepter.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .name(\"vif-foo\")\n .vlan(4094)\n .addressFamily(\"ipv4\")\n .bgpAsn(65352)\n .customerAddress(\"175.45.176.1/30\")\n .amazonAddress(\"175.45.176.2/30\")\n .routeFilterPrefixes( \n \"210.52.109.0/24\",\n \"175.45.176.0/22\")\n .build());\n\n // Accepter's side of the VIF.\n var accepterHostedPublicVirtualInterfaceAccepter = new HostedPublicVirtualInterfaceAccepter(\"accepterHostedPublicVirtualInterfaceAccepter\", HostedPublicVirtualInterfaceAccepterArgs.builder()\n .virtualInterfaceId(creator.id())\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Creator's side of the VIF\n creator:\n type: aws:directconnect:HostedPublicVirtualInterface\n properties:\n connectionId: dxcon-zzzzzzzz\n ownerAccountId: ${accepter.accountId}\n name: vif-foo\n vlan: 4094\n addressFamily: ipv4\n bgpAsn: 65352\n customerAddress: 175.45.176.1/30\n amazonAddress: 175.45.176.2/30\n routeFilterPrefixes:\n - 210.52.109.0/24\n - 175.45.176.0/22\n # Accepter's side of the VIF.\n accepterHostedPublicVirtualInterfaceAccepter:\n type: aws:directconnect:HostedPublicVirtualInterfaceAccepter\n name: accepter\n properties:\n virtualInterfaceId: ${creator.id}\n tags:\n Side: Accepter\nvariables:\n accepter:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Direct Connect hosted public virtual interfaces using the VIF `id`. For example:\n\n```sh\n$ pulumi import aws:directconnect/hostedPublicVirtualInterfaceAccepter:HostedPublicVirtualInterfaceAccepter test dxvif-33cc44dd\n```\n", + "description": "Provides a resource to manage the accepter's side of a Direct Connect hosted public virtual interface.\nThis resource accepts ownership of a public virtual interface created by another AWS account.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst accepter = aws.getCallerIdentity({});\n// Creator's side of the VIF\nconst creator = new aws.directconnect.HostedPublicVirtualInterface(\"creator\", {\n connectionId: \"dxcon-zzzzzzzz\",\n ownerAccountId: accepter.then(accepter =\u003e accepter.accountId),\n name: \"vif-foo\",\n vlan: 4094,\n addressFamily: \"ipv4\",\n bgpAsn: 65352,\n customerAddress: \"175.45.176.1/30\",\n amazonAddress: \"175.45.176.2/30\",\n routeFilterPrefixes: [\n \"210.52.109.0/24\",\n \"175.45.176.0/22\",\n ],\n});\n// Accepter's side of the VIF.\nconst accepterHostedPublicVirtualInterfaceAccepter = new aws.directconnect.HostedPublicVirtualInterfaceAccepter(\"accepter\", {\n virtualInterfaceId: creator.id,\n tags: {\n Side: \"Accepter\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naccepter = aws.get_caller_identity()\n# Creator's side of the VIF\ncreator = aws.directconnect.HostedPublicVirtualInterface(\"creator\",\n connection_id=\"dxcon-zzzzzzzz\",\n owner_account_id=accepter.account_id,\n name=\"vif-foo\",\n vlan=4094,\n address_family=\"ipv4\",\n bgp_asn=65352,\n customer_address=\"175.45.176.1/30\",\n amazon_address=\"175.45.176.2/30\",\n route_filter_prefixes=[\n \"210.52.109.0/24\",\n \"175.45.176.0/22\",\n ])\n# Accepter's side of the VIF.\naccepter_hosted_public_virtual_interface_accepter = aws.directconnect.HostedPublicVirtualInterfaceAccepter(\"accepter\",\n virtual_interface_id=creator.id,\n tags={\n \"Side\": \"Accepter\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var accepter = Aws.GetCallerIdentity.Invoke();\n\n // Creator's side of the VIF\n var creator = new Aws.DirectConnect.HostedPublicVirtualInterface(\"creator\", new()\n {\n ConnectionId = \"dxcon-zzzzzzzz\",\n OwnerAccountId = accepter.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Name = \"vif-foo\",\n Vlan = 4094,\n AddressFamily = \"ipv4\",\n BgpAsn = 65352,\n CustomerAddress = \"175.45.176.1/30\",\n AmazonAddress = \"175.45.176.2/30\",\n RouteFilterPrefixes = new[]\n {\n \"210.52.109.0/24\",\n \"175.45.176.0/22\",\n },\n });\n\n // Accepter's side of the VIF.\n var accepterHostedPublicVirtualInterfaceAccepter = new Aws.DirectConnect.HostedPublicVirtualInterfaceAccepter(\"accepter\", new()\n {\n VirtualInterfaceId = creator.Id,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taccepter, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Creator's side of the VIF\n\t\tcreator, err := directconnect.NewHostedPublicVirtualInterface(ctx, \"creator\", \u0026directconnect.HostedPublicVirtualInterfaceArgs{\n\t\t\tConnectionId: pulumi.String(\"dxcon-zzzzzzzz\"),\n\t\t\tOwnerAccountId: pulumi.String(accepter.AccountId),\n\t\t\tName: pulumi.String(\"vif-foo\"),\n\t\t\tVlan: pulumi.Int(4094),\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tBgpAsn: pulumi.Int(65352),\n\t\t\tCustomerAddress: pulumi.String(\"175.45.176.1/30\"),\n\t\t\tAmazonAddress: pulumi.String(\"175.45.176.2/30\"),\n\t\t\tRouteFilterPrefixes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"210.52.109.0/24\"),\n\t\t\t\tpulumi.String(\"175.45.176.0/22\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the VIF.\n\t\t_, err = directconnect.NewHostedPublicVirtualInterfaceAccepter(ctx, \"accepter\", \u0026directconnect.HostedPublicVirtualInterfaceAccepterArgs{\n\t\t\tVirtualInterfaceId: creator.ID(),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.directconnect.HostedPublicVirtualInterface;\nimport com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceArgs;\nimport com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceAccepter;\nimport com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var accepter = AwsFunctions.getCallerIdentity();\n\n // Creator's side of the VIF\n var creator = new HostedPublicVirtualInterface(\"creator\", HostedPublicVirtualInterfaceArgs.builder()\n .connectionId(\"dxcon-zzzzzzzz\")\n .ownerAccountId(accepter.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .name(\"vif-foo\")\n .vlan(4094)\n .addressFamily(\"ipv4\")\n .bgpAsn(65352)\n .customerAddress(\"175.45.176.1/30\")\n .amazonAddress(\"175.45.176.2/30\")\n .routeFilterPrefixes( \n \"210.52.109.0/24\",\n \"175.45.176.0/22\")\n .build());\n\n // Accepter's side of the VIF.\n var accepterHostedPublicVirtualInterfaceAccepter = new HostedPublicVirtualInterfaceAccepter(\"accepterHostedPublicVirtualInterfaceAccepter\", HostedPublicVirtualInterfaceAccepterArgs.builder()\n .virtualInterfaceId(creator.id())\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Creator's side of the VIF\n creator:\n type: aws:directconnect:HostedPublicVirtualInterface\n properties:\n connectionId: dxcon-zzzzzzzz\n ownerAccountId: ${accepter.accountId}\n name: vif-foo\n vlan: 4094\n addressFamily: ipv4\n bgpAsn: 65352\n customerAddress: 175.45.176.1/30\n amazonAddress: 175.45.176.2/30\n routeFilterPrefixes:\n - 210.52.109.0/24\n - 175.45.176.0/22\n # Accepter's side of the VIF.\n accepterHostedPublicVirtualInterfaceAccepter:\n type: aws:directconnect:HostedPublicVirtualInterfaceAccepter\n name: accepter\n properties:\n virtualInterfaceId: ${creator.id}\n tags:\n Side: Accepter\nvariables:\n accepter:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Direct Connect hosted public virtual interfaces using the VIF `id`. For example:\n\n```sh\n$ pulumi import aws:directconnect/hostedPublicVirtualInterfaceAccepter:HostedPublicVirtualInterfaceAccepter test dxvif-33cc44dd\n```\n", "properties": { "arn": { "type": "string", @@ -220517,7 +220517,7 @@ } }, "aws:directconnect/hostedTransitVirtualInterfaceAcceptor:HostedTransitVirtualInterfaceAcceptor": { - "description": "Provides a resource to manage the accepter's side of a Direct Connect hosted transit virtual interface.\nThis resource accepts ownership of a transit virtual interface created by another AWS account.\n\n\u003e **NOTE:** AWS allows a Direct Connect hosted transit virtual interface to be deleted from either the allocator's or accepter's side. However, this provider only allows the Direct Connect hosted transit virtual interface to be deleted from the allocator's side by removing the corresponding `aws.directconnect.HostedTransitVirtualInterface` resource from your configuration. Removing a `aws.directconnect.HostedTransitVirtualInterfaceAcceptor` resource from your configuration will remove it from your statefile and management, **but will not delete the Direct Connect virtual interface.**\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst accepter = aws.getCallerIdentity({});\n// Accepter's side of the VIF.\nconst example = new aws.directconnect.Gateway(\"example\", {\n name: \"tf-dxg-example\",\n amazonSideAsn: \"64512\",\n});\n// Creator's side of the VIF\nconst creator = new aws.directconnect.HostedTransitVirtualInterface(\"creator\", {\n connectionId: \"dxcon-zzzzzzzz\",\n ownerAccountId: accepter.then(accepter =\u003e accepter.accountId),\n name: \"tf-transit-vif-example\",\n vlan: 4094,\n addressFamily: \"ipv4\",\n bgpAsn: 65352,\n}, {\n dependsOn: [example],\n});\nconst accepterHostedTransitVirtualInterfaceAcceptor = new aws.directconnect.HostedTransitVirtualInterfaceAcceptor(\"accepter\", {\n virtualInterfaceId: creator.id,\n dxGatewayId: example.id,\n tags: {\n Side: \"Accepter\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naccepter = aws.get_caller_identity()\n# Accepter's side of the VIF.\nexample = aws.directconnect.Gateway(\"example\",\n name=\"tf-dxg-example\",\n amazon_side_asn=\"64512\")\n# Creator's side of the VIF\ncreator = aws.directconnect.HostedTransitVirtualInterface(\"creator\",\n connection_id=\"dxcon-zzzzzzzz\",\n owner_account_id=accepter.account_id,\n name=\"tf-transit-vif-example\",\n vlan=4094,\n address_family=\"ipv4\",\n bgp_asn=65352,\n opts = pulumi.ResourceOptions(depends_on=[example]))\naccepter_hosted_transit_virtual_interface_acceptor = aws.directconnect.HostedTransitVirtualInterfaceAcceptor(\"accepter\",\n virtual_interface_id=creator.id,\n dx_gateway_id=example.id,\n tags={\n \"Side\": \"Accepter\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var accepter = Aws.GetCallerIdentity.Invoke();\n\n // Accepter's side of the VIF.\n var example = new Aws.DirectConnect.Gateway(\"example\", new()\n {\n Name = \"tf-dxg-example\",\n AmazonSideAsn = \"64512\",\n });\n\n // Creator's side of the VIF\n var creator = new Aws.DirectConnect.HostedTransitVirtualInterface(\"creator\", new()\n {\n ConnectionId = \"dxcon-zzzzzzzz\",\n OwnerAccountId = accepter.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Name = \"tf-transit-vif-example\",\n Vlan = 4094,\n AddressFamily = \"ipv4\",\n BgpAsn = 65352,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n example,\n },\n });\n\n var accepterHostedTransitVirtualInterfaceAcceptor = new Aws.DirectConnect.HostedTransitVirtualInterfaceAcceptor(\"accepter\", new()\n {\n VirtualInterfaceId = creator.Id,\n DxGatewayId = example.Id,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taccepter, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the VIF.\n\t\texample, err := directconnect.NewGateway(ctx, \"example\", \u0026directconnect.GatewayArgs{\n\t\t\tName: pulumi.String(\"tf-dxg-example\"),\n\t\t\tAmazonSideAsn: pulumi.String(\"64512\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Creator's side of the VIF\n\t\tcreator, err := directconnect.NewHostedTransitVirtualInterface(ctx, \"creator\", \u0026directconnect.HostedTransitVirtualInterfaceArgs{\n\t\t\tConnectionId: pulumi.String(\"dxcon-zzzzzzzz\"),\n\t\t\tOwnerAccountId: pulumi.String(accepter.AccountId),\n\t\t\tName: pulumi.String(\"tf-transit-vif-example\"),\n\t\t\tVlan: pulumi.Int(4094),\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tBgpAsn: pulumi.Int(65352),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texample,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = directconnect.NewHostedTransitVirtualInterfaceAcceptor(ctx, \"accepter\", \u0026directconnect.HostedTransitVirtualInterfaceAcceptorArgs{\n\t\t\tVirtualInterfaceId: creator.ID(),\n\t\t\tDxGatewayId: example.ID(),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.directconnect.Gateway;\nimport com.pulumi.aws.directconnect.GatewayArgs;\nimport com.pulumi.aws.directconnect.HostedTransitVirtualInterface;\nimport com.pulumi.aws.directconnect.HostedTransitVirtualInterfaceArgs;\nimport com.pulumi.aws.directconnect.HostedTransitVirtualInterfaceAcceptor;\nimport com.pulumi.aws.directconnect.HostedTransitVirtualInterfaceAcceptorArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var accepter = AwsFunctions.getCallerIdentity();\n\n // Accepter's side of the VIF.\n var example = new Gateway(\"example\", GatewayArgs.builder()\n .name(\"tf-dxg-example\")\n .amazonSideAsn(64512)\n .build());\n\n // Creator's side of the VIF\n var creator = new HostedTransitVirtualInterface(\"creator\", HostedTransitVirtualInterfaceArgs.builder()\n .connectionId(\"dxcon-zzzzzzzz\")\n .ownerAccountId(accepter.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .name(\"tf-transit-vif-example\")\n .vlan(4094)\n .addressFamily(\"ipv4\")\n .bgpAsn(65352)\n .build(), CustomResourceOptions.builder()\n .dependsOn(example)\n .build());\n\n var accepterHostedTransitVirtualInterfaceAcceptor = new HostedTransitVirtualInterfaceAcceptor(\"accepterHostedTransitVirtualInterfaceAcceptor\", HostedTransitVirtualInterfaceAcceptorArgs.builder()\n .virtualInterfaceId(creator.id())\n .dxGatewayId(example.id())\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Creator's side of the VIF\n creator:\n type: aws:directconnect:HostedTransitVirtualInterface\n properties:\n connectionId: dxcon-zzzzzzzz\n ownerAccountId: ${accepter.accountId}\n name: tf-transit-vif-example\n vlan: 4094\n addressFamily: ipv4\n bgpAsn: 65352 # The aws_dx_hosted_transit_virtual_interface\n # # must be destroyed before the aws_dx_gateway.\n options:\n dependson:\n - ${example}\n # Accepter's side of the VIF.\n example:\n type: aws:directconnect:Gateway\n properties:\n name: tf-dxg-example\n amazonSideAsn: 64512\n accepterHostedTransitVirtualInterfaceAcceptor:\n type: aws:directconnect:HostedTransitVirtualInterfaceAcceptor\n name: accepter\n properties:\n virtualInterfaceId: ${creator.id}\n dxGatewayId: ${example.id}\n tags:\n Side: Accepter\nvariables:\n accepter:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Direct Connect hosted transit virtual interfaces using the VIF `id`. For example:\n\n```sh\n$ pulumi import aws:directconnect/hostedTransitVirtualInterfaceAcceptor:HostedTransitVirtualInterfaceAcceptor test dxvif-33cc44dd\n```\n", + "description": "Provides a resource to manage the accepter's side of a Direct Connect hosted transit virtual interface.\nThis resource accepts ownership of a transit virtual interface created by another AWS account.\n\n\u003e **NOTE:** AWS allows a Direct Connect hosted transit virtual interface to be deleted from either the allocator's or accepter's side. However, this provider only allows the Direct Connect hosted transit virtual interface to be deleted from the allocator's side by removing the corresponding `aws.directconnect.HostedTransitVirtualInterface` resource from your configuration. Removing a `aws.directconnect.HostedTransitVirtualInterfaceAcceptor` resource from your configuration will remove it from your statefile and management, **but will not delete the Direct Connect virtual interface.**\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst accepter = aws.getCallerIdentity({});\n// Accepter's side of the VIF.\nconst example = new aws.directconnect.Gateway(\"example\", {\n name: \"tf-dxg-example\",\n amazonSideAsn: \"64512\",\n});\n// Creator's side of the VIF\nconst creator = new aws.directconnect.HostedTransitVirtualInterface(\"creator\", {\n connectionId: \"dxcon-zzzzzzzz\",\n ownerAccountId: accepter.then(accepter =\u003e accepter.accountId),\n name: \"tf-transit-vif-example\",\n vlan: 4094,\n addressFamily: \"ipv4\",\n bgpAsn: 65352,\n}, {\n dependsOn: [example],\n});\nconst accepterHostedTransitVirtualInterfaceAcceptor = new aws.directconnect.HostedTransitVirtualInterfaceAcceptor(\"accepter\", {\n virtualInterfaceId: creator.id,\n dxGatewayId: example.id,\n tags: {\n Side: \"Accepter\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\naccepter = aws.get_caller_identity()\n# Accepter's side of the VIF.\nexample = aws.directconnect.Gateway(\"example\",\n name=\"tf-dxg-example\",\n amazon_side_asn=\"64512\")\n# Creator's side of the VIF\ncreator = aws.directconnect.HostedTransitVirtualInterface(\"creator\",\n connection_id=\"dxcon-zzzzzzzz\",\n owner_account_id=accepter.account_id,\n name=\"tf-transit-vif-example\",\n vlan=4094,\n address_family=\"ipv4\",\n bgp_asn=65352,\n opts = pulumi.ResourceOptions(depends_on=[example]))\naccepter_hosted_transit_virtual_interface_acceptor = aws.directconnect.HostedTransitVirtualInterfaceAcceptor(\"accepter\",\n virtual_interface_id=creator.id,\n dx_gateway_id=example.id,\n tags={\n \"Side\": \"Accepter\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var accepter = Aws.GetCallerIdentity.Invoke();\n\n // Accepter's side of the VIF.\n var example = new Aws.DirectConnect.Gateway(\"example\", new()\n {\n Name = \"tf-dxg-example\",\n AmazonSideAsn = \"64512\",\n });\n\n // Creator's side of the VIF\n var creator = new Aws.DirectConnect.HostedTransitVirtualInterface(\"creator\", new()\n {\n ConnectionId = \"dxcon-zzzzzzzz\",\n OwnerAccountId = accepter.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Name = \"tf-transit-vif-example\",\n Vlan = 4094,\n AddressFamily = \"ipv4\",\n BgpAsn = 65352,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n example,\n },\n });\n\n var accepterHostedTransitVirtualInterfaceAcceptor = new Aws.DirectConnect.HostedTransitVirtualInterfaceAcceptor(\"accepter\", new()\n {\n VirtualInterfaceId = creator.Id,\n DxGatewayId = example.Id,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taccepter, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the VIF.\n\t\texample, err := directconnect.NewGateway(ctx, \"example\", \u0026directconnect.GatewayArgs{\n\t\t\tName: pulumi.String(\"tf-dxg-example\"),\n\t\t\tAmazonSideAsn: pulumi.String(\"64512\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Creator's side of the VIF\n\t\tcreator, err := directconnect.NewHostedTransitVirtualInterface(ctx, \"creator\", \u0026directconnect.HostedTransitVirtualInterfaceArgs{\n\t\t\tConnectionId: pulumi.String(\"dxcon-zzzzzzzz\"),\n\t\t\tOwnerAccountId: pulumi.String(accepter.AccountId),\n\t\t\tName: pulumi.String(\"tf-transit-vif-example\"),\n\t\t\tVlan: pulumi.Int(4094),\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tBgpAsn: pulumi.Int(65352),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texample,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = directconnect.NewHostedTransitVirtualInterfaceAcceptor(ctx, \"accepter\", \u0026directconnect.HostedTransitVirtualInterfaceAcceptorArgs{\n\t\t\tVirtualInterfaceId: creator.ID(),\n\t\t\tDxGatewayId: example.ID(),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.directconnect.Gateway;\nimport com.pulumi.aws.directconnect.GatewayArgs;\nimport com.pulumi.aws.directconnect.HostedTransitVirtualInterface;\nimport com.pulumi.aws.directconnect.HostedTransitVirtualInterfaceArgs;\nimport com.pulumi.aws.directconnect.HostedTransitVirtualInterfaceAcceptor;\nimport com.pulumi.aws.directconnect.HostedTransitVirtualInterfaceAcceptorArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var accepter = AwsFunctions.getCallerIdentity();\n\n // Accepter's side of the VIF.\n var example = new Gateway(\"example\", GatewayArgs.builder()\n .name(\"tf-dxg-example\")\n .amazonSideAsn(64512)\n .build());\n\n // Creator's side of the VIF\n var creator = new HostedTransitVirtualInterface(\"creator\", HostedTransitVirtualInterfaceArgs.builder()\n .connectionId(\"dxcon-zzzzzzzz\")\n .ownerAccountId(accepter.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .name(\"tf-transit-vif-example\")\n .vlan(4094)\n .addressFamily(\"ipv4\")\n .bgpAsn(65352)\n .build(), CustomResourceOptions.builder()\n .dependsOn(example)\n .build());\n\n var accepterHostedTransitVirtualInterfaceAcceptor = new HostedTransitVirtualInterfaceAcceptor(\"accepterHostedTransitVirtualInterfaceAcceptor\", HostedTransitVirtualInterfaceAcceptorArgs.builder()\n .virtualInterfaceId(creator.id())\n .dxGatewayId(example.id())\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Creator's side of the VIF\n creator:\n type: aws:directconnect:HostedTransitVirtualInterface\n properties:\n connectionId: dxcon-zzzzzzzz\n ownerAccountId: ${accepter.accountId}\n name: tf-transit-vif-example\n vlan: 4094\n addressFamily: ipv4\n bgpAsn: 65352 # The aws_dx_hosted_transit_virtual_interface\n # # must be destroyed before the aws_dx_gateway.\n options:\n dependson:\n - ${example}\n # Accepter's side of the VIF.\n example:\n type: aws:directconnect:Gateway\n properties:\n name: tf-dxg-example\n amazonSideAsn: 64512\n accepterHostedTransitVirtualInterfaceAcceptor:\n type: aws:directconnect:HostedTransitVirtualInterfaceAcceptor\n name: accepter\n properties:\n virtualInterfaceId: ${creator.id}\n dxGatewayId: ${example.id}\n tags:\n Side: Accepter\nvariables:\n accepter:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Direct Connect hosted transit virtual interfaces using the VIF `id`. For example:\n\n```sh\n$ pulumi import aws:directconnect/hostedTransitVirtualInterfaceAcceptor:HostedTransitVirtualInterfaceAcceptor test dxvif-33cc44dd\n```\n", "properties": { "arn": { "type": "string", @@ -222172,7 +222172,7 @@ } }, "aws:directoryservice/serviceRegion:ServiceRegion": { - "description": "Manages a replicated Region and directory for Multi-Region replication.\nMulti-Region replication is only supported for the Enterprise Edition of AWS Managed Microsoft AD.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst example = aws.getRegion({});\nconst available = aws.getAvailabilityZones({\n state: \"available\",\n filters: [{\n name: \"opt-in-status\",\n values: [\"opt-in-not-required\"],\n }],\n});\nconst exampleVpc = new aws.ec2.Vpc(\"example\", {\n cidrBlock: \"10.0.0.0/16\",\n tags: {\n Name: \"Primary\",\n },\n});\nconst exampleSubnet: aws.ec2.Subnet[] = [];\nfor (const range = {value: 0}; range.value \u003c 2; range.value++) {\n exampleSubnet.push(new aws.ec2.Subnet(`example-${range.value}`, {\n vpcId: exampleVpc.id,\n availabilityZone: available.then(available =\u003e available.names[range.value]),\n cidrBlock: exampleVpc.cidrBlock.apply(cidrBlock =\u003e std.cidrsubnetOutput({\n input: cidrBlock,\n newbits: 8,\n netnum: range.value,\n })).apply(invoke =\u003e invoke.result),\n tags: {\n Name: \"Primary\",\n },\n }));\n}\nconst exampleDirectory = new aws.directoryservice.Directory(\"example\", {\n name: \"example.com\",\n password: \"SuperSecretPassw0rd\",\n type: \"MicrosoftAD\",\n vpcSettings: {\n vpcId: exampleVpc.id,\n subnetIds: exampleSubnet.map(__item =\u003e __item.id),\n },\n});\nconst available-secondary = aws.getAvailabilityZones({\n state: \"available\",\n filters: [{\n name: \"opt-in-status\",\n values: [\"opt-in-not-required\"],\n }],\n});\nconst example_secondary = new aws.ec2.Vpc(\"example-secondary\", {\n cidrBlock: \"10.1.0.0/16\",\n tags: {\n Name: \"Secondary\",\n },\n});\nconst example_secondarySubnet: aws.ec2.Subnet[] = [];\nfor (const range = {value: 0}; range.value \u003c 2; range.value++) {\n example_secondarySubnet.push(new aws.ec2.Subnet(`example-secondary-${range.value}`, {\n vpcId: example_secondary.id,\n availabilityZone: available_secondary.then(available_secondary =\u003e available_secondary.names[range.value]),\n cidrBlock: example_secondary.cidrBlock.apply(cidrBlock =\u003e std.cidrsubnetOutput({\n input: cidrBlock,\n newbits: 8,\n netnum: range.value,\n })).apply(invoke =\u003e invoke.result),\n tags: {\n Name: \"Secondary\",\n },\n }));\n}\nconst exampleServiceRegion = new aws.directoryservice.ServiceRegion(\"example\", {\n directoryId: exampleDirectory.id,\n regionName: example.then(example =\u003e example.name),\n vpcSettings: {\n vpcId: example_secondary.id,\n subnetIds: example_secondarySubnet.map(__item =\u003e __item.id),\n },\n tags: {\n Name: \"Secondary\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.get_region()\navailable = aws.get_availability_zones(state=\"available\",\n filters=[{\n \"name\": \"opt-in-status\",\n \"values\": [\"opt-in-not-required\"],\n }])\nexample_vpc = aws.ec2.Vpc(\"example\",\n cidr_block=\"10.0.0.0/16\",\n tags={\n \"Name\": \"Primary\",\n })\nexample_subnet = []\nfor range in [{\"value\": i} for i in range(0, 2)]:\n example_subnet.append(aws.ec2.Subnet(f\"example-{range['value']}\",\n vpc_id=example_vpc.id,\n availability_zone=available.names[range[\"value\"]],\n cidr_block=example_vpc.cidr_block.apply(lambda cidr_block: std.cidrsubnet_output(input=cidr_block,\n newbits=8,\n netnum=range[\"value\"])).apply(lambda invoke: invoke.result),\n tags={\n \"Name\": \"Primary\",\n }))\nexample_directory = aws.directoryservice.Directory(\"example\",\n name=\"example.com\",\n password=\"SuperSecretPassw0rd\",\n type=\"MicrosoftAD\",\n vpc_settings={\n \"vpc_id\": example_vpc.id,\n \"subnet_ids\": [__item.id for __item in example_subnet],\n })\navailable_secondary = aws.get_availability_zones(state=\"available\",\n filters=[{\n \"name\": \"opt-in-status\",\n \"values\": [\"opt-in-not-required\"],\n }])\nexample_secondary = aws.ec2.Vpc(\"example-secondary\",\n cidr_block=\"10.1.0.0/16\",\n tags={\n \"Name\": \"Secondary\",\n })\nexample_secondary_subnet = []\nfor range in [{\"value\": i} for i in range(0, 2)]:\n example_secondary_subnet.append(aws.ec2.Subnet(f\"example-secondary-{range['value']}\",\n vpc_id=example_secondary.id,\n availability_zone=available_secondary.names[range[\"value\"]],\n cidr_block=example_secondary.cidr_block.apply(lambda cidr_block: std.cidrsubnet_output(input=cidr_block,\n newbits=8,\n netnum=range[\"value\"])).apply(lambda invoke: invoke.result),\n tags={\n \"Name\": \"Secondary\",\n }))\nexample_service_region = aws.directoryservice.ServiceRegion(\"example\",\n directory_id=example_directory.id,\n region_name=example.name,\n vpc_settings={\n \"vpc_id\": example_secondary.id,\n \"subnet_ids\": [__item.id for __item in example_secondary_subnet],\n },\n tags={\n \"Name\": \"Secondary\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.GetRegion.Invoke();\n\n var available = Aws.GetAvailabilityZones.Invoke(new()\n {\n State = \"available\",\n Filters = new[]\n {\n new Aws.Inputs.GetAvailabilityZonesFilterInputArgs\n {\n Name = \"opt-in-status\",\n Values = new[]\n {\n \"opt-in-not-required\",\n },\n },\n },\n });\n\n var exampleVpc = new Aws.Ec2.Vpc(\"example\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n Tags = \n {\n { \"Name\", \"Primary\" },\n },\n });\n\n var exampleSubnet = new List\u003cAws.Ec2.Subnet\u003e();\n for (var rangeIndex = 0; rangeIndex \u003c 2; rangeIndex++)\n {\n var range = new { Value = rangeIndex };\n exampleSubnet.Add(new Aws.Ec2.Subnet($\"example-{range.Value}\", new()\n {\n VpcId = exampleVpc.Id,\n AvailabilityZone = available.Apply(getAvailabilityZonesResult =\u003e getAvailabilityZonesResult.Names)[range.Value],\n CidrBlock = exampleVpc.CidrBlock.Apply(cidrBlock =\u003e Std.Cidrsubnet.Invoke(new()\n {\n Input = cidrBlock,\n Newbits = 8,\n Netnum = range.Value,\n })).Apply(invoke =\u003e invoke.Result),\n Tags = \n {\n { \"Name\", \"Primary\" },\n },\n }));\n }\n var exampleDirectory = new Aws.DirectoryService.Directory(\"example\", new()\n {\n Name = \"example.com\",\n Password = \"SuperSecretPassw0rd\",\n Type = \"MicrosoftAD\",\n VpcSettings = new Aws.DirectoryService.Inputs.DirectoryVpcSettingsArgs\n {\n VpcId = exampleVpc.Id,\n SubnetIds = exampleSubnet.Select(__item =\u003e __item.Id).ToList(),\n },\n });\n\n var available_secondary = Aws.GetAvailabilityZones.Invoke(new()\n {\n State = \"available\",\n Filters = new[]\n {\n new Aws.Inputs.GetAvailabilityZonesFilterInputArgs\n {\n Name = \"opt-in-status\",\n Values = new[]\n {\n \"opt-in-not-required\",\n },\n },\n },\n });\n\n var example_secondary = new Aws.Ec2.Vpc(\"example-secondary\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n Tags = \n {\n { \"Name\", \"Secondary\" },\n },\n });\n\n var example_secondarySubnet = new List\u003cAws.Ec2.Subnet\u003e();\n for (var rangeIndex = 0; rangeIndex \u003c 2; rangeIndex++)\n {\n var range = new { Value = rangeIndex };\n example_secondarySubnet.Add(new Aws.Ec2.Subnet($\"example-secondary-{range.Value}\", new()\n {\n VpcId = example_secondary.Id,\n AvailabilityZone = available_secondary.Apply(available_secondary =\u003e available_secondary.Apply(getAvailabilityZonesResult =\u003e getAvailabilityZonesResult.Names)[range.Value]),\n CidrBlock = example_secondary.CidrBlock.Apply(cidrBlock =\u003e Std.Cidrsubnet.Invoke(new()\n {\n Input = cidrBlock,\n Newbits = 8,\n Netnum = range.Value,\n })).Apply(invoke =\u003e invoke.Result),\n Tags = \n {\n { \"Name\", \"Secondary\" },\n },\n }));\n }\n var exampleServiceRegion = new Aws.DirectoryService.ServiceRegion(\"example\", new()\n {\n DirectoryId = exampleDirectory.Id,\n RegionName = example.Apply(getRegionResult =\u003e getRegionResult.Name),\n VpcSettings = new Aws.DirectoryService.Inputs.ServiceRegionVpcSettingsArgs\n {\n VpcId = example_secondary.Id,\n SubnetIds = example_secondarySubnet.Select(__item =\u003e __item.Id).ToList(),\n },\n Tags = \n {\n { \"Name\", \"Secondary\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directoryservice\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := aws.GetRegion(ctx, nil, nil);\nif err != nil {\nreturn err\n}\navailable, err := aws.GetAvailabilityZones(ctx, \u0026aws.GetAvailabilityZonesArgs{\nState: pulumi.StringRef(\"available\"),\nFilters: []aws.GetAvailabilityZonesFilter{\n{\nName: \"opt-in-status\",\nValues: []string{\n\"opt-in-not-required\",\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nexampleVpc, err := ec2.NewVpc(ctx, \"example\", \u0026ec2.VpcArgs{\nCidrBlock: pulumi.String(\"10.0.0.0/16\"),\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Primary\"),\n},\n})\nif err != nil {\nreturn err\n}\nvar exampleSubnet []*ec2.Subnet\nfor index := 0; index \u003c 2; index++ {\n key0 := index\n val0 := index\n__res, err := ec2.NewSubnet(ctx, fmt.Sprintf(\"example-%v\", key0), \u0026ec2.SubnetArgs{\nVpcId: exampleVpc.ID(),\nAvailabilityZone: pulumi.String(available.Names[val0]),\nCidrBlock: pulumi.String(exampleVpc.CidrBlock.ApplyT(func(cidrBlock string) (std.CidrsubnetResult, error) {\nreturn std.CidrsubnetResult(interface{}(std.CidrsubnetOutput(ctx, std.CidrsubnetOutputArgs{\nInput: cidrBlock,\nNewbits: 8,\nNetnum: val0,\n}, nil))), nil\n}).(std.CidrsubnetResultOutput).ApplyT(func(invoke std.CidrsubnetResult) (*string, error) {\nreturn invoke.Result, nil\n}).(pulumi.StringPtrOutput)),\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Primary\"),\n},\n})\nif err != nil {\nreturn err\n}\nexampleSubnet = append(exampleSubnet, __res)\n}\nexampleDirectory, err := directoryservice.NewDirectory(ctx, \"example\", \u0026directoryservice.DirectoryArgs{\nName: pulumi.String(\"example.com\"),\nPassword: pulumi.String(\"SuperSecretPassw0rd\"),\nType: pulumi.String(\"MicrosoftAD\"),\nVpcSettings: \u0026directoryservice.DirectoryVpcSettingsArgs{\nVpcId: exampleVpc.ID(),\nSubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:44,17-36),\n},\n})\nif err != nil {\nreturn err\n}\navailable_secondary, err := aws.GetAvailabilityZones(ctx, \u0026aws.GetAvailabilityZonesArgs{\nState: pulumi.StringRef(\"available\"),\nFilters: []aws.GetAvailabilityZonesFilter{\n{\nName: \"opt-in-status\",\nValues: []string{\n\"opt-in-not-required\",\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\n_, err = ec2.NewVpc(ctx, \"example-secondary\", \u0026ec2.VpcArgs{\nCidrBlock: pulumi.String(\"10.1.0.0/16\"),\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Secondary\"),\n},\n})\nif err != nil {\nreturn err\n}\nvar example_secondarySubnet []*ec2.Subnet\nfor index := 0; index \u003c 2; index++ {\n key0 := index\n val0 := index\n__res, err := ec2.NewSubnet(ctx, fmt.Sprintf(\"example-secondary-%v\", key0), \u0026ec2.SubnetArgs{\nVpcId: example_secondary.ID(),\nAvailabilityZone: pulumi.String(available_secondary.Names[val0]),\nCidrBlock: pulumi.String(example_secondary.CidrBlock.ApplyT(func(cidrBlock string) (std.CidrsubnetResult, error) {\nreturn std.CidrsubnetResult(interface{}(std.CidrsubnetOutput(ctx, std.CidrsubnetOutputArgs{\nInput: cidrBlock,\nNewbits: 8,\nNetnum: val0,\n}, nil))), nil\n}).(std.CidrsubnetResultOutput).ApplyT(func(invoke std.CidrsubnetResult) (*string, error) {\nreturn invoke.Result, nil\n}).(pulumi.StringPtrOutput)),\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Secondary\"),\n},\n})\nif err != nil {\nreturn err\n}\nexample_secondarySubnet = append(example_secondarySubnet, __res)\n}\n_, err = directoryservice.NewServiceRegion(ctx, \"example\", \u0026directoryservice.ServiceRegionArgs{\nDirectoryId: exampleDirectory.ID(),\nRegionName: pulumi.String(example.Name),\nVpcSettings: \u0026directoryservice.ServiceRegionVpcSettingsArgs{\nVpcId: example_secondary.ID(),\nSubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:87,17-46),\n},\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Secondary\"),\n},\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetAvailabilityZonesArgs;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.Subnet;\nimport com.pulumi.aws.ec2.SubnetArgs;\nimport com.pulumi.aws.directoryservice.Directory;\nimport com.pulumi.aws.directoryservice.DirectoryArgs;\nimport com.pulumi.aws.directoryservice.inputs.DirectoryVpcSettingsArgs;\nimport com.pulumi.aws.directoryservice.ServiceRegion;\nimport com.pulumi.aws.directoryservice.ServiceRegionArgs;\nimport com.pulumi.aws.directoryservice.inputs.ServiceRegionVpcSettingsArgs;\nimport com.pulumi.codegen.internal.KeyedValue;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = AwsFunctions.getRegion();\n\n final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()\n .state(\"available\")\n .filters(GetAvailabilityZonesFilterArgs.builder()\n .name(\"opt-in-status\")\n .values(\"opt-in-not-required\")\n .build())\n .build());\n\n var exampleVpc = new Vpc(\"exampleVpc\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .tags(Map.of(\"Name\", \"Primary\"))\n .build());\n\n for (var i = 0; i \u003c 2; i++) {\n new Subnet(\"exampleSubnet-\" + i, SubnetArgs.builder()\n .vpcId(exampleVpc.id())\n .availabilityZone(available.applyValue(getAvailabilityZonesResult -\u003e getAvailabilityZonesResult.names())[range.value()])\n .cidrBlock(exampleVpc.cidrBlock().applyValue(cidrBlock -\u003e StdFunctions.cidrsubnet()).applyValue(invoke -\u003e invoke.result()))\n .tags(Map.of(\"Name\", \"Primary\"))\n .build());\n\n \n}\n var exampleDirectory = new Directory(\"exampleDirectory\", DirectoryArgs.builder()\n .name(\"example.com\")\n .password(\"SuperSecretPassw0rd\")\n .type(\"MicrosoftAD\")\n .vpcSettings(DirectoryVpcSettingsArgs.builder()\n .vpcId(exampleVpc.id())\n .subnetIds(exampleSubnet.stream().map(element -\u003e element.id()).collect(toList()))\n .build())\n .build());\n\n final var available-secondary = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()\n .state(\"available\")\n .filters(GetAvailabilityZonesFilterArgs.builder()\n .name(\"opt-in-status\")\n .values(\"opt-in-not-required\")\n .build())\n .build());\n\n var example_secondary = new Vpc(\"example-secondary\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .tags(Map.of(\"Name\", \"Secondary\"))\n .build());\n\n for (var i = 0; i \u003c 2; i++) {\n new Subnet(\"example-secondarySubnet-\" + i, SubnetArgs.builder()\n .vpcId(example_secondary.id())\n .availabilityZone(available_secondary.names()[range.value()])\n .cidrBlock(example_secondary.cidrBlock().applyValue(cidrBlock -\u003e StdFunctions.cidrsubnet()).applyValue(invoke -\u003e invoke.result()))\n .tags(Map.of(\"Name\", \"Secondary\"))\n .build());\n\n \n}\n var exampleServiceRegion = new ServiceRegion(\"exampleServiceRegion\", ServiceRegionArgs.builder()\n .directoryId(exampleDirectory.id())\n .regionName(example.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .vpcSettings(ServiceRegionVpcSettingsArgs.builder()\n .vpcId(example_secondary.id())\n .subnetIds(example_secondarySubnet.stream().map(element -\u003e element.id()).collect(toList()))\n .build())\n .tags(Map.of(\"Name\", \"Secondary\"))\n .build());\n\n }\n}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Replicated Regions using directory ID,Region name. For example:\n\n```sh\n$ pulumi import aws:directoryservice/serviceRegion:ServiceRegion example d-9267651497,us-east-2\n```\n", + "description": "Manages a replicated Region and directory for Multi-Region replication.\nMulti-Region replication is only supported for the Enterprise Edition of AWS Managed Microsoft AD.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst example = aws.getRegion({});\nconst available = aws.getAvailabilityZones({\n state: \"available\",\n filters: [{\n name: \"opt-in-status\",\n values: [\"opt-in-not-required\"],\n }],\n});\nconst exampleVpc = new aws.ec2.Vpc(\"example\", {\n cidrBlock: \"10.0.0.0/16\",\n tags: {\n Name: \"Primary\",\n },\n});\nconst exampleSubnet: aws.ec2.Subnet[] = [];\nfor (const range = {value: 0}; range.value \u003c 2; range.value++) {\n exampleSubnet.push(new aws.ec2.Subnet(`example-${range.value}`, {\n vpcId: exampleVpc.id,\n availabilityZone: available.then(available =\u003e available.names[range.value]),\n cidrBlock: exampleVpc.cidrBlock.apply(cidrBlock =\u003e std.cidrsubnetOutput({\n input: cidrBlock,\n newbits: 8,\n netnum: range.value,\n })).apply(invoke =\u003e invoke.result),\n tags: {\n Name: \"Primary\",\n },\n }));\n}\nconst exampleDirectory = new aws.directoryservice.Directory(\"example\", {\n name: \"example.com\",\n password: \"SuperSecretPassw0rd\",\n type: \"MicrosoftAD\",\n vpcSettings: {\n vpcId: exampleVpc.id,\n subnetIds: exampleSubnet.map(__item =\u003e __item.id),\n },\n});\nconst available-secondary = aws.getAvailabilityZones({\n state: \"available\",\n filters: [{\n name: \"opt-in-status\",\n values: [\"opt-in-not-required\"],\n }],\n});\nconst example_secondary = new aws.ec2.Vpc(\"example-secondary\", {\n cidrBlock: \"10.1.0.0/16\",\n tags: {\n Name: \"Secondary\",\n },\n});\nconst example_secondarySubnet: aws.ec2.Subnet[] = [];\nfor (const range = {value: 0}; range.value \u003c 2; range.value++) {\n example_secondarySubnet.push(new aws.ec2.Subnet(`example-secondary-${range.value}`, {\n vpcId: example_secondary.id,\n availabilityZone: available_secondary.then(available_secondary =\u003e available_secondary.names[range.value]),\n cidrBlock: example_secondary.cidrBlock.apply(cidrBlock =\u003e std.cidrsubnetOutput({\n input: cidrBlock,\n newbits: 8,\n netnum: range.value,\n })).apply(invoke =\u003e invoke.result),\n tags: {\n Name: \"Secondary\",\n },\n }));\n}\nconst exampleServiceRegion = new aws.directoryservice.ServiceRegion(\"example\", {\n directoryId: exampleDirectory.id,\n regionName: example.then(example =\u003e example.name),\n vpcSettings: {\n vpcId: example_secondary.id,\n subnetIds: example_secondarySubnet.map(__item =\u003e __item.id),\n },\n tags: {\n Name: \"Secondary\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.get_region()\navailable = aws.get_availability_zones(state=\"available\",\n filters=[{\n \"name\": \"opt-in-status\",\n \"values\": [\"opt-in-not-required\"],\n }])\nexample_vpc = aws.ec2.Vpc(\"example\",\n cidr_block=\"10.0.0.0/16\",\n tags={\n \"Name\": \"Primary\",\n })\nexample_subnet = []\nfor range in [{\"value\": i} for i in range(0, 2)]:\n example_subnet.append(aws.ec2.Subnet(f\"example-{range['value']}\",\n vpc_id=example_vpc.id,\n availability_zone=available.names[range[\"value\"]],\n cidr_block=example_vpc.cidr_block.apply(lambda cidr_block: std.cidrsubnet_output(input=cidr_block,\n newbits=8,\n netnum=range[\"value\"])).apply(lambda invoke: invoke.result),\n tags={\n \"Name\": \"Primary\",\n }))\nexample_directory = aws.directoryservice.Directory(\"example\",\n name=\"example.com\",\n password=\"SuperSecretPassw0rd\",\n type=\"MicrosoftAD\",\n vpc_settings={\n \"vpc_id\": example_vpc.id,\n \"subnet_ids\": [__item.id for __item in example_subnet],\n })\navailable_secondary = aws.get_availability_zones(state=\"available\",\n filters=[{\n \"name\": \"opt-in-status\",\n \"values\": [\"opt-in-not-required\"],\n }])\nexample_secondary = aws.ec2.Vpc(\"example-secondary\",\n cidr_block=\"10.1.0.0/16\",\n tags={\n \"Name\": \"Secondary\",\n })\nexample_secondary_subnet = []\nfor range in [{\"value\": i} for i in range(0, 2)]:\n example_secondary_subnet.append(aws.ec2.Subnet(f\"example-secondary-{range['value']}\",\n vpc_id=example_secondary.id,\n availability_zone=available_secondary.names[range[\"value\"]],\n cidr_block=example_secondary.cidr_block.apply(lambda cidr_block: std.cidrsubnet_output(input=cidr_block,\n newbits=8,\n netnum=range[\"value\"])).apply(lambda invoke: invoke.result),\n tags={\n \"Name\": \"Secondary\",\n }))\nexample_service_region = aws.directoryservice.ServiceRegion(\"example\",\n directory_id=example_directory.id,\n region_name=example.name,\n vpc_settings={\n \"vpc_id\": example_secondary.id,\n \"subnet_ids\": [__item.id for __item in example_secondary_subnet],\n },\n tags={\n \"Name\": \"Secondary\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.GetRegion.Invoke();\n\n var available = Aws.GetAvailabilityZones.Invoke(new()\n {\n State = \"available\",\n Filters = new[]\n {\n new Aws.Inputs.GetAvailabilityZonesFilterInputArgs\n {\n Name = \"opt-in-status\",\n Values = new[]\n {\n \"opt-in-not-required\",\n },\n },\n },\n });\n\n var exampleVpc = new Aws.Ec2.Vpc(\"example\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n Tags = \n {\n { \"Name\", \"Primary\" },\n },\n });\n\n var exampleSubnet = new List\u003cAws.Ec2.Subnet\u003e();\n for (var rangeIndex = 0; rangeIndex \u003c 2; rangeIndex++)\n {\n var range = new { Value = rangeIndex };\n exampleSubnet.Add(new Aws.Ec2.Subnet($\"example-{range.Value}\", new()\n {\n VpcId = exampleVpc.Id,\n AvailabilityZone = available.Apply(getAvailabilityZonesResult =\u003e getAvailabilityZonesResult.Names)[range.Value],\n CidrBlock = exampleVpc.CidrBlock.Apply(cidrBlock =\u003e Std.Cidrsubnet.Invoke(new()\n {\n Input = cidrBlock,\n Newbits = 8,\n Netnum = range.Value,\n })).Apply(invoke =\u003e invoke.Result),\n Tags = \n {\n { \"Name\", \"Primary\" },\n },\n }));\n }\n var exampleDirectory = new Aws.DirectoryService.Directory(\"example\", new()\n {\n Name = \"example.com\",\n Password = \"SuperSecretPassw0rd\",\n Type = \"MicrosoftAD\",\n VpcSettings = new Aws.DirectoryService.Inputs.DirectoryVpcSettingsArgs\n {\n VpcId = exampleVpc.Id,\n SubnetIds = exampleSubnet.Select(__item =\u003e __item.Id).ToList(),\n },\n });\n\n var available_secondary = Aws.GetAvailabilityZones.Invoke(new()\n {\n State = \"available\",\n Filters = new[]\n {\n new Aws.Inputs.GetAvailabilityZonesFilterInputArgs\n {\n Name = \"opt-in-status\",\n Values = new[]\n {\n \"opt-in-not-required\",\n },\n },\n },\n });\n\n var example_secondary = new Aws.Ec2.Vpc(\"example-secondary\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n Tags = \n {\n { \"Name\", \"Secondary\" },\n },\n });\n\n var example_secondarySubnet = new List\u003cAws.Ec2.Subnet\u003e();\n for (var rangeIndex = 0; rangeIndex \u003c 2; rangeIndex++)\n {\n var range = new { Value = rangeIndex };\n example_secondarySubnet.Add(new Aws.Ec2.Subnet($\"example-secondary-{range.Value}\", new()\n {\n VpcId = example_secondary.Id,\n AvailabilityZone = available_secondary.Apply(available_secondary =\u003e available_secondary.Apply(getAvailabilityZonesResult =\u003e getAvailabilityZonesResult.Names)[range.Value]),\n CidrBlock = example_secondary.CidrBlock.Apply(cidrBlock =\u003e Std.Cidrsubnet.Invoke(new()\n {\n Input = cidrBlock,\n Newbits = 8,\n Netnum = range.Value,\n })).Apply(invoke =\u003e invoke.Result),\n Tags = \n {\n { \"Name\", \"Secondary\" },\n },\n }));\n }\n var exampleServiceRegion = new Aws.DirectoryService.ServiceRegion(\"example\", new()\n {\n DirectoryId = exampleDirectory.Id,\n RegionName = example.Apply(getRegionResult =\u003e getRegionResult.Name),\n VpcSettings = new Aws.DirectoryService.Inputs.ServiceRegionVpcSettingsArgs\n {\n VpcId = example_secondary.Id,\n SubnetIds = example_secondarySubnet.Select(__item =\u003e __item.Id).ToList(),\n },\n Tags = \n {\n { \"Name\", \"Secondary\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directoryservice\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{\n}, nil);\nif err != nil {\nreturn err\n}\navailable, err := aws.GetAvailabilityZones(ctx, \u0026aws.GetAvailabilityZonesArgs{\nState: pulumi.StringRef(\"available\"),\nFilters: []aws.GetAvailabilityZonesFilter{\n{\nName: \"opt-in-status\",\nValues: []string{\n\"opt-in-not-required\",\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nexampleVpc, err := ec2.NewVpc(ctx, \"example\", \u0026ec2.VpcArgs{\nCidrBlock: pulumi.String(\"10.0.0.0/16\"),\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Primary\"),\n},\n})\nif err != nil {\nreturn err\n}\nvar exampleSubnet []*ec2.Subnet\nfor index := 0; index \u003c 2; index++ {\n key0 := index\n val0 := index\n__res, err := ec2.NewSubnet(ctx, fmt.Sprintf(\"example-%v\", key0), \u0026ec2.SubnetArgs{\nVpcId: exampleVpc.ID(),\nAvailabilityZone: pulumi.String(available.Names[val0]),\nCidrBlock: pulumi.String(exampleVpc.CidrBlock.ApplyT(func(cidrBlock string) (std.CidrsubnetResult, error) {\nreturn std.CidrsubnetResult(interface{}(std.CidrsubnetOutput(ctx, std.CidrsubnetOutputArgs{\nInput: cidrBlock,\nNewbits: 8,\nNetnum: val0,\n}, nil))), nil\n}).(std.CidrsubnetResultOutput).ApplyT(func(invoke std.CidrsubnetResult) (*string, error) {\nreturn invoke.Result, nil\n}).(pulumi.StringPtrOutput)),\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Primary\"),\n},\n})\nif err != nil {\nreturn err\n}\nexampleSubnet = append(exampleSubnet, __res)\n}\nexampleDirectory, err := directoryservice.NewDirectory(ctx, \"example\", \u0026directoryservice.DirectoryArgs{\nName: pulumi.String(\"example.com\"),\nPassword: pulumi.String(\"SuperSecretPassw0rd\"),\nType: pulumi.String(\"MicrosoftAD\"),\nVpcSettings: \u0026directoryservice.DirectoryVpcSettingsArgs{\nVpcId: exampleVpc.ID(),\nSubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:44,17-36),\n},\n})\nif err != nil {\nreturn err\n}\navailable_secondary, err := aws.GetAvailabilityZones(ctx, \u0026aws.GetAvailabilityZonesArgs{\nState: pulumi.StringRef(\"available\"),\nFilters: []aws.GetAvailabilityZonesFilter{\n{\nName: \"opt-in-status\",\nValues: []string{\n\"opt-in-not-required\",\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\n_, err = ec2.NewVpc(ctx, \"example-secondary\", \u0026ec2.VpcArgs{\nCidrBlock: pulumi.String(\"10.1.0.0/16\"),\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Secondary\"),\n},\n})\nif err != nil {\nreturn err\n}\nvar example_secondarySubnet []*ec2.Subnet\nfor index := 0; index \u003c 2; index++ {\n key0 := index\n val0 := index\n__res, err := ec2.NewSubnet(ctx, fmt.Sprintf(\"example-secondary-%v\", key0), \u0026ec2.SubnetArgs{\nVpcId: example_secondary.ID(),\nAvailabilityZone: pulumi.String(available_secondary.Names[val0]),\nCidrBlock: pulumi.String(example_secondary.CidrBlock.ApplyT(func(cidrBlock string) (std.CidrsubnetResult, error) {\nreturn std.CidrsubnetResult(interface{}(std.CidrsubnetOutput(ctx, std.CidrsubnetOutputArgs{\nInput: cidrBlock,\nNewbits: 8,\nNetnum: val0,\n}, nil))), nil\n}).(std.CidrsubnetResultOutput).ApplyT(func(invoke std.CidrsubnetResult) (*string, error) {\nreturn invoke.Result, nil\n}).(pulumi.StringPtrOutput)),\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Secondary\"),\n},\n})\nif err != nil {\nreturn err\n}\nexample_secondarySubnet = append(example_secondarySubnet, __res)\n}\n_, err = directoryservice.NewServiceRegion(ctx, \"example\", \u0026directoryservice.ServiceRegionArgs{\nDirectoryId: exampleDirectory.ID(),\nRegionName: pulumi.String(example.Name),\nVpcSettings: \u0026directoryservice.ServiceRegionVpcSettingsArgs{\nVpcId: example_secondary.ID(),\nSubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:87,17-46),\n},\nTags: pulumi.StringMap{\n\"Name\": pulumi.String(\"Secondary\"),\n},\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetAvailabilityZonesArgs;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.Subnet;\nimport com.pulumi.aws.ec2.SubnetArgs;\nimport com.pulumi.aws.directoryservice.Directory;\nimport com.pulumi.aws.directoryservice.DirectoryArgs;\nimport com.pulumi.aws.directoryservice.inputs.DirectoryVpcSettingsArgs;\nimport com.pulumi.aws.directoryservice.ServiceRegion;\nimport com.pulumi.aws.directoryservice.ServiceRegionArgs;\nimport com.pulumi.aws.directoryservice.inputs.ServiceRegionVpcSettingsArgs;\nimport com.pulumi.codegen.internal.KeyedValue;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = AwsFunctions.getRegion();\n\n final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()\n .state(\"available\")\n .filters(GetAvailabilityZonesFilterArgs.builder()\n .name(\"opt-in-status\")\n .values(\"opt-in-not-required\")\n .build())\n .build());\n\n var exampleVpc = new Vpc(\"exampleVpc\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .tags(Map.of(\"Name\", \"Primary\"))\n .build());\n\n for (var i = 0; i \u003c 2; i++) {\n new Subnet(\"exampleSubnet-\" + i, SubnetArgs.builder()\n .vpcId(exampleVpc.id())\n .availabilityZone(available.applyValue(getAvailabilityZonesResult -\u003e getAvailabilityZonesResult.names())[range.value()])\n .cidrBlock(exampleVpc.cidrBlock().applyValue(cidrBlock -\u003e StdFunctions.cidrsubnet()).applyValue(invoke -\u003e invoke.result()))\n .tags(Map.of(\"Name\", \"Primary\"))\n .build());\n\n \n}\n var exampleDirectory = new Directory(\"exampleDirectory\", DirectoryArgs.builder()\n .name(\"example.com\")\n .password(\"SuperSecretPassw0rd\")\n .type(\"MicrosoftAD\")\n .vpcSettings(DirectoryVpcSettingsArgs.builder()\n .vpcId(exampleVpc.id())\n .subnetIds(exampleSubnet.stream().map(element -\u003e element.id()).collect(toList()))\n .build())\n .build());\n\n final var available-secondary = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()\n .state(\"available\")\n .filters(GetAvailabilityZonesFilterArgs.builder()\n .name(\"opt-in-status\")\n .values(\"opt-in-not-required\")\n .build())\n .build());\n\n var example_secondary = new Vpc(\"example-secondary\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .tags(Map.of(\"Name\", \"Secondary\"))\n .build());\n\n for (var i = 0; i \u003c 2; i++) {\n new Subnet(\"example-secondarySubnet-\" + i, SubnetArgs.builder()\n .vpcId(example_secondary.id())\n .availabilityZone(available_secondary.names()[range.value()])\n .cidrBlock(example_secondary.cidrBlock().applyValue(cidrBlock -\u003e StdFunctions.cidrsubnet()).applyValue(invoke -\u003e invoke.result()))\n .tags(Map.of(\"Name\", \"Secondary\"))\n .build());\n\n \n}\n var exampleServiceRegion = new ServiceRegion(\"exampleServiceRegion\", ServiceRegionArgs.builder()\n .directoryId(exampleDirectory.id())\n .regionName(example.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .vpcSettings(ServiceRegionVpcSettingsArgs.builder()\n .vpcId(example_secondary.id())\n .subnetIds(example_secondarySubnet.stream().map(element -\u003e element.id()).collect(toList()))\n .build())\n .tags(Map.of(\"Name\", \"Secondary\"))\n .build());\n\n }\n}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Replicated Regions using directory ID,Region name. For example:\n\n```sh\n$ pulumi import aws:directoryservice/serviceRegion:ServiceRegion example d-9267651497,us-east-2\n```\n", "properties": { "desiredNumberOfDomainControllers": { "type": "integer", @@ -222634,7 +222634,7 @@ } }, "aws:dlm/lifecyclePolicy:LifecyclePolicy": { - "description": "Provides a [Data Lifecycle Manager (DLM) lifecycle policy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html) for managing snapshots.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"dlm.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst dlmLifecycleRole = new aws.iam.Role(\"dlm_lifecycle_role\", {\n name: \"dlm-lifecycle-role\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst dlmLifecycle = aws.iam.getPolicyDocument({\n statements: [\n {\n effect: \"Allow\",\n actions: [\n \"ec2:CreateSnapshot\",\n \"ec2:CreateSnapshots\",\n \"ec2:DeleteSnapshot\",\n \"ec2:DescribeInstances\",\n \"ec2:DescribeVolumes\",\n \"ec2:DescribeSnapshots\",\n ],\n resources: [\"*\"],\n },\n {\n effect: \"Allow\",\n actions: [\"ec2:CreateTags\"],\n resources: [\"arn:aws:ec2:*::snapshot/*\"],\n },\n ],\n});\nconst dlmLifecycleRolePolicy = new aws.iam.RolePolicy(\"dlm_lifecycle\", {\n name: \"dlm-lifecycle-policy\",\n role: dlmLifecycleRole.id,\n policy: dlmLifecycle.then(dlmLifecycle =\u003e dlmLifecycle.json),\n});\nconst example = new aws.dlm.LifecyclePolicy(\"example\", {\n description: \"example DLM lifecycle policy\",\n executionRoleArn: dlmLifecycleRole.arn,\n state: \"ENABLED\",\n policyDetails: {\n resourceTypes: \"VOLUME\",\n schedules: [{\n name: \"2 weeks of daily snapshots\",\n createRule: {\n interval: 24,\n intervalUnit: \"HOURS\",\n times: \"23:45\",\n },\n retainRule: {\n count: 14,\n },\n tagsToAdd: {\n SnapshotCreator: \"DLM\",\n },\n copyTags: false,\n }],\n targetTags: {\n Snapshot: \"true\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"dlm.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\ndlm_lifecycle_role = aws.iam.Role(\"dlm_lifecycle_role\",\n name=\"dlm-lifecycle-role\",\n assume_role_policy=assume_role.json)\ndlm_lifecycle = aws.iam.get_policy_document(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"ec2:CreateSnapshot\",\n \"ec2:CreateSnapshots\",\n \"ec2:DeleteSnapshot\",\n \"ec2:DescribeInstances\",\n \"ec2:DescribeVolumes\",\n \"ec2:DescribeSnapshots\",\n ],\n \"resources\": [\"*\"],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"ec2:CreateTags\"],\n \"resources\": [\"arn:aws:ec2:*::snapshot/*\"],\n },\n])\ndlm_lifecycle_role_policy = aws.iam.RolePolicy(\"dlm_lifecycle\",\n name=\"dlm-lifecycle-policy\",\n role=dlm_lifecycle_role.id,\n policy=dlm_lifecycle.json)\nexample = aws.dlm.LifecyclePolicy(\"example\",\n description=\"example DLM lifecycle policy\",\n execution_role_arn=dlm_lifecycle_role.arn,\n state=\"ENABLED\",\n policy_details={\n \"resource_types\": \"VOLUME\",\n \"schedules\": [{\n \"name\": \"2 weeks of daily snapshots\",\n \"create_rule\": {\n \"interval\": 24,\n \"interval_unit\": \"HOURS\",\n \"times\": \"23:45\",\n },\n \"retain_rule\": {\n \"count\": 14,\n },\n \"tags_to_add\": {\n \"snapshot_creator\": \"DLM\",\n },\n \"copy_tags\": False,\n }],\n \"target_tags\": {\n \"snapshot\": \"true\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"dlm.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var dlmLifecycleRole = new Aws.Iam.Role(\"dlm_lifecycle_role\", new()\n {\n Name = \"dlm-lifecycle-role\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var dlmLifecycle = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ec2:CreateSnapshot\",\n \"ec2:CreateSnapshots\",\n \"ec2:DeleteSnapshot\",\n \"ec2:DescribeInstances\",\n \"ec2:DescribeVolumes\",\n \"ec2:DescribeSnapshots\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ec2:CreateTags\",\n },\n Resources = new[]\n {\n \"arn:aws:ec2:*::snapshot/*\",\n },\n },\n },\n });\n\n var dlmLifecycleRolePolicy = new Aws.Iam.RolePolicy(\"dlm_lifecycle\", new()\n {\n Name = \"dlm-lifecycle-policy\",\n Role = dlmLifecycleRole.Id,\n Policy = dlmLifecycle.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var example = new Aws.Dlm.LifecyclePolicy(\"example\", new()\n {\n Description = \"example DLM lifecycle policy\",\n ExecutionRoleArn = dlmLifecycleRole.Arn,\n State = \"ENABLED\",\n PolicyDetails = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsArgs\n {\n ResourceTypes = \"VOLUME\",\n Schedules = new[]\n {\n new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleArgs\n {\n Name = \"2 weeks of daily snapshots\",\n CreateRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs\n {\n Interval = 24,\n IntervalUnit = \"HOURS\",\n Times = \"23:45\",\n },\n RetainRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs\n {\n Count = 14,\n },\n TagsToAdd = \n {\n { \"SnapshotCreator\", \"DLM\" },\n },\n CopyTags = false,\n },\n },\n TargetTags = \n {\n { \"Snapshot\", \"true\" },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dlm\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"dlm.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdlmLifecycleRole, err := iam.NewRole(ctx, \"dlm_lifecycle_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"dlm-lifecycle-role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdlmLifecycle, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"ec2:CreateSnapshot\",\n\t\t\t\t\t\t\"ec2:CreateSnapshots\",\n\t\t\t\t\t\t\"ec2:DeleteSnapshot\",\n\t\t\t\t\t\t\"ec2:DescribeInstances\",\n\t\t\t\t\t\t\"ec2:DescribeVolumes\",\n\t\t\t\t\t\t\"ec2:DescribeSnapshots\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"ec2:CreateTags\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:ec2:*::snapshot/*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicy(ctx, \"dlm_lifecycle\", \u0026iam.RolePolicyArgs{\n\t\t\tName: pulumi.String(\"dlm-lifecycle-policy\"),\n\t\t\tRole: dlmLifecycleRole.ID(),\n\t\t\tPolicy: pulumi.String(dlmLifecycle.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dlm.NewLifecyclePolicy(ctx, \"example\", \u0026dlm.LifecyclePolicyArgs{\n\t\t\tDescription: pulumi.String(\"example DLM lifecycle policy\"),\n\t\t\tExecutionRoleArn: dlmLifecycleRole.Arn,\n\t\t\tState: pulumi.String(\"ENABLED\"),\n\t\t\tPolicyDetails: \u0026dlm.LifecyclePolicyPolicyDetailsArgs{\n\t\t\t\tResourceTypes: pulumi.StringArray(\"VOLUME\"),\n\t\t\t\tSchedules: dlm.LifecyclePolicyPolicyDetailsScheduleArray{\n\t\t\t\t\t\u0026dlm.LifecyclePolicyPolicyDetailsScheduleArgs{\n\t\t\t\t\t\tName: pulumi.String(\"2 weeks of daily snapshots\"),\n\t\t\t\t\t\tCreateRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs{\n\t\t\t\t\t\t\tInterval: pulumi.Int(24),\n\t\t\t\t\t\t\tIntervalUnit: pulumi.String(\"HOURS\"),\n\t\t\t\t\t\t\tTimes: pulumi.String(\"23:45\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tRetainRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs{\n\t\t\t\t\t\t\tCount: pulumi.Int(14),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tTagsToAdd: pulumi.StringMap{\n\t\t\t\t\t\t\t\"SnapshotCreator\": pulumi.String(\"DLM\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tCopyTags: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tTargetTags: pulumi.StringMap{\n\t\t\t\t\t\"Snapshot\": pulumi.String(\"true\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport com.pulumi.aws.dlm.LifecyclePolicy;\nimport com.pulumi.aws.dlm.LifecyclePolicyArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"dlm.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var dlmLifecycleRole = new Role(\"dlmLifecycleRole\", RoleArgs.builder()\n .name(\"dlm-lifecycle-role\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var dlmLifecycle = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"ec2:CreateSnapshot\",\n \"ec2:CreateSnapshots\",\n \"ec2:DeleteSnapshot\",\n \"ec2:DescribeInstances\",\n \"ec2:DescribeVolumes\",\n \"ec2:DescribeSnapshots\")\n .resources(\"*\")\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ec2:CreateTags\")\n .resources(\"arn:aws:ec2:*::snapshot/*\")\n .build())\n .build());\n\n var dlmLifecycleRolePolicy = new RolePolicy(\"dlmLifecycleRolePolicy\", RolePolicyArgs.builder()\n .name(\"dlm-lifecycle-policy\")\n .role(dlmLifecycleRole.id())\n .policy(dlmLifecycle.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var example = new LifecyclePolicy(\"example\", LifecyclePolicyArgs.builder()\n .description(\"example DLM lifecycle policy\")\n .executionRoleArn(dlmLifecycleRole.arn())\n .state(\"ENABLED\")\n .policyDetails(LifecyclePolicyPolicyDetailsArgs.builder()\n .resourceTypes(\"VOLUME\")\n .schedules(LifecyclePolicyPolicyDetailsScheduleArgs.builder()\n .name(\"2 weeks of daily snapshots\")\n .createRule(LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs.builder()\n .interval(24)\n .intervalUnit(\"HOURS\")\n .times(\"23:45\")\n .build())\n .retainRule(LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs.builder()\n .count(14)\n .build())\n .tagsToAdd(Map.of(\"SnapshotCreator\", \"DLM\"))\n .copyTags(false)\n .build())\n .targetTags(Map.of(\"Snapshot\", \"true\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dlmLifecycleRole:\n type: aws:iam:Role\n name: dlm_lifecycle_role\n properties:\n name: dlm-lifecycle-role\n assumeRolePolicy: ${assumeRole.json}\n dlmLifecycleRolePolicy:\n type: aws:iam:RolePolicy\n name: dlm_lifecycle\n properties:\n name: dlm-lifecycle-policy\n role: ${dlmLifecycleRole.id}\n policy: ${dlmLifecycle.json}\n example:\n type: aws:dlm:LifecyclePolicy\n properties:\n description: example DLM lifecycle policy\n executionRoleArn: ${dlmLifecycleRole.arn}\n state: ENABLED\n policyDetails:\n resourceTypes: VOLUME\n schedules:\n - name: 2 weeks of daily snapshots\n createRule:\n interval: 24\n intervalUnit: HOURS\n times: 23:45\n retainRule:\n count: 14\n tagsToAdd:\n SnapshotCreator: DLM\n copyTags: false\n targetTags:\n Snapshot: 'true'\nvariables:\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - dlm.amazonaws.com\n actions:\n - sts:AssumeRole\n dlmLifecycle:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - ec2:CreateSnapshot\n - ec2:CreateSnapshots\n - ec2:DeleteSnapshot\n - ec2:DescribeInstances\n - ec2:DescribeVolumes\n - ec2:DescribeSnapshots\n resources:\n - '*'\n - effect: Allow\n actions:\n - ec2:CreateTags\n resources:\n - arn:aws:ec2:*::snapshot/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Cross-Region Snapshot Copy Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// ...other configuration...\nconst current = aws.getCallerIdentity({});\nconst key = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"Enable IAM User Permissions\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current.accountId}:root`],\n }],\n actions: [\"kms:*\"],\n resources: [\"*\"],\n }],\n}));\nconst dlmCrossRegionCopyCmk = new aws.kms.Key(\"dlm_cross_region_copy_cmk\", {\n description: \"Example Alternate Region KMS Key\",\n policy: key.then(key =\u003e key.json),\n});\nconst example = new aws.dlm.LifecyclePolicy(\"example\", {\n description: \"example DLM lifecycle policy\",\n executionRoleArn: dlmLifecycleRole.arn,\n state: \"ENABLED\",\n policyDetails: {\n resourceTypes: \"VOLUME\",\n schedules: [{\n name: \"2 weeks of daily snapshots\",\n createRule: {\n interval: 24,\n intervalUnit: \"HOURS\",\n times: \"23:45\",\n },\n retainRule: {\n count: 14,\n },\n tagsToAdd: {\n SnapshotCreator: \"DLM\",\n },\n copyTags: false,\n crossRegionCopyRules: [{\n target: \"us-west-2\",\n encrypted: true,\n cmkArn: dlmCrossRegionCopyCmk.arn,\n copyTags: true,\n retainRule: {\n interval: 30,\n intervalUnit: \"DAYS\",\n },\n }],\n }],\n targetTags: {\n Snapshot: \"true\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# ...other configuration...\ncurrent = aws.get_caller_identity()\nkey = aws.iam.get_policy_document(statements=[{\n \"sid\": \"Enable IAM User Permissions\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n \"actions\": [\"kms:*\"],\n \"resources\": [\"*\"],\n}])\ndlm_cross_region_copy_cmk = aws.kms.Key(\"dlm_cross_region_copy_cmk\",\n description=\"Example Alternate Region KMS Key\",\n policy=key.json)\nexample = aws.dlm.LifecyclePolicy(\"example\",\n description=\"example DLM lifecycle policy\",\n execution_role_arn=dlm_lifecycle_role[\"arn\"],\n state=\"ENABLED\",\n policy_details={\n \"resource_types\": \"VOLUME\",\n \"schedules\": [{\n \"name\": \"2 weeks of daily snapshots\",\n \"create_rule\": {\n \"interval\": 24,\n \"interval_unit\": \"HOURS\",\n \"times\": \"23:45\",\n },\n \"retain_rule\": {\n \"count\": 14,\n },\n \"tags_to_add\": {\n \"snapshot_creator\": \"DLM\",\n },\n \"copy_tags\": False,\n \"cross_region_copy_rules\": [{\n \"target\": \"us-west-2\",\n \"encrypted\": True,\n \"cmk_arn\": dlm_cross_region_copy_cmk.arn,\n \"copy_tags\": True,\n \"retain_rule\": {\n \"interval\": 30,\n \"interval_unit\": \"DAYS\",\n },\n }],\n }],\n \"target_tags\": {\n \"snapshot\": \"true\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // ...other configuration...\n var current = Aws.GetCallerIdentity.Invoke();\n\n var key = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Enable IAM User Permissions\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var dlmCrossRegionCopyCmk = new Aws.Kms.Key(\"dlm_cross_region_copy_cmk\", new()\n {\n Description = \"Example Alternate Region KMS Key\",\n Policy = key.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var example = new Aws.Dlm.LifecyclePolicy(\"example\", new()\n {\n Description = \"example DLM lifecycle policy\",\n ExecutionRoleArn = dlmLifecycleRole.Arn,\n State = \"ENABLED\",\n PolicyDetails = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsArgs\n {\n ResourceTypes = \"VOLUME\",\n Schedules = new[]\n {\n new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleArgs\n {\n Name = \"2 weeks of daily snapshots\",\n CreateRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs\n {\n Interval = 24,\n IntervalUnit = \"HOURS\",\n Times = \"23:45\",\n },\n RetainRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs\n {\n Count = 14,\n },\n TagsToAdd = \n {\n { \"SnapshotCreator\", \"DLM\" },\n },\n CopyTags = false,\n CrossRegionCopyRules = new[]\n {\n new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleArgs\n {\n Target = \"us-west-2\",\n Encrypted = true,\n CmkArn = dlmCrossRegionCopyCmk.Arn,\n CopyTags = true,\n RetainRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRuleArgs\n {\n Interval = 30,\n IntervalUnit = \"DAYS\",\n },\n },\n },\n },\n },\n TargetTags = \n {\n { \"Snapshot\", \"true\" },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dlm\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// ...other configuration...\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tkey, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Enable IAM User Permissions\"),\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdlmCrossRegionCopyCmk, err := kms.NewKey(ctx, \"dlm_cross_region_copy_cmk\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Example Alternate Region KMS Key\"),\n\t\t\tPolicy: pulumi.String(key.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dlm.NewLifecyclePolicy(ctx, \"example\", \u0026dlm.LifecyclePolicyArgs{\n\t\t\tDescription: pulumi.String(\"example DLM lifecycle policy\"),\n\t\t\tExecutionRoleArn: pulumi.Any(dlmLifecycleRole.Arn),\n\t\t\tState: pulumi.String(\"ENABLED\"),\n\t\t\tPolicyDetails: \u0026dlm.LifecyclePolicyPolicyDetailsArgs{\n\t\t\t\tResourceTypes: pulumi.StringArray(\"VOLUME\"),\n\t\t\t\tSchedules: dlm.LifecyclePolicyPolicyDetailsScheduleArray{\n\t\t\t\t\t\u0026dlm.LifecyclePolicyPolicyDetailsScheduleArgs{\n\t\t\t\t\t\tName: pulumi.String(\"2 weeks of daily snapshots\"),\n\t\t\t\t\t\tCreateRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs{\n\t\t\t\t\t\t\tInterval: pulumi.Int(24),\n\t\t\t\t\t\t\tIntervalUnit: pulumi.String(\"HOURS\"),\n\t\t\t\t\t\t\tTimes: pulumi.String(\"23:45\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tRetainRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs{\n\t\t\t\t\t\t\tCount: pulumi.Int(14),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tTagsToAdd: pulumi.StringMap{\n\t\t\t\t\t\t\t\"SnapshotCreator\": pulumi.String(\"DLM\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tCopyTags: pulumi.Bool(false),\n\t\t\t\t\t\tCrossRegionCopyRules: dlm.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleArray{\n\t\t\t\t\t\t\t\u0026dlm.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleArgs{\n\t\t\t\t\t\t\t\tTarget: pulumi.String(\"us-west-2\"),\n\t\t\t\t\t\t\t\tEncrypted: pulumi.Bool(true),\n\t\t\t\t\t\t\t\tCmkArn: dlmCrossRegionCopyCmk.Arn,\n\t\t\t\t\t\t\t\tCopyTags: pulumi.Bool(true),\n\t\t\t\t\t\t\t\tRetainRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRuleArgs{\n\t\t\t\t\t\t\t\t\tInterval: pulumi.Int(30),\n\t\t\t\t\t\t\t\t\tIntervalUnit: pulumi.String(\"DAYS\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tTargetTags: pulumi.StringMap{\n\t\t\t\t\t\"Snapshot\": pulumi.String(\"true\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.dlm.LifecyclePolicy;\nimport com.pulumi.aws.dlm.LifecyclePolicyArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // ...other configuration...\n final var current = AwsFunctions.getCallerIdentity();\n\n final var key = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"Enable IAM User Permissions\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .actions(\"kms:*\")\n .resources(\"*\")\n .build())\n .build());\n\n var dlmCrossRegionCopyCmk = new Key(\"dlmCrossRegionCopyCmk\", KeyArgs.builder()\n .description(\"Example Alternate Region KMS Key\")\n .policy(key.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var example = new LifecyclePolicy(\"example\", LifecyclePolicyArgs.builder()\n .description(\"example DLM lifecycle policy\")\n .executionRoleArn(dlmLifecycleRole.arn())\n .state(\"ENABLED\")\n .policyDetails(LifecyclePolicyPolicyDetailsArgs.builder()\n .resourceTypes(\"VOLUME\")\n .schedules(LifecyclePolicyPolicyDetailsScheduleArgs.builder()\n .name(\"2 weeks of daily snapshots\")\n .createRule(LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs.builder()\n .interval(24)\n .intervalUnit(\"HOURS\")\n .times(\"23:45\")\n .build())\n .retainRule(LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs.builder()\n .count(14)\n .build())\n .tagsToAdd(Map.of(\"SnapshotCreator\", \"DLM\"))\n .copyTags(false)\n .crossRegionCopyRules(LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleArgs.builder()\n .target(\"us-west-2\")\n .encrypted(true)\n .cmkArn(dlmCrossRegionCopyCmk.arn())\n .copyTags(true)\n .retainRule(LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRuleArgs.builder()\n .interval(30)\n .intervalUnit(\"DAYS\")\n .build())\n .build())\n .build())\n .targetTags(Map.of(\"Snapshot\", \"true\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dlmCrossRegionCopyCmk:\n type: aws:kms:Key\n name: dlm_cross_region_copy_cmk\n properties:\n description: Example Alternate Region KMS Key\n policy: ${key.json}\n example:\n type: aws:dlm:LifecyclePolicy\n properties:\n description: example DLM lifecycle policy\n executionRoleArn: ${dlmLifecycleRole.arn}\n state: ENABLED\n policyDetails:\n resourceTypes: VOLUME\n schedules:\n - name: 2 weeks of daily snapshots\n createRule:\n interval: 24\n intervalUnit: HOURS\n times: 23:45\n retainRule:\n count: 14\n tagsToAdd:\n SnapshotCreator: DLM\n copyTags: false\n crossRegionCopyRules:\n - target: us-west-2\n encrypted: true\n cmkArn: ${dlmCrossRegionCopyCmk.arn}\n copyTags: true\n retainRule:\n interval: 30\n intervalUnit: DAYS\n targetTags:\n Snapshot: 'true'\nvariables:\n # ...other configuration...\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n key:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Enable IAM User Permissions\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n actions:\n - kms:*\n resources:\n - '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Event Based Policy Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst exampleLifecyclePolicy = new aws.dlm.LifecyclePolicy(\"example\", {\n description: \"tf-acc-basic\",\n executionRoleArn: exampleAwsIamRole.arn,\n policyDetails: {\n policyType: \"EVENT_BASED_POLICY\",\n action: {\n name: \"tf-acc-basic\",\n crossRegionCopies: [{\n encryptionConfiguration: {},\n retainRule: {\n interval: 15,\n intervalUnit: \"MONTHS\",\n },\n target: \"us-east-1\",\n }],\n },\n eventSource: {\n type: \"MANAGED_CWE\",\n parameters: {\n descriptionRegex: \"^.*Created for policy: policy-1234567890abcdef0.*$\",\n eventType: \"shareSnapshot\",\n snapshotOwners: [current.then(current =\u003e current.accountId)],\n },\n },\n },\n});\nconst example = aws.iam.getPolicy({\n name: \"AWSDataLifecycleManagerServiceRole\",\n});\nconst exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"example\", {\n role: exampleAwsIamRole.id,\n policyArn: example.then(example =\u003e example.arn),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample_lifecycle_policy = aws.dlm.LifecyclePolicy(\"example\",\n description=\"tf-acc-basic\",\n execution_role_arn=example_aws_iam_role[\"arn\"],\n policy_details={\n \"policy_type\": \"EVENT_BASED_POLICY\",\n \"action\": {\n \"name\": \"tf-acc-basic\",\n \"cross_region_copies\": [{\n \"encryption_configuration\": {},\n \"retain_rule\": {\n \"interval\": 15,\n \"interval_unit\": \"MONTHS\",\n },\n \"target\": \"us-east-1\",\n }],\n },\n \"event_source\": {\n \"type\": \"MANAGED_CWE\",\n \"parameters\": {\n \"description_regex\": \"^.*Created for policy: policy-1234567890abcdef0.*$\",\n \"event_type\": \"shareSnapshot\",\n \"snapshot_owners\": [current.account_id],\n },\n },\n })\nexample = aws.iam.get_policy(name=\"AWSDataLifecycleManagerServiceRole\")\nexample_role_policy_attachment = aws.iam.RolePolicyAttachment(\"example\",\n role=example_aws_iam_role[\"id\"],\n policy_arn=example.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var exampleLifecyclePolicy = new Aws.Dlm.LifecyclePolicy(\"example\", new()\n {\n Description = \"tf-acc-basic\",\n ExecutionRoleArn = exampleAwsIamRole.Arn,\n PolicyDetails = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsArgs\n {\n PolicyType = \"EVENT_BASED_POLICY\",\n Action = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsActionArgs\n {\n Name = \"tf-acc-basic\",\n CrossRegionCopies = new[]\n {\n new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsActionCrossRegionCopyArgs\n {\n EncryptionConfiguration = null,\n RetainRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsActionCrossRegionCopyRetainRuleArgs\n {\n Interval = 15,\n IntervalUnit = \"MONTHS\",\n },\n Target = \"us-east-1\",\n },\n },\n },\n EventSource = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsEventSourceArgs\n {\n Type = \"MANAGED_CWE\",\n Parameters = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsEventSourceParametersArgs\n {\n DescriptionRegex = \"^.*Created for policy: policy-1234567890abcdef0.*$\",\n EventType = \"shareSnapshot\",\n SnapshotOwners = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n },\n });\n\n var example = Aws.Iam.GetPolicy.Invoke(new()\n {\n Name = \"AWSDataLifecycleManagerServiceRole\",\n });\n\n var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"example\", new()\n {\n Role = exampleAwsIamRole.Id,\n PolicyArn = example.Apply(getPolicyResult =\u003e getPolicyResult.Arn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dlm\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dlm.NewLifecyclePolicy(ctx, \"example\", \u0026dlm.LifecyclePolicyArgs{\n\t\t\tDescription: pulumi.String(\"tf-acc-basic\"),\n\t\t\tExecutionRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tPolicyDetails: \u0026dlm.LifecyclePolicyPolicyDetailsArgs{\n\t\t\t\tPolicyType: pulumi.String(\"EVENT_BASED_POLICY\"),\n\t\t\t\tAction: \u0026dlm.LifecyclePolicyPolicyDetailsActionArgs{\n\t\t\t\t\tName: pulumi.String(\"tf-acc-basic\"),\n\t\t\t\t\tCrossRegionCopies: dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyArray{\n\t\t\t\t\t\t\u0026dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyArgs{\n\t\t\t\t\t\t\tEncryptionConfiguration: nil,\n\t\t\t\t\t\t\tRetainRule: \u0026dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyRetainRuleArgs{\n\t\t\t\t\t\t\t\tInterval: pulumi.Int(15),\n\t\t\t\t\t\t\t\tIntervalUnit: pulumi.String(\"MONTHS\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tTarget: pulumi.String(\"us-east-1\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tEventSource: \u0026dlm.LifecyclePolicyPolicyDetailsEventSourceArgs{\n\t\t\t\t\tType: pulumi.String(\"MANAGED_CWE\"),\n\t\t\t\t\tParameters: \u0026dlm.LifecyclePolicyPolicyDetailsEventSourceParametersArgs{\n\t\t\t\t\t\tDescriptionRegex: pulumi.String(\"^.*Created for policy: policy-1234567890abcdef0.*$\"),\n\t\t\t\t\t\tEventType: pulumi.String(\"shareSnapshot\"),\n\t\t\t\t\t\tSnapshotOwners: pulumi.StringArray{\n\t\t\t\t\t\t\tpulumi.String(current.AccountId),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.LookupPolicy(ctx, \u0026iam.LookupPolicyArgs{\n\t\t\tName: pulumi.StringRef(\"AWSDataLifecycleManagerServiceRole\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicyAttachment(ctx, \"example\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tRole: pulumi.Any(exampleAwsIamRole.Id),\n\t\t\tPolicyArn: pulumi.String(example.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.dlm.LifecyclePolicy;\nimport com.pulumi.aws.dlm.LifecyclePolicyArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsActionArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsEventSourceArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsEventSourceParametersArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var exampleLifecyclePolicy = new LifecyclePolicy(\"exampleLifecyclePolicy\", LifecyclePolicyArgs.builder()\n .description(\"tf-acc-basic\")\n .executionRoleArn(exampleAwsIamRole.arn())\n .policyDetails(LifecyclePolicyPolicyDetailsArgs.builder()\n .policyType(\"EVENT_BASED_POLICY\")\n .action(LifecyclePolicyPolicyDetailsActionArgs.builder()\n .name(\"tf-acc-basic\")\n .crossRegionCopies(LifecyclePolicyPolicyDetailsActionCrossRegionCopyArgs.builder()\n .encryptionConfiguration()\n .retainRule(LifecyclePolicyPolicyDetailsActionCrossRegionCopyRetainRuleArgs.builder()\n .interval(15)\n .intervalUnit(\"MONTHS\")\n .build())\n .target(\"us-east-1\")\n .build())\n .build())\n .eventSource(LifecyclePolicyPolicyDetailsEventSourceArgs.builder()\n .type(\"MANAGED_CWE\")\n .parameters(LifecyclePolicyPolicyDetailsEventSourceParametersArgs.builder()\n .descriptionRegex(\"^.*Created for policy: policy-1234567890abcdef0.*$\")\n .eventType(\"shareSnapshot\")\n .snapshotOwners(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .build())\n .build())\n .build());\n\n final var example = IamFunctions.getPolicy(GetPolicyArgs.builder()\n .name(\"AWSDataLifecycleManagerServiceRole\")\n .build());\n\n var exampleRolePolicyAttachment = new RolePolicyAttachment(\"exampleRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .role(exampleAwsIamRole.id())\n .policyArn(example.applyValue(getPolicyResult -\u003e getPolicyResult.arn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleLifecyclePolicy:\n type: aws:dlm:LifecyclePolicy\n name: example\n properties:\n description: tf-acc-basic\n executionRoleArn: ${exampleAwsIamRole.arn}\n policyDetails:\n policyType: EVENT_BASED_POLICY\n action:\n name: tf-acc-basic\n crossRegionCopies:\n - encryptionConfiguration: {}\n retainRule:\n interval: 15\n intervalUnit: MONTHS\n target: us-east-1\n eventSource:\n type: MANAGED_CWE\n parameters:\n descriptionRegex: '^.*Created for policy: policy-1234567890abcdef0.*$'\n eventType: shareSnapshot\n snapshotOwners:\n - ${current.accountId}\n exampleRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: example\n properties:\n role: ${exampleAwsIamRole.id}\n policyArn: ${example.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicy\n Arguments:\n name: AWSDataLifecycleManagerServiceRole\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DLM lifecycle policies using their policy ID. For example:\n\n```sh\n$ pulumi import aws:dlm/lifecyclePolicy:LifecyclePolicy example policy-abcdef12345678901\n```\n", + "description": "Provides a [Data Lifecycle Manager (DLM) lifecycle policy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html) for managing snapshots.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"dlm.amazonaws.com\"],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst dlmLifecycleRole = new aws.iam.Role(\"dlm_lifecycle_role\", {\n name: \"dlm-lifecycle-role\",\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n});\nconst dlmLifecycle = aws.iam.getPolicyDocument({\n statements: [\n {\n effect: \"Allow\",\n actions: [\n \"ec2:CreateSnapshot\",\n \"ec2:CreateSnapshots\",\n \"ec2:DeleteSnapshot\",\n \"ec2:DescribeInstances\",\n \"ec2:DescribeVolumes\",\n \"ec2:DescribeSnapshots\",\n ],\n resources: [\"*\"],\n },\n {\n effect: \"Allow\",\n actions: [\"ec2:CreateTags\"],\n resources: [\"arn:aws:ec2:*::snapshot/*\"],\n },\n ],\n});\nconst dlmLifecycleRolePolicy = new aws.iam.RolePolicy(\"dlm_lifecycle\", {\n name: \"dlm-lifecycle-policy\",\n role: dlmLifecycleRole.id,\n policy: dlmLifecycle.then(dlmLifecycle =\u003e dlmLifecycle.json),\n});\nconst example = new aws.dlm.LifecyclePolicy(\"example\", {\n description: \"example DLM lifecycle policy\",\n executionRoleArn: dlmLifecycleRole.arn,\n state: \"ENABLED\",\n policyDetails: {\n resourceTypes: \"VOLUME\",\n schedules: [{\n name: \"2 weeks of daily snapshots\",\n createRule: {\n interval: 24,\n intervalUnit: \"HOURS\",\n times: \"23:45\",\n },\n retainRule: {\n count: 14,\n },\n tagsToAdd: {\n SnapshotCreator: \"DLM\",\n },\n copyTags: false,\n }],\n targetTags: {\n Snapshot: \"true\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"dlm.amazonaws.com\"],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\ndlm_lifecycle_role = aws.iam.Role(\"dlm_lifecycle_role\",\n name=\"dlm-lifecycle-role\",\n assume_role_policy=assume_role.json)\ndlm_lifecycle = aws.iam.get_policy_document(statements=[\n {\n \"effect\": \"Allow\",\n \"actions\": [\n \"ec2:CreateSnapshot\",\n \"ec2:CreateSnapshots\",\n \"ec2:DeleteSnapshot\",\n \"ec2:DescribeInstances\",\n \"ec2:DescribeVolumes\",\n \"ec2:DescribeSnapshots\",\n ],\n \"resources\": [\"*\"],\n },\n {\n \"effect\": \"Allow\",\n \"actions\": [\"ec2:CreateTags\"],\n \"resources\": [\"arn:aws:ec2:*::snapshot/*\"],\n },\n])\ndlm_lifecycle_role_policy = aws.iam.RolePolicy(\"dlm_lifecycle\",\n name=\"dlm-lifecycle-policy\",\n role=dlm_lifecycle_role.id,\n policy=dlm_lifecycle.json)\nexample = aws.dlm.LifecyclePolicy(\"example\",\n description=\"example DLM lifecycle policy\",\n execution_role_arn=dlm_lifecycle_role.arn,\n state=\"ENABLED\",\n policy_details={\n \"resource_types\": \"VOLUME\",\n \"schedules\": [{\n \"name\": \"2 weeks of daily snapshots\",\n \"create_rule\": {\n \"interval\": 24,\n \"interval_unit\": \"HOURS\",\n \"times\": \"23:45\",\n },\n \"retain_rule\": {\n \"count\": 14,\n },\n \"tags_to_add\": {\n \"snapshot_creator\": \"DLM\",\n },\n \"copy_tags\": False,\n }],\n \"target_tags\": {\n \"snapshot\": \"true\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"dlm.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var dlmLifecycleRole = new Aws.Iam.Role(\"dlm_lifecycle_role\", new()\n {\n Name = \"dlm-lifecycle-role\",\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var dlmLifecycle = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ec2:CreateSnapshot\",\n \"ec2:CreateSnapshots\",\n \"ec2:DeleteSnapshot\",\n \"ec2:DescribeInstances\",\n \"ec2:DescribeVolumes\",\n \"ec2:DescribeSnapshots\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"ec2:CreateTags\",\n },\n Resources = new[]\n {\n \"arn:aws:ec2:*::snapshot/*\",\n },\n },\n },\n });\n\n var dlmLifecycleRolePolicy = new Aws.Iam.RolePolicy(\"dlm_lifecycle\", new()\n {\n Name = \"dlm-lifecycle-policy\",\n Role = dlmLifecycleRole.Id,\n Policy = dlmLifecycle.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var example = new Aws.Dlm.LifecyclePolicy(\"example\", new()\n {\n Description = \"example DLM lifecycle policy\",\n ExecutionRoleArn = dlmLifecycleRole.Arn,\n State = \"ENABLED\",\n PolicyDetails = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsArgs\n {\n ResourceTypes = \"VOLUME\",\n Schedules = new[]\n {\n new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleArgs\n {\n Name = \"2 weeks of daily snapshots\",\n CreateRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs\n {\n Interval = 24,\n IntervalUnit = \"HOURS\",\n Times = \"23:45\",\n },\n RetainRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs\n {\n Count = 14,\n },\n TagsToAdd = \n {\n { \"SnapshotCreator\", \"DLM\" },\n },\n CopyTags = false,\n },\n },\n TargetTags = \n {\n { \"Snapshot\", \"true\" },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dlm\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"dlm.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdlmLifecycleRole, err := iam.NewRole(ctx, \"dlm_lifecycle_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"dlm-lifecycle-role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdlmLifecycle, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"ec2:CreateSnapshot\",\n\t\t\t\t\t\t\"ec2:CreateSnapshots\",\n\t\t\t\t\t\t\"ec2:DeleteSnapshot\",\n\t\t\t\t\t\t\"ec2:DescribeInstances\",\n\t\t\t\t\t\t\"ec2:DescribeVolumes\",\n\t\t\t\t\t\t\"ec2:DescribeSnapshots\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"ec2:CreateTags\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:ec2:*::snapshot/*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicy(ctx, \"dlm_lifecycle\", \u0026iam.RolePolicyArgs{\n\t\t\tName: pulumi.String(\"dlm-lifecycle-policy\"),\n\t\t\tRole: dlmLifecycleRole.ID(),\n\t\t\tPolicy: pulumi.String(dlmLifecycle.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dlm.NewLifecyclePolicy(ctx, \"example\", \u0026dlm.LifecyclePolicyArgs{\n\t\t\tDescription: pulumi.String(\"example DLM lifecycle policy\"),\n\t\t\tExecutionRoleArn: dlmLifecycleRole.Arn,\n\t\t\tState: pulumi.String(\"ENABLED\"),\n\t\t\tPolicyDetails: \u0026dlm.LifecyclePolicyPolicyDetailsArgs{\n\t\t\t\tResourceTypes: pulumi.StringArray(\"VOLUME\"),\n\t\t\t\tSchedules: dlm.LifecyclePolicyPolicyDetailsScheduleArray{\n\t\t\t\t\t\u0026dlm.LifecyclePolicyPolicyDetailsScheduleArgs{\n\t\t\t\t\t\tName: pulumi.String(\"2 weeks of daily snapshots\"),\n\t\t\t\t\t\tCreateRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs{\n\t\t\t\t\t\t\tInterval: pulumi.Int(24),\n\t\t\t\t\t\t\tIntervalUnit: pulumi.String(\"HOURS\"),\n\t\t\t\t\t\t\tTimes: pulumi.String(\"23:45\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tRetainRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs{\n\t\t\t\t\t\t\tCount: pulumi.Int(14),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tTagsToAdd: pulumi.StringMap{\n\t\t\t\t\t\t\t\"SnapshotCreator\": pulumi.String(\"DLM\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tCopyTags: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tTargetTags: pulumi.StringMap{\n\t\t\t\t\t\"Snapshot\": pulumi.String(\"true\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport com.pulumi.aws.dlm.LifecyclePolicy;\nimport com.pulumi.aws.dlm.LifecyclePolicyArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"dlm.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var dlmLifecycleRole = new Role(\"dlmLifecycleRole\", RoleArgs.builder()\n .name(\"dlm-lifecycle-role\")\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n final var dlmLifecycle = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"ec2:CreateSnapshot\",\n \"ec2:CreateSnapshots\",\n \"ec2:DeleteSnapshot\",\n \"ec2:DescribeInstances\",\n \"ec2:DescribeVolumes\",\n \"ec2:DescribeSnapshots\")\n .resources(\"*\")\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions(\"ec2:CreateTags\")\n .resources(\"arn:aws:ec2:*::snapshot/*\")\n .build())\n .build());\n\n var dlmLifecycleRolePolicy = new RolePolicy(\"dlmLifecycleRolePolicy\", RolePolicyArgs.builder()\n .name(\"dlm-lifecycle-policy\")\n .role(dlmLifecycleRole.id())\n .policy(dlmLifecycle.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var example = new LifecyclePolicy(\"example\", LifecyclePolicyArgs.builder()\n .description(\"example DLM lifecycle policy\")\n .executionRoleArn(dlmLifecycleRole.arn())\n .state(\"ENABLED\")\n .policyDetails(LifecyclePolicyPolicyDetailsArgs.builder()\n .resourceTypes(\"VOLUME\")\n .schedules(LifecyclePolicyPolicyDetailsScheduleArgs.builder()\n .name(\"2 weeks of daily snapshots\")\n .createRule(LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs.builder()\n .interval(24)\n .intervalUnit(\"HOURS\")\n .times(\"23:45\")\n .build())\n .retainRule(LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs.builder()\n .count(14)\n .build())\n .tagsToAdd(Map.of(\"SnapshotCreator\", \"DLM\"))\n .copyTags(false)\n .build())\n .targetTags(Map.of(\"Snapshot\", \"true\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dlmLifecycleRole:\n type: aws:iam:Role\n name: dlm_lifecycle_role\n properties:\n name: dlm-lifecycle-role\n assumeRolePolicy: ${assumeRole.json}\n dlmLifecycleRolePolicy:\n type: aws:iam:RolePolicy\n name: dlm_lifecycle\n properties:\n name: dlm-lifecycle-policy\n role: ${dlmLifecycleRole.id}\n policy: ${dlmLifecycle.json}\n example:\n type: aws:dlm:LifecyclePolicy\n properties:\n description: example DLM lifecycle policy\n executionRoleArn: ${dlmLifecycleRole.arn}\n state: ENABLED\n policyDetails:\n resourceTypes: VOLUME\n schedules:\n - name: 2 weeks of daily snapshots\n createRule:\n interval: 24\n intervalUnit: HOURS\n times: 23:45\n retainRule:\n count: 14\n tagsToAdd:\n SnapshotCreator: DLM\n copyTags: false\n targetTags:\n Snapshot: 'true'\nvariables:\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - dlm.amazonaws.com\n actions:\n - sts:AssumeRole\n dlmLifecycle:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - ec2:CreateSnapshot\n - ec2:CreateSnapshots\n - ec2:DeleteSnapshot\n - ec2:DescribeInstances\n - ec2:DescribeVolumes\n - ec2:DescribeSnapshots\n resources:\n - '*'\n - effect: Allow\n actions:\n - ec2:CreateTags\n resources:\n - arn:aws:ec2:*::snapshot/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Cross-Region Snapshot Copy Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// ...other configuration...\nconst current = aws.getCallerIdentity({});\nconst key = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"Enable IAM User Permissions\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current.accountId}:root`],\n }],\n actions: [\"kms:*\"],\n resources: [\"*\"],\n }],\n}));\nconst dlmCrossRegionCopyCmk = new aws.kms.Key(\"dlm_cross_region_copy_cmk\", {\n description: \"Example Alternate Region KMS Key\",\n policy: key.then(key =\u003e key.json),\n});\nconst example = new aws.dlm.LifecyclePolicy(\"example\", {\n description: \"example DLM lifecycle policy\",\n executionRoleArn: dlmLifecycleRole.arn,\n state: \"ENABLED\",\n policyDetails: {\n resourceTypes: \"VOLUME\",\n schedules: [{\n name: \"2 weeks of daily snapshots\",\n createRule: {\n interval: 24,\n intervalUnit: \"HOURS\",\n times: \"23:45\",\n },\n retainRule: {\n count: 14,\n },\n tagsToAdd: {\n SnapshotCreator: \"DLM\",\n },\n copyTags: false,\n crossRegionCopyRules: [{\n target: \"us-west-2\",\n encrypted: true,\n cmkArn: dlmCrossRegionCopyCmk.arn,\n copyTags: true,\n retainRule: {\n interval: 30,\n intervalUnit: \"DAYS\",\n },\n }],\n }],\n targetTags: {\n Snapshot: \"true\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# ...other configuration...\ncurrent = aws.get_caller_identity()\nkey = aws.iam.get_policy_document(statements=[{\n \"sid\": \"Enable IAM User Permissions\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n \"actions\": [\"kms:*\"],\n \"resources\": [\"*\"],\n}])\ndlm_cross_region_copy_cmk = aws.kms.Key(\"dlm_cross_region_copy_cmk\",\n description=\"Example Alternate Region KMS Key\",\n policy=key.json)\nexample = aws.dlm.LifecyclePolicy(\"example\",\n description=\"example DLM lifecycle policy\",\n execution_role_arn=dlm_lifecycle_role[\"arn\"],\n state=\"ENABLED\",\n policy_details={\n \"resource_types\": \"VOLUME\",\n \"schedules\": [{\n \"name\": \"2 weeks of daily snapshots\",\n \"create_rule\": {\n \"interval\": 24,\n \"interval_unit\": \"HOURS\",\n \"times\": \"23:45\",\n },\n \"retain_rule\": {\n \"count\": 14,\n },\n \"tags_to_add\": {\n \"snapshot_creator\": \"DLM\",\n },\n \"copy_tags\": False,\n \"cross_region_copy_rules\": [{\n \"target\": \"us-west-2\",\n \"encrypted\": True,\n \"cmk_arn\": dlm_cross_region_copy_cmk.arn,\n \"copy_tags\": True,\n \"retain_rule\": {\n \"interval\": 30,\n \"interval_unit\": \"DAYS\",\n },\n }],\n }],\n \"target_tags\": {\n \"snapshot\": \"true\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // ...other configuration...\n var current = Aws.GetCallerIdentity.Invoke();\n\n var key = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Enable IAM User Permissions\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var dlmCrossRegionCopyCmk = new Aws.Kms.Key(\"dlm_cross_region_copy_cmk\", new()\n {\n Description = \"Example Alternate Region KMS Key\",\n Policy = key.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var example = new Aws.Dlm.LifecyclePolicy(\"example\", new()\n {\n Description = \"example DLM lifecycle policy\",\n ExecutionRoleArn = dlmLifecycleRole.Arn,\n State = \"ENABLED\",\n PolicyDetails = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsArgs\n {\n ResourceTypes = \"VOLUME\",\n Schedules = new[]\n {\n new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleArgs\n {\n Name = \"2 weeks of daily snapshots\",\n CreateRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs\n {\n Interval = 24,\n IntervalUnit = \"HOURS\",\n Times = \"23:45\",\n },\n RetainRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs\n {\n Count = 14,\n },\n TagsToAdd = \n {\n { \"SnapshotCreator\", \"DLM\" },\n },\n CopyTags = false,\n CrossRegionCopyRules = new[]\n {\n new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleArgs\n {\n Target = \"us-west-2\",\n Encrypted = true,\n CmkArn = dlmCrossRegionCopyCmk.Arn,\n CopyTags = true,\n RetainRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRuleArgs\n {\n Interval = 30,\n IntervalUnit = \"DAYS\",\n },\n },\n },\n },\n },\n TargetTags = \n {\n { \"Snapshot\", \"true\" },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dlm\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// ...other configuration...\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tkey, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Enable IAM User Permissions\"),\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdlmCrossRegionCopyCmk, err := kms.NewKey(ctx, \"dlm_cross_region_copy_cmk\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Example Alternate Region KMS Key\"),\n\t\t\tPolicy: pulumi.String(key.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dlm.NewLifecyclePolicy(ctx, \"example\", \u0026dlm.LifecyclePolicyArgs{\n\t\t\tDescription: pulumi.String(\"example DLM lifecycle policy\"),\n\t\t\tExecutionRoleArn: pulumi.Any(dlmLifecycleRole.Arn),\n\t\t\tState: pulumi.String(\"ENABLED\"),\n\t\t\tPolicyDetails: \u0026dlm.LifecyclePolicyPolicyDetailsArgs{\n\t\t\t\tResourceTypes: pulumi.StringArray(\"VOLUME\"),\n\t\t\t\tSchedules: dlm.LifecyclePolicyPolicyDetailsScheduleArray{\n\t\t\t\t\t\u0026dlm.LifecyclePolicyPolicyDetailsScheduleArgs{\n\t\t\t\t\t\tName: pulumi.String(\"2 weeks of daily snapshots\"),\n\t\t\t\t\t\tCreateRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs{\n\t\t\t\t\t\t\tInterval: pulumi.Int(24),\n\t\t\t\t\t\t\tIntervalUnit: pulumi.String(\"HOURS\"),\n\t\t\t\t\t\t\tTimes: pulumi.String(\"23:45\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tRetainRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs{\n\t\t\t\t\t\t\tCount: pulumi.Int(14),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tTagsToAdd: pulumi.StringMap{\n\t\t\t\t\t\t\t\"SnapshotCreator\": pulumi.String(\"DLM\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tCopyTags: pulumi.Bool(false),\n\t\t\t\t\t\tCrossRegionCopyRules: dlm.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleArray{\n\t\t\t\t\t\t\t\u0026dlm.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleArgs{\n\t\t\t\t\t\t\t\tTarget: pulumi.String(\"us-west-2\"),\n\t\t\t\t\t\t\t\tEncrypted: pulumi.Bool(true),\n\t\t\t\t\t\t\t\tCmkArn: dlmCrossRegionCopyCmk.Arn,\n\t\t\t\t\t\t\t\tCopyTags: pulumi.Bool(true),\n\t\t\t\t\t\t\t\tRetainRule: \u0026dlm.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRuleArgs{\n\t\t\t\t\t\t\t\t\tInterval: pulumi.Int(30),\n\t\t\t\t\t\t\t\t\tIntervalUnit: pulumi.String(\"DAYS\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tTargetTags: pulumi.StringMap{\n\t\t\t\t\t\"Snapshot\": pulumi.String(\"true\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.dlm.LifecyclePolicy;\nimport com.pulumi.aws.dlm.LifecyclePolicyArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // ...other configuration...\n final var current = AwsFunctions.getCallerIdentity();\n\n final var key = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"Enable IAM User Permissions\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .actions(\"kms:*\")\n .resources(\"*\")\n .build())\n .build());\n\n var dlmCrossRegionCopyCmk = new Key(\"dlmCrossRegionCopyCmk\", KeyArgs.builder()\n .description(\"Example Alternate Region KMS Key\")\n .policy(key.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var example = new LifecyclePolicy(\"example\", LifecyclePolicyArgs.builder()\n .description(\"example DLM lifecycle policy\")\n .executionRoleArn(dlmLifecycleRole.arn())\n .state(\"ENABLED\")\n .policyDetails(LifecyclePolicyPolicyDetailsArgs.builder()\n .resourceTypes(\"VOLUME\")\n .schedules(LifecyclePolicyPolicyDetailsScheduleArgs.builder()\n .name(\"2 weeks of daily snapshots\")\n .createRule(LifecyclePolicyPolicyDetailsScheduleCreateRuleArgs.builder()\n .interval(24)\n .intervalUnit(\"HOURS\")\n .times(\"23:45\")\n .build())\n .retainRule(LifecyclePolicyPolicyDetailsScheduleRetainRuleArgs.builder()\n .count(14)\n .build())\n .tagsToAdd(Map.of(\"SnapshotCreator\", \"DLM\"))\n .copyTags(false)\n .crossRegionCopyRules(LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleArgs.builder()\n .target(\"us-west-2\")\n .encrypted(true)\n .cmkArn(dlmCrossRegionCopyCmk.arn())\n .copyTags(true)\n .retainRule(LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRuleArgs.builder()\n .interval(30)\n .intervalUnit(\"DAYS\")\n .build())\n .build())\n .build())\n .targetTags(Map.of(\"Snapshot\", \"true\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dlmCrossRegionCopyCmk:\n type: aws:kms:Key\n name: dlm_cross_region_copy_cmk\n properties:\n description: Example Alternate Region KMS Key\n policy: ${key.json}\n example:\n type: aws:dlm:LifecyclePolicy\n properties:\n description: example DLM lifecycle policy\n executionRoleArn: ${dlmLifecycleRole.arn}\n state: ENABLED\n policyDetails:\n resourceTypes: VOLUME\n schedules:\n - name: 2 weeks of daily snapshots\n createRule:\n interval: 24\n intervalUnit: HOURS\n times: 23:45\n retainRule:\n count: 14\n tagsToAdd:\n SnapshotCreator: DLM\n copyTags: false\n crossRegionCopyRules:\n - target: us-west-2\n encrypted: true\n cmkArn: ${dlmCrossRegionCopyCmk.arn}\n copyTags: true\n retainRule:\n interval: 30\n intervalUnit: DAYS\n targetTags:\n Snapshot: 'true'\nvariables:\n # ...other configuration...\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n key:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Enable IAM User Permissions\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n actions:\n - kms:*\n resources:\n - '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Event Based Policy Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst exampleLifecyclePolicy = new aws.dlm.LifecyclePolicy(\"example\", {\n description: \"tf-acc-basic\",\n executionRoleArn: exampleAwsIamRole.arn,\n policyDetails: {\n policyType: \"EVENT_BASED_POLICY\",\n action: {\n name: \"tf-acc-basic\",\n crossRegionCopies: [{\n encryptionConfiguration: {},\n retainRule: {\n interval: 15,\n intervalUnit: \"MONTHS\",\n },\n target: \"us-east-1\",\n }],\n },\n eventSource: {\n type: \"MANAGED_CWE\",\n parameters: {\n descriptionRegex: \"^.*Created for policy: policy-1234567890abcdef0.*$\",\n eventType: \"shareSnapshot\",\n snapshotOwners: [current.then(current =\u003e current.accountId)],\n },\n },\n },\n});\nconst example = aws.iam.getPolicy({\n name: \"AWSDataLifecycleManagerServiceRole\",\n});\nconst exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"example\", {\n role: exampleAwsIamRole.id,\n policyArn: example.then(example =\u003e example.arn),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample_lifecycle_policy = aws.dlm.LifecyclePolicy(\"example\",\n description=\"tf-acc-basic\",\n execution_role_arn=example_aws_iam_role[\"arn\"],\n policy_details={\n \"policy_type\": \"EVENT_BASED_POLICY\",\n \"action\": {\n \"name\": \"tf-acc-basic\",\n \"cross_region_copies\": [{\n \"encryption_configuration\": {},\n \"retain_rule\": {\n \"interval\": 15,\n \"interval_unit\": \"MONTHS\",\n },\n \"target\": \"us-east-1\",\n }],\n },\n \"event_source\": {\n \"type\": \"MANAGED_CWE\",\n \"parameters\": {\n \"description_regex\": \"^.*Created for policy: policy-1234567890abcdef0.*$\",\n \"event_type\": \"shareSnapshot\",\n \"snapshot_owners\": [current.account_id],\n },\n },\n })\nexample = aws.iam.get_policy(name=\"AWSDataLifecycleManagerServiceRole\")\nexample_role_policy_attachment = aws.iam.RolePolicyAttachment(\"example\",\n role=example_aws_iam_role[\"id\"],\n policy_arn=example.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var exampleLifecyclePolicy = new Aws.Dlm.LifecyclePolicy(\"example\", new()\n {\n Description = \"tf-acc-basic\",\n ExecutionRoleArn = exampleAwsIamRole.Arn,\n PolicyDetails = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsArgs\n {\n PolicyType = \"EVENT_BASED_POLICY\",\n Action = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsActionArgs\n {\n Name = \"tf-acc-basic\",\n CrossRegionCopies = new[]\n {\n new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsActionCrossRegionCopyArgs\n {\n EncryptionConfiguration = null,\n RetainRule = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsActionCrossRegionCopyRetainRuleArgs\n {\n Interval = 15,\n IntervalUnit = \"MONTHS\",\n },\n Target = \"us-east-1\",\n },\n },\n },\n EventSource = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsEventSourceArgs\n {\n Type = \"MANAGED_CWE\",\n Parameters = new Aws.Dlm.Inputs.LifecyclePolicyPolicyDetailsEventSourceParametersArgs\n {\n DescriptionRegex = \"^.*Created for policy: policy-1234567890abcdef0.*$\",\n EventType = \"shareSnapshot\",\n SnapshotOwners = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n },\n });\n\n var example = Aws.Iam.GetPolicy.Invoke(new()\n {\n Name = \"AWSDataLifecycleManagerServiceRole\",\n });\n\n var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"example\", new()\n {\n Role = exampleAwsIamRole.Id,\n PolicyArn = example.Apply(getPolicyResult =\u003e getPolicyResult.Arn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dlm\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dlm.NewLifecyclePolicy(ctx, \"example\", \u0026dlm.LifecyclePolicyArgs{\n\t\t\tDescription: pulumi.String(\"tf-acc-basic\"),\n\t\t\tExecutionRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tPolicyDetails: \u0026dlm.LifecyclePolicyPolicyDetailsArgs{\n\t\t\t\tPolicyType: pulumi.String(\"EVENT_BASED_POLICY\"),\n\t\t\t\tAction: \u0026dlm.LifecyclePolicyPolicyDetailsActionArgs{\n\t\t\t\t\tName: pulumi.String(\"tf-acc-basic\"),\n\t\t\t\t\tCrossRegionCopies: dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyArray{\n\t\t\t\t\t\t\u0026dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyArgs{\n\t\t\t\t\t\t\tEncryptionConfiguration: \u0026dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyEncryptionConfigurationArgs{},\n\t\t\t\t\t\t\tRetainRule: \u0026dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyRetainRuleArgs{\n\t\t\t\t\t\t\t\tInterval: pulumi.Int(15),\n\t\t\t\t\t\t\t\tIntervalUnit: pulumi.String(\"MONTHS\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tTarget: pulumi.String(\"us-east-1\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tEventSource: \u0026dlm.LifecyclePolicyPolicyDetailsEventSourceArgs{\n\t\t\t\t\tType: pulumi.String(\"MANAGED_CWE\"),\n\t\t\t\t\tParameters: \u0026dlm.LifecyclePolicyPolicyDetailsEventSourceParametersArgs{\n\t\t\t\t\t\tDescriptionRegex: pulumi.String(\"^.*Created for policy: policy-1234567890abcdef0.*$\"),\n\t\t\t\t\t\tEventType: pulumi.String(\"shareSnapshot\"),\n\t\t\t\t\t\tSnapshotOwners: pulumi.StringArray{\n\t\t\t\t\t\t\tpulumi.String(current.AccountId),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.LookupPolicy(ctx, \u0026iam.LookupPolicyArgs{\n\t\t\tName: pulumi.StringRef(\"AWSDataLifecycleManagerServiceRole\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicyAttachment(ctx, \"example\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tRole: pulumi.Any(exampleAwsIamRole.Id),\n\t\t\tPolicyArn: pulumi.String(example.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.dlm.LifecyclePolicy;\nimport com.pulumi.aws.dlm.LifecyclePolicyArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsActionArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsEventSourceArgs;\nimport com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsEventSourceParametersArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var exampleLifecyclePolicy = new LifecyclePolicy(\"exampleLifecyclePolicy\", LifecyclePolicyArgs.builder()\n .description(\"tf-acc-basic\")\n .executionRoleArn(exampleAwsIamRole.arn())\n .policyDetails(LifecyclePolicyPolicyDetailsArgs.builder()\n .policyType(\"EVENT_BASED_POLICY\")\n .action(LifecyclePolicyPolicyDetailsActionArgs.builder()\n .name(\"tf-acc-basic\")\n .crossRegionCopies(LifecyclePolicyPolicyDetailsActionCrossRegionCopyArgs.builder()\n .encryptionConfiguration()\n .retainRule(LifecyclePolicyPolicyDetailsActionCrossRegionCopyRetainRuleArgs.builder()\n .interval(15)\n .intervalUnit(\"MONTHS\")\n .build())\n .target(\"us-east-1\")\n .build())\n .build())\n .eventSource(LifecyclePolicyPolicyDetailsEventSourceArgs.builder()\n .type(\"MANAGED_CWE\")\n .parameters(LifecyclePolicyPolicyDetailsEventSourceParametersArgs.builder()\n .descriptionRegex(\"^.*Created for policy: policy-1234567890abcdef0.*$\")\n .eventType(\"shareSnapshot\")\n .snapshotOwners(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .build())\n .build())\n .build());\n\n final var example = IamFunctions.getPolicy(GetPolicyArgs.builder()\n .name(\"AWSDataLifecycleManagerServiceRole\")\n .build());\n\n var exampleRolePolicyAttachment = new RolePolicyAttachment(\"exampleRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .role(exampleAwsIamRole.id())\n .policyArn(example.applyValue(getPolicyResult -\u003e getPolicyResult.arn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleLifecyclePolicy:\n type: aws:dlm:LifecyclePolicy\n name: example\n properties:\n description: tf-acc-basic\n executionRoleArn: ${exampleAwsIamRole.arn}\n policyDetails:\n policyType: EVENT_BASED_POLICY\n action:\n name: tf-acc-basic\n crossRegionCopies:\n - encryptionConfiguration: {}\n retainRule:\n interval: 15\n intervalUnit: MONTHS\n target: us-east-1\n eventSource:\n type: MANAGED_CWE\n parameters:\n descriptionRegex: '^.*Created for policy: policy-1234567890abcdef0.*$'\n eventType: shareSnapshot\n snapshotOwners:\n - ${current.accountId}\n exampleRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: example\n properties:\n role: ${exampleAwsIamRole.id}\n policyArn: ${example.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicy\n Arguments:\n name: AWSDataLifecycleManagerServiceRole\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DLM lifecycle policies using their policy ID. For example:\n\n```sh\n$ pulumi import aws:dlm/lifecyclePolicy:LifecyclePolicy example policy-abcdef12345678901\n```\n", "properties": { "arn": { "type": "string", @@ -227310,7 +227310,7 @@ } }, "aws:dynamodb/table:Table": { - "description": "Provides a DynamoDB table resource.\n\n\u003e **Note:** It is recommended to use [`ignoreChanges`](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) for `read_capacity` and/or `write_capacity` if there's `autoscaling policy` attached to the table.\n\n\u003e **Note:** When using aws.dynamodb.TableReplica with this resource, use `lifecycle` `ignore_changes` for `replica`, _e.g._, `lifecycle { ignore_changes = [replica] }`.\n\n## DynamoDB Table attributes\n\nOnly define attributes on the table object that are going to be used as:\n\n* Table hash key or range key\n* LSI or GSI hash key or range key\n\nThe DynamoDB API expects attribute structure (name and type) to be passed along when creating or updating GSI/LSIs or creating the initial table. In these cases it expects the Hash / Range keys to be provided. Because these get re-used in numerous places (i.e the table's range key could be a part of one or more GSIs), they are stored on the table object to prevent duplication and increase consistency. If you add attributes here that are not used in these scenarios it can cause an infinite loop in planning.\n\n## Example Usage\n\n### Basic Example\n\nThe following dynamodb table description models the table and GSI shown in the [AWS SDK example documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html)\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst basic_dynamodb_table = new aws.dynamodb.Table(\"basic-dynamodb-table\", {\n name: \"GameScores\",\n billingMode: \"PROVISIONED\",\n readCapacity: 20,\n writeCapacity: 20,\n hashKey: \"UserId\",\n rangeKey: \"GameTitle\",\n attributes: [\n {\n name: \"UserId\",\n type: \"S\",\n },\n {\n name: \"GameTitle\",\n type: \"S\",\n },\n {\n name: \"TopScore\",\n type: \"N\",\n },\n ],\n ttl: {\n attributeName: \"TimeToExist\",\n enabled: true,\n },\n globalSecondaryIndexes: [{\n name: \"GameTitleIndex\",\n hashKey: \"GameTitle\",\n rangeKey: \"TopScore\",\n writeCapacity: 10,\n readCapacity: 10,\n projectionType: \"INCLUDE\",\n nonKeyAttributes: [\"UserId\"],\n }],\n tags: {\n Name: \"dynamodb-table-1\",\n Environment: \"production\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nbasic_dynamodb_table = aws.dynamodb.Table(\"basic-dynamodb-table\",\n name=\"GameScores\",\n billing_mode=\"PROVISIONED\",\n read_capacity=20,\n write_capacity=20,\n hash_key=\"UserId\",\n range_key=\"GameTitle\",\n attributes=[\n {\n \"name\": \"UserId\",\n \"type\": \"S\",\n },\n {\n \"name\": \"GameTitle\",\n \"type\": \"S\",\n },\n {\n \"name\": \"TopScore\",\n \"type\": \"N\",\n },\n ],\n ttl={\n \"attribute_name\": \"TimeToExist\",\n \"enabled\": True,\n },\n global_secondary_indexes=[{\n \"name\": \"GameTitleIndex\",\n \"hash_key\": \"GameTitle\",\n \"range_key\": \"TopScore\",\n \"write_capacity\": 10,\n \"read_capacity\": 10,\n \"projection_type\": \"INCLUDE\",\n \"non_key_attributes\": [\"UserId\"],\n }],\n tags={\n \"Name\": \"dynamodb-table-1\",\n \"Environment\": \"production\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var basic_dynamodb_table = new Aws.DynamoDB.Table(\"basic-dynamodb-table\", new()\n {\n Name = \"GameScores\",\n BillingMode = \"PROVISIONED\",\n ReadCapacity = 20,\n WriteCapacity = 20,\n HashKey = \"UserId\",\n RangeKey = \"GameTitle\",\n Attributes = new[]\n {\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"UserId\",\n Type = \"S\",\n },\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"GameTitle\",\n Type = \"S\",\n },\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"TopScore\",\n Type = \"N\",\n },\n },\n Ttl = new Aws.DynamoDB.Inputs.TableTtlArgs\n {\n AttributeName = \"TimeToExist\",\n Enabled = true,\n },\n GlobalSecondaryIndexes = new[]\n {\n new Aws.DynamoDB.Inputs.TableGlobalSecondaryIndexArgs\n {\n Name = \"GameTitleIndex\",\n HashKey = \"GameTitle\",\n RangeKey = \"TopScore\",\n WriteCapacity = 10,\n ReadCapacity = 10,\n ProjectionType = \"INCLUDE\",\n NonKeyAttributes = new[]\n {\n \"UserId\",\n },\n },\n },\n Tags = \n {\n { \"Name\", \"dynamodb-table-1\" },\n { \"Environment\", \"production\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dynamodb.NewTable(ctx, \"basic-dynamodb-table\", \u0026dynamodb.TableArgs{\n\t\t\tName: pulumi.String(\"GameScores\"),\n\t\t\tBillingMode: pulumi.String(\"PROVISIONED\"),\n\t\t\tReadCapacity: pulumi.Int(20),\n\t\t\tWriteCapacity: pulumi.Int(20),\n\t\t\tHashKey: pulumi.String(\"UserId\"),\n\t\t\tRangeKey: pulumi.String(\"GameTitle\"),\n\t\t\tAttributes: dynamodb.TableAttributeArray{\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"UserId\"),\n\t\t\t\t\tType: pulumi.String(\"S\"),\n\t\t\t\t},\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"GameTitle\"),\n\t\t\t\t\tType: pulumi.String(\"S\"),\n\t\t\t\t},\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"TopScore\"),\n\t\t\t\t\tType: pulumi.String(\"N\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTtl: \u0026dynamodb.TableTtlArgs{\n\t\t\t\tAttributeName: pulumi.String(\"TimeToExist\"),\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tGlobalSecondaryIndexes: dynamodb.TableGlobalSecondaryIndexArray{\n\t\t\t\t\u0026dynamodb.TableGlobalSecondaryIndexArgs{\n\t\t\t\t\tName: pulumi.String(\"GameTitleIndex\"),\n\t\t\t\t\tHashKey: pulumi.String(\"GameTitle\"),\n\t\t\t\t\tRangeKey: pulumi.String(\"TopScore\"),\n\t\t\t\t\tWriteCapacity: pulumi.Int(10),\n\t\t\t\t\tReadCapacity: pulumi.Int(10),\n\t\t\t\t\tProjectionType: pulumi.String(\"INCLUDE\"),\n\t\t\t\t\tNonKeyAttributes: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"UserId\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"dynamodb-table-1\"),\n\t\t\t\t\"Environment\": pulumi.String(\"production\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.dynamodb.Table;\nimport com.pulumi.aws.dynamodb.TableArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableTtlArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableGlobalSecondaryIndexArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var basic_dynamodb_table = new Table(\"basic-dynamodb-table\", TableArgs.builder()\n .name(\"GameScores\")\n .billingMode(\"PROVISIONED\")\n .readCapacity(20)\n .writeCapacity(20)\n .hashKey(\"UserId\")\n .rangeKey(\"GameTitle\")\n .attributes( \n TableAttributeArgs.builder()\n .name(\"UserId\")\n .type(\"S\")\n .build(),\n TableAttributeArgs.builder()\n .name(\"GameTitle\")\n .type(\"S\")\n .build(),\n TableAttributeArgs.builder()\n .name(\"TopScore\")\n .type(\"N\")\n .build())\n .ttl(TableTtlArgs.builder()\n .attributeName(\"TimeToExist\")\n .enabled(true)\n .build())\n .globalSecondaryIndexes(TableGlobalSecondaryIndexArgs.builder()\n .name(\"GameTitleIndex\")\n .hashKey(\"GameTitle\")\n .rangeKey(\"TopScore\")\n .writeCapacity(10)\n .readCapacity(10)\n .projectionType(\"INCLUDE\")\n .nonKeyAttributes(\"UserId\")\n .build())\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"dynamodb-table-1\"),\n Map.entry(\"Environment\", \"production\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n basic-dynamodb-table:\n type: aws:dynamodb:Table\n properties:\n name: GameScores\n billingMode: PROVISIONED\n readCapacity: 20\n writeCapacity: 20\n hashKey: UserId\n rangeKey: GameTitle\n attributes:\n - name: UserId\n type: S\n - name: GameTitle\n type: S\n - name: TopScore\n type: N\n ttl:\n attributeName: TimeToExist\n enabled: true\n globalSecondaryIndexes:\n - name: GameTitleIndex\n hashKey: GameTitle\n rangeKey: TopScore\n writeCapacity: 10\n readCapacity: 10\n projectionType: INCLUDE\n nonKeyAttributes:\n - UserId\n tags:\n Name: dynamodb-table-1\n Environment: production\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Global Tables\n\nThis resource implements support for [DynamoDB Global Tables V2 (version 2019.11.21)](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) via `replica` configuration blocks. For working with [DynamoDB Global Tables V1 (version 2017.11.29)](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html), see the `aws.dynamodb.GlobalTable` resource.\n\n\u003e **Note:** aws.dynamodb.TableReplica is an alternate way of configuring Global Tables. Do not use `replica` configuration blocks of `aws.dynamodb.Table` together with aws_dynamodb_table_replica.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.dynamodb.Table(\"example\", {\n name: \"example\",\n hashKey: \"TestTableHashKey\",\n billingMode: \"PAY_PER_REQUEST\",\n streamEnabled: true,\n streamViewType: \"NEW_AND_OLD_IMAGES\",\n attributes: [{\n name: \"TestTableHashKey\",\n type: \"S\",\n }],\n replicas: [\n {\n regionName: \"us-east-2\",\n },\n {\n regionName: \"us-west-2\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.dynamodb.Table(\"example\",\n name=\"example\",\n hash_key=\"TestTableHashKey\",\n billing_mode=\"PAY_PER_REQUEST\",\n stream_enabled=True,\n stream_view_type=\"NEW_AND_OLD_IMAGES\",\n attributes=[{\n \"name\": \"TestTableHashKey\",\n \"type\": \"S\",\n }],\n replicas=[\n {\n \"region_name\": \"us-east-2\",\n },\n {\n \"region_name\": \"us-west-2\",\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DynamoDB.Table(\"example\", new()\n {\n Name = \"example\",\n HashKey = \"TestTableHashKey\",\n BillingMode = \"PAY_PER_REQUEST\",\n StreamEnabled = true,\n StreamViewType = \"NEW_AND_OLD_IMAGES\",\n Attributes = new[]\n {\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"TestTableHashKey\",\n Type = \"S\",\n },\n },\n Replicas = new[]\n {\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = \"us-east-2\",\n },\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = \"us-west-2\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dynamodb.NewTable(ctx, \"example\", \u0026dynamodb.TableArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tHashKey: pulumi.String(\"TestTableHashKey\"),\n\t\t\tBillingMode: pulumi.String(\"PAY_PER_REQUEST\"),\n\t\t\tStreamEnabled: pulumi.Bool(true),\n\t\t\tStreamViewType: pulumi.String(\"NEW_AND_OLD_IMAGES\"),\n\t\t\tAttributes: dynamodb.TableAttributeArray{\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"TestTableHashKey\"),\n\t\t\t\t\tType: pulumi.String(\"S\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tReplicas: dynamodb.TableReplicaTypeArray{\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(\"us-east-2\"),\n\t\t\t\t},\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(\"us-west-2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.dynamodb.Table;\nimport com.pulumi.aws.dynamodb.TableArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableReplicaArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Table(\"example\", TableArgs.builder()\n .name(\"example\")\n .hashKey(\"TestTableHashKey\")\n .billingMode(\"PAY_PER_REQUEST\")\n .streamEnabled(true)\n .streamViewType(\"NEW_AND_OLD_IMAGES\")\n .attributes(TableAttributeArgs.builder()\n .name(\"TestTableHashKey\")\n .type(\"S\")\n .build())\n .replicas( \n TableReplicaArgs.builder()\n .regionName(\"us-east-2\")\n .build(),\n TableReplicaArgs.builder()\n .regionName(\"us-west-2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:dynamodb:Table\n properties:\n name: example\n hashKey: TestTableHashKey\n billingMode: PAY_PER_REQUEST\n streamEnabled: true\n streamViewType: NEW_AND_OLD_IMAGES\n attributes:\n - name: TestTableHashKey\n type: S\n replicas:\n - regionName: us-east-2\n - regionName: us-west-2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Replica Tagging\n\nYou can manage global table replicas' tags in various ways. This example shows using `replica.*.propagate_tags` for the first replica and the `aws.dynamodb.Tag` resource for the other.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst current = aws.getRegion({});\nconst alternate = aws.getRegion({});\nconst third = aws.getRegion({});\nconst example = new aws.dynamodb.Table(\"example\", {\n billingMode: \"PAY_PER_REQUEST\",\n hashKey: \"TestTableHashKey\",\n name: \"example-13281\",\n streamEnabled: true,\n streamViewType: \"NEW_AND_OLD_IMAGES\",\n attributes: [{\n name: \"TestTableHashKey\",\n type: \"S\",\n }],\n replicas: [\n {\n regionName: alternate.then(alternate =\u003e alternate.name),\n },\n {\n regionName: third.then(third =\u003e third.name),\n propagateTags: true,\n },\n ],\n tags: {\n Architect: \"Eleanor\",\n Zone: \"SW\",\n },\n});\nconst exampleTag = new aws.dynamodb.Tag(\"example\", {\n resourceArn: pulumi.all([example.arn, current, alternate]).apply(([arn, current, alternate]) =\u003e std.replaceOutput({\n text: arn,\n search: current.name,\n replace: alternate.name,\n })).apply(invoke =\u003e invoke.result),\n key: \"Architect\",\n value: \"Gigi\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ncurrent = aws.get_region()\nalternate = aws.get_region()\nthird = aws.get_region()\nexample = aws.dynamodb.Table(\"example\",\n billing_mode=\"PAY_PER_REQUEST\",\n hash_key=\"TestTableHashKey\",\n name=\"example-13281\",\n stream_enabled=True,\n stream_view_type=\"NEW_AND_OLD_IMAGES\",\n attributes=[{\n \"name\": \"TestTableHashKey\",\n \"type\": \"S\",\n }],\n replicas=[\n {\n \"region_name\": alternate.name,\n },\n {\n \"region_name\": third.name,\n \"propagate_tags\": True,\n },\n ],\n tags={\n \"Architect\": \"Eleanor\",\n \"Zone\": \"SW\",\n })\nexample_tag = aws.dynamodb.Tag(\"example\",\n resource_arn=example.arn.apply(lambda arn: std.replace_output(text=arn,\n search=current.name,\n replace=alternate.name)).apply(lambda invoke: invoke.result),\n key=\"Architect\",\n value=\"Gigi\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var alternate = Aws.GetRegion.Invoke();\n\n var third = Aws.GetRegion.Invoke();\n\n var example = new Aws.DynamoDB.Table(\"example\", new()\n {\n BillingMode = \"PAY_PER_REQUEST\",\n HashKey = \"TestTableHashKey\",\n Name = \"example-13281\",\n StreamEnabled = true,\n StreamViewType = \"NEW_AND_OLD_IMAGES\",\n Attributes = new[]\n {\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"TestTableHashKey\",\n Type = \"S\",\n },\n },\n Replicas = new[]\n {\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = alternate.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = third.Apply(getRegionResult =\u003e getRegionResult.Name),\n PropagateTags = true,\n },\n },\n Tags = \n {\n { \"Architect\", \"Eleanor\" },\n { \"Zone\", \"SW\" },\n },\n });\n\n var exampleTag = new Aws.DynamoDB.Tag(\"example\", new()\n {\n ResourceArn = Output.Tuple(example.Arn, current, alternate).Apply(values =\u003e\n {\n var arn = values.Item1;\n var current = values.Item2;\n var alternate = values.Item3;\n return Std.Replace.Invoke(new()\n {\n Text = arn,\n Search = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n Replace = alternate.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n }).Apply(invoke =\u003e invoke.Result),\n Key = \"Architect\",\n Value = \"Gigi\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\talternate, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tthird, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := dynamodb.NewTable(ctx, \"example\", \u0026dynamodb.TableArgs{\n\t\t\tBillingMode: pulumi.String(\"PAY_PER_REQUEST\"),\n\t\t\tHashKey: pulumi.String(\"TestTableHashKey\"),\n\t\t\tName: pulumi.String(\"example-13281\"),\n\t\t\tStreamEnabled: pulumi.Bool(true),\n\t\t\tStreamViewType: pulumi.String(\"NEW_AND_OLD_IMAGES\"),\n\t\t\tAttributes: dynamodb.TableAttributeArray{\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"TestTableHashKey\"),\n\t\t\t\t\tType: pulumi.String(\"S\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tReplicas: dynamodb.TableReplicaTypeArray{\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(alternate.Name),\n\t\t\t\t},\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(third.Name),\n\t\t\t\t\tPropagateTags: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Architect\": pulumi.String(\"Eleanor\"),\n\t\t\t\t\"Zone\": pulumi.String(\"SW\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dynamodb.NewTag(ctx, \"example\", \u0026dynamodb.TagArgs{\n\t\t\tResourceArn: pulumi.String(example.Arn.ApplyT(func(arn string) (std.ReplaceResult, error) {\n\t\t\t\treturn std.ReplaceResult(interface{}(std.ReplaceOutput(ctx, std.ReplaceOutputArgs{\n\t\t\t\t\tText: arn,\n\t\t\t\t\tSearch: current.Name,\n\t\t\t\t\tReplace: alternate.Name,\n\t\t\t\t}, nil))), nil\n\t\t\t}).(std.ReplaceResultOutput).ApplyT(func(invoke std.ReplaceResult) (*string, error) {\n\t\t\t\treturn invoke.Result, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tKey: pulumi.String(\"Architect\"),\n\t\t\tValue: pulumi.String(\"Gigi\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.dynamodb.Table;\nimport com.pulumi.aws.dynamodb.TableArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableReplicaArgs;\nimport com.pulumi.aws.dynamodb.Tag;\nimport com.pulumi.aws.dynamodb.TagArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var alternate = AwsFunctions.getRegion();\n\n final var third = AwsFunctions.getRegion();\n\n var example = new Table(\"example\", TableArgs.builder()\n .billingMode(\"PAY_PER_REQUEST\")\n .hashKey(\"TestTableHashKey\")\n .name(\"example-13281\")\n .streamEnabled(true)\n .streamViewType(\"NEW_AND_OLD_IMAGES\")\n .attributes(TableAttributeArgs.builder()\n .name(\"TestTableHashKey\")\n .type(\"S\")\n .build())\n .replicas( \n TableReplicaArgs.builder()\n .regionName(alternate.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build(),\n TableReplicaArgs.builder()\n .regionName(third.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .propagateTags(true)\n .build())\n .tags(Map.ofEntries(\n Map.entry(\"Architect\", \"Eleanor\"),\n Map.entry(\"Zone\", \"SW\")\n ))\n .build());\n\n var exampleTag = new Tag(\"exampleTag\", TagArgs.builder()\n .resourceArn(example.arn().applyValue(arn -\u003e StdFunctions.replace()).applyValue(invoke -\u003e invoke.result()))\n .key(\"Architect\")\n .value(\"Gigi\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:dynamodb:Table\n properties:\n billingMode: PAY_PER_REQUEST\n hashKey: TestTableHashKey\n name: example-13281\n streamEnabled: true\n streamViewType: NEW_AND_OLD_IMAGES\n attributes:\n - name: TestTableHashKey\n type: S\n replicas:\n - regionName: ${alternate.name}\n - regionName: ${third.name}\n propagateTags: true\n tags:\n Architect: Eleanor\n Zone: SW\n exampleTag:\n type: aws:dynamodb:Tag\n name: example\n properties:\n resourceArn:\n fn::invoke:\n Function: std:replace\n Arguments:\n text: ${example.arn}\n search: ${current.name}\n replace: ${alternate.name}\n Return: result\n key: Architect\n value: Gigi\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n alternate:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n third:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DynamoDB tables using the `name`. For example:\n\n```sh\n$ pulumi import aws:dynamodb/table:Table basic-dynamodb-table GameScores\n```\n", + "description": "Provides a DynamoDB table resource.\n\n\u003e **Note:** It is recommended to use [`ignoreChanges`](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) for `read_capacity` and/or `write_capacity` if there's `autoscaling policy` attached to the table.\n\n\u003e **Note:** When using aws.dynamodb.TableReplica with this resource, use `lifecycle` `ignore_changes` for `replica`, _e.g._, `lifecycle { ignore_changes = [replica] }`.\n\n## DynamoDB Table attributes\n\nOnly define attributes on the table object that are going to be used as:\n\n* Table hash key or range key\n* LSI or GSI hash key or range key\n\nThe DynamoDB API expects attribute structure (name and type) to be passed along when creating or updating GSI/LSIs or creating the initial table. In these cases it expects the Hash / Range keys to be provided. Because these get re-used in numerous places (i.e the table's range key could be a part of one or more GSIs), they are stored on the table object to prevent duplication and increase consistency. If you add attributes here that are not used in these scenarios it can cause an infinite loop in planning.\n\n## Example Usage\n\n### Basic Example\n\nThe following dynamodb table description models the table and GSI shown in the [AWS SDK example documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html)\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst basic_dynamodb_table = new aws.dynamodb.Table(\"basic-dynamodb-table\", {\n name: \"GameScores\",\n billingMode: \"PROVISIONED\",\n readCapacity: 20,\n writeCapacity: 20,\n hashKey: \"UserId\",\n rangeKey: \"GameTitle\",\n attributes: [\n {\n name: \"UserId\",\n type: \"S\",\n },\n {\n name: \"GameTitle\",\n type: \"S\",\n },\n {\n name: \"TopScore\",\n type: \"N\",\n },\n ],\n ttl: {\n attributeName: \"TimeToExist\",\n enabled: true,\n },\n globalSecondaryIndexes: [{\n name: \"GameTitleIndex\",\n hashKey: \"GameTitle\",\n rangeKey: \"TopScore\",\n writeCapacity: 10,\n readCapacity: 10,\n projectionType: \"INCLUDE\",\n nonKeyAttributes: [\"UserId\"],\n }],\n tags: {\n Name: \"dynamodb-table-1\",\n Environment: \"production\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nbasic_dynamodb_table = aws.dynamodb.Table(\"basic-dynamodb-table\",\n name=\"GameScores\",\n billing_mode=\"PROVISIONED\",\n read_capacity=20,\n write_capacity=20,\n hash_key=\"UserId\",\n range_key=\"GameTitle\",\n attributes=[\n {\n \"name\": \"UserId\",\n \"type\": \"S\",\n },\n {\n \"name\": \"GameTitle\",\n \"type\": \"S\",\n },\n {\n \"name\": \"TopScore\",\n \"type\": \"N\",\n },\n ],\n ttl={\n \"attribute_name\": \"TimeToExist\",\n \"enabled\": True,\n },\n global_secondary_indexes=[{\n \"name\": \"GameTitleIndex\",\n \"hash_key\": \"GameTitle\",\n \"range_key\": \"TopScore\",\n \"write_capacity\": 10,\n \"read_capacity\": 10,\n \"projection_type\": \"INCLUDE\",\n \"non_key_attributes\": [\"UserId\"],\n }],\n tags={\n \"Name\": \"dynamodb-table-1\",\n \"Environment\": \"production\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var basic_dynamodb_table = new Aws.DynamoDB.Table(\"basic-dynamodb-table\", new()\n {\n Name = \"GameScores\",\n BillingMode = \"PROVISIONED\",\n ReadCapacity = 20,\n WriteCapacity = 20,\n HashKey = \"UserId\",\n RangeKey = \"GameTitle\",\n Attributes = new[]\n {\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"UserId\",\n Type = \"S\",\n },\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"GameTitle\",\n Type = \"S\",\n },\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"TopScore\",\n Type = \"N\",\n },\n },\n Ttl = new Aws.DynamoDB.Inputs.TableTtlArgs\n {\n AttributeName = \"TimeToExist\",\n Enabled = true,\n },\n GlobalSecondaryIndexes = new[]\n {\n new Aws.DynamoDB.Inputs.TableGlobalSecondaryIndexArgs\n {\n Name = \"GameTitleIndex\",\n HashKey = \"GameTitle\",\n RangeKey = \"TopScore\",\n WriteCapacity = 10,\n ReadCapacity = 10,\n ProjectionType = \"INCLUDE\",\n NonKeyAttributes = new[]\n {\n \"UserId\",\n },\n },\n },\n Tags = \n {\n { \"Name\", \"dynamodb-table-1\" },\n { \"Environment\", \"production\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dynamodb.NewTable(ctx, \"basic-dynamodb-table\", \u0026dynamodb.TableArgs{\n\t\t\tName: pulumi.String(\"GameScores\"),\n\t\t\tBillingMode: pulumi.String(\"PROVISIONED\"),\n\t\t\tReadCapacity: pulumi.Int(20),\n\t\t\tWriteCapacity: pulumi.Int(20),\n\t\t\tHashKey: pulumi.String(\"UserId\"),\n\t\t\tRangeKey: pulumi.String(\"GameTitle\"),\n\t\t\tAttributes: dynamodb.TableAttributeArray{\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"UserId\"),\n\t\t\t\t\tType: pulumi.String(\"S\"),\n\t\t\t\t},\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"GameTitle\"),\n\t\t\t\t\tType: pulumi.String(\"S\"),\n\t\t\t\t},\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"TopScore\"),\n\t\t\t\t\tType: pulumi.String(\"N\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTtl: \u0026dynamodb.TableTtlArgs{\n\t\t\t\tAttributeName: pulumi.String(\"TimeToExist\"),\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tGlobalSecondaryIndexes: dynamodb.TableGlobalSecondaryIndexArray{\n\t\t\t\t\u0026dynamodb.TableGlobalSecondaryIndexArgs{\n\t\t\t\t\tName: pulumi.String(\"GameTitleIndex\"),\n\t\t\t\t\tHashKey: pulumi.String(\"GameTitle\"),\n\t\t\t\t\tRangeKey: pulumi.String(\"TopScore\"),\n\t\t\t\t\tWriteCapacity: pulumi.Int(10),\n\t\t\t\t\tReadCapacity: pulumi.Int(10),\n\t\t\t\t\tProjectionType: pulumi.String(\"INCLUDE\"),\n\t\t\t\t\tNonKeyAttributes: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"UserId\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"dynamodb-table-1\"),\n\t\t\t\t\"Environment\": pulumi.String(\"production\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.dynamodb.Table;\nimport com.pulumi.aws.dynamodb.TableArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableTtlArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableGlobalSecondaryIndexArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var basic_dynamodb_table = new Table(\"basic-dynamodb-table\", TableArgs.builder()\n .name(\"GameScores\")\n .billingMode(\"PROVISIONED\")\n .readCapacity(20)\n .writeCapacity(20)\n .hashKey(\"UserId\")\n .rangeKey(\"GameTitle\")\n .attributes( \n TableAttributeArgs.builder()\n .name(\"UserId\")\n .type(\"S\")\n .build(),\n TableAttributeArgs.builder()\n .name(\"GameTitle\")\n .type(\"S\")\n .build(),\n TableAttributeArgs.builder()\n .name(\"TopScore\")\n .type(\"N\")\n .build())\n .ttl(TableTtlArgs.builder()\n .attributeName(\"TimeToExist\")\n .enabled(true)\n .build())\n .globalSecondaryIndexes(TableGlobalSecondaryIndexArgs.builder()\n .name(\"GameTitleIndex\")\n .hashKey(\"GameTitle\")\n .rangeKey(\"TopScore\")\n .writeCapacity(10)\n .readCapacity(10)\n .projectionType(\"INCLUDE\")\n .nonKeyAttributes(\"UserId\")\n .build())\n .tags(Map.ofEntries(\n Map.entry(\"Name\", \"dynamodb-table-1\"),\n Map.entry(\"Environment\", \"production\")\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n basic-dynamodb-table:\n type: aws:dynamodb:Table\n properties:\n name: GameScores\n billingMode: PROVISIONED\n readCapacity: 20\n writeCapacity: 20\n hashKey: UserId\n rangeKey: GameTitle\n attributes:\n - name: UserId\n type: S\n - name: GameTitle\n type: S\n - name: TopScore\n type: N\n ttl:\n attributeName: TimeToExist\n enabled: true\n globalSecondaryIndexes:\n - name: GameTitleIndex\n hashKey: GameTitle\n rangeKey: TopScore\n writeCapacity: 10\n readCapacity: 10\n projectionType: INCLUDE\n nonKeyAttributes:\n - UserId\n tags:\n Name: dynamodb-table-1\n Environment: production\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Global Tables\n\nThis resource implements support for [DynamoDB Global Tables V2 (version 2019.11.21)](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) via `replica` configuration blocks. For working with [DynamoDB Global Tables V1 (version 2017.11.29)](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html), see the `aws.dynamodb.GlobalTable` resource.\n\n\u003e **Note:** aws.dynamodb.TableReplica is an alternate way of configuring Global Tables. Do not use `replica` configuration blocks of `aws.dynamodb.Table` together with aws_dynamodb_table_replica.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.dynamodb.Table(\"example\", {\n name: \"example\",\n hashKey: \"TestTableHashKey\",\n billingMode: \"PAY_PER_REQUEST\",\n streamEnabled: true,\n streamViewType: \"NEW_AND_OLD_IMAGES\",\n attributes: [{\n name: \"TestTableHashKey\",\n type: \"S\",\n }],\n replicas: [\n {\n regionName: \"us-east-2\",\n },\n {\n regionName: \"us-west-2\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.dynamodb.Table(\"example\",\n name=\"example\",\n hash_key=\"TestTableHashKey\",\n billing_mode=\"PAY_PER_REQUEST\",\n stream_enabled=True,\n stream_view_type=\"NEW_AND_OLD_IMAGES\",\n attributes=[{\n \"name\": \"TestTableHashKey\",\n \"type\": \"S\",\n }],\n replicas=[\n {\n \"region_name\": \"us-east-2\",\n },\n {\n \"region_name\": \"us-west-2\",\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.DynamoDB.Table(\"example\", new()\n {\n Name = \"example\",\n HashKey = \"TestTableHashKey\",\n BillingMode = \"PAY_PER_REQUEST\",\n StreamEnabled = true,\n StreamViewType = \"NEW_AND_OLD_IMAGES\",\n Attributes = new[]\n {\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"TestTableHashKey\",\n Type = \"S\",\n },\n },\n Replicas = new[]\n {\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = \"us-east-2\",\n },\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = \"us-west-2\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dynamodb.NewTable(ctx, \"example\", \u0026dynamodb.TableArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tHashKey: pulumi.String(\"TestTableHashKey\"),\n\t\t\tBillingMode: pulumi.String(\"PAY_PER_REQUEST\"),\n\t\t\tStreamEnabled: pulumi.Bool(true),\n\t\t\tStreamViewType: pulumi.String(\"NEW_AND_OLD_IMAGES\"),\n\t\t\tAttributes: dynamodb.TableAttributeArray{\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"TestTableHashKey\"),\n\t\t\t\t\tType: pulumi.String(\"S\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tReplicas: dynamodb.TableReplicaTypeArray{\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(\"us-east-2\"),\n\t\t\t\t},\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(\"us-west-2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.dynamodb.Table;\nimport com.pulumi.aws.dynamodb.TableArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableReplicaArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Table(\"example\", TableArgs.builder()\n .name(\"example\")\n .hashKey(\"TestTableHashKey\")\n .billingMode(\"PAY_PER_REQUEST\")\n .streamEnabled(true)\n .streamViewType(\"NEW_AND_OLD_IMAGES\")\n .attributes(TableAttributeArgs.builder()\n .name(\"TestTableHashKey\")\n .type(\"S\")\n .build())\n .replicas( \n TableReplicaArgs.builder()\n .regionName(\"us-east-2\")\n .build(),\n TableReplicaArgs.builder()\n .regionName(\"us-west-2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:dynamodb:Table\n properties:\n name: example\n hashKey: TestTableHashKey\n billingMode: PAY_PER_REQUEST\n streamEnabled: true\n streamViewType: NEW_AND_OLD_IMAGES\n attributes:\n - name: TestTableHashKey\n type: S\n replicas:\n - regionName: us-east-2\n - regionName: us-west-2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Replica Tagging\n\nYou can manage global table replicas' tags in various ways. This example shows using `replica.*.propagate_tags` for the first replica and the `aws.dynamodb.Tag` resource for the other.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst current = aws.getRegion({});\nconst alternate = aws.getRegion({});\nconst third = aws.getRegion({});\nconst example = new aws.dynamodb.Table(\"example\", {\n billingMode: \"PAY_PER_REQUEST\",\n hashKey: \"TestTableHashKey\",\n name: \"example-13281\",\n streamEnabled: true,\n streamViewType: \"NEW_AND_OLD_IMAGES\",\n attributes: [{\n name: \"TestTableHashKey\",\n type: \"S\",\n }],\n replicas: [\n {\n regionName: alternate.then(alternate =\u003e alternate.name),\n },\n {\n regionName: third.then(third =\u003e third.name),\n propagateTags: true,\n },\n ],\n tags: {\n Architect: \"Eleanor\",\n Zone: \"SW\",\n },\n});\nconst exampleTag = new aws.dynamodb.Tag(\"example\", {\n resourceArn: pulumi.all([example.arn, current, alternate]).apply(([arn, current, alternate]) =\u003e std.replaceOutput({\n text: arn,\n search: current.name,\n replace: alternate.name,\n })).apply(invoke =\u003e invoke.result),\n key: \"Architect\",\n value: \"Gigi\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\ncurrent = aws.get_region()\nalternate = aws.get_region()\nthird = aws.get_region()\nexample = aws.dynamodb.Table(\"example\",\n billing_mode=\"PAY_PER_REQUEST\",\n hash_key=\"TestTableHashKey\",\n name=\"example-13281\",\n stream_enabled=True,\n stream_view_type=\"NEW_AND_OLD_IMAGES\",\n attributes=[{\n \"name\": \"TestTableHashKey\",\n \"type\": \"S\",\n }],\n replicas=[\n {\n \"region_name\": alternate.name,\n },\n {\n \"region_name\": third.name,\n \"propagate_tags\": True,\n },\n ],\n tags={\n \"Architect\": \"Eleanor\",\n \"Zone\": \"SW\",\n })\nexample_tag = aws.dynamodb.Tag(\"example\",\n resource_arn=example.arn.apply(lambda arn: std.replace_output(text=arn,\n search=current.name,\n replace=alternate.name)).apply(lambda invoke: invoke.result),\n key=\"Architect\",\n value=\"Gigi\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var alternate = Aws.GetRegion.Invoke();\n\n var third = Aws.GetRegion.Invoke();\n\n var example = new Aws.DynamoDB.Table(\"example\", new()\n {\n BillingMode = \"PAY_PER_REQUEST\",\n HashKey = \"TestTableHashKey\",\n Name = \"example-13281\",\n StreamEnabled = true,\n StreamViewType = \"NEW_AND_OLD_IMAGES\",\n Attributes = new[]\n {\n new Aws.DynamoDB.Inputs.TableAttributeArgs\n {\n Name = \"TestTableHashKey\",\n Type = \"S\",\n },\n },\n Replicas = new[]\n {\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = alternate.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = third.Apply(getRegionResult =\u003e getRegionResult.Name),\n PropagateTags = true,\n },\n },\n Tags = \n {\n { \"Architect\", \"Eleanor\" },\n { \"Zone\", \"SW\" },\n },\n });\n\n var exampleTag = new Aws.DynamoDB.Tag(\"example\", new()\n {\n ResourceArn = Output.Tuple(example.Arn, current, alternate).Apply(values =\u003e\n {\n var arn = values.Item1;\n var current = values.Item2;\n var alternate = values.Item3;\n return Std.Replace.Invoke(new()\n {\n Text = arn,\n Search = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n Replace = alternate.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n }).Apply(invoke =\u003e invoke.Result),\n Key = \"Architect\",\n Value = \"Gigi\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\talternate, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tthird, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := dynamodb.NewTable(ctx, \"example\", \u0026dynamodb.TableArgs{\n\t\t\tBillingMode: pulumi.String(\"PAY_PER_REQUEST\"),\n\t\t\tHashKey: pulumi.String(\"TestTableHashKey\"),\n\t\t\tName: pulumi.String(\"example-13281\"),\n\t\t\tStreamEnabled: pulumi.Bool(true),\n\t\t\tStreamViewType: pulumi.String(\"NEW_AND_OLD_IMAGES\"),\n\t\t\tAttributes: dynamodb.TableAttributeArray{\n\t\t\t\t\u0026dynamodb.TableAttributeArgs{\n\t\t\t\t\tName: pulumi.String(\"TestTableHashKey\"),\n\t\t\t\t\tType: pulumi.String(\"S\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tReplicas: dynamodb.TableReplicaTypeArray{\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(alternate.Name),\n\t\t\t\t},\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(third.Name),\n\t\t\t\t\tPropagateTags: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Architect\": pulumi.String(\"Eleanor\"),\n\t\t\t\t\"Zone\": pulumi.String(\"SW\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dynamodb.NewTag(ctx, \"example\", \u0026dynamodb.TagArgs{\n\t\t\tResourceArn: pulumi.String(example.Arn.ApplyT(func(arn string) (std.ReplaceResult, error) {\n\t\t\t\treturn std.ReplaceResult(interface{}(std.ReplaceOutput(ctx, std.ReplaceOutputArgs{\n\t\t\t\t\tText: arn,\n\t\t\t\t\tSearch: current.Name,\n\t\t\t\t\tReplace: alternate.Name,\n\t\t\t\t}, nil))), nil\n\t\t\t}).(std.ReplaceResultOutput).ApplyT(func(invoke std.ReplaceResult) (*string, error) {\n\t\t\t\treturn invoke.Result, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tKey: pulumi.String(\"Architect\"),\n\t\t\tValue: pulumi.String(\"Gigi\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.dynamodb.Table;\nimport com.pulumi.aws.dynamodb.TableArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableReplicaArgs;\nimport com.pulumi.aws.dynamodb.Tag;\nimport com.pulumi.aws.dynamodb.TagArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var alternate = AwsFunctions.getRegion();\n\n final var third = AwsFunctions.getRegion();\n\n var example = new Table(\"example\", TableArgs.builder()\n .billingMode(\"PAY_PER_REQUEST\")\n .hashKey(\"TestTableHashKey\")\n .name(\"example-13281\")\n .streamEnabled(true)\n .streamViewType(\"NEW_AND_OLD_IMAGES\")\n .attributes(TableAttributeArgs.builder()\n .name(\"TestTableHashKey\")\n .type(\"S\")\n .build())\n .replicas( \n TableReplicaArgs.builder()\n .regionName(alternate.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build(),\n TableReplicaArgs.builder()\n .regionName(third.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .propagateTags(true)\n .build())\n .tags(Map.ofEntries(\n Map.entry(\"Architect\", \"Eleanor\"),\n Map.entry(\"Zone\", \"SW\")\n ))\n .build());\n\n var exampleTag = new Tag(\"exampleTag\", TagArgs.builder()\n .resourceArn(example.arn().applyValue(arn -\u003e StdFunctions.replace()).applyValue(invoke -\u003e invoke.result()))\n .key(\"Architect\")\n .value(\"Gigi\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:dynamodb:Table\n properties:\n billingMode: PAY_PER_REQUEST\n hashKey: TestTableHashKey\n name: example-13281\n streamEnabled: true\n streamViewType: NEW_AND_OLD_IMAGES\n attributes:\n - name: TestTableHashKey\n type: S\n replicas:\n - regionName: ${alternate.name}\n - regionName: ${third.name}\n propagateTags: true\n tags:\n Architect: Eleanor\n Zone: SW\n exampleTag:\n type: aws:dynamodb:Tag\n name: example\n properties:\n resourceArn:\n fn::invoke:\n Function: std:replace\n Arguments:\n text: ${example.arn}\n search: ${current.name}\n replace: ${alternate.name}\n Return: result\n key: Architect\n value: Gigi\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n alternate:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n third:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import DynamoDB tables using the `name`. For example:\n\n```sh\n$ pulumi import aws:dynamodb/table:Table basic-dynamodb-table GameScores\n```\n", "properties": { "arn": { "type": "string", @@ -228109,7 +228109,7 @@ } }, "aws:dynamodb/tag:Tag": { - "description": "Manages an individual DynamoDB resource tag. This resource should only be used in cases where DynamoDB resources are created outside the provider (e.g., Table replicas in other regions).\n\n\u003e **NOTE:** This tagging resource should not be combined with the resource for managing the parent resource. For example, using `aws.dynamodb.Table` and `aws.dynamodb.Tag` to manage tags of the same DynamoDB Table in the same region will cause a perpetual difference where the `aws_dynamodb_cluster` resource will try to remove the tag being added by the `aws.dynamodb.Tag` resource.\n\n\u003e **NOTE:** This tagging resource does not use the provider `ignore_tags` configuration.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst replica = aws.getRegion({});\nconst current = aws.getRegion({});\nconst example = new aws.dynamodb.Table(\"example\", {replicas: [{\n regionName: replica.then(replica =\u003e replica.name),\n}]});\nconst test = new aws.dynamodb.Tag(\"test\", {\n resourceArn: pulumi.all([example.arn, current, replica]).apply(([arn, current, replica]) =\u003e std.replaceOutput({\n text: arn,\n search: current.name,\n replace: replica.name,\n })).apply(invoke =\u003e invoke.result),\n key: \"testkey\",\n value: \"testvalue\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nreplica = aws.get_region()\ncurrent = aws.get_region()\nexample = aws.dynamodb.Table(\"example\", replicas=[{\n \"region_name\": replica.name,\n}])\ntest = aws.dynamodb.Tag(\"test\",\n resource_arn=example.arn.apply(lambda arn: std.replace_output(text=arn,\n search=current.name,\n replace=replica.name)).apply(lambda invoke: invoke.result),\n key=\"testkey\",\n value=\"testvalue\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var replica = Aws.GetRegion.Invoke();\n\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.DynamoDB.Table(\"example\", new()\n {\n Replicas = new[]\n {\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = replica.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var test = new Aws.DynamoDB.Tag(\"test\", new()\n {\n ResourceArn = Output.Tuple(example.Arn, current, replica).Apply(values =\u003e\n {\n var arn = values.Item1;\n var current = values.Item2;\n var replica = values.Item3;\n return Std.Replace.Invoke(new()\n {\n Text = arn,\n Search = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n Replace = replica.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n }).Apply(invoke =\u003e invoke.Result),\n Key = \"testkey\",\n Value = \"testvalue\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\treplica, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := dynamodb.NewTable(ctx, \"example\", \u0026dynamodb.TableArgs{\n\t\t\tReplicas: dynamodb.TableReplicaTypeArray{\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(replica.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dynamodb.NewTag(ctx, \"test\", \u0026dynamodb.TagArgs{\n\t\t\tResourceArn: pulumi.String(example.Arn.ApplyT(func(arn string) (std.ReplaceResult, error) {\n\t\t\t\treturn std.ReplaceResult(interface{}(std.ReplaceOutput(ctx, std.ReplaceOutputArgs{\n\t\t\t\t\tText: arn,\n\t\t\t\t\tSearch: current.Name,\n\t\t\t\t\tReplace: replica.Name,\n\t\t\t\t}, nil))), nil\n\t\t\t}).(std.ReplaceResultOutput).ApplyT(func(invoke std.ReplaceResult) (*string, error) {\n\t\t\t\treturn invoke.Result, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tKey: pulumi.String(\"testkey\"),\n\t\t\tValue: pulumi.String(\"testvalue\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.dynamodb.Table;\nimport com.pulumi.aws.dynamodb.TableArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableReplicaArgs;\nimport com.pulumi.aws.dynamodb.Tag;\nimport com.pulumi.aws.dynamodb.TagArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var replica = AwsFunctions.getRegion();\n\n final var current = AwsFunctions.getRegion();\n\n var example = new Table(\"example\", TableArgs.builder()\n .replicas(TableReplicaArgs.builder()\n .regionName(replica.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var test = new Tag(\"test\", TagArgs.builder()\n .resourceArn(example.arn().applyValue(arn -\u003e StdFunctions.replace()).applyValue(invoke -\u003e invoke.result()))\n .key(\"testkey\")\n .value(\"testvalue\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:dynamodb:Table\n properties:\n replicas:\n - regionName: ${replica.name}\n test:\n type: aws:dynamodb:Tag\n properties:\n resourceArn:\n fn::invoke:\n Function: std:replace\n Arguments:\n text: ${example.arn}\n search: ${current.name}\n replace: ${replica.name}\n Return: result\n key: testkey\n value: testvalue\nvariables:\n replica:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_dynamodb_tag` using the DynamoDB resource identifier and key, separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:dynamodb/tag:Tag example arn:aws:dynamodb:us-east-1:123456789012:table/example,Name\n```\n", + "description": "Manages an individual DynamoDB resource tag. This resource should only be used in cases where DynamoDB resources are created outside the provider (e.g., Table replicas in other regions).\n\n\u003e **NOTE:** This tagging resource should not be combined with the resource for managing the parent resource. For example, using `aws.dynamodb.Table` and `aws.dynamodb.Tag` to manage tags of the same DynamoDB Table in the same region will cause a perpetual difference where the `aws_dynamodb_cluster` resource will try to remove the tag being added by the `aws.dynamodb.Tag` resource.\n\n\u003e **NOTE:** This tagging resource does not use the provider `ignore_tags` configuration.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst replica = aws.getRegion({});\nconst current = aws.getRegion({});\nconst example = new aws.dynamodb.Table(\"example\", {replicas: [{\n regionName: replica.then(replica =\u003e replica.name),\n}]});\nconst test = new aws.dynamodb.Tag(\"test\", {\n resourceArn: pulumi.all([example.arn, current, replica]).apply(([arn, current, replica]) =\u003e std.replaceOutput({\n text: arn,\n search: current.name,\n replace: replica.name,\n })).apply(invoke =\u003e invoke.result),\n key: \"testkey\",\n value: \"testvalue\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nreplica = aws.get_region()\ncurrent = aws.get_region()\nexample = aws.dynamodb.Table(\"example\", replicas=[{\n \"region_name\": replica.name,\n}])\ntest = aws.dynamodb.Tag(\"test\",\n resource_arn=example.arn.apply(lambda arn: std.replace_output(text=arn,\n search=current.name,\n replace=replica.name)).apply(lambda invoke: invoke.result),\n key=\"testkey\",\n value=\"testvalue\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var replica = Aws.GetRegion.Invoke();\n\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.DynamoDB.Table(\"example\", new()\n {\n Replicas = new[]\n {\n new Aws.DynamoDB.Inputs.TableReplicaArgs\n {\n RegionName = replica.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var test = new Aws.DynamoDB.Tag(\"test\", new()\n {\n ResourceArn = Output.Tuple(example.Arn, current, replica).Apply(values =\u003e\n {\n var arn = values.Item1;\n var current = values.Item2;\n var replica = values.Item3;\n return Std.Replace.Invoke(new()\n {\n Text = arn,\n Search = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n Replace = replica.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n }).Apply(invoke =\u003e invoke.Result),\n Key = \"testkey\",\n Value = \"testvalue\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\treplica, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := dynamodb.NewTable(ctx, \"example\", \u0026dynamodb.TableArgs{\n\t\t\tReplicas: dynamodb.TableReplicaTypeArray{\n\t\t\t\t\u0026dynamodb.TableReplicaTypeArgs{\n\t\t\t\t\tRegionName: pulumi.String(replica.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = dynamodb.NewTag(ctx, \"test\", \u0026dynamodb.TagArgs{\n\t\t\tResourceArn: pulumi.String(example.Arn.ApplyT(func(arn string) (std.ReplaceResult, error) {\n\t\t\t\treturn std.ReplaceResult(interface{}(std.ReplaceOutput(ctx, std.ReplaceOutputArgs{\n\t\t\t\t\tText: arn,\n\t\t\t\t\tSearch: current.Name,\n\t\t\t\t\tReplace: replica.Name,\n\t\t\t\t}, nil))), nil\n\t\t\t}).(std.ReplaceResultOutput).ApplyT(func(invoke std.ReplaceResult) (*string, error) {\n\t\t\t\treturn invoke.Result, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t\tKey: pulumi.String(\"testkey\"),\n\t\t\tValue: pulumi.String(\"testvalue\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.dynamodb.Table;\nimport com.pulumi.aws.dynamodb.TableArgs;\nimport com.pulumi.aws.dynamodb.inputs.TableReplicaArgs;\nimport com.pulumi.aws.dynamodb.Tag;\nimport com.pulumi.aws.dynamodb.TagArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var replica = AwsFunctions.getRegion();\n\n final var current = AwsFunctions.getRegion();\n\n var example = new Table(\"example\", TableArgs.builder()\n .replicas(TableReplicaArgs.builder()\n .regionName(replica.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var test = new Tag(\"test\", TagArgs.builder()\n .resourceArn(example.arn().applyValue(arn -\u003e StdFunctions.replace()).applyValue(invoke -\u003e invoke.result()))\n .key(\"testkey\")\n .value(\"testvalue\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:dynamodb:Table\n properties:\n replicas:\n - regionName: ${replica.name}\n test:\n type: aws:dynamodb:Tag\n properties:\n resourceArn:\n fn::invoke:\n Function: std:replace\n Arguments:\n text: ${example.arn}\n search: ${current.name}\n replace: ${replica.name}\n Return: result\n key: testkey\n value: testvalue\nvariables:\n replica:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_dynamodb_tag` using the DynamoDB resource identifier and key, separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:dynamodb/tag:Tag example arn:aws:dynamodb:us-east-1:123456789012:table/example,Name\n```\n", "properties": { "key": { "type": "string", @@ -230316,7 +230316,7 @@ } }, "aws:ec2/amiLaunchPermission:AmiLaunchPermission": { - "description": "Adds a launch permission to an Amazon Machine Image (AMI).\n\n## Example Usage\n\n### AWS Account ID\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.ec2.AmiLaunchPermission(\"example\", {\n imageId: \"ami-12345678\",\n accountId: \"123456789012\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.AmiLaunchPermission(\"example\",\n image_id=\"ami-12345678\",\n account_id=\"123456789012\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Ec2.AmiLaunchPermission(\"example\", new()\n {\n ImageId = \"ami-12345678\",\n AccountId = \"123456789012\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewAmiLaunchPermission(ctx, \"example\", \u0026ec2.AmiLaunchPermissionArgs{\n\t\t\tImageId: pulumi.String(\"ami-12345678\"),\n\t\t\tAccountId: pulumi.String(\"123456789012\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.AmiLaunchPermission;\nimport com.pulumi.aws.ec2.AmiLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new AmiLaunchPermission(\"example\", AmiLaunchPermissionArgs.builder()\n .imageId(\"ami-12345678\")\n .accountId(\"123456789012\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:AmiLaunchPermission\n properties:\n imageId: ami-12345678\n accountId: '123456789012'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Public Access\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.ec2.AmiLaunchPermission(\"example\", {\n imageId: \"ami-12345678\",\n group: \"all\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.AmiLaunchPermission(\"example\",\n image_id=\"ami-12345678\",\n group=\"all\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Ec2.AmiLaunchPermission(\"example\", new()\n {\n ImageId = \"ami-12345678\",\n Group = \"all\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewAmiLaunchPermission(ctx, \"example\", \u0026ec2.AmiLaunchPermissionArgs{\n\t\t\tImageId: pulumi.String(\"ami-12345678\"),\n\t\t\tGroup: pulumi.String(\"all\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.AmiLaunchPermission;\nimport com.pulumi.aws.ec2.AmiLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new AmiLaunchPermission(\"example\", AmiLaunchPermissionArgs.builder()\n .imageId(\"ami-12345678\")\n .group(\"all\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:AmiLaunchPermission\n properties:\n imageId: ami-12345678\n group: all\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Organization Access\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.organizations.getOrganization({});\nconst example = new aws.ec2.AmiLaunchPermission(\"example\", {\n imageId: \"ami-12345678\",\n organizationArn: current.then(current =\u003e current.arn),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.organizations.get_organization()\nexample = aws.ec2.AmiLaunchPermission(\"example\",\n image_id=\"ami-12345678\",\n organization_arn=current.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Organizations.GetOrganization.Invoke();\n\n var example = new Aws.Ec2.AmiLaunchPermission(\"example\", new()\n {\n ImageId = \"ami-12345678\",\n OrganizationArn = current.Apply(getOrganizationResult =\u003e getOrganizationResult.Arn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := organizations.LookupOrganization(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewAmiLaunchPermission(ctx, \"example\", \u0026ec2.AmiLaunchPermissionArgs{\n\t\t\tImageId: pulumi.String(\"ami-12345678\"),\n\t\t\tOrganizationArn: pulumi.String(current.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.ec2.AmiLaunchPermission;\nimport com.pulumi.aws.ec2.AmiLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = OrganizationsFunctions.getOrganization();\n\n var example = new AmiLaunchPermission(\"example\", AmiLaunchPermissionArgs.builder()\n .imageId(\"ami-12345678\")\n .organizationArn(current.applyValue(getOrganizationResult -\u003e getOrganizationResult.arn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:AmiLaunchPermission\n properties:\n imageId: ami-12345678\n organizationArn: ${current.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import AMI Launch Permissions using `[ACCOUNT-ID|GROUP-NAME|ORGANIZATION-ARN|ORGANIZATIONAL-UNIT-ARN]/IMAGE-ID`. For example:\n\n```sh\n$ pulumi import aws:ec2/amiLaunchPermission:AmiLaunchPermission example 123456789012/ami-12345678\n```\n", + "description": "Adds a launch permission to an Amazon Machine Image (AMI).\n\n## Example Usage\n\n### AWS Account ID\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.ec2.AmiLaunchPermission(\"example\", {\n imageId: \"ami-12345678\",\n accountId: \"123456789012\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.AmiLaunchPermission(\"example\",\n image_id=\"ami-12345678\",\n account_id=\"123456789012\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Ec2.AmiLaunchPermission(\"example\", new()\n {\n ImageId = \"ami-12345678\",\n AccountId = \"123456789012\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewAmiLaunchPermission(ctx, \"example\", \u0026ec2.AmiLaunchPermissionArgs{\n\t\t\tImageId: pulumi.String(\"ami-12345678\"),\n\t\t\tAccountId: pulumi.String(\"123456789012\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.AmiLaunchPermission;\nimport com.pulumi.aws.ec2.AmiLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new AmiLaunchPermission(\"example\", AmiLaunchPermissionArgs.builder()\n .imageId(\"ami-12345678\")\n .accountId(\"123456789012\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:AmiLaunchPermission\n properties:\n imageId: ami-12345678\n accountId: '123456789012'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Public Access\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.ec2.AmiLaunchPermission(\"example\", {\n imageId: \"ami-12345678\",\n group: \"all\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.AmiLaunchPermission(\"example\",\n image_id=\"ami-12345678\",\n group=\"all\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Ec2.AmiLaunchPermission(\"example\", new()\n {\n ImageId = \"ami-12345678\",\n Group = \"all\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewAmiLaunchPermission(ctx, \"example\", \u0026ec2.AmiLaunchPermissionArgs{\n\t\t\tImageId: pulumi.String(\"ami-12345678\"),\n\t\t\tGroup: pulumi.String(\"all\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.AmiLaunchPermission;\nimport com.pulumi.aws.ec2.AmiLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new AmiLaunchPermission(\"example\", AmiLaunchPermissionArgs.builder()\n .imageId(\"ami-12345678\")\n .group(\"all\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:AmiLaunchPermission\n properties:\n imageId: ami-12345678\n group: all\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Organization Access\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.organizations.getOrganization({});\nconst example = new aws.ec2.AmiLaunchPermission(\"example\", {\n imageId: \"ami-12345678\",\n organizationArn: current.then(current =\u003e current.arn),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.organizations.get_organization()\nexample = aws.ec2.AmiLaunchPermission(\"example\",\n image_id=\"ami-12345678\",\n organization_arn=current.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Organizations.GetOrganization.Invoke();\n\n var example = new Aws.Ec2.AmiLaunchPermission(\"example\", new()\n {\n ImageId = \"ami-12345678\",\n OrganizationArn = current.Apply(getOrganizationResult =\u003e getOrganizationResult.Arn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewAmiLaunchPermission(ctx, \"example\", \u0026ec2.AmiLaunchPermissionArgs{\n\t\t\tImageId: pulumi.String(\"ami-12345678\"),\n\t\t\tOrganizationArn: pulumi.String(current.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.ec2.AmiLaunchPermission;\nimport com.pulumi.aws.ec2.AmiLaunchPermissionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = OrganizationsFunctions.getOrganization();\n\n var example = new AmiLaunchPermission(\"example\", AmiLaunchPermissionArgs.builder()\n .imageId(\"ami-12345678\")\n .organizationArn(current.applyValue(getOrganizationResult -\u003e getOrganizationResult.arn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:AmiLaunchPermission\n properties:\n imageId: ami-12345678\n organizationArn: ${current.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import AMI Launch Permissions using `[ACCOUNT-ID|GROUP-NAME|ORGANIZATION-ARN|ORGANIZATIONAL-UNIT-ARN]/IMAGE-ID`. For example:\n\n```sh\n$ pulumi import aws:ec2/amiLaunchPermission:AmiLaunchPermission example 123456789012/ami-12345678\n```\n", "properties": { "accountId": { "type": "string", @@ -231359,7 +231359,7 @@ } }, "aws:ec2/defaultNetworkAcl:DefaultNetworkAcl": { - "description": "Provides a resource to manage a VPC's default network ACL. This resource can manage the default network ACL of the default or a non-default VPC.\n\n\u003e **NOTE:** This is an advanced resource with special caveats. Please read this document in its entirety before using this resource. The `aws.ec2.DefaultNetworkAcl` behaves differently from normal resources. This provider does not _create_ this resource but instead attempts to \"adopt\" it into management.\n\nEvery VPC has a default network ACL that can be managed but not destroyed. When the provider first adopts the Default Network ACL, it **immediately removes all rules in the ACL**. It then proceeds to create any rules specified in the configuration. This step is required so that only the rules specified in the configuration are created.\n\nThis resource treats its inline rules as absolute; only the rules defined inline are created, and any additions/removals external to this resource will result in diffs being shown. For these reasons, this resource is incompatible with the `aws.ec2.NetworkAclRule` resource.\n\nFor more information about Network ACLs, see the AWS Documentation on [Network ACLs][aws-network-acls].\n\n## Example Usage\n\n### Basic Example\n\nThe following config gives the Default Network ACL the same rules that AWS includes but pulls the resource under management by this provider. This means that any ACL rules added or changed will be detected as drift.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultNetworkAcl(\"default\", {\n defaultNetworkAclId: mainvpc.defaultNetworkAclId,\n ingress: [{\n protocol: \"-1\",\n ruleNo: 100,\n action: \"allow\",\n cidrBlock: \"0.0.0.0/0\",\n fromPort: 0,\n toPort: 0,\n }],\n egress: [{\n protocol: \"-1\",\n ruleNo: 100,\n action: \"allow\",\n cidrBlock: \"0.0.0.0/0\",\n fromPort: 0,\n toPort: 0,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultNetworkAcl(\"default\",\n default_network_acl_id=mainvpc.default_network_acl_id,\n ingress=[{\n \"protocol\": \"-1\",\n \"rule_no\": 100,\n \"action\": \"allow\",\n \"cidr_block\": \"0.0.0.0/0\",\n \"from_port\": 0,\n \"to_port\": 0,\n }],\n egress=[{\n \"protocol\": \"-1\",\n \"rule_no\": 100,\n \"action\": \"allow\",\n \"cidr_block\": \"0.0.0.0/0\",\n \"from_port\": 0,\n \"to_port\": 0,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultNetworkAcl(\"default\", new()\n {\n DefaultNetworkAclId = mainvpc.DefaultNetworkAclId,\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.DefaultNetworkAclIngressArgs\n {\n Protocol = \"-1\",\n RuleNo = 100,\n Action = \"allow\",\n CidrBlock = \"0.0.0.0/0\",\n FromPort = 0,\n ToPort = 0,\n },\n },\n Egress = new[]\n {\n new Aws.Ec2.Inputs.DefaultNetworkAclEgressArgs\n {\n Protocol = \"-1\",\n RuleNo = 100,\n Action = \"allow\",\n CidrBlock = \"0.0.0.0/0\",\n FromPort = 0,\n ToPort = 0,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultNetworkAcl(ctx, \"default\", \u0026ec2.DefaultNetworkAclArgs{\n\t\t\tDefaultNetworkAclId: mainvpc.DefaultNetworkAclId,\n\t\t\tIngress: ec2.DefaultNetworkAclIngressArray{\n\t\t\t\t\u0026ec2.DefaultNetworkAclIngressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tRuleNo: pulumi.Int(100),\n\t\t\t\t\tAction: pulumi.String(\"allow\"),\n\t\t\t\t\tCidrBlock: pulumi.String(\"0.0.0.0/0\"),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t\tEgress: ec2.DefaultNetworkAclEgressArray{\n\t\t\t\t\u0026ec2.DefaultNetworkAclEgressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tRuleNo: pulumi.Int(100),\n\t\t\t\t\tAction: pulumi.String(\"allow\"),\n\t\t\t\t\tCidrBlock: pulumi.String(\"0.0.0.0/0\"),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultNetworkAcl\n properties:\n defaultNetworkAclId: ${mainvpc.defaultNetworkAclId}\n ingress:\n - protocol: -1\n ruleNo: 100\n action: allow\n cidrBlock: 0.0.0.0/0\n fromPort: 0\n toPort: 0\n egress:\n - protocol: -1\n ruleNo: 100\n action: allow\n cidrBlock: 0.0.0.0/0\n fromPort: 0\n toPort: 0\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example: Deny All Egress Traffic, Allow Ingress\n\nThe following denies all Egress traffic by omitting any `egress` rules, while including the default `ingress` rule to allow all traffic.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultNetworkAcl(\"default\", {\n defaultNetworkAclId: mainvpc.defaultNetworkAclId,\n ingress: [{\n protocol: \"-1\",\n ruleNo: 100,\n action: \"allow\",\n cidrBlock: mainvpcAwsDefaultVpc.cidrBlock,\n fromPort: 0,\n toPort: 0,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultNetworkAcl(\"default\",\n default_network_acl_id=mainvpc.default_network_acl_id,\n ingress=[{\n \"protocol\": \"-1\",\n \"rule_no\": 100,\n \"action\": \"allow\",\n \"cidr_block\": mainvpc_aws_default_vpc[\"cidrBlock\"],\n \"from_port\": 0,\n \"to_port\": 0,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultNetworkAcl(\"default\", new()\n {\n DefaultNetworkAclId = mainvpc.DefaultNetworkAclId,\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.DefaultNetworkAclIngressArgs\n {\n Protocol = \"-1\",\n RuleNo = 100,\n Action = \"allow\",\n CidrBlock = mainvpcAwsDefaultVpc.CidrBlock,\n FromPort = 0,\n ToPort = 0,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultNetworkAcl(ctx, \"default\", \u0026ec2.DefaultNetworkAclArgs{\n\t\t\tDefaultNetworkAclId: mainvpc.DefaultNetworkAclId,\n\t\t\tIngress: ec2.DefaultNetworkAclIngressArray{\n\t\t\t\t\u0026ec2.DefaultNetworkAclIngressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tRuleNo: pulumi.Int(100),\n\t\t\t\t\tAction: pulumi.String(\"allow\"),\n\t\t\t\t\tCidrBlock: pulumi.Any(mainvpcAwsDefaultVpc.CidrBlock),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultNetworkAcl\n properties:\n defaultNetworkAclId: ${mainvpc.defaultNetworkAclId}\n ingress:\n - protocol: -1\n ruleNo: 100\n action: allow\n cidrBlock: ${mainvpcAwsDefaultVpc.cidrBlock}\n fromPort: 0\n toPort: 0\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example: Deny All Traffic To Any Subnet In The Default Network ACL\n\nThis config denies all traffic in the Default ACL. This can be useful if you want to lock down the VPC to force all resources to assign a non-default ACL.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultNetworkAcl(\"default\", {defaultNetworkAclId: mainvpc.defaultNetworkAclId});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultNetworkAcl(\"default\", default_network_acl_id=mainvpc.default_network_acl_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultNetworkAcl(\"default\", new()\n {\n DefaultNetworkAclId = mainvpc.DefaultNetworkAclId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultNetworkAcl(ctx, \"default\", \u0026ec2.DefaultNetworkAclArgs{\n\t\t\tDefaultNetworkAclId: mainvpc.DefaultNetworkAclId,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.DefaultNetworkAcl;\nimport com.pulumi.aws.ec2.DefaultNetworkAclArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var mainvpc = new Vpc(\"mainvpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n var default_ = new DefaultNetworkAcl(\"default\", DefaultNetworkAclArgs.builder()\n .defaultNetworkAclId(mainvpc.defaultNetworkAclId())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultNetworkAcl\n properties:\n defaultNetworkAclId: ${mainvpc.defaultNetworkAclId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Managing Subnets In A Default Network ACL\n\nWithin a VPC, all Subnets must be associated with a Network ACL. In order to \"delete\" the association between a Subnet and a non-default Network ACL, the association is destroyed by replacing it with an association between the Subnet and the Default ACL instead.\n\nWhen managing the Default Network ACL, you cannot \"remove\" Subnets. Instead, they must be reassigned to another Network ACL, or the Subnet itself must be destroyed. Because of these requirements, removing the `subnet_ids` attribute from the configuration of a `aws.ec2.DefaultNetworkAcl` resource may result in a reoccurring plan, until the Subnets are reassigned to another Network ACL or are destroyed.\n\nBecause Subnets are by default associated with the Default Network ACL, any non-explicit association will show up as a plan to remove the Subnet. For example: if you have a custom `aws.ec2.NetworkAcl` with two subnets attached, and you remove the `aws.ec2.NetworkAcl` resource, after successfully destroying this resource future plans will show a diff on the managed `aws.ec2.DefaultNetworkAcl`, as those two Subnets have been orphaned by the now destroyed network acl and thus adopted by the Default Network ACL. In order to avoid a reoccurring plan, they will need to be reassigned, destroyed, or added to the `subnet_ids` attribute of the `aws.ec2.DefaultNetworkAcl` entry.\n\nAs an alternative to the above, you can also specify the following lifecycle configuration in your `aws.ec2.DefaultNetworkAcl` resource:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst _default = new aws.ec2.DefaultNetworkAcl(\"default\", {});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ndefault = aws.ec2.DefaultNetworkAcl(\"default\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = new Aws.Ec2.DefaultNetworkAcl(\"default\");\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewDefaultNetworkAcl(ctx, \"default\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.DefaultNetworkAcl;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var default_ = new DefaultNetworkAcl(\"default\");\n\n }\n}\n```\n```yaml\nresources:\n default:\n type: aws:ec2:DefaultNetworkAcl\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Removing `aws.ec2.DefaultNetworkAcl` From Your Configuration\n\nEach AWS VPC comes with a Default Network ACL that cannot be deleted. The `aws.ec2.DefaultNetworkAcl` allows you to manage this Network ACL, but the provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile and management, **but will not destroy the Network ACL.** All Subnets associations and ingress or egress rules will be left as they are at the time of removal. You can resume managing them via the AWS Console.\n\n## Import\n\nUsing `pulumi import`, import Default Network ACLs using the `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/defaultNetworkAcl:DefaultNetworkAcl sample acl-7aaabd18\n```\n", + "description": "Provides a resource to manage a VPC's default network ACL. This resource can manage the default network ACL of the default or a non-default VPC.\n\n\u003e **NOTE:** This is an advanced resource with special caveats. Please read this document in its entirety before using this resource. The `aws.ec2.DefaultNetworkAcl` behaves differently from normal resources. This provider does not _create_ this resource but instead attempts to \"adopt\" it into management.\n\nEvery VPC has a default network ACL that can be managed but not destroyed. When the provider first adopts the Default Network ACL, it **immediately removes all rules in the ACL**. It then proceeds to create any rules specified in the configuration. This step is required so that only the rules specified in the configuration are created.\n\nThis resource treats its inline rules as absolute; only the rules defined inline are created, and any additions/removals external to this resource will result in diffs being shown. For these reasons, this resource is incompatible with the `aws.ec2.NetworkAclRule` resource.\n\nFor more information about Network ACLs, see the AWS Documentation on [Network ACLs][aws-network-acls].\n\n## Example Usage\n\n### Basic Example\n\nThe following config gives the Default Network ACL the same rules that AWS includes but pulls the resource under management by this provider. This means that any ACL rules added or changed will be detected as drift.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultNetworkAcl(\"default\", {\n defaultNetworkAclId: mainvpc.defaultNetworkAclId,\n ingress: [{\n protocol: \"-1\",\n ruleNo: 100,\n action: \"allow\",\n cidrBlock: \"0.0.0.0/0\",\n fromPort: 0,\n toPort: 0,\n }],\n egress: [{\n protocol: \"-1\",\n ruleNo: 100,\n action: \"allow\",\n cidrBlock: \"0.0.0.0/0\",\n fromPort: 0,\n toPort: 0,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultNetworkAcl(\"default\",\n default_network_acl_id=mainvpc.default_network_acl_id,\n ingress=[{\n \"protocol\": \"-1\",\n \"rule_no\": 100,\n \"action\": \"allow\",\n \"cidr_block\": \"0.0.0.0/0\",\n \"from_port\": 0,\n \"to_port\": 0,\n }],\n egress=[{\n \"protocol\": \"-1\",\n \"rule_no\": 100,\n \"action\": \"allow\",\n \"cidr_block\": \"0.0.0.0/0\",\n \"from_port\": 0,\n \"to_port\": 0,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultNetworkAcl(\"default\", new()\n {\n DefaultNetworkAclId = mainvpc.DefaultNetworkAclId,\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.DefaultNetworkAclIngressArgs\n {\n Protocol = \"-1\",\n RuleNo = 100,\n Action = \"allow\",\n CidrBlock = \"0.0.0.0/0\",\n FromPort = 0,\n ToPort = 0,\n },\n },\n Egress = new[]\n {\n new Aws.Ec2.Inputs.DefaultNetworkAclEgressArgs\n {\n Protocol = \"-1\",\n RuleNo = 100,\n Action = \"allow\",\n CidrBlock = \"0.0.0.0/0\",\n FromPort = 0,\n ToPort = 0,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultNetworkAcl(ctx, \"default\", \u0026ec2.DefaultNetworkAclArgs{\n\t\t\tDefaultNetworkAclId: mainvpc.DefaultNetworkAclId,\n\t\t\tIngress: ec2.DefaultNetworkAclIngressArray{\n\t\t\t\t\u0026ec2.DefaultNetworkAclIngressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tRuleNo: pulumi.Int(100),\n\t\t\t\t\tAction: pulumi.String(\"allow\"),\n\t\t\t\t\tCidrBlock: pulumi.String(\"0.0.0.0/0\"),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t\tEgress: ec2.DefaultNetworkAclEgressArray{\n\t\t\t\t\u0026ec2.DefaultNetworkAclEgressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tRuleNo: pulumi.Int(100),\n\t\t\t\t\tAction: pulumi.String(\"allow\"),\n\t\t\t\t\tCidrBlock: pulumi.String(\"0.0.0.0/0\"),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.DefaultNetworkAcl;\nimport com.pulumi.aws.ec2.DefaultNetworkAclArgs;\nimport com.pulumi.aws.ec2.inputs.DefaultNetworkAclIngressArgs;\nimport com.pulumi.aws.ec2.inputs.DefaultNetworkAclEgressArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var mainvpc = new Vpc(\"mainvpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n var default_ = new DefaultNetworkAcl(\"default\", DefaultNetworkAclArgs.builder()\n .defaultNetworkAclId(mainvpc.defaultNetworkAclId())\n .ingress(DefaultNetworkAclIngressArgs.builder()\n .protocol(-1)\n .ruleNo(100)\n .action(\"allow\")\n .cidrBlock(\"0.0.0.0/0\")\n .fromPort(0)\n .toPort(0)\n .build())\n .egress(DefaultNetworkAclEgressArgs.builder()\n .protocol(-1)\n .ruleNo(100)\n .action(\"allow\")\n .cidrBlock(\"0.0.0.0/0\")\n .fromPort(0)\n .toPort(0)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultNetworkAcl\n properties:\n defaultNetworkAclId: ${mainvpc.defaultNetworkAclId}\n ingress:\n - protocol: -1\n ruleNo: 100\n action: allow\n cidrBlock: 0.0.0.0/0\n fromPort: 0\n toPort: 0\n egress:\n - protocol: -1\n ruleNo: 100\n action: allow\n cidrBlock: 0.0.0.0/0\n fromPort: 0\n toPort: 0\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example: Deny All Egress Traffic, Allow Ingress\n\nThe following denies all Egress traffic by omitting any `egress` rules, while including the default `ingress` rule to allow all traffic.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultNetworkAcl(\"default\", {\n defaultNetworkAclId: mainvpc.defaultNetworkAclId,\n ingress: [{\n protocol: \"-1\",\n ruleNo: 100,\n action: \"allow\",\n cidrBlock: mainvpcAwsDefaultVpc.cidrBlock,\n fromPort: 0,\n toPort: 0,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultNetworkAcl(\"default\",\n default_network_acl_id=mainvpc.default_network_acl_id,\n ingress=[{\n \"protocol\": \"-1\",\n \"rule_no\": 100,\n \"action\": \"allow\",\n \"cidr_block\": mainvpc_aws_default_vpc[\"cidrBlock\"],\n \"from_port\": 0,\n \"to_port\": 0,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultNetworkAcl(\"default\", new()\n {\n DefaultNetworkAclId = mainvpc.DefaultNetworkAclId,\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.DefaultNetworkAclIngressArgs\n {\n Protocol = \"-1\",\n RuleNo = 100,\n Action = \"allow\",\n CidrBlock = mainvpcAwsDefaultVpc.CidrBlock,\n FromPort = 0,\n ToPort = 0,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultNetworkAcl(ctx, \"default\", \u0026ec2.DefaultNetworkAclArgs{\n\t\t\tDefaultNetworkAclId: mainvpc.DefaultNetworkAclId,\n\t\t\tIngress: ec2.DefaultNetworkAclIngressArray{\n\t\t\t\t\u0026ec2.DefaultNetworkAclIngressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tRuleNo: pulumi.Int(100),\n\t\t\t\t\tAction: pulumi.String(\"allow\"),\n\t\t\t\t\tCidrBlock: pulumi.Any(mainvpcAwsDefaultVpc.CidrBlock),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.DefaultNetworkAcl;\nimport com.pulumi.aws.ec2.DefaultNetworkAclArgs;\nimport com.pulumi.aws.ec2.inputs.DefaultNetworkAclIngressArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var mainvpc = new Vpc(\"mainvpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n var default_ = new DefaultNetworkAcl(\"default\", DefaultNetworkAclArgs.builder()\n .defaultNetworkAclId(mainvpc.defaultNetworkAclId())\n .ingress(DefaultNetworkAclIngressArgs.builder()\n .protocol(-1)\n .ruleNo(100)\n .action(\"allow\")\n .cidrBlock(mainvpcAwsDefaultVpc.cidrBlock())\n .fromPort(0)\n .toPort(0)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultNetworkAcl\n properties:\n defaultNetworkAclId: ${mainvpc.defaultNetworkAclId}\n ingress:\n - protocol: -1\n ruleNo: 100\n action: allow\n cidrBlock: ${mainvpcAwsDefaultVpc.cidrBlock}\n fromPort: 0\n toPort: 0\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example: Deny All Traffic To Any Subnet In The Default Network ACL\n\nThis config denies all traffic in the Default ACL. This can be useful if you want to lock down the VPC to force all resources to assign a non-default ACL.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultNetworkAcl(\"default\", {defaultNetworkAclId: mainvpc.defaultNetworkAclId});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultNetworkAcl(\"default\", default_network_acl_id=mainvpc.default_network_acl_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultNetworkAcl(\"default\", new()\n {\n DefaultNetworkAclId = mainvpc.DefaultNetworkAclId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultNetworkAcl(ctx, \"default\", \u0026ec2.DefaultNetworkAclArgs{\n\t\t\tDefaultNetworkAclId: mainvpc.DefaultNetworkAclId,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.DefaultNetworkAcl;\nimport com.pulumi.aws.ec2.DefaultNetworkAclArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var mainvpc = new Vpc(\"mainvpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n var default_ = new DefaultNetworkAcl(\"default\", DefaultNetworkAclArgs.builder()\n .defaultNetworkAclId(mainvpc.defaultNetworkAclId())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultNetworkAcl\n properties:\n defaultNetworkAclId: ${mainvpc.defaultNetworkAclId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Managing Subnets In A Default Network ACL\n\nWithin a VPC, all Subnets must be associated with a Network ACL. In order to \"delete\" the association between a Subnet and a non-default Network ACL, the association is destroyed by replacing it with an association between the Subnet and the Default ACL instead.\n\nWhen managing the Default Network ACL, you cannot \"remove\" Subnets. Instead, they must be reassigned to another Network ACL, or the Subnet itself must be destroyed. Because of these requirements, removing the `subnet_ids` attribute from the configuration of a `aws.ec2.DefaultNetworkAcl` resource may result in a reoccurring plan, until the Subnets are reassigned to another Network ACL or are destroyed.\n\nBecause Subnets are by default associated with the Default Network ACL, any non-explicit association will show up as a plan to remove the Subnet. For example: if you have a custom `aws.ec2.NetworkAcl` with two subnets attached, and you remove the `aws.ec2.NetworkAcl` resource, after successfully destroying this resource future plans will show a diff on the managed `aws.ec2.DefaultNetworkAcl`, as those two Subnets have been orphaned by the now destroyed network acl and thus adopted by the Default Network ACL. In order to avoid a reoccurring plan, they will need to be reassigned, destroyed, or added to the `subnet_ids` attribute of the `aws.ec2.DefaultNetworkAcl` entry.\n\nAs an alternative to the above, you can also specify the following lifecycle configuration in your `aws.ec2.DefaultNetworkAcl` resource:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst _default = new aws.ec2.DefaultNetworkAcl(\"default\", {});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ndefault = aws.ec2.DefaultNetworkAcl(\"default\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @default = new Aws.Ec2.DefaultNetworkAcl(\"default\");\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewDefaultNetworkAcl(ctx, \"default\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.DefaultNetworkAcl;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var default_ = new DefaultNetworkAcl(\"default\");\n\n }\n}\n```\n```yaml\nresources:\n default:\n type: aws:ec2:DefaultNetworkAcl\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Removing `aws.ec2.DefaultNetworkAcl` From Your Configuration\n\nEach AWS VPC comes with a Default Network ACL that cannot be deleted. The `aws.ec2.DefaultNetworkAcl` allows you to manage this Network ACL, but the provider cannot destroy it. Removing this resource from your configuration will remove it from your statefile and management, **but will not destroy the Network ACL.** All Subnets associations and ingress or egress rules will be left as they are at the time of removal. You can resume managing them via the AWS Console.\n\n## Import\n\nUsing `pulumi import`, import Default Network ACLs using the `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/defaultNetworkAcl:DefaultNetworkAcl sample acl-7aaabd18\n```\n", "properties": { "arn": { "type": "string", @@ -231661,7 +231661,7 @@ } }, "aws:ec2/defaultSecurityGroup:DefaultSecurityGroup": { - "description": "Provides a resource to manage a default security group. This resource can manage the default security group of the default or a non-default VPC.\n\n\u003e **NOTE:** This is an advanced resource with special caveats. Please read this document in its entirety before using this resource. The `aws.ec2.DefaultSecurityGroup` resource behaves differently from normal resources. This provider does not _create_ this resource but instead attempts to \"adopt\" it into management.\n\nWhen the provider first begins managing the default security group, it **immediately removes all ingress and egress rules in the Security Group**. It then creates any rules specified in the configuration. This way only the rules specified in the configuration are created.\n\nThis resource treats its inline rules as absolute; only the rules defined inline are created, and any additions/removals external to this resource will result in diff shown. For these reasons, this resource is incompatible with the `aws.ec2.SecurityGroupRule` resource.\n\nFor more information about default security groups, see the AWS documentation on [Default Security Groups][aws-default-security-groups]. To manage normal security groups, see the `aws.ec2.SecurityGroup` resource.\n\n## Example Usage\n\nThe following config gives the default security group the same rules that AWS provides by default but under management by this provider. This means that any ingress or egress rules added or changed will be detected as drift.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultSecurityGroup(\"default\", {\n vpcId: mainvpc.id,\n ingress: [{\n protocol: \"-1\",\n self: true,\n fromPort: 0,\n toPort: 0,\n }],\n egress: [{\n fromPort: 0,\n toPort: 0,\n protocol: \"-1\",\n cidrBlocks: [\"0.0.0.0/0\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultSecurityGroup(\"default\",\n vpc_id=mainvpc.id,\n ingress=[{\n \"protocol\": \"-1\",\n \"self\": True,\n \"from_port\": 0,\n \"to_port\": 0,\n }],\n egress=[{\n \"from_port\": 0,\n \"to_port\": 0,\n \"protocol\": \"-1\",\n \"cidr_blocks\": [\"0.0.0.0/0\"],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultSecurityGroup(\"default\", new()\n {\n VpcId = mainvpc.Id,\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.DefaultSecurityGroupIngressArgs\n {\n Protocol = \"-1\",\n Self = true,\n FromPort = 0,\n ToPort = 0,\n },\n },\n Egress = new[]\n {\n new Aws.Ec2.Inputs.DefaultSecurityGroupEgressArgs\n {\n FromPort = 0,\n ToPort = 0,\n Protocol = \"-1\",\n CidrBlocks = new[]\n {\n \"0.0.0.0/0\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultSecurityGroup(ctx, \"default\", \u0026ec2.DefaultSecurityGroupArgs{\n\t\t\tVpcId: mainvpc.ID(),\n\t\t\tIngress: ec2.DefaultSecurityGroupIngressArray{\n\t\t\t\t\u0026ec2.DefaultSecurityGroupIngressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tSelf: pulumi.Bool(true),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t\tEgress: ec2.DefaultSecurityGroupEgressArray{\n\t\t\t\t\u0026ec2.DefaultSecurityGroupEgressArgs{\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tCidrBlocks: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"0.0.0.0/0\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultSecurityGroup\n properties:\n vpcId: ${mainvpc.id}\n ingress:\n - protocol: -1\n self: true\n fromPort: 0\n toPort: 0\n egress:\n - fromPort: 0\n toPort: 0\n protocol: '-1'\n cidrBlocks:\n - 0.0.0.0/0\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Config To Deny All Egress Traffic, Allowing Ingress\n\nThe following denies all Egress traffic by omitting any `egress` rules, while including the default `ingress` rule to allow all traffic.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultSecurityGroup(\"default\", {\n vpcId: mainvpc.id,\n ingress: [{\n protocol: \"-1\",\n self: true,\n fromPort: 0,\n toPort: 0,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultSecurityGroup(\"default\",\n vpc_id=mainvpc.id,\n ingress=[{\n \"protocol\": \"-1\",\n \"self\": True,\n \"from_port\": 0,\n \"to_port\": 0,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultSecurityGroup(\"default\", new()\n {\n VpcId = mainvpc.Id,\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.DefaultSecurityGroupIngressArgs\n {\n Protocol = \"-1\",\n Self = true,\n FromPort = 0,\n ToPort = 0,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultSecurityGroup(ctx, \"default\", \u0026ec2.DefaultSecurityGroupArgs{\n\t\t\tVpcId: mainvpc.ID(),\n\t\t\tIngress: ec2.DefaultSecurityGroupIngressArray{\n\t\t\t\t\u0026ec2.DefaultSecurityGroupIngressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tSelf: pulumi.Bool(true),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultSecurityGroup\n properties:\n vpcId: ${mainvpc.id}\n ingress:\n - protocol: -1\n self: true\n fromPort: 0\n toPort: 0\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Removing `aws.ec2.DefaultSecurityGroup` From Your Configuration\n\nRemoving this resource from your configuration will remove it from your statefile and management, but will not destroy the Security Group. All ingress or egress rules will be left as they are at the time of removal. You can resume managing them via the AWS Console.\n\n## Import\n\nUsing `pulumi import`, import Security Groups using the security group `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/defaultSecurityGroup:DefaultSecurityGroup default_sg sg-903004f8\n```\n", + "description": "Provides a resource to manage a default security group. This resource can manage the default security group of the default or a non-default VPC.\n\n\u003e **NOTE:** This is an advanced resource with special caveats. Please read this document in its entirety before using this resource. The `aws.ec2.DefaultSecurityGroup` resource behaves differently from normal resources. This provider does not _create_ this resource but instead attempts to \"adopt\" it into management.\n\nWhen the provider first begins managing the default security group, it **immediately removes all ingress and egress rules in the Security Group**. It then creates any rules specified in the configuration. This way only the rules specified in the configuration are created.\n\nThis resource treats its inline rules as absolute; only the rules defined inline are created, and any additions/removals external to this resource will result in diff shown. For these reasons, this resource is incompatible with the `aws.ec2.SecurityGroupRule` resource.\n\nFor more information about default security groups, see the AWS documentation on [Default Security Groups][aws-default-security-groups]. To manage normal security groups, see the `aws.ec2.SecurityGroup` resource.\n\n## Example Usage\n\nThe following config gives the default security group the same rules that AWS provides by default but under management by this provider. This means that any ingress or egress rules added or changed will be detected as drift.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultSecurityGroup(\"default\", {\n vpcId: mainvpc.id,\n ingress: [{\n protocol: \"-1\",\n self: true,\n fromPort: 0,\n toPort: 0,\n }],\n egress: [{\n fromPort: 0,\n toPort: 0,\n protocol: \"-1\",\n cidrBlocks: [\"0.0.0.0/0\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultSecurityGroup(\"default\",\n vpc_id=mainvpc.id,\n ingress=[{\n \"protocol\": \"-1\",\n \"self\": True,\n \"from_port\": 0,\n \"to_port\": 0,\n }],\n egress=[{\n \"from_port\": 0,\n \"to_port\": 0,\n \"protocol\": \"-1\",\n \"cidr_blocks\": [\"0.0.0.0/0\"],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultSecurityGroup(\"default\", new()\n {\n VpcId = mainvpc.Id,\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.DefaultSecurityGroupIngressArgs\n {\n Protocol = \"-1\",\n Self = true,\n FromPort = 0,\n ToPort = 0,\n },\n },\n Egress = new[]\n {\n new Aws.Ec2.Inputs.DefaultSecurityGroupEgressArgs\n {\n FromPort = 0,\n ToPort = 0,\n Protocol = \"-1\",\n CidrBlocks = new[]\n {\n \"0.0.0.0/0\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultSecurityGroup(ctx, \"default\", \u0026ec2.DefaultSecurityGroupArgs{\n\t\t\tVpcId: mainvpc.ID(),\n\t\t\tIngress: ec2.DefaultSecurityGroupIngressArray{\n\t\t\t\t\u0026ec2.DefaultSecurityGroupIngressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tSelf: pulumi.Bool(true),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t\tEgress: ec2.DefaultSecurityGroupEgressArray{\n\t\t\t\t\u0026ec2.DefaultSecurityGroupEgressArgs{\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tCidrBlocks: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"0.0.0.0/0\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.DefaultSecurityGroup;\nimport com.pulumi.aws.ec2.DefaultSecurityGroupArgs;\nimport com.pulumi.aws.ec2.inputs.DefaultSecurityGroupIngressArgs;\nimport com.pulumi.aws.ec2.inputs.DefaultSecurityGroupEgressArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var mainvpc = new Vpc(\"mainvpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n var default_ = new DefaultSecurityGroup(\"default\", DefaultSecurityGroupArgs.builder()\n .vpcId(mainvpc.id())\n .ingress(DefaultSecurityGroupIngressArgs.builder()\n .protocol(-1)\n .self(true)\n .fromPort(0)\n .toPort(0)\n .build())\n .egress(DefaultSecurityGroupEgressArgs.builder()\n .fromPort(0)\n .toPort(0)\n .protocol(\"-1\")\n .cidrBlocks(\"0.0.0.0/0\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultSecurityGroup\n properties:\n vpcId: ${mainvpc.id}\n ingress:\n - protocol: -1\n self: true\n fromPort: 0\n toPort: 0\n egress:\n - fromPort: 0\n toPort: 0\n protocol: '-1'\n cidrBlocks:\n - 0.0.0.0/0\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example Config To Deny All Egress Traffic, Allowing Ingress\n\nThe following denies all Egress traffic by omitting any `egress` rules, while including the default `ingress` rule to allow all traffic.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst mainvpc = new aws.ec2.Vpc(\"mainvpc\", {cidrBlock: \"10.1.0.0/16\"});\nconst _default = new aws.ec2.DefaultSecurityGroup(\"default\", {\n vpcId: mainvpc.id,\n ingress: [{\n protocol: \"-1\",\n self: true,\n fromPort: 0,\n toPort: 0,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmainvpc = aws.ec2.Vpc(\"mainvpc\", cidr_block=\"10.1.0.0/16\")\ndefault = aws.ec2.DefaultSecurityGroup(\"default\",\n vpc_id=mainvpc.id,\n ingress=[{\n \"protocol\": \"-1\",\n \"self\": True,\n \"from_port\": 0,\n \"to_port\": 0,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var mainvpc = new Aws.Ec2.Vpc(\"mainvpc\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var @default = new Aws.Ec2.DefaultSecurityGroup(\"default\", new()\n {\n VpcId = mainvpc.Id,\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.DefaultSecurityGroupIngressArgs\n {\n Protocol = \"-1\",\n Self = true,\n FromPort = 0,\n ToPort = 0,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmainvpc, err := ec2.NewVpc(ctx, \"mainvpc\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewDefaultSecurityGroup(ctx, \"default\", \u0026ec2.DefaultSecurityGroupArgs{\n\t\t\tVpcId: mainvpc.ID(),\n\t\t\tIngress: ec2.DefaultSecurityGroupIngressArray{\n\t\t\t\t\u0026ec2.DefaultSecurityGroupIngressArgs{\n\t\t\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\t\t\tSelf: pulumi.Bool(true),\n\t\t\t\t\tFromPort: pulumi.Int(0),\n\t\t\t\t\tToPort: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.DefaultSecurityGroup;\nimport com.pulumi.aws.ec2.DefaultSecurityGroupArgs;\nimport com.pulumi.aws.ec2.inputs.DefaultSecurityGroupIngressArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var mainvpc = new Vpc(\"mainvpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n var default_ = new DefaultSecurityGroup(\"default\", DefaultSecurityGroupArgs.builder()\n .vpcId(mainvpc.id())\n .ingress(DefaultSecurityGroupIngressArgs.builder()\n .protocol(-1)\n .self(true)\n .fromPort(0)\n .toPort(0)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n mainvpc:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n default:\n type: aws:ec2:DefaultSecurityGroup\n properties:\n vpcId: ${mainvpc.id}\n ingress:\n - protocol: -1\n self: true\n fromPort: 0\n toPort: 0\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Removing `aws.ec2.DefaultSecurityGroup` From Your Configuration\n\nRemoving this resource from your configuration will remove it from your statefile and management, but will not destroy the Security Group. All ingress or egress rules will be left as they are at the time of removal. You can resume managing them via the AWS Console.\n\n## Import\n\nUsing `pulumi import`, import Security Groups using the security group `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/defaultSecurityGroup:DefaultSecurityGroup default_sg sg-903004f8\n```\n", "properties": { "arn": { "type": "string", @@ -237602,7 +237602,7 @@ } }, "aws:ec2/peeringConnectionOptions:PeeringConnectionOptions": { - "description": "Provides a resource to manage VPC peering connection options.\n\n\u003e **NOTE on VPC Peering Connections and VPC Peering Connection Options:** This provider provides\nboth a standalone VPC Peering Connection Options and a VPC Peering Connection\nresource with `accepter` and `requester` attributes. Do not manage options for the same VPC peering\nconnection in both a VPC Peering Connection resource and a VPC Peering Connection Options resource.\nDoing so will cause a conflict of options and will overwrite the options.\nUsing a VPC Peering Connection Options resource decouples management of the connection options from\nmanagement of the VPC Peering Connection and allows options to be set correctly in cross-region and\ncross-account scenarios.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst foo = new aws.ec2.Vpc(\"foo\", {cidrBlock: \"10.0.0.0/16\"});\nconst bar = new aws.ec2.Vpc(\"bar\", {cidrBlock: \"10.1.0.0/16\"});\nconst fooVpcPeeringConnection = new aws.ec2.VpcPeeringConnection(\"foo\", {\n vpcId: foo.id,\n peerVpcId: bar.id,\n autoAccept: true,\n});\nconst fooPeeringConnectionOptions = new aws.ec2.PeeringConnectionOptions(\"foo\", {\n vpcPeeringConnectionId: fooVpcPeeringConnection.id,\n accepter: {\n allowRemoteVpcDnsResolution: true,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.Vpc(\"foo\", cidr_block=\"10.0.0.0/16\")\nbar = aws.ec2.Vpc(\"bar\", cidr_block=\"10.1.0.0/16\")\nfoo_vpc_peering_connection = aws.ec2.VpcPeeringConnection(\"foo\",\n vpc_id=foo.id,\n peer_vpc_id=bar.id,\n auto_accept=True)\nfoo_peering_connection_options = aws.ec2.PeeringConnectionOptions(\"foo\",\n vpc_peering_connection_id=foo_vpc_peering_connection.id,\n accepter={\n \"allow_remote_vpc_dns_resolution\": True,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foo = new Aws.Ec2.Vpc(\"foo\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n });\n\n var bar = new Aws.Ec2.Vpc(\"bar\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var fooVpcPeeringConnection = new Aws.Ec2.VpcPeeringConnection(\"foo\", new()\n {\n VpcId = foo.Id,\n PeerVpcId = bar.Id,\n AutoAccept = true,\n });\n\n var fooPeeringConnectionOptions = new Aws.Ec2.PeeringConnectionOptions(\"foo\", new()\n {\n VpcPeeringConnectionId = fooVpcPeeringConnection.Id,\n Accepter = new Aws.Ec2.Inputs.PeeringConnectionOptionsAccepterArgs\n {\n AllowRemoteVpcDnsResolution = true,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tfoo, err := ec2.NewVpc(ctx, \"foo\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbar, err := ec2.NewVpc(ctx, \"bar\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooVpcPeeringConnection, err := ec2.NewVpcPeeringConnection(ctx, \"foo\", \u0026ec2.VpcPeeringConnectionArgs{\n\t\t\tVpcId: foo.ID(),\n\t\t\tPeerVpcId: bar.ID(),\n\t\t\tAutoAccept: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewPeeringConnectionOptions(ctx, \"foo\", \u0026ec2.PeeringConnectionOptionsArgs{\n\t\t\tVpcPeeringConnectionId: fooVpcPeeringConnection.ID(),\n\t\t\tAccepter: \u0026ec2.PeeringConnectionOptionsAccepterArgs{\n\t\t\t\tAllowRemoteVpcDnsResolution: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnection;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionArgs;\nimport com.pulumi.aws.ec2.PeeringConnectionOptions;\nimport com.pulumi.aws.ec2.PeeringConnectionOptionsArgs;\nimport com.pulumi.aws.ec2.inputs.PeeringConnectionOptionsAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foo = new Vpc(\"foo\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .build());\n\n var bar = new Vpc(\"bar\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n var fooVpcPeeringConnection = new VpcPeeringConnection(\"fooVpcPeeringConnection\", VpcPeeringConnectionArgs.builder()\n .vpcId(foo.id())\n .peerVpcId(bar.id())\n .autoAccept(true)\n .build());\n\n var fooPeeringConnectionOptions = new PeeringConnectionOptions(\"fooPeeringConnectionOptions\", PeeringConnectionOptionsArgs.builder()\n .vpcPeeringConnectionId(fooVpcPeeringConnection.id())\n .accepter(PeeringConnectionOptionsAccepterArgs.builder()\n .allowRemoteVpcDnsResolution(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n bar:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n fooVpcPeeringConnection:\n type: aws:ec2:VpcPeeringConnection\n name: foo\n properties:\n vpcId: ${foo.id}\n peerVpcId: ${bar.id}\n autoAccept: true\n fooPeeringConnectionOptions:\n type: aws:ec2:PeeringConnectionOptions\n name: foo\n properties:\n vpcPeeringConnectionId: ${fooVpcPeeringConnection.id}\n accepter:\n allowRemoteVpcDnsResolution: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Cross-Account Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = new aws.ec2.Vpc(\"main\", {\n cidrBlock: \"10.0.0.0/16\",\n enableDnsSupport: true,\n enableDnsHostnames: true,\n});\nconst peerVpc = new aws.ec2.Vpc(\"peer\", {\n cidrBlock: \"10.1.0.0/16\",\n enableDnsSupport: true,\n enableDnsHostnames: true,\n});\nconst peer = aws.getCallerIdentity({});\n// Requester's side of the connection.\nconst peerVpcPeeringConnection = new aws.ec2.VpcPeeringConnection(\"peer\", {\n vpcId: main.id,\n peerVpcId: peerVpc.id,\n peerOwnerId: peer.then(peer =\u003e peer.accountId),\n autoAccept: false,\n tags: {\n Side: \"Requester\",\n },\n});\n// Accepter's side of the connection.\nconst peerVpcPeeringConnectionAccepter = new aws.ec2.VpcPeeringConnectionAccepter(\"peer\", {\n vpcPeeringConnectionId: peerVpcPeeringConnection.id,\n autoAccept: true,\n tags: {\n Side: \"Accepter\",\n },\n});\nconst requester = new aws.ec2.PeeringConnectionOptions(\"requester\", {\n vpcPeeringConnectionId: peerVpcPeeringConnectionAccepter.id,\n requester: {\n allowRemoteVpcDnsResolution: true,\n },\n});\nconst accepter = new aws.ec2.PeeringConnectionOptions(\"accepter\", {\n vpcPeeringConnectionId: peerVpcPeeringConnectionAccepter.id,\n accepter: {\n allowRemoteVpcDnsResolution: true,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ec2.Vpc(\"main\",\n cidr_block=\"10.0.0.0/16\",\n enable_dns_support=True,\n enable_dns_hostnames=True)\npeer_vpc = aws.ec2.Vpc(\"peer\",\n cidr_block=\"10.1.0.0/16\",\n enable_dns_support=True,\n enable_dns_hostnames=True)\npeer = aws.get_caller_identity()\n# Requester's side of the connection.\npeer_vpc_peering_connection = aws.ec2.VpcPeeringConnection(\"peer\",\n vpc_id=main.id,\n peer_vpc_id=peer_vpc.id,\n peer_owner_id=peer.account_id,\n auto_accept=False,\n tags={\n \"Side\": \"Requester\",\n })\n# Accepter's side of the connection.\npeer_vpc_peering_connection_accepter = aws.ec2.VpcPeeringConnectionAccepter(\"peer\",\n vpc_peering_connection_id=peer_vpc_peering_connection.id,\n auto_accept=True,\n tags={\n \"Side\": \"Accepter\",\n })\nrequester = aws.ec2.PeeringConnectionOptions(\"requester\",\n vpc_peering_connection_id=peer_vpc_peering_connection_accepter.id,\n requester={\n \"allow_remote_vpc_dns_resolution\": True,\n })\naccepter = aws.ec2.PeeringConnectionOptions(\"accepter\",\n vpc_peering_connection_id=peer_vpc_peering_connection_accepter.id,\n accepter={\n \"allow_remote_vpc_dns_resolution\": True,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = new Aws.Ec2.Vpc(\"main\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n EnableDnsSupport = true,\n EnableDnsHostnames = true,\n });\n\n var peerVpc = new Aws.Ec2.Vpc(\"peer\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n EnableDnsSupport = true,\n EnableDnsHostnames = true,\n });\n\n var peer = Aws.GetCallerIdentity.Invoke();\n\n // Requester's side of the connection.\n var peerVpcPeeringConnection = new Aws.Ec2.VpcPeeringConnection(\"peer\", new()\n {\n VpcId = main.Id,\n PeerVpcId = peerVpc.Id,\n PeerOwnerId = peer.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n AutoAccept = false,\n Tags = \n {\n { \"Side\", \"Requester\" },\n },\n });\n\n // Accepter's side of the connection.\n var peerVpcPeeringConnectionAccepter = new Aws.Ec2.VpcPeeringConnectionAccepter(\"peer\", new()\n {\n VpcPeeringConnectionId = peerVpcPeeringConnection.Id,\n AutoAccept = true,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n var requester = new Aws.Ec2.PeeringConnectionOptions(\"requester\", new()\n {\n VpcPeeringConnectionId = peerVpcPeeringConnectionAccepter.Id,\n Requester = new Aws.Ec2.Inputs.PeeringConnectionOptionsRequesterArgs\n {\n AllowRemoteVpcDnsResolution = true,\n },\n });\n\n var accepter = new Aws.Ec2.PeeringConnectionOptions(\"accepter\", new()\n {\n VpcPeeringConnectionId = peerVpcPeeringConnectionAccepter.Id,\n Accepter = new Aws.Ec2.Inputs.PeeringConnectionOptionsAccepterArgs\n {\n AllowRemoteVpcDnsResolution = true,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := ec2.NewVpc(ctx, \"main\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t\tEnableDnsSupport: pulumi.Bool(true),\n\t\t\tEnableDnsHostnames: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeerVpc, err := ec2.NewVpc(ctx, \"peer\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t\tEnableDnsSupport: pulumi.Bool(true),\n\t\t\tEnableDnsHostnames: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeer, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Requester's side of the connection.\n\t\tpeerVpcPeeringConnection, err := ec2.NewVpcPeeringConnection(ctx, \"peer\", \u0026ec2.VpcPeeringConnectionArgs{\n\t\t\tVpcId: main.ID(),\n\t\t\tPeerVpcId: peerVpc.ID(),\n\t\t\tPeerOwnerId: pulumi.String(peer.AccountId),\n\t\t\tAutoAccept: pulumi.Bool(false),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Requester\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the connection.\n\t\tpeerVpcPeeringConnectionAccepter, err := ec2.NewVpcPeeringConnectionAccepter(ctx, \"peer\", \u0026ec2.VpcPeeringConnectionAccepterArgs{\n\t\t\tVpcPeeringConnectionId: peerVpcPeeringConnection.ID(),\n\t\t\tAutoAccept: pulumi.Bool(true),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewPeeringConnectionOptions(ctx, \"requester\", \u0026ec2.PeeringConnectionOptionsArgs{\n\t\t\tVpcPeeringConnectionId: peerVpcPeeringConnectionAccepter.ID(),\n\t\t\tRequester: \u0026ec2.PeeringConnectionOptionsRequesterArgs{\n\t\t\t\tAllowRemoteVpcDnsResolution: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewPeeringConnectionOptions(ctx, \"accepter\", \u0026ec2.PeeringConnectionOptionsArgs{\n\t\t\tVpcPeeringConnectionId: peerVpcPeeringConnectionAccepter.ID(),\n\t\t\tAccepter: \u0026ec2.PeeringConnectionOptionsAccepterArgs{\n\t\t\t\tAllowRemoteVpcDnsResolution: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnection;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionAccepter;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionAccepterArgs;\nimport com.pulumi.aws.ec2.PeeringConnectionOptions;\nimport com.pulumi.aws.ec2.PeeringConnectionOptionsArgs;\nimport com.pulumi.aws.ec2.inputs.PeeringConnectionOptionsRequesterArgs;\nimport com.pulumi.aws.ec2.inputs.PeeringConnectionOptionsAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var main = new Vpc(\"main\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .enableDnsSupport(true)\n .enableDnsHostnames(true)\n .build());\n\n var peerVpc = new Vpc(\"peerVpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .enableDnsSupport(true)\n .enableDnsHostnames(true)\n .build());\n\n final var peer = AwsFunctions.getCallerIdentity();\n\n // Requester's side of the connection.\n var peerVpcPeeringConnection = new VpcPeeringConnection(\"peerVpcPeeringConnection\", VpcPeeringConnectionArgs.builder()\n .vpcId(main.id())\n .peerVpcId(peerVpc.id())\n .peerOwnerId(peer.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .autoAccept(false)\n .tags(Map.of(\"Side\", \"Requester\"))\n .build());\n\n // Accepter's side of the connection.\n var peerVpcPeeringConnectionAccepter = new VpcPeeringConnectionAccepter(\"peerVpcPeeringConnectionAccepter\", VpcPeeringConnectionAccepterArgs.builder()\n .vpcPeeringConnectionId(peerVpcPeeringConnection.id())\n .autoAccept(true)\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n var requester = new PeeringConnectionOptions(\"requester\", PeeringConnectionOptionsArgs.builder()\n .vpcPeeringConnectionId(peerVpcPeeringConnectionAccepter.id())\n .requester(PeeringConnectionOptionsRequesterArgs.builder()\n .allowRemoteVpcDnsResolution(true)\n .build())\n .build());\n\n var accepter = new PeeringConnectionOptions(\"accepter\", PeeringConnectionOptionsArgs.builder()\n .vpcPeeringConnectionId(peerVpcPeeringConnectionAccepter.id())\n .accepter(PeeringConnectionOptionsAccepterArgs.builder()\n .allowRemoteVpcDnsResolution(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n enableDnsSupport: true\n enableDnsHostnames: true\n peerVpc:\n type: aws:ec2:Vpc\n name: peer\n properties:\n cidrBlock: 10.1.0.0/16\n enableDnsSupport: true\n enableDnsHostnames: true\n # Requester's side of the connection.\n peerVpcPeeringConnection:\n type: aws:ec2:VpcPeeringConnection\n name: peer\n properties:\n vpcId: ${main.id}\n peerVpcId: ${peerVpc.id}\n peerOwnerId: ${peer.accountId}\n autoAccept: false\n tags:\n Side: Requester\n # Accepter's side of the connection.\n peerVpcPeeringConnectionAccepter:\n type: aws:ec2:VpcPeeringConnectionAccepter\n name: peer\n properties:\n vpcPeeringConnectionId: ${peerVpcPeeringConnection.id}\n autoAccept: true\n tags:\n Side: Accepter\n requester:\n type: aws:ec2:PeeringConnectionOptions\n properties:\n vpcPeeringConnectionId: ${peerVpcPeeringConnectionAccepter.id}\n requester:\n allowRemoteVpcDnsResolution: true\n accepter:\n type: aws:ec2:PeeringConnectionOptions\n properties:\n vpcPeeringConnectionId: ${peerVpcPeeringConnectionAccepter.id}\n accepter:\n allowRemoteVpcDnsResolution: true\nvariables:\n peer:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPC Peering Connection Options using the VPC peering `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/peeringConnectionOptions:PeeringConnectionOptions foo pcx-111aaa111\n```\n", + "description": "Provides a resource to manage VPC peering connection options.\n\n\u003e **NOTE on VPC Peering Connections and VPC Peering Connection Options:** This provider provides\nboth a standalone VPC Peering Connection Options and a VPC Peering Connection\nresource with `accepter` and `requester` attributes. Do not manage options for the same VPC peering\nconnection in both a VPC Peering Connection resource and a VPC Peering Connection Options resource.\nDoing so will cause a conflict of options and will overwrite the options.\nUsing a VPC Peering Connection Options resource decouples management of the connection options from\nmanagement of the VPC Peering Connection and allows options to be set correctly in cross-region and\ncross-account scenarios.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst foo = new aws.ec2.Vpc(\"foo\", {cidrBlock: \"10.0.0.0/16\"});\nconst bar = new aws.ec2.Vpc(\"bar\", {cidrBlock: \"10.1.0.0/16\"});\nconst fooVpcPeeringConnection = new aws.ec2.VpcPeeringConnection(\"foo\", {\n vpcId: foo.id,\n peerVpcId: bar.id,\n autoAccept: true,\n});\nconst fooPeeringConnectionOptions = new aws.ec2.PeeringConnectionOptions(\"foo\", {\n vpcPeeringConnectionId: fooVpcPeeringConnection.id,\n accepter: {\n allowRemoteVpcDnsResolution: true,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.Vpc(\"foo\", cidr_block=\"10.0.0.0/16\")\nbar = aws.ec2.Vpc(\"bar\", cidr_block=\"10.1.0.0/16\")\nfoo_vpc_peering_connection = aws.ec2.VpcPeeringConnection(\"foo\",\n vpc_id=foo.id,\n peer_vpc_id=bar.id,\n auto_accept=True)\nfoo_peering_connection_options = aws.ec2.PeeringConnectionOptions(\"foo\",\n vpc_peering_connection_id=foo_vpc_peering_connection.id,\n accepter={\n \"allow_remote_vpc_dns_resolution\": True,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foo = new Aws.Ec2.Vpc(\"foo\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n });\n\n var bar = new Aws.Ec2.Vpc(\"bar\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var fooVpcPeeringConnection = new Aws.Ec2.VpcPeeringConnection(\"foo\", new()\n {\n VpcId = foo.Id,\n PeerVpcId = bar.Id,\n AutoAccept = true,\n });\n\n var fooPeeringConnectionOptions = new Aws.Ec2.PeeringConnectionOptions(\"foo\", new()\n {\n VpcPeeringConnectionId = fooVpcPeeringConnection.Id,\n Accepter = new Aws.Ec2.Inputs.PeeringConnectionOptionsAccepterArgs\n {\n AllowRemoteVpcDnsResolution = true,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tfoo, err := ec2.NewVpc(ctx, \"foo\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbar, err := ec2.NewVpc(ctx, \"bar\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooVpcPeeringConnection, err := ec2.NewVpcPeeringConnection(ctx, \"foo\", \u0026ec2.VpcPeeringConnectionArgs{\n\t\t\tVpcId: foo.ID(),\n\t\t\tPeerVpcId: bar.ID(),\n\t\t\tAutoAccept: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewPeeringConnectionOptions(ctx, \"foo\", \u0026ec2.PeeringConnectionOptionsArgs{\n\t\t\tVpcPeeringConnectionId: fooVpcPeeringConnection.ID(),\n\t\t\tAccepter: \u0026ec2.PeeringConnectionOptionsAccepterArgs{\n\t\t\t\tAllowRemoteVpcDnsResolution: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnection;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionArgs;\nimport com.pulumi.aws.ec2.PeeringConnectionOptions;\nimport com.pulumi.aws.ec2.PeeringConnectionOptionsArgs;\nimport com.pulumi.aws.ec2.inputs.PeeringConnectionOptionsAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foo = new Vpc(\"foo\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .build());\n\n var bar = new Vpc(\"bar\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n var fooVpcPeeringConnection = new VpcPeeringConnection(\"fooVpcPeeringConnection\", VpcPeeringConnectionArgs.builder()\n .vpcId(foo.id())\n .peerVpcId(bar.id())\n .autoAccept(true)\n .build());\n\n var fooPeeringConnectionOptions = new PeeringConnectionOptions(\"fooPeeringConnectionOptions\", PeeringConnectionOptionsArgs.builder()\n .vpcPeeringConnectionId(fooVpcPeeringConnection.id())\n .accepter(PeeringConnectionOptionsAccepterArgs.builder()\n .allowRemoteVpcDnsResolution(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n bar:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.1.0.0/16\n fooVpcPeeringConnection:\n type: aws:ec2:VpcPeeringConnection\n name: foo\n properties:\n vpcId: ${foo.id}\n peerVpcId: ${bar.id}\n autoAccept: true\n fooPeeringConnectionOptions:\n type: aws:ec2:PeeringConnectionOptions\n name: foo\n properties:\n vpcPeeringConnectionId: ${fooVpcPeeringConnection.id}\n accepter:\n allowRemoteVpcDnsResolution: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Cross-Account Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = new aws.ec2.Vpc(\"main\", {\n cidrBlock: \"10.0.0.0/16\",\n enableDnsSupport: true,\n enableDnsHostnames: true,\n});\nconst peerVpc = new aws.ec2.Vpc(\"peer\", {\n cidrBlock: \"10.1.0.0/16\",\n enableDnsSupport: true,\n enableDnsHostnames: true,\n});\nconst peer = aws.getCallerIdentity({});\n// Requester's side of the connection.\nconst peerVpcPeeringConnection = new aws.ec2.VpcPeeringConnection(\"peer\", {\n vpcId: main.id,\n peerVpcId: peerVpc.id,\n peerOwnerId: peer.then(peer =\u003e peer.accountId),\n autoAccept: false,\n tags: {\n Side: \"Requester\",\n },\n});\n// Accepter's side of the connection.\nconst peerVpcPeeringConnectionAccepter = new aws.ec2.VpcPeeringConnectionAccepter(\"peer\", {\n vpcPeeringConnectionId: peerVpcPeeringConnection.id,\n autoAccept: true,\n tags: {\n Side: \"Accepter\",\n },\n});\nconst requester = new aws.ec2.PeeringConnectionOptions(\"requester\", {\n vpcPeeringConnectionId: peerVpcPeeringConnectionAccepter.id,\n requester: {\n allowRemoteVpcDnsResolution: true,\n },\n});\nconst accepter = new aws.ec2.PeeringConnectionOptions(\"accepter\", {\n vpcPeeringConnectionId: peerVpcPeeringConnectionAccepter.id,\n accepter: {\n allowRemoteVpcDnsResolution: true,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ec2.Vpc(\"main\",\n cidr_block=\"10.0.0.0/16\",\n enable_dns_support=True,\n enable_dns_hostnames=True)\npeer_vpc = aws.ec2.Vpc(\"peer\",\n cidr_block=\"10.1.0.0/16\",\n enable_dns_support=True,\n enable_dns_hostnames=True)\npeer = aws.get_caller_identity()\n# Requester's side of the connection.\npeer_vpc_peering_connection = aws.ec2.VpcPeeringConnection(\"peer\",\n vpc_id=main.id,\n peer_vpc_id=peer_vpc.id,\n peer_owner_id=peer.account_id,\n auto_accept=False,\n tags={\n \"Side\": \"Requester\",\n })\n# Accepter's side of the connection.\npeer_vpc_peering_connection_accepter = aws.ec2.VpcPeeringConnectionAccepter(\"peer\",\n vpc_peering_connection_id=peer_vpc_peering_connection.id,\n auto_accept=True,\n tags={\n \"Side\": \"Accepter\",\n })\nrequester = aws.ec2.PeeringConnectionOptions(\"requester\",\n vpc_peering_connection_id=peer_vpc_peering_connection_accepter.id,\n requester={\n \"allow_remote_vpc_dns_resolution\": True,\n })\naccepter = aws.ec2.PeeringConnectionOptions(\"accepter\",\n vpc_peering_connection_id=peer_vpc_peering_connection_accepter.id,\n accepter={\n \"allow_remote_vpc_dns_resolution\": True,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = new Aws.Ec2.Vpc(\"main\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n EnableDnsSupport = true,\n EnableDnsHostnames = true,\n });\n\n var peerVpc = new Aws.Ec2.Vpc(\"peer\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n EnableDnsSupport = true,\n EnableDnsHostnames = true,\n });\n\n var peer = Aws.GetCallerIdentity.Invoke();\n\n // Requester's side of the connection.\n var peerVpcPeeringConnection = new Aws.Ec2.VpcPeeringConnection(\"peer\", new()\n {\n VpcId = main.Id,\n PeerVpcId = peerVpc.Id,\n PeerOwnerId = peer.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n AutoAccept = false,\n Tags = \n {\n { \"Side\", \"Requester\" },\n },\n });\n\n // Accepter's side of the connection.\n var peerVpcPeeringConnectionAccepter = new Aws.Ec2.VpcPeeringConnectionAccepter(\"peer\", new()\n {\n VpcPeeringConnectionId = peerVpcPeeringConnection.Id,\n AutoAccept = true,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n var requester = new Aws.Ec2.PeeringConnectionOptions(\"requester\", new()\n {\n VpcPeeringConnectionId = peerVpcPeeringConnectionAccepter.Id,\n Requester = new Aws.Ec2.Inputs.PeeringConnectionOptionsRequesterArgs\n {\n AllowRemoteVpcDnsResolution = true,\n },\n });\n\n var accepter = new Aws.Ec2.PeeringConnectionOptions(\"accepter\", new()\n {\n VpcPeeringConnectionId = peerVpcPeeringConnectionAccepter.Id,\n Accepter = new Aws.Ec2.Inputs.PeeringConnectionOptionsAccepterArgs\n {\n AllowRemoteVpcDnsResolution = true,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := ec2.NewVpc(ctx, \"main\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t\tEnableDnsSupport: pulumi.Bool(true),\n\t\t\tEnableDnsHostnames: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeerVpc, err := ec2.NewVpc(ctx, \"peer\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t\tEnableDnsSupport: pulumi.Bool(true),\n\t\t\tEnableDnsHostnames: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeer, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Requester's side of the connection.\n\t\tpeerVpcPeeringConnection, err := ec2.NewVpcPeeringConnection(ctx, \"peer\", \u0026ec2.VpcPeeringConnectionArgs{\n\t\t\tVpcId: main.ID(),\n\t\t\tPeerVpcId: peerVpc.ID(),\n\t\t\tPeerOwnerId: pulumi.String(peer.AccountId),\n\t\t\tAutoAccept: pulumi.Bool(false),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Requester\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the connection.\n\t\tpeerVpcPeeringConnectionAccepter, err := ec2.NewVpcPeeringConnectionAccepter(ctx, \"peer\", \u0026ec2.VpcPeeringConnectionAccepterArgs{\n\t\t\tVpcPeeringConnectionId: peerVpcPeeringConnection.ID(),\n\t\t\tAutoAccept: pulumi.Bool(true),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewPeeringConnectionOptions(ctx, \"requester\", \u0026ec2.PeeringConnectionOptionsArgs{\n\t\t\tVpcPeeringConnectionId: peerVpcPeeringConnectionAccepter.ID(),\n\t\t\tRequester: \u0026ec2.PeeringConnectionOptionsRequesterArgs{\n\t\t\t\tAllowRemoteVpcDnsResolution: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewPeeringConnectionOptions(ctx, \"accepter\", \u0026ec2.PeeringConnectionOptionsArgs{\n\t\t\tVpcPeeringConnectionId: peerVpcPeeringConnectionAccepter.ID(),\n\t\t\tAccepter: \u0026ec2.PeeringConnectionOptionsAccepterArgs{\n\t\t\t\tAllowRemoteVpcDnsResolution: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnection;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionAccepter;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionAccepterArgs;\nimport com.pulumi.aws.ec2.PeeringConnectionOptions;\nimport com.pulumi.aws.ec2.PeeringConnectionOptionsArgs;\nimport com.pulumi.aws.ec2.inputs.PeeringConnectionOptionsRequesterArgs;\nimport com.pulumi.aws.ec2.inputs.PeeringConnectionOptionsAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var main = new Vpc(\"main\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .enableDnsSupport(true)\n .enableDnsHostnames(true)\n .build());\n\n var peerVpc = new Vpc(\"peerVpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .enableDnsSupport(true)\n .enableDnsHostnames(true)\n .build());\n\n final var peer = AwsFunctions.getCallerIdentity();\n\n // Requester's side of the connection.\n var peerVpcPeeringConnection = new VpcPeeringConnection(\"peerVpcPeeringConnection\", VpcPeeringConnectionArgs.builder()\n .vpcId(main.id())\n .peerVpcId(peerVpc.id())\n .peerOwnerId(peer.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .autoAccept(false)\n .tags(Map.of(\"Side\", \"Requester\"))\n .build());\n\n // Accepter's side of the connection.\n var peerVpcPeeringConnectionAccepter = new VpcPeeringConnectionAccepter(\"peerVpcPeeringConnectionAccepter\", VpcPeeringConnectionAccepterArgs.builder()\n .vpcPeeringConnectionId(peerVpcPeeringConnection.id())\n .autoAccept(true)\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n var requester = new PeeringConnectionOptions(\"requester\", PeeringConnectionOptionsArgs.builder()\n .vpcPeeringConnectionId(peerVpcPeeringConnectionAccepter.id())\n .requester(PeeringConnectionOptionsRequesterArgs.builder()\n .allowRemoteVpcDnsResolution(true)\n .build())\n .build());\n\n var accepter = new PeeringConnectionOptions(\"accepter\", PeeringConnectionOptionsArgs.builder()\n .vpcPeeringConnectionId(peerVpcPeeringConnectionAccepter.id())\n .accepter(PeeringConnectionOptionsAccepterArgs.builder()\n .allowRemoteVpcDnsResolution(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n enableDnsSupport: true\n enableDnsHostnames: true\n peerVpc:\n type: aws:ec2:Vpc\n name: peer\n properties:\n cidrBlock: 10.1.0.0/16\n enableDnsSupport: true\n enableDnsHostnames: true\n # Requester's side of the connection.\n peerVpcPeeringConnection:\n type: aws:ec2:VpcPeeringConnection\n name: peer\n properties:\n vpcId: ${main.id}\n peerVpcId: ${peerVpc.id}\n peerOwnerId: ${peer.accountId}\n autoAccept: false\n tags:\n Side: Requester\n # Accepter's side of the connection.\n peerVpcPeeringConnectionAccepter:\n type: aws:ec2:VpcPeeringConnectionAccepter\n name: peer\n properties:\n vpcPeeringConnectionId: ${peerVpcPeeringConnection.id}\n autoAccept: true\n tags:\n Side: Accepter\n requester:\n type: aws:ec2:PeeringConnectionOptions\n properties:\n vpcPeeringConnectionId: ${peerVpcPeeringConnectionAccepter.id}\n requester:\n allowRemoteVpcDnsResolution: true\n accepter:\n type: aws:ec2:PeeringConnectionOptions\n properties:\n vpcPeeringConnectionId: ${peerVpcPeeringConnectionAccepter.id}\n accepter:\n allowRemoteVpcDnsResolution: true\nvariables:\n peer:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPC Peering Connection Options using the VPC peering `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/peeringConnectionOptions:PeeringConnectionOptions foo pcx-111aaa111\n```\n", "properties": { "accepter": { "$ref": "#/types/aws:ec2/PeeringConnectionOptionsAccepter:PeeringConnectionOptionsAccepter", @@ -238544,7 +238544,7 @@ } }, "aws:ec2/securityGroupRule:SecurityGroupRule": { - "description": "Provides a security group rule resource. Represents a single `ingress` or `egress` group rule, which can be added to external Security Groups.\n\n\u003e **NOTE:** Avoid using the `aws.ec2.SecurityGroupRule` resource, as it struggles with managing multiple CIDR blocks, and, due to the historical lack of unique IDs, tags and descriptions. To avoid these problems, use the current best practice of the `aws.vpc.SecurityGroupEgressRule` and `aws.vpc.SecurityGroupIngressRule` resources with one CIDR block per rule.\n\n!\u003e **WARNING:** You should not use the `aws.ec2.SecurityGroupRule` resource in conjunction with `aws.vpc.SecurityGroupEgressRule` and `aws.vpc.SecurityGroupIngressRule` resources or with an `aws.ec2.SecurityGroup` resource that has in-line rules. Doing so may cause rule conflicts, perpetual differences, and result in rules being overwritten.\n\n\u003e **NOTE:** Setting `protocol = \"all\"` or `protocol = -1` with `from_port` and `to_port` will result in the EC2 API creating a security group rule with all ports open. This API behavior cannot be controlled by this provider and may generate warnings in the future.\n\n\u003e **NOTE:** Referencing Security Groups across VPC peering has certain restrictions. More information is available in the [VPC Peering User Guide](https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-security-groups.html).\n\n## Example Usage\n\nBasic usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.ec2.SecurityGroupRule(\"example\", {\n type: \"ingress\",\n fromPort: 0,\n toPort: 65535,\n protocol: aws.ec2.ProtocolType.TCP,\n cidrBlocks: [exampleAwsVpc.cidrBlock],\n ipv6CidrBlocks: [exampleAwsVpc.ipv6CidrBlock],\n securityGroupId: \"sg-123456\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.SecurityGroupRule(\"example\",\n type=\"ingress\",\n from_port=0,\n to_port=65535,\n protocol=aws.ec2.ProtocolType.TCP,\n cidr_blocks=[example_aws_vpc[\"cidrBlock\"]],\n ipv6_cidr_blocks=[example_aws_vpc[\"ipv6CidrBlock\"]],\n security_group_id=\"sg-123456\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Ec2.SecurityGroupRule(\"example\", new()\n {\n Type = \"ingress\",\n FromPort = 0,\n ToPort = 65535,\n Protocol = Aws.Ec2.ProtocolType.TCP,\n CidrBlocks = new[]\n {\n exampleAwsVpc.CidrBlock,\n },\n Ipv6CidrBlocks = new[]\n {\n exampleAwsVpc.Ipv6CidrBlock,\n },\n SecurityGroupId = \"sg-123456\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewSecurityGroupRule(ctx, \"example\", \u0026ec2.SecurityGroupRuleArgs{\n\t\t\tType: pulumi.String(\"ingress\"),\n\t\t\tFromPort: pulumi.Int(0),\n\t\t\tToPort: pulumi.Int(65535),\n\t\t\tProtocol: pulumi.String(ec2.ProtocolTypeTCP),\n\t\t\tCidrBlocks: pulumi.StringArray{\n\t\t\t\texampleAwsVpc.CidrBlock,\n\t\t\t},\n\t\t\tIpv6CidrBlocks: pulumi.StringArray{\n\t\t\t\texampleAwsVpc.Ipv6CidrBlock,\n\t\t\t},\n\t\t\tSecurityGroupId: pulumi.String(\"sg-123456\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.SecurityGroupRule;\nimport com.pulumi.aws.ec2.SecurityGroupRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new SecurityGroupRule(\"example\", SecurityGroupRuleArgs.builder()\n .type(\"ingress\")\n .fromPort(0)\n .toPort(65535)\n .protocol(\"tcp\")\n .cidrBlocks(exampleAwsVpc.cidrBlock())\n .ipv6CidrBlocks(exampleAwsVpc.ipv6CidrBlock())\n .securityGroupId(\"sg-123456\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:SecurityGroupRule\n properties:\n type: ingress\n fromPort: 0\n toPort: 65535\n protocol: tcp\n cidrBlocks:\n - ${exampleAwsVpc.cidrBlock}\n ipv6CidrBlocks:\n - ${exampleAwsVpc.ipv6CidrBlock}\n securityGroupId: sg-123456\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Usage With Prefix List IDs\n\nPrefix Lists are either managed by AWS internally, or created by the customer using a\nManaged Prefix List resource. Prefix Lists provided by\nAWS are associated with a prefix list name, or service name, that is linked to a specific region.\n\nPrefix list IDs are exported on VPC Endpoints, so you can use this format:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// ...\nconst myEndpoint = new aws.ec2.VpcEndpoint(\"my_endpoint\", {});\nconst allowAll = new aws.ec2.SecurityGroupRule(\"allow_all\", {\n type: \"egress\",\n toPort: 0,\n protocol: \"-1\",\n prefixListIds: [myEndpoint.prefixListId],\n fromPort: 0,\n securityGroupId: \"sg-123456\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# ...\nmy_endpoint = aws.ec2.VpcEndpoint(\"my_endpoint\")\nallow_all = aws.ec2.SecurityGroupRule(\"allow_all\",\n type=\"egress\",\n to_port=0,\n protocol=\"-1\",\n prefix_list_ids=[my_endpoint.prefix_list_id],\n from_port=0,\n security_group_id=\"sg-123456\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // ...\n var myEndpoint = new Aws.Ec2.VpcEndpoint(\"my_endpoint\");\n\n var allowAll = new Aws.Ec2.SecurityGroupRule(\"allow_all\", new()\n {\n Type = \"egress\",\n ToPort = 0,\n Protocol = \"-1\",\n PrefixListIds = new[]\n {\n myEndpoint.PrefixListId,\n },\n FromPort = 0,\n SecurityGroupId = \"sg-123456\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// ...\n\t\tmyEndpoint, err := ec2.NewVpcEndpoint(ctx, \"my_endpoint\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroupRule(ctx, \"allow_all\", \u0026ec2.SecurityGroupRuleArgs{\n\t\t\tType: pulumi.String(\"egress\"),\n\t\t\tToPort: pulumi.Int(0),\n\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\tPrefixListIds: pulumi.StringArray{\n\t\t\t\tmyEndpoint.PrefixListId,\n\t\t\t},\n\t\t\tFromPort: pulumi.Int(0),\n\t\t\tSecurityGroupId: pulumi.String(\"sg-123456\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.SecurityGroupRule;\nimport com.pulumi.aws.ec2.SecurityGroupRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // ...\n var myEndpoint = new VpcEndpoint(\"myEndpoint\");\n\n var allowAll = new SecurityGroupRule(\"allowAll\", SecurityGroupRuleArgs.builder()\n .type(\"egress\")\n .toPort(0)\n .protocol(\"-1\")\n .prefixListIds(myEndpoint.prefixListId())\n .fromPort(0)\n .securityGroupId(\"sg-123456\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n allowAll:\n type: aws:ec2:SecurityGroupRule\n name: allow_all\n properties:\n type: egress\n toPort: 0\n protocol: '-1'\n prefixListIds:\n - ${myEndpoint.prefixListId}\n fromPort: 0\n securityGroupId: sg-123456\n # ...\n myEndpoint:\n type: aws:ec2:VpcEndpoint\n name: my_endpoint\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nYou can also find a specific Prefix List using the `aws.ec2.getPrefixList`\nor `ec2_managed_prefix_list` data sources:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst s3 = current.then(current =\u003e aws.ec2.getPrefixList({\n name: `com.amazonaws.${current.name}.s3`,\n}));\nconst s3GatewayEgress = new aws.ec2.SecurityGroupRule(\"s3_gateway_egress\", {\n description: \"S3 Gateway Egress\",\n type: \"egress\",\n securityGroupId: \"sg-123456\",\n fromPort: 443,\n toPort: 443,\n protocol: aws.ec2.ProtocolType.TCP,\n prefixListIds: [s3.then(s3 =\u003e s3.id)],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ns3 = aws.ec2.get_prefix_list(name=f\"com.amazonaws.{current.name}.s3\")\ns3_gateway_egress = aws.ec2.SecurityGroupRule(\"s3_gateway_egress\",\n description=\"S3 Gateway Egress\",\n type=\"egress\",\n security_group_id=\"sg-123456\",\n from_port=443,\n to_port=443,\n protocol=aws.ec2.ProtocolType.TCP,\n prefix_list_ids=[s3.id])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var s3 = Aws.Ec2.GetPrefixList.Invoke(new()\n {\n Name = $\"com.amazonaws.{current.Apply(getRegionResult =\u003e getRegionResult.Name)}.s3\",\n });\n\n var s3GatewayEgress = new Aws.Ec2.SecurityGroupRule(\"s3_gateway_egress\", new()\n {\n Description = \"S3 Gateway Egress\",\n Type = \"egress\",\n SecurityGroupId = \"sg-123456\",\n FromPort = 443,\n ToPort = 443,\n Protocol = Aws.Ec2.ProtocolType.TCP,\n PrefixListIds = new[]\n {\n s3.Apply(getPrefixListResult =\u003e getPrefixListResult.Id),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ts3, err := ec2.GetPrefixList(ctx, \u0026ec2.GetPrefixListArgs{\n\t\t\tName: pulumi.StringRef(fmt.Sprintf(\"com.amazonaws.%v.s3\", current.Name)),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroupRule(ctx, \"s3_gateway_egress\", \u0026ec2.SecurityGroupRuleArgs{\n\t\t\tDescription: pulumi.String(\"S3 Gateway Egress\"),\n\t\t\tType: pulumi.String(\"egress\"),\n\t\t\tSecurityGroupId: pulumi.String(\"sg-123456\"),\n\t\t\tFromPort: pulumi.Int(443),\n\t\t\tToPort: pulumi.Int(443),\n\t\t\tProtocol: pulumi.String(ec2.ProtocolTypeTCP),\n\t\t\tPrefixListIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(s3.Id),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetPrefixListArgs;\nimport com.pulumi.aws.ec2.SecurityGroupRule;\nimport com.pulumi.aws.ec2.SecurityGroupRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var s3 = Ec2Functions.getPrefixList(GetPrefixListArgs.builder()\n .name(String.format(\"com.amazonaws.%s.s3\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build());\n\n var s3GatewayEgress = new SecurityGroupRule(\"s3GatewayEgress\", SecurityGroupRuleArgs.builder()\n .description(\"S3 Gateway Egress\")\n .type(\"egress\")\n .securityGroupId(\"sg-123456\")\n .fromPort(443)\n .toPort(443)\n .protocol(\"tcp\")\n .prefixListIds(s3.applyValue(getPrefixListResult -\u003e getPrefixListResult.id()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n s3GatewayEgress:\n type: aws:ec2:SecurityGroupRule\n name: s3_gateway_egress\n properties:\n description: S3 Gateway Egress\n type: egress\n securityGroupId: sg-123456\n fromPort: 443\n toPort: 443\n protocol: tcp\n prefixListIds:\n - ${s3.id}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n s3:\n fn::invoke:\n Function: aws:ec2:getPrefixList\n Arguments:\n name: com.amazonaws.${current.name}.s3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nImport a rule with various IPv4 and IPv6 source CIDR blocks:\n\nImport a rule, applicable to all ports, with a protocol other than TCP/UDP/ICMP/ICMPV6/ALL, e.g., Multicast Transport Protocol (MTP), using the IANA protocol number. For example: 92.\n\nImport a default any/any egress rule to 0.0.0.0/0:\n\nImport an egress rule with a prefix list ID destination:\n\nImport a rule applicable to all protocols and ports with a security group source:\n\nImport a rule that has itself and an IPv6 CIDR block as sources:\n\n__Using `pulumi import` to import__ Security Group Rules using the `security_group_id`, `type`, `protocol`, `from_port`, `to_port`, and source(s)/destination(s) (such as a `cidr_block`) separated by underscores (`_`). All parts are required. For example:\n\n__NOTE:__ Not all rule permissions (e.g., not all of a rule's CIDR blocks) need to be imported for this provider to manage rule permissions. However, importing some of a rule's permissions but not others, and then making changes to the rule will result in the creation of an additional rule to capture the updated permissions. Rule permissions that were not imported are left intact in the original rule.\n\nImport an ingress rule in security group `sg-6e616f6d69` for TCP port 8000 with an IPv4 destination CIDR of `10.0.3.0/24`:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule ingress sg-6e616f6d69_ingress_tcp_8000_8000_10.0.3.0/24\n```\nImport a rule with various IPv4 and IPv6 source CIDR blocks:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule ingress sg-4973616163_ingress_tcp_100_121_10.1.0.0/16_2001:db8::/48_10.2.0.0/16_2002:db8::/48\n```\nImport a rule, applicable to all ports, with a protocol other than TCP/UDP/ICMP/ICMPV6/ALL, e.g., Multicast Transport Protocol (MTP), using the IANA protocol number. For example: 92.\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule ingress sg-6777656e646f6c796e_ingress_92_0_65536_10.0.3.0/24_10.0.4.0/24\n```\nImport a default any/any egress rule to 0.0.0.0/0:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule default_egress sg-6777656e646f6c796e_egress_all_0_0_0.0.0.0/0\n```\nImport an egress rule with a prefix list ID destination:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule egress sg-62726f6479_egress_tcp_8000_8000_pl-6469726b\n```\nImport a rule applicable to all protocols and ports with a security group source:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule ingress_rule sg-7472697374616e_ingress_all_0_65536_sg-6176657279\n```\nImport a rule that has itself and an IPv6 CIDR block as sources:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule rule_name sg-656c65616e6f72_ingress_tcp_80_80_self_2001:db8::/48\n```\n", + "description": "Provides a security group rule resource. Represents a single `ingress` or `egress` group rule, which can be added to external Security Groups.\n\n\u003e **NOTE:** Avoid using the `aws.ec2.SecurityGroupRule` resource, as it struggles with managing multiple CIDR blocks, and, due to the historical lack of unique IDs, tags and descriptions. To avoid these problems, use the current best practice of the `aws.vpc.SecurityGroupEgressRule` and `aws.vpc.SecurityGroupIngressRule` resources with one CIDR block per rule.\n\n!\u003e **WARNING:** You should not use the `aws.ec2.SecurityGroupRule` resource in conjunction with `aws.vpc.SecurityGroupEgressRule` and `aws.vpc.SecurityGroupIngressRule` resources or with an `aws.ec2.SecurityGroup` resource that has in-line rules. Doing so may cause rule conflicts, perpetual differences, and result in rules being overwritten.\n\n\u003e **NOTE:** Setting `protocol = \"all\"` or `protocol = -1` with `from_port` and `to_port` will result in the EC2 API creating a security group rule with all ports open. This API behavior cannot be controlled by this provider and may generate warnings in the future.\n\n\u003e **NOTE:** Referencing Security Groups across VPC peering has certain restrictions. More information is available in the [VPC Peering User Guide](https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-security-groups.html).\n\n## Example Usage\n\nBasic usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.ec2.SecurityGroupRule(\"example\", {\n type: \"ingress\",\n fromPort: 0,\n toPort: 65535,\n protocol: aws.ec2.ProtocolType.TCP,\n cidrBlocks: [exampleAwsVpc.cidrBlock],\n ipv6CidrBlocks: [exampleAwsVpc.ipv6CidrBlock],\n securityGroupId: \"sg-123456\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.SecurityGroupRule(\"example\",\n type=\"ingress\",\n from_port=0,\n to_port=65535,\n protocol=aws.ec2.ProtocolType.TCP,\n cidr_blocks=[example_aws_vpc[\"cidrBlock\"]],\n ipv6_cidr_blocks=[example_aws_vpc[\"ipv6CidrBlock\"]],\n security_group_id=\"sg-123456\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Ec2.SecurityGroupRule(\"example\", new()\n {\n Type = \"ingress\",\n FromPort = 0,\n ToPort = 65535,\n Protocol = Aws.Ec2.ProtocolType.TCP,\n CidrBlocks = new[]\n {\n exampleAwsVpc.CidrBlock,\n },\n Ipv6CidrBlocks = new[]\n {\n exampleAwsVpc.Ipv6CidrBlock,\n },\n SecurityGroupId = \"sg-123456\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewSecurityGroupRule(ctx, \"example\", \u0026ec2.SecurityGroupRuleArgs{\n\t\t\tType: pulumi.String(\"ingress\"),\n\t\t\tFromPort: pulumi.Int(0),\n\t\t\tToPort: pulumi.Int(65535),\n\t\t\tProtocol: pulumi.String(ec2.ProtocolTypeTCP),\n\t\t\tCidrBlocks: pulumi.StringArray{\n\t\t\t\texampleAwsVpc.CidrBlock,\n\t\t\t},\n\t\t\tIpv6CidrBlocks: pulumi.StringArray{\n\t\t\t\texampleAwsVpc.Ipv6CidrBlock,\n\t\t\t},\n\t\t\tSecurityGroupId: pulumi.String(\"sg-123456\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.SecurityGroupRule;\nimport com.pulumi.aws.ec2.SecurityGroupRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new SecurityGroupRule(\"example\", SecurityGroupRuleArgs.builder()\n .type(\"ingress\")\n .fromPort(0)\n .toPort(65535)\n .protocol(\"tcp\")\n .cidrBlocks(exampleAwsVpc.cidrBlock())\n .ipv6CidrBlocks(exampleAwsVpc.ipv6CidrBlock())\n .securityGroupId(\"sg-123456\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:SecurityGroupRule\n properties:\n type: ingress\n fromPort: 0\n toPort: 65535\n protocol: tcp\n cidrBlocks:\n - ${exampleAwsVpc.cidrBlock}\n ipv6CidrBlocks:\n - ${exampleAwsVpc.ipv6CidrBlock}\n securityGroupId: sg-123456\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Usage With Prefix List IDs\n\nPrefix Lists are either managed by AWS internally, or created by the customer using a\nManaged Prefix List resource. Prefix Lists provided by\nAWS are associated with a prefix list name, or service name, that is linked to a specific region.\n\nPrefix list IDs are exported on VPC Endpoints, so you can use this format:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// ...\nconst myEndpoint = new aws.ec2.VpcEndpoint(\"my_endpoint\", {});\nconst allowAll = new aws.ec2.SecurityGroupRule(\"allow_all\", {\n type: \"egress\",\n toPort: 0,\n protocol: \"-1\",\n prefixListIds: [myEndpoint.prefixListId],\n fromPort: 0,\n securityGroupId: \"sg-123456\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# ...\nmy_endpoint = aws.ec2.VpcEndpoint(\"my_endpoint\")\nallow_all = aws.ec2.SecurityGroupRule(\"allow_all\",\n type=\"egress\",\n to_port=0,\n protocol=\"-1\",\n prefix_list_ids=[my_endpoint.prefix_list_id],\n from_port=0,\n security_group_id=\"sg-123456\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // ...\n var myEndpoint = new Aws.Ec2.VpcEndpoint(\"my_endpoint\");\n\n var allowAll = new Aws.Ec2.SecurityGroupRule(\"allow_all\", new()\n {\n Type = \"egress\",\n ToPort = 0,\n Protocol = \"-1\",\n PrefixListIds = new[]\n {\n myEndpoint.PrefixListId,\n },\n FromPort = 0,\n SecurityGroupId = \"sg-123456\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// ...\n\t\tmyEndpoint, err := ec2.NewVpcEndpoint(ctx, \"my_endpoint\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroupRule(ctx, \"allow_all\", \u0026ec2.SecurityGroupRuleArgs{\n\t\t\tType: pulumi.String(\"egress\"),\n\t\t\tToPort: pulumi.Int(0),\n\t\t\tProtocol: pulumi.String(\"-1\"),\n\t\t\tPrefixListIds: pulumi.StringArray{\n\t\t\t\tmyEndpoint.PrefixListId,\n\t\t\t},\n\t\t\tFromPort: pulumi.Int(0),\n\t\t\tSecurityGroupId: pulumi.String(\"sg-123456\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.SecurityGroupRule;\nimport com.pulumi.aws.ec2.SecurityGroupRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // ...\n var myEndpoint = new VpcEndpoint(\"myEndpoint\");\n\n var allowAll = new SecurityGroupRule(\"allowAll\", SecurityGroupRuleArgs.builder()\n .type(\"egress\")\n .toPort(0)\n .protocol(\"-1\")\n .prefixListIds(myEndpoint.prefixListId())\n .fromPort(0)\n .securityGroupId(\"sg-123456\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n allowAll:\n type: aws:ec2:SecurityGroupRule\n name: allow_all\n properties:\n type: egress\n toPort: 0\n protocol: '-1'\n prefixListIds:\n - ${myEndpoint.prefixListId}\n fromPort: 0\n securityGroupId: sg-123456\n # ...\n myEndpoint:\n type: aws:ec2:VpcEndpoint\n name: my_endpoint\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nYou can also find a specific Prefix List using the `aws.ec2.getPrefixList`\nor `ec2_managed_prefix_list` data sources:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst s3 = current.then(current =\u003e aws.ec2.getPrefixList({\n name: `com.amazonaws.${current.name}.s3`,\n}));\nconst s3GatewayEgress = new aws.ec2.SecurityGroupRule(\"s3_gateway_egress\", {\n description: \"S3 Gateway Egress\",\n type: \"egress\",\n securityGroupId: \"sg-123456\",\n fromPort: 443,\n toPort: 443,\n protocol: aws.ec2.ProtocolType.TCP,\n prefixListIds: [s3.then(s3 =\u003e s3.id)],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ns3 = aws.ec2.get_prefix_list(name=f\"com.amazonaws.{current.name}.s3\")\ns3_gateway_egress = aws.ec2.SecurityGroupRule(\"s3_gateway_egress\",\n description=\"S3 Gateway Egress\",\n type=\"egress\",\n security_group_id=\"sg-123456\",\n from_port=443,\n to_port=443,\n protocol=aws.ec2.ProtocolType.TCP,\n prefix_list_ids=[s3.id])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var s3 = Aws.Ec2.GetPrefixList.Invoke(new()\n {\n Name = $\"com.amazonaws.{current.Apply(getRegionResult =\u003e getRegionResult.Name)}.s3\",\n });\n\n var s3GatewayEgress = new Aws.Ec2.SecurityGroupRule(\"s3_gateway_egress\", new()\n {\n Description = \"S3 Gateway Egress\",\n Type = \"egress\",\n SecurityGroupId = \"sg-123456\",\n FromPort = 443,\n ToPort = 443,\n Protocol = Aws.Ec2.ProtocolType.TCP,\n PrefixListIds = new[]\n {\n s3.Apply(getPrefixListResult =\u003e getPrefixListResult.Id),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ts3, err := ec2.GetPrefixList(ctx, \u0026ec2.GetPrefixListArgs{\n\t\t\tName: pulumi.StringRef(fmt.Sprintf(\"com.amazonaws.%v.s3\", current.Name)),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewSecurityGroupRule(ctx, \"s3_gateway_egress\", \u0026ec2.SecurityGroupRuleArgs{\n\t\t\tDescription: pulumi.String(\"S3 Gateway Egress\"),\n\t\t\tType: pulumi.String(\"egress\"),\n\t\t\tSecurityGroupId: pulumi.String(\"sg-123456\"),\n\t\t\tFromPort: pulumi.Int(443),\n\t\t\tToPort: pulumi.Int(443),\n\t\t\tProtocol: pulumi.String(ec2.ProtocolTypeTCP),\n\t\t\tPrefixListIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(s3.Id),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetPrefixListArgs;\nimport com.pulumi.aws.ec2.SecurityGroupRule;\nimport com.pulumi.aws.ec2.SecurityGroupRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var s3 = Ec2Functions.getPrefixList(GetPrefixListArgs.builder()\n .name(String.format(\"com.amazonaws.%s.s3\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build());\n\n var s3GatewayEgress = new SecurityGroupRule(\"s3GatewayEgress\", SecurityGroupRuleArgs.builder()\n .description(\"S3 Gateway Egress\")\n .type(\"egress\")\n .securityGroupId(\"sg-123456\")\n .fromPort(443)\n .toPort(443)\n .protocol(\"tcp\")\n .prefixListIds(s3.applyValue(getPrefixListResult -\u003e getPrefixListResult.id()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n s3GatewayEgress:\n type: aws:ec2:SecurityGroupRule\n name: s3_gateway_egress\n properties:\n description: S3 Gateway Egress\n type: egress\n securityGroupId: sg-123456\n fromPort: 443\n toPort: 443\n protocol: tcp\n prefixListIds:\n - ${s3.id}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n s3:\n fn::invoke:\n Function: aws:ec2:getPrefixList\n Arguments:\n name: com.amazonaws.${current.name}.s3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nImport a rule with various IPv4 and IPv6 source CIDR blocks:\n\nImport a rule, applicable to all ports, with a protocol other than TCP/UDP/ICMP/ICMPV6/ALL, e.g., Multicast Transport Protocol (MTP), using the IANA protocol number. For example: 92.\n\nImport a default any/any egress rule to 0.0.0.0/0:\n\nImport an egress rule with a prefix list ID destination:\n\nImport a rule applicable to all protocols and ports with a security group source:\n\nImport a rule that has itself and an IPv6 CIDR block as sources:\n\n__Using `pulumi import` to import__ Security Group Rules using the `security_group_id`, `type`, `protocol`, `from_port`, `to_port`, and source(s)/destination(s) (such as a `cidr_block`) separated by underscores (`_`). All parts are required. For example:\n\n__NOTE:__ Not all rule permissions (e.g., not all of a rule's CIDR blocks) need to be imported for this provider to manage rule permissions. However, importing some of a rule's permissions but not others, and then making changes to the rule will result in the creation of an additional rule to capture the updated permissions. Rule permissions that were not imported are left intact in the original rule.\n\nImport an ingress rule in security group `sg-6e616f6d69` for TCP port 8000 with an IPv4 destination CIDR of `10.0.3.0/24`:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule ingress sg-6e616f6d69_ingress_tcp_8000_8000_10.0.3.0/24\n```\nImport a rule with various IPv4 and IPv6 source CIDR blocks:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule ingress sg-4973616163_ingress_tcp_100_121_10.1.0.0/16_2001:db8::/48_10.2.0.0/16_2002:db8::/48\n```\nImport a rule, applicable to all ports, with a protocol other than TCP/UDP/ICMP/ICMPV6/ALL, e.g., Multicast Transport Protocol (MTP), using the IANA protocol number. For example: 92.\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule ingress sg-6777656e646f6c796e_ingress_92_0_65536_10.0.3.0/24_10.0.4.0/24\n```\nImport a default any/any egress rule to 0.0.0.0/0:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule default_egress sg-6777656e646f6c796e_egress_all_0_0_0.0.0.0/0\n```\nImport an egress rule with a prefix list ID destination:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule egress sg-62726f6479_egress_tcp_8000_8000_pl-6469726b\n```\nImport a rule applicable to all protocols and ports with a security group source:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule ingress_rule sg-7472697374616e_ingress_all_0_65536_sg-6176657279\n```\nImport a rule that has itself and an IPv6 CIDR block as sources:\n\n```sh\n$ pulumi import aws:ec2/securityGroupRule:SecurityGroupRule rule_name sg-656c65616e6f72_ingress_tcp_80_80_self_2001:db8::/48\n```\n", "properties": { "cidrBlocks": { "type": "array", @@ -241414,7 +241414,7 @@ } }, "aws:ec2/vpc:Vpc": { - "description": "Provides a VPC resource.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = new aws.ec2.Vpc(\"main\", {cidrBlock: \"10.0.0.0/16\"});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ec2.Vpc(\"main\", cidr_block=\"10.0.0.0/16\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = new Aws.Ec2.Vpc(\"main\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpc(ctx, \"main\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var main = new Vpc(\"main\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nBasic usage with tags:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = new aws.ec2.Vpc(\"main\", {\n cidrBlock: \"10.0.0.0/16\",\n instanceTenancy: \"default\",\n tags: {\n Name: \"main\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ec2.Vpc(\"main\",\n cidr_block=\"10.0.0.0/16\",\n instance_tenancy=\"default\",\n tags={\n \"Name\": \"main\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = new Aws.Ec2.Vpc(\"main\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n InstanceTenancy = \"default\",\n Tags = \n {\n { \"Name\", \"main\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpc(ctx, \"main\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t\tInstanceTenancy: pulumi.String(\"default\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"main\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var main = new Vpc(\"main\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .instanceTenancy(\"default\")\n .tags(Map.of(\"Name\", \"main\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n instanceTenancy: default\n tags:\n Name: main\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nVPC with CIDR from AWS IPAM:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst test = new aws.ec2.VpcIpam(\"test\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst testVpcIpamPool = new aws.ec2.VpcIpamPool(\"test\", {\n addressFamily: \"ipv4\",\n ipamScopeId: test.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst testVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"test\", {\n ipamPoolId: testVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\nconst testVpc = new aws.ec2.Vpc(\"test\", {\n ipv4IpamPoolId: testVpcIpamPool.id,\n ipv4NetmaskLength: 28,\n}, {\n dependsOn: [testVpcIpamPoolCidr],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ntest = aws.ec2.VpcIpam(\"test\", operating_regions=[{\n \"region_name\": current.name,\n}])\ntest_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"test\",\n address_family=\"ipv4\",\n ipam_scope_id=test.private_default_scope_id,\n locale=current.name)\ntest_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"test\",\n ipam_pool_id=test_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\ntest_vpc = aws.ec2.Vpc(\"test\",\n ipv4_ipam_pool_id=test_vpc_ipam_pool.id,\n ipv4_netmask_length=28,\n opts = pulumi.ResourceOptions(depends_on=[test_vpc_ipam_pool_cidr]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var test = new Aws.Ec2.VpcIpam(\"test\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var testVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"test\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = test.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var testVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"test\", new()\n {\n IpamPoolId = testVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var testVpc = new Aws.Ec2.Vpc(\"test\", new()\n {\n Ipv4IpamPoolId = testVpcIpamPool.Id,\n Ipv4NetmaskLength = 28,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n testVpcIpamPoolCidr,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttest, err := ec2.NewVpcIpam(ctx, \"test\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"test\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: test.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, \"test\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: testVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpc(ctx, \"test\", \u0026ec2.VpcArgs{\n\t\t\tIpv4IpamPoolId: testVpcIpamPool.ID(),\n\t\t\tIpv4NetmaskLength: pulumi.Int(28),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\ttestVpcIpamPoolCidr,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var test = new VpcIpam(\"test\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var testVpcIpamPool = new VpcIpamPool(\"testVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(test.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var testVpcIpamPoolCidr = new VpcIpamPoolCidr(\"testVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(testVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var testVpc = new Vpc(\"testVpc\", VpcArgs.builder()\n .ipv4IpamPoolId(testVpcIpamPool.id())\n .ipv4NetmaskLength(28)\n .build(), CustomResourceOptions.builder()\n .dependsOn(testVpcIpamPoolCidr)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n testVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: test\n properties:\n addressFamily: ipv4\n ipamScopeId: ${test.privateDefaultScopeId}\n locale: ${current.name}\n testVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: test\n properties:\n ipamPoolId: ${testVpcIpamPool.id}\n cidr: 172.20.0.0/16\n testVpc:\n type: aws:ec2:Vpc\n name: test\n properties:\n ipv4IpamPoolId: ${testVpcIpamPool.id}\n ipv4NetmaskLength: 28\n options:\n dependson:\n - ${testVpcIpamPoolCidr}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPCs using the VPC `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpc:Vpc test_vpc vpc-a01106c2\n```\n", + "description": "Provides a VPC resource.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = new aws.ec2.Vpc(\"main\", {cidrBlock: \"10.0.0.0/16\"});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ec2.Vpc(\"main\", cidr_block=\"10.0.0.0/16\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = new Aws.Ec2.Vpc(\"main\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpc(ctx, \"main\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var main = new Vpc(\"main\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nBasic usage with tags:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = new aws.ec2.Vpc(\"main\", {\n cidrBlock: \"10.0.0.0/16\",\n instanceTenancy: \"default\",\n tags: {\n Name: \"main\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ec2.Vpc(\"main\",\n cidr_block=\"10.0.0.0/16\",\n instance_tenancy=\"default\",\n tags={\n \"Name\": \"main\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = new Aws.Ec2.Vpc(\"main\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n InstanceTenancy = \"default\",\n Tags = \n {\n { \"Name\", \"main\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpc(ctx, \"main\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t\tInstanceTenancy: pulumi.String(\"default\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"main\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var main = new Vpc(\"main\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .instanceTenancy(\"default\")\n .tags(Map.of(\"Name\", \"main\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n instanceTenancy: default\n tags:\n Name: main\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nVPC with CIDR from AWS IPAM:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst test = new aws.ec2.VpcIpam(\"test\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst testVpcIpamPool = new aws.ec2.VpcIpamPool(\"test\", {\n addressFamily: \"ipv4\",\n ipamScopeId: test.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst testVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"test\", {\n ipamPoolId: testVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\nconst testVpc = new aws.ec2.Vpc(\"test\", {\n ipv4IpamPoolId: testVpcIpamPool.id,\n ipv4NetmaskLength: 28,\n}, {\n dependsOn: [testVpcIpamPoolCidr],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ntest = aws.ec2.VpcIpam(\"test\", operating_regions=[{\n \"region_name\": current.name,\n}])\ntest_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"test\",\n address_family=\"ipv4\",\n ipam_scope_id=test.private_default_scope_id,\n locale=current.name)\ntest_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"test\",\n ipam_pool_id=test_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\ntest_vpc = aws.ec2.Vpc(\"test\",\n ipv4_ipam_pool_id=test_vpc_ipam_pool.id,\n ipv4_netmask_length=28,\n opts = pulumi.ResourceOptions(depends_on=[test_vpc_ipam_pool_cidr]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var test = new Aws.Ec2.VpcIpam(\"test\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var testVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"test\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = test.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var testVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"test\", new()\n {\n IpamPoolId = testVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var testVpc = new Aws.Ec2.Vpc(\"test\", new()\n {\n Ipv4IpamPoolId = testVpcIpamPool.Id,\n Ipv4NetmaskLength = 28,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n testVpcIpamPoolCidr,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttest, err := ec2.NewVpcIpam(ctx, \"test\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"test\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: test.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, \"test\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: testVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpc(ctx, \"test\", \u0026ec2.VpcArgs{\n\t\t\tIpv4IpamPoolId: testVpcIpamPool.ID(),\n\t\t\tIpv4NetmaskLength: pulumi.Int(28),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\ttestVpcIpamPoolCidr,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var test = new VpcIpam(\"test\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var testVpcIpamPool = new VpcIpamPool(\"testVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(test.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var testVpcIpamPoolCidr = new VpcIpamPoolCidr(\"testVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(testVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var testVpc = new Vpc(\"testVpc\", VpcArgs.builder()\n .ipv4IpamPoolId(testVpcIpamPool.id())\n .ipv4NetmaskLength(28)\n .build(), CustomResourceOptions.builder()\n .dependsOn(testVpcIpamPoolCidr)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n testVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: test\n properties:\n addressFamily: ipv4\n ipamScopeId: ${test.privateDefaultScopeId}\n locale: ${current.name}\n testVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: test\n properties:\n ipamPoolId: ${testVpcIpamPool.id}\n cidr: 172.20.0.0/16\n testVpc:\n type: aws:ec2:Vpc\n name: test\n properties:\n ipv4IpamPoolId: ${testVpcIpamPool.id}\n ipv4NetmaskLength: 28\n options:\n dependson:\n - ${testVpcIpamPoolCidr}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPCs using the VPC `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpc:Vpc test_vpc vpc-a01106c2\n```\n", "properties": { "arn": { "type": "string", @@ -241923,7 +241923,7 @@ } }, "aws:ec2/vpcEndpoint:VpcEndpoint": { - "description": "Provides a VPC Endpoint resource.\n\n\u003e **NOTE on VPC Endpoints and VPC Endpoint Associations:** The provider provides both standalone VPC Endpoint Associations for\nRoute Tables - (an association between a VPC endpoint and a single `route_table_id`),\nSecurity Groups - (an association between a VPC endpoint and a single `security_group_id`),\nand Subnets - (an association between a VPC endpoint and a single `subnet_id`) and\na VPC Endpoint resource with `route_table_ids` and `subnet_ids` attributes.\nDo not use the same resource ID in both a VPC Endpoint resource and a VPC Endpoint Association resource.\nDoing so will cause a conflict of associations and will overwrite the association.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst s3 = new aws.ec2.VpcEndpoint(\"s3\", {\n vpcId: main.id,\n serviceName: \"com.amazonaws.us-west-2.s3\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ns3 = aws.ec2.VpcEndpoint(\"s3\",\n vpc_id=main[\"id\"],\n service_name=\"com.amazonaws.us-west-2.s3\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var s3 = new Aws.Ec2.VpcEndpoint(\"s3\", new()\n {\n VpcId = main.Id,\n ServiceName = \"com.amazonaws.us-west-2.s3\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpcEndpoint(ctx, \"s3\", \u0026ec2.VpcEndpointArgs{\n\t\t\tVpcId: pulumi.Any(main.Id),\n\t\t\tServiceName: pulumi.String(\"com.amazonaws.us-west-2.s3\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var s3 = new VpcEndpoint(\"s3\", VpcEndpointArgs.builder()\n .vpcId(main.id())\n .serviceName(\"com.amazonaws.us-west-2.s3\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n s3:\n type: aws:ec2:VpcEndpoint\n properties:\n vpcId: ${main.id}\n serviceName: com.amazonaws.us-west-2.s3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Basic w/ Tags\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst s3 = new aws.ec2.VpcEndpoint(\"s3\", {\n vpcId: main.id,\n serviceName: \"com.amazonaws.us-west-2.s3\",\n tags: {\n Environment: \"test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ns3 = aws.ec2.VpcEndpoint(\"s3\",\n vpc_id=main[\"id\"],\n service_name=\"com.amazonaws.us-west-2.s3\",\n tags={\n \"Environment\": \"test\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var s3 = new Aws.Ec2.VpcEndpoint(\"s3\", new()\n {\n VpcId = main.Id,\n ServiceName = \"com.amazonaws.us-west-2.s3\",\n Tags = \n {\n { \"Environment\", \"test\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpcEndpoint(ctx, \"s3\", \u0026ec2.VpcEndpointArgs{\n\t\t\tVpcId: pulumi.Any(main.Id),\n\t\t\tServiceName: pulumi.String(\"com.amazonaws.us-west-2.s3\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Environment\": pulumi.String(\"test\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var s3 = new VpcEndpoint(\"s3\", VpcEndpointArgs.builder()\n .vpcId(main.id())\n .serviceName(\"com.amazonaws.us-west-2.s3\")\n .tags(Map.of(\"Environment\", \"test\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n s3:\n type: aws:ec2:VpcEndpoint\n properties:\n vpcId: ${main.id}\n serviceName: com.amazonaws.us-west-2.s3\n tags:\n Environment: test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Interface Endpoint Type\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ec2 = new aws.ec2.VpcEndpoint(\"ec2\", {\n vpcId: main.id,\n serviceName: \"com.amazonaws.us-west-2.ec2\",\n vpcEndpointType: \"Interface\",\n securityGroupIds: [sg1.id],\n privateDnsEnabled: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nec2 = aws.ec2.VpcEndpoint(\"ec2\",\n vpc_id=main[\"id\"],\n service_name=\"com.amazonaws.us-west-2.ec2\",\n vpc_endpoint_type=\"Interface\",\n security_group_ids=[sg1[\"id\"]],\n private_dns_enabled=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ec2 = new Aws.Ec2.VpcEndpoint(\"ec2\", new()\n {\n VpcId = main.Id,\n ServiceName = \"com.amazonaws.us-west-2.ec2\",\n VpcEndpointType = \"Interface\",\n SecurityGroupIds = new[]\n {\n sg1.Id,\n },\n PrivateDnsEnabled = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpcEndpoint(ctx, \"ec2\", \u0026ec2.VpcEndpointArgs{\n\t\t\tVpcId: pulumi.Any(main.Id),\n\t\t\tServiceName: pulumi.String(\"com.amazonaws.us-west-2.ec2\"),\n\t\t\tVpcEndpointType: pulumi.String(\"Interface\"),\n\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\tsg1.Id,\n\t\t\t},\n\t\t\tPrivateDnsEnabled: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ec2 = new VpcEndpoint(\"ec2\", VpcEndpointArgs.builder()\n .vpcId(main.id())\n .serviceName(\"com.amazonaws.us-west-2.ec2\")\n .vpcEndpointType(\"Interface\")\n .securityGroupIds(sg1.id())\n .privateDnsEnabled(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ec2:\n type: aws:ec2:VpcEndpoint\n properties:\n vpcId: ${main.id}\n serviceName: com.amazonaws.us-west-2.ec2\n vpcEndpointType: Interface\n securityGroupIds:\n - ${sg1.id}\n privateDnsEnabled: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Interface Endpoint Type with User-Defined IP Address\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ec2 = new aws.ec2.VpcEndpoint(\"ec2\", {\n vpcId: example.id,\n serviceName: \"com.amazonaws.us-west-2.ec2\",\n vpcEndpointType: \"Interface\",\n subnetConfigurations: [\n {\n ipv4: \"10.0.1.10\",\n subnetId: example1.id,\n },\n {\n ipv4: \"10.0.2.10\",\n subnetId: example2.id,\n },\n ],\n subnetIds: [\n example1.id,\n example2.id,\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nec2 = aws.ec2.VpcEndpoint(\"ec2\",\n vpc_id=example[\"id\"],\n service_name=\"com.amazonaws.us-west-2.ec2\",\n vpc_endpoint_type=\"Interface\",\n subnet_configurations=[\n {\n \"ipv4\": \"10.0.1.10\",\n \"subnet_id\": example1[\"id\"],\n },\n {\n \"ipv4\": \"10.0.2.10\",\n \"subnet_id\": example2[\"id\"],\n },\n ],\n subnet_ids=[\n example1[\"id\"],\n example2[\"id\"],\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ec2 = new Aws.Ec2.VpcEndpoint(\"ec2\", new()\n {\n VpcId = example.Id,\n ServiceName = \"com.amazonaws.us-west-2.ec2\",\n VpcEndpointType = \"Interface\",\n SubnetConfigurations = new[]\n {\n new Aws.Ec2.Inputs.VpcEndpointSubnetConfigurationArgs\n {\n Ipv4 = \"10.0.1.10\",\n SubnetId = example1.Id,\n },\n new Aws.Ec2.Inputs.VpcEndpointSubnetConfigurationArgs\n {\n Ipv4 = \"10.0.2.10\",\n SubnetId = example2.Id,\n },\n },\n SubnetIds = new[]\n {\n example1.Id,\n example2.Id,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpcEndpoint(ctx, \"ec2\", \u0026ec2.VpcEndpointArgs{\n\t\t\tVpcId: pulumi.Any(example.Id),\n\t\t\tServiceName: pulumi.String(\"com.amazonaws.us-west-2.ec2\"),\n\t\t\tVpcEndpointType: pulumi.String(\"Interface\"),\n\t\t\tSubnetConfigurations: ec2.VpcEndpointSubnetConfigurationArray{\n\t\t\t\t\u0026ec2.VpcEndpointSubnetConfigurationArgs{\n\t\t\t\t\tIpv4: pulumi.String(\"10.0.1.10\"),\n\t\t\t\t\tSubnetId: pulumi.Any(example1.Id),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.VpcEndpointSubnetConfigurationArgs{\n\t\t\t\t\tIpv4: pulumi.String(\"10.0.2.10\"),\n\t\t\t\t\tSubnetId: pulumi.Any(example2.Id),\n\t\t\t\t},\n\t\t\t},\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texample1.Id,\n\t\t\t\texample2.Id,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport com.pulumi.aws.ec2.inputs.VpcEndpointSubnetConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ec2 = new VpcEndpoint(\"ec2\", VpcEndpointArgs.builder()\n .vpcId(example.id())\n .serviceName(\"com.amazonaws.us-west-2.ec2\")\n .vpcEndpointType(\"Interface\")\n .subnetConfigurations( \n VpcEndpointSubnetConfigurationArgs.builder()\n .ipv4(\"10.0.1.10\")\n .subnetId(example1.id())\n .build(),\n VpcEndpointSubnetConfigurationArgs.builder()\n .ipv4(\"10.0.2.10\")\n .subnetId(example2.id())\n .build())\n .subnetIds( \n example1.id(),\n example2.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ec2:\n type: aws:ec2:VpcEndpoint\n properties:\n vpcId: ${example.id}\n serviceName: com.amazonaws.us-west-2.ec2\n vpcEndpointType: Interface\n subnetConfigurations:\n - ipv4: 10.0.1.10\n subnetId: ${example1.id}\n - ipv4: 10.0.2.10\n subnetId: ${example2.id}\n subnetIds:\n - ${example1.id}\n - ${example2.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Gateway Load Balancer Endpoint Type\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.ec2.VpcEndpointService(\"example\", {\n acceptanceRequired: false,\n allowedPrincipals: [current.then(current =\u003e current.arn)],\n gatewayLoadBalancerArns: [exampleAwsLb.arn],\n});\nconst exampleVpcEndpoint = new aws.ec2.VpcEndpoint(\"example\", {\n serviceName: example.serviceName,\n subnetIds: [exampleAwsSubnet.id],\n vpcEndpointType: example.serviceType,\n vpcId: exampleAwsVpc.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.ec2.VpcEndpointService(\"example\",\n acceptance_required=False,\n allowed_principals=[current.arn],\n gateway_load_balancer_arns=[example_aws_lb[\"arn\"]])\nexample_vpc_endpoint = aws.ec2.VpcEndpoint(\"example\",\n service_name=example.service_name,\n subnet_ids=[example_aws_subnet[\"id\"]],\n vpc_endpoint_type=example.service_type,\n vpc_id=example_aws_vpc[\"id\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Ec2.VpcEndpointService(\"example\", new()\n {\n AcceptanceRequired = false,\n AllowedPrincipals = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n },\n GatewayLoadBalancerArns = new[]\n {\n exampleAwsLb.Arn,\n },\n });\n\n var exampleVpcEndpoint = new Aws.Ec2.VpcEndpoint(\"example\", new()\n {\n ServiceName = example.ServiceName,\n SubnetIds = new[]\n {\n exampleAwsSubnet.Id,\n },\n VpcEndpointType = example.ServiceType,\n VpcId = exampleAwsVpc.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcEndpointService(ctx, \"example\", \u0026ec2.VpcEndpointServiceArgs{\n\t\t\tAcceptanceRequired: pulumi.Bool(false),\n\t\t\tAllowedPrincipals: pulumi.StringArray{\n\t\t\t\tpulumi.String(current.Arn),\n\t\t\t},\n\t\t\tGatewayLoadBalancerArns: pulumi.StringArray{\n\t\t\t\texampleAwsLb.Arn,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcEndpoint(ctx, \"example\", \u0026ec2.VpcEndpointArgs{\n\t\t\tServiceName: example.ServiceName,\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texampleAwsSubnet.Id,\n\t\t\t},\n\t\t\tVpcEndpointType: example.ServiceType,\n\t\t\tVpcId: pulumi.Any(exampleAwsVpc.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcEndpointService;\nimport com.pulumi.aws.ec2.VpcEndpointServiceArgs;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new VpcEndpointService(\"example\", VpcEndpointServiceArgs.builder()\n .acceptanceRequired(false)\n .allowedPrincipals(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .gatewayLoadBalancerArns(exampleAwsLb.arn())\n .build());\n\n var exampleVpcEndpoint = new VpcEndpoint(\"exampleVpcEndpoint\", VpcEndpointArgs.builder()\n .serviceName(example.serviceName())\n .subnetIds(exampleAwsSubnet.id())\n .vpcEndpointType(example.serviceType())\n .vpcId(exampleAwsVpc.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcEndpointService\n properties:\n acceptanceRequired: false\n allowedPrincipals:\n - ${current.arn}\n gatewayLoadBalancerArns:\n - ${exampleAwsLb.arn}\n exampleVpcEndpoint:\n type: aws:ec2:VpcEndpoint\n name: example\n properties:\n serviceName: ${example.serviceName}\n subnetIds:\n - ${exampleAwsSubnet.id}\n vpcEndpointType: ${example.serviceType}\n vpcId: ${exampleAwsVpc.id}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPC Endpoints using the VPC endpoint `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcEndpoint:VpcEndpoint endpoint1 vpce-3ecf2a57\n```\n", + "description": "Provides a VPC Endpoint resource.\n\n\u003e **NOTE on VPC Endpoints and VPC Endpoint Associations:** The provider provides both standalone VPC Endpoint Associations for\nRoute Tables - (an association between a VPC endpoint and a single `route_table_id`),\nSecurity Groups - (an association between a VPC endpoint and a single `security_group_id`),\nand Subnets - (an association between a VPC endpoint and a single `subnet_id`) and\na VPC Endpoint resource with `route_table_ids` and `subnet_ids` attributes.\nDo not use the same resource ID in both a VPC Endpoint resource and a VPC Endpoint Association resource.\nDoing so will cause a conflict of associations and will overwrite the association.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst s3 = new aws.ec2.VpcEndpoint(\"s3\", {\n vpcId: main.id,\n serviceName: \"com.amazonaws.us-west-2.s3\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ns3 = aws.ec2.VpcEndpoint(\"s3\",\n vpc_id=main[\"id\"],\n service_name=\"com.amazonaws.us-west-2.s3\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var s3 = new Aws.Ec2.VpcEndpoint(\"s3\", new()\n {\n VpcId = main.Id,\n ServiceName = \"com.amazonaws.us-west-2.s3\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpcEndpoint(ctx, \"s3\", \u0026ec2.VpcEndpointArgs{\n\t\t\tVpcId: pulumi.Any(main.Id),\n\t\t\tServiceName: pulumi.String(\"com.amazonaws.us-west-2.s3\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var s3 = new VpcEndpoint(\"s3\", VpcEndpointArgs.builder()\n .vpcId(main.id())\n .serviceName(\"com.amazonaws.us-west-2.s3\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n s3:\n type: aws:ec2:VpcEndpoint\n properties:\n vpcId: ${main.id}\n serviceName: com.amazonaws.us-west-2.s3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Basic w/ Tags\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst s3 = new aws.ec2.VpcEndpoint(\"s3\", {\n vpcId: main.id,\n serviceName: \"com.amazonaws.us-west-2.s3\",\n tags: {\n Environment: \"test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ns3 = aws.ec2.VpcEndpoint(\"s3\",\n vpc_id=main[\"id\"],\n service_name=\"com.amazonaws.us-west-2.s3\",\n tags={\n \"Environment\": \"test\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var s3 = new Aws.Ec2.VpcEndpoint(\"s3\", new()\n {\n VpcId = main.Id,\n ServiceName = \"com.amazonaws.us-west-2.s3\",\n Tags = \n {\n { \"Environment\", \"test\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpcEndpoint(ctx, \"s3\", \u0026ec2.VpcEndpointArgs{\n\t\t\tVpcId: pulumi.Any(main.Id),\n\t\t\tServiceName: pulumi.String(\"com.amazonaws.us-west-2.s3\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Environment\": pulumi.String(\"test\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var s3 = new VpcEndpoint(\"s3\", VpcEndpointArgs.builder()\n .vpcId(main.id())\n .serviceName(\"com.amazonaws.us-west-2.s3\")\n .tags(Map.of(\"Environment\", \"test\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n s3:\n type: aws:ec2:VpcEndpoint\n properties:\n vpcId: ${main.id}\n serviceName: com.amazonaws.us-west-2.s3\n tags:\n Environment: test\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Interface Endpoint Type\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ec2 = new aws.ec2.VpcEndpoint(\"ec2\", {\n vpcId: main.id,\n serviceName: \"com.amazonaws.us-west-2.ec2\",\n vpcEndpointType: \"Interface\",\n securityGroupIds: [sg1.id],\n privateDnsEnabled: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nec2 = aws.ec2.VpcEndpoint(\"ec2\",\n vpc_id=main[\"id\"],\n service_name=\"com.amazonaws.us-west-2.ec2\",\n vpc_endpoint_type=\"Interface\",\n security_group_ids=[sg1[\"id\"]],\n private_dns_enabled=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ec2 = new Aws.Ec2.VpcEndpoint(\"ec2\", new()\n {\n VpcId = main.Id,\n ServiceName = \"com.amazonaws.us-west-2.ec2\",\n VpcEndpointType = \"Interface\",\n SecurityGroupIds = new[]\n {\n sg1.Id,\n },\n PrivateDnsEnabled = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpcEndpoint(ctx, \"ec2\", \u0026ec2.VpcEndpointArgs{\n\t\t\tVpcId: pulumi.Any(main.Id),\n\t\t\tServiceName: pulumi.String(\"com.amazonaws.us-west-2.ec2\"),\n\t\t\tVpcEndpointType: pulumi.String(\"Interface\"),\n\t\t\tSecurityGroupIds: pulumi.StringArray{\n\t\t\t\tsg1.Id,\n\t\t\t},\n\t\t\tPrivateDnsEnabled: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ec2 = new VpcEndpoint(\"ec2\", VpcEndpointArgs.builder()\n .vpcId(main.id())\n .serviceName(\"com.amazonaws.us-west-2.ec2\")\n .vpcEndpointType(\"Interface\")\n .securityGroupIds(sg1.id())\n .privateDnsEnabled(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ec2:\n type: aws:ec2:VpcEndpoint\n properties:\n vpcId: ${main.id}\n serviceName: com.amazonaws.us-west-2.ec2\n vpcEndpointType: Interface\n securityGroupIds:\n - ${sg1.id}\n privateDnsEnabled: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Interface Endpoint Type with User-Defined IP Address\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ec2 = new aws.ec2.VpcEndpoint(\"ec2\", {\n vpcId: example.id,\n serviceName: \"com.amazonaws.us-west-2.ec2\",\n vpcEndpointType: \"Interface\",\n subnetConfigurations: [\n {\n ipv4: \"10.0.1.10\",\n subnetId: example1.id,\n },\n {\n ipv4: \"10.0.2.10\",\n subnetId: example2.id,\n },\n ],\n subnetIds: [\n example1.id,\n example2.id,\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nec2 = aws.ec2.VpcEndpoint(\"ec2\",\n vpc_id=example[\"id\"],\n service_name=\"com.amazonaws.us-west-2.ec2\",\n vpc_endpoint_type=\"Interface\",\n subnet_configurations=[\n {\n \"ipv4\": \"10.0.1.10\",\n \"subnet_id\": example1[\"id\"],\n },\n {\n \"ipv4\": \"10.0.2.10\",\n \"subnet_id\": example2[\"id\"],\n },\n ],\n subnet_ids=[\n example1[\"id\"],\n example2[\"id\"],\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ec2 = new Aws.Ec2.VpcEndpoint(\"ec2\", new()\n {\n VpcId = example.Id,\n ServiceName = \"com.amazonaws.us-west-2.ec2\",\n VpcEndpointType = \"Interface\",\n SubnetConfigurations = new[]\n {\n new Aws.Ec2.Inputs.VpcEndpointSubnetConfigurationArgs\n {\n Ipv4 = \"10.0.1.10\",\n SubnetId = example1.Id,\n },\n new Aws.Ec2.Inputs.VpcEndpointSubnetConfigurationArgs\n {\n Ipv4 = \"10.0.2.10\",\n SubnetId = example2.Id,\n },\n },\n SubnetIds = new[]\n {\n example1.Id,\n example2.Id,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.NewVpcEndpoint(ctx, \"ec2\", \u0026ec2.VpcEndpointArgs{\n\t\t\tVpcId: pulumi.Any(example.Id),\n\t\t\tServiceName: pulumi.String(\"com.amazonaws.us-west-2.ec2\"),\n\t\t\tVpcEndpointType: pulumi.String(\"Interface\"),\n\t\t\tSubnetConfigurations: ec2.VpcEndpointSubnetConfigurationArray{\n\t\t\t\t\u0026ec2.VpcEndpointSubnetConfigurationArgs{\n\t\t\t\t\tIpv4: pulumi.String(\"10.0.1.10\"),\n\t\t\t\t\tSubnetId: pulumi.Any(example1.Id),\n\t\t\t\t},\n\t\t\t\t\u0026ec2.VpcEndpointSubnetConfigurationArgs{\n\t\t\t\t\tIpv4: pulumi.String(\"10.0.2.10\"),\n\t\t\t\t\tSubnetId: pulumi.Any(example2.Id),\n\t\t\t\t},\n\t\t\t},\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texample1.Id,\n\t\t\t\texample2.Id,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport com.pulumi.aws.ec2.inputs.VpcEndpointSubnetConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ec2 = new VpcEndpoint(\"ec2\", VpcEndpointArgs.builder()\n .vpcId(example.id())\n .serviceName(\"com.amazonaws.us-west-2.ec2\")\n .vpcEndpointType(\"Interface\")\n .subnetConfigurations( \n VpcEndpointSubnetConfigurationArgs.builder()\n .ipv4(\"10.0.1.10\")\n .subnetId(example1.id())\n .build(),\n VpcEndpointSubnetConfigurationArgs.builder()\n .ipv4(\"10.0.2.10\")\n .subnetId(example2.id())\n .build())\n .subnetIds( \n example1.id(),\n example2.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ec2:\n type: aws:ec2:VpcEndpoint\n properties:\n vpcId: ${example.id}\n serviceName: com.amazonaws.us-west-2.ec2\n vpcEndpointType: Interface\n subnetConfigurations:\n - ipv4: 10.0.1.10\n subnetId: ${example1.id}\n - ipv4: 10.0.2.10\n subnetId: ${example2.id}\n subnetIds:\n - ${example1.id}\n - ${example2.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Gateway Load Balancer Endpoint Type\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.ec2.VpcEndpointService(\"example\", {\n acceptanceRequired: false,\n allowedPrincipals: [current.then(current =\u003e current.arn)],\n gatewayLoadBalancerArns: [exampleAwsLb.arn],\n});\nconst exampleVpcEndpoint = new aws.ec2.VpcEndpoint(\"example\", {\n serviceName: example.serviceName,\n subnetIds: [exampleAwsSubnet.id],\n vpcEndpointType: example.serviceType,\n vpcId: exampleAwsVpc.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.ec2.VpcEndpointService(\"example\",\n acceptance_required=False,\n allowed_principals=[current.arn],\n gateway_load_balancer_arns=[example_aws_lb[\"arn\"]])\nexample_vpc_endpoint = aws.ec2.VpcEndpoint(\"example\",\n service_name=example.service_name,\n subnet_ids=[example_aws_subnet[\"id\"]],\n vpc_endpoint_type=example.service_type,\n vpc_id=example_aws_vpc[\"id\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Ec2.VpcEndpointService(\"example\", new()\n {\n AcceptanceRequired = false,\n AllowedPrincipals = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n },\n GatewayLoadBalancerArns = new[]\n {\n exampleAwsLb.Arn,\n },\n });\n\n var exampleVpcEndpoint = new Aws.Ec2.VpcEndpoint(\"example\", new()\n {\n ServiceName = example.ServiceName,\n SubnetIds = new[]\n {\n exampleAwsSubnet.Id,\n },\n VpcEndpointType = example.ServiceType,\n VpcId = exampleAwsVpc.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcEndpointService(ctx, \"example\", \u0026ec2.VpcEndpointServiceArgs{\n\t\t\tAcceptanceRequired: pulumi.Bool(false),\n\t\t\tAllowedPrincipals: pulumi.StringArray{\n\t\t\t\tpulumi.String(current.Arn),\n\t\t\t},\n\t\t\tGatewayLoadBalancerArns: pulumi.StringArray{\n\t\t\t\texampleAwsLb.Arn,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcEndpoint(ctx, \"example\", \u0026ec2.VpcEndpointArgs{\n\t\t\tServiceName: example.ServiceName,\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texampleAwsSubnet.Id,\n\t\t\t},\n\t\t\tVpcEndpointType: example.ServiceType,\n\t\t\tVpcId: pulumi.Any(exampleAwsVpc.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcEndpointService;\nimport com.pulumi.aws.ec2.VpcEndpointServiceArgs;\nimport com.pulumi.aws.ec2.VpcEndpoint;\nimport com.pulumi.aws.ec2.VpcEndpointArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new VpcEndpointService(\"example\", VpcEndpointServiceArgs.builder()\n .acceptanceRequired(false)\n .allowedPrincipals(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .gatewayLoadBalancerArns(exampleAwsLb.arn())\n .build());\n\n var exampleVpcEndpoint = new VpcEndpoint(\"exampleVpcEndpoint\", VpcEndpointArgs.builder()\n .serviceName(example.serviceName())\n .subnetIds(exampleAwsSubnet.id())\n .vpcEndpointType(example.serviceType())\n .vpcId(exampleAwsVpc.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcEndpointService\n properties:\n acceptanceRequired: false\n allowedPrincipals:\n - ${current.arn}\n gatewayLoadBalancerArns:\n - ${exampleAwsLb.arn}\n exampleVpcEndpoint:\n type: aws:ec2:VpcEndpoint\n name: example\n properties:\n serviceName: ${example.serviceName}\n subnetIds:\n - ${exampleAwsSubnet.id}\n vpcEndpointType: ${example.serviceType}\n vpcId: ${exampleAwsVpc.id}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPC Endpoints using the VPC endpoint `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcEndpoint:VpcEndpoint endpoint1 vpce-3ecf2a57\n```\n", "properties": { "arn": { "type": "string", @@ -242777,7 +242777,7 @@ } }, "aws:ec2/vpcEndpointServiceAllowedPrinciple:VpcEndpointServiceAllowedPrinciple": { - "description": "Provides a resource to allow a principal to discover a VPC endpoint service.\n\n\u003e **NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals:** This provider provides\nboth a standalone VPC Endpoint Service Allowed Principal resource\nand a VPC Endpoint Service resource with an `allowed_principals` attribute. Do not use the same principal ARN in both\na VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict\nand will overwrite the association.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst allowMeToFoo = new aws.ec2.VpcEndpointServiceAllowedPrinciple(\"allow_me_to_foo\", {\n vpcEndpointServiceId: foo.id,\n principalArn: current.then(current =\u003e current.arn),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nallow_me_to_foo = aws.ec2.VpcEndpointServiceAllowedPrinciple(\"allow_me_to_foo\",\n vpc_endpoint_service_id=foo[\"id\"],\n principal_arn=current.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var allowMeToFoo = new Aws.Ec2.VpcEndpointServiceAllowedPrinciple(\"allow_me_to_foo\", new()\n {\n VpcEndpointServiceId = foo.Id,\n PrincipalArn = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcEndpointServiceAllowedPrinciple(ctx, \"allow_me_to_foo\", \u0026ec2.VpcEndpointServiceAllowedPrincipleArgs{\n\t\t\tVpcEndpointServiceId: pulumi.Any(foo.Id),\n\t\t\tPrincipalArn: pulumi.String(current.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrinciple;\nimport com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrincipleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var allowMeToFoo = new VpcEndpointServiceAllowedPrinciple(\"allowMeToFoo\", VpcEndpointServiceAllowedPrincipleArgs.builder()\n .vpcEndpointServiceId(foo.id())\n .principalArn(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n allowMeToFoo:\n type: aws:ec2:VpcEndpointServiceAllowedPrinciple\n name: allow_me_to_foo\n properties:\n vpcEndpointServiceId: ${foo.id}\n principalArn: ${current.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides a resource to allow a principal to discover a VPC endpoint service.\n\n\u003e **NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals:** This provider provides\nboth a standalone VPC Endpoint Service Allowed Principal resource\nand a VPC Endpoint Service resource with an `allowed_principals` attribute. Do not use the same principal ARN in both\na VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict\nand will overwrite the association.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst allowMeToFoo = new aws.ec2.VpcEndpointServiceAllowedPrinciple(\"allow_me_to_foo\", {\n vpcEndpointServiceId: foo.id,\n principalArn: current.then(current =\u003e current.arn),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nallow_me_to_foo = aws.ec2.VpcEndpointServiceAllowedPrinciple(\"allow_me_to_foo\",\n vpc_endpoint_service_id=foo[\"id\"],\n principal_arn=current.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var allowMeToFoo = new Aws.Ec2.VpcEndpointServiceAllowedPrinciple(\"allow_me_to_foo\", new()\n {\n VpcEndpointServiceId = foo.Id,\n PrincipalArn = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcEndpointServiceAllowedPrinciple(ctx, \"allow_me_to_foo\", \u0026ec2.VpcEndpointServiceAllowedPrincipleArgs{\n\t\t\tVpcEndpointServiceId: pulumi.Any(foo.Id),\n\t\t\tPrincipalArn: pulumi.String(current.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrinciple;\nimport com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrincipleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var allowMeToFoo = new VpcEndpointServiceAllowedPrinciple(\"allowMeToFoo\", VpcEndpointServiceAllowedPrincipleArgs.builder()\n .vpcEndpointServiceId(foo.id())\n .principalArn(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n allowMeToFoo:\n type: aws:ec2:VpcEndpointServiceAllowedPrinciple\n name: allow_me_to_foo\n properties:\n vpcEndpointServiceId: ${foo.id}\n principalArn: ${current.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "principalArn": { "type": "string", @@ -242875,7 +242875,7 @@ } }, "aws:ec2/vpcIpam:VpcIpam": { - "description": "Provides an IPAM resource.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst main = new aws.ec2.VpcIpam(\"main\", {\n description: \"My IPAM\",\n operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n }],\n tags: {\n Test: \"Main\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nmain = aws.ec2.VpcIpam(\"main\",\n description=\"My IPAM\",\n operating_regions=[{\n \"region_name\": current.name,\n }],\n tags={\n \"Test\": \"Main\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var main = new Aws.Ec2.VpcIpam(\"main\", new()\n {\n Description = \"My IPAM\",\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n Tags = \n {\n { \"Test\", \"Main\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpam(ctx, \"main\", \u0026ec2.VpcIpamArgs{\n\t\t\tDescription: pulumi.String(\"My IPAM\"),\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Test\": pulumi.String(\"Main\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var main = new VpcIpam(\"main\", VpcIpamArgs.builder()\n .description(\"My IPAM\")\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .tags(Map.of(\"Test\", \"Main\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:VpcIpam\n properties:\n description: My IPAM\n operatingRegions:\n - regionName: ${current.name}\n tags:\n Test: Main\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nShared with multiple operating_regions:\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the IPAM `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpam:VpcIpam example ipam-0178368ad2146a492\n```\n", + "description": "Provides an IPAM resource.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst main = new aws.ec2.VpcIpam(\"main\", {\n description: \"My IPAM\",\n operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n }],\n tags: {\n Test: \"Main\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nmain = aws.ec2.VpcIpam(\"main\",\n description=\"My IPAM\",\n operating_regions=[{\n \"region_name\": current.name,\n }],\n tags={\n \"Test\": \"Main\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var main = new Aws.Ec2.VpcIpam(\"main\", new()\n {\n Description = \"My IPAM\",\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n Tags = \n {\n { \"Test\", \"Main\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpam(ctx, \"main\", \u0026ec2.VpcIpamArgs{\n\t\t\tDescription: pulumi.String(\"My IPAM\"),\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Test\": pulumi.String(\"Main\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var main = new VpcIpam(\"main\", VpcIpamArgs.builder()\n .description(\"My IPAM\")\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .tags(Map.of(\"Test\", \"Main\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:VpcIpam\n properties:\n description: My IPAM\n operatingRegions:\n - regionName: ${current.name}\n tags:\n Test: Main\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nShared with multiple operating_regions:\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the IPAM `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpam:VpcIpam example ipam-0178368ad2146a492\n```\n", "properties": { "arn": { "type": "string", @@ -243043,7 +243043,7 @@ } }, "aws:ec2/vpcIpamOrganizationAdminAccount:VpcIpamOrganizationAdminAccount": { - "description": "Enables the IPAM Service and promotes a delegated administrator.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst delegated = aws.getCallerIdentity({});\nconst example = new aws.ec2.VpcIpamOrganizationAdminAccount(\"example\", {delegatedAdminAccountId: delegated.then(delegated =\u003e delegated.accountId)});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ndelegated = aws.get_caller_identity()\nexample = aws.ec2.VpcIpamOrganizationAdminAccount(\"example\", delegated_admin_account_id=delegated.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var delegated = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Ec2.VpcIpamOrganizationAdminAccount(\"example\", new()\n {\n DelegatedAdminAccountId = delegated.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdelegated, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamOrganizationAdminAccount(ctx, \"example\", \u0026ec2.VpcIpamOrganizationAdminAccountArgs{\n\t\t\tDelegatedAdminAccountId: pulumi.String(delegated.AccountId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcIpamOrganizationAdminAccount;\nimport com.pulumi.aws.ec2.VpcIpamOrganizationAdminAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var delegated = AwsFunctions.getCallerIdentity();\n\n var example = new VpcIpamOrganizationAdminAccount(\"example\", VpcIpamOrganizationAdminAccountArgs.builder()\n .delegatedAdminAccountId(delegated.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpamOrganizationAdminAccount\n properties:\n delegatedAdminAccountId: ${delegated.accountId}\nvariables:\n delegated:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the delegate account `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamOrganizationAdminAccount:VpcIpamOrganizationAdminAccount example 12345678901\n```\n", + "description": "Enables the IPAM Service and promotes a delegated administrator.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst delegated = aws.getCallerIdentity({});\nconst example = new aws.ec2.VpcIpamOrganizationAdminAccount(\"example\", {delegatedAdminAccountId: delegated.then(delegated =\u003e delegated.accountId)});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ndelegated = aws.get_caller_identity()\nexample = aws.ec2.VpcIpamOrganizationAdminAccount(\"example\", delegated_admin_account_id=delegated.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var delegated = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Ec2.VpcIpamOrganizationAdminAccount(\"example\", new()\n {\n DelegatedAdminAccountId = delegated.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tdelegated, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamOrganizationAdminAccount(ctx, \"example\", \u0026ec2.VpcIpamOrganizationAdminAccountArgs{\n\t\t\tDelegatedAdminAccountId: pulumi.String(delegated.AccountId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcIpamOrganizationAdminAccount;\nimport com.pulumi.aws.ec2.VpcIpamOrganizationAdminAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var delegated = AwsFunctions.getCallerIdentity();\n\n var example = new VpcIpamOrganizationAdminAccount(\"example\", VpcIpamOrganizationAdminAccountArgs.builder()\n .delegatedAdminAccountId(delegated.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpamOrganizationAdminAccount\n properties:\n delegatedAdminAccountId: ${delegated.accountId}\nvariables:\n delegated:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the delegate account `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamOrganizationAdminAccount:VpcIpamOrganizationAdminAccount example 12345678901\n```\n", "properties": { "arn": { "type": "string", @@ -243109,7 +243109,7 @@ } }, "aws:ec2/vpcIpamPool:VpcIpamPool": { - "description": "Provides an IP address pool resource for IPAM.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: example.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example.private_default_scope_id,\n locale=current.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = example.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: example.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(example.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${example.privateDefaultScopeId}\n locale: ${current.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nNested Pools:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst parent = new aws.ec2.VpcIpamPool(\"parent\", {\n addressFamily: \"ipv4\",\n ipamScopeId: example.privateDefaultScopeId,\n});\nconst parentTest = new aws.ec2.VpcIpamPoolCidr(\"parent_test\", {\n ipamPoolId: parent.id,\n cidr: \"172.20.0.0/16\",\n});\nconst child = new aws.ec2.VpcIpamPool(\"child\", {\n addressFamily: \"ipv4\",\n ipamScopeId: example.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n sourceIpamPoolId: parent.id,\n});\nconst childTest = new aws.ec2.VpcIpamPoolCidr(\"child_test\", {\n ipamPoolId: child.id,\n cidr: \"172.20.0.0/24\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nparent = aws.ec2.VpcIpamPool(\"parent\",\n address_family=\"ipv4\",\n ipam_scope_id=example.private_default_scope_id)\nparent_test = aws.ec2.VpcIpamPoolCidr(\"parent_test\",\n ipam_pool_id=parent.id,\n cidr=\"172.20.0.0/16\")\nchild = aws.ec2.VpcIpamPool(\"child\",\n address_family=\"ipv4\",\n ipam_scope_id=example.private_default_scope_id,\n locale=current.name,\n source_ipam_pool_id=parent.id)\nchild_test = aws.ec2.VpcIpamPoolCidr(\"child_test\",\n ipam_pool_id=child.id,\n cidr=\"172.20.0.0/24\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var parent = new Aws.Ec2.VpcIpamPool(\"parent\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = example.PrivateDefaultScopeId,\n });\n\n var parentTest = new Aws.Ec2.VpcIpamPoolCidr(\"parent_test\", new()\n {\n IpamPoolId = parent.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var child = new Aws.Ec2.VpcIpamPool(\"child\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = example.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n SourceIpamPoolId = parent.Id,\n });\n\n var childTest = new Aws.Ec2.VpcIpamPoolCidr(\"child_test\", new()\n {\n IpamPoolId = child.Id,\n Cidr = \"172.20.0.0/24\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tparent, err := ec2.NewVpcIpamPool(ctx, \"parent\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: example.PrivateDefaultScopeId,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidr(ctx, \"parent_test\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: parent.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tchild, err := ec2.NewVpcIpamPool(ctx, \"child\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: example.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t\tSourceIpamPoolId: parent.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidr(ctx, \"child_test\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: child.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/24\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var parent = new VpcIpamPool(\"parent\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(example.privateDefaultScopeId())\n .build());\n\n var parentTest = new VpcIpamPoolCidr(\"parentTest\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(parent.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var child = new VpcIpamPool(\"child\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(example.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .sourceIpamPoolId(parent.id())\n .build());\n\n var childTest = new VpcIpamPoolCidr(\"childTest\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(child.id())\n .cidr(\"172.20.0.0/24\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n parent:\n type: aws:ec2:VpcIpamPool\n properties:\n addressFamily: ipv4\n ipamScopeId: ${example.privateDefaultScopeId}\n parentTest:\n type: aws:ec2:VpcIpamPoolCidr\n name: parent_test\n properties:\n ipamPoolId: ${parent.id}\n cidr: 172.20.0.0/16\n child:\n type: aws:ec2:VpcIpamPool\n properties:\n addressFamily: ipv4\n ipamScopeId: ${example.privateDefaultScopeId}\n locale: ${current.name}\n sourceIpamPoolId: ${parent.id}\n childTest:\n type: aws:ec2:VpcIpamPoolCidr\n name: child_test\n properties:\n ipamPoolId: ${child.id}\n cidr: 172.20.0.0/24\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the IPAM pool `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamPool:VpcIpamPool example ipam-pool-0958f95207d978e1e\n```\n", + "description": "Provides an IP address pool resource for IPAM.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: example.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example.private_default_scope_id,\n locale=current.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = example.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: example.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(example.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${example.privateDefaultScopeId}\n locale: ${current.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nNested Pools:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst parent = new aws.ec2.VpcIpamPool(\"parent\", {\n addressFamily: \"ipv4\",\n ipamScopeId: example.privateDefaultScopeId,\n});\nconst parentTest = new aws.ec2.VpcIpamPoolCidr(\"parent_test\", {\n ipamPoolId: parent.id,\n cidr: \"172.20.0.0/16\",\n});\nconst child = new aws.ec2.VpcIpamPool(\"child\", {\n addressFamily: \"ipv4\",\n ipamScopeId: example.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n sourceIpamPoolId: parent.id,\n});\nconst childTest = new aws.ec2.VpcIpamPoolCidr(\"child_test\", {\n ipamPoolId: child.id,\n cidr: \"172.20.0.0/24\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nparent = aws.ec2.VpcIpamPool(\"parent\",\n address_family=\"ipv4\",\n ipam_scope_id=example.private_default_scope_id)\nparent_test = aws.ec2.VpcIpamPoolCidr(\"parent_test\",\n ipam_pool_id=parent.id,\n cidr=\"172.20.0.0/16\")\nchild = aws.ec2.VpcIpamPool(\"child\",\n address_family=\"ipv4\",\n ipam_scope_id=example.private_default_scope_id,\n locale=current.name,\n source_ipam_pool_id=parent.id)\nchild_test = aws.ec2.VpcIpamPoolCidr(\"child_test\",\n ipam_pool_id=child.id,\n cidr=\"172.20.0.0/24\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var parent = new Aws.Ec2.VpcIpamPool(\"parent\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = example.PrivateDefaultScopeId,\n });\n\n var parentTest = new Aws.Ec2.VpcIpamPoolCidr(\"parent_test\", new()\n {\n IpamPoolId = parent.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var child = new Aws.Ec2.VpcIpamPool(\"child\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = example.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n SourceIpamPoolId = parent.Id,\n });\n\n var childTest = new Aws.Ec2.VpcIpamPoolCidr(\"child_test\", new()\n {\n IpamPoolId = child.Id,\n Cidr = \"172.20.0.0/24\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tparent, err := ec2.NewVpcIpamPool(ctx, \"parent\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: example.PrivateDefaultScopeId,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidr(ctx, \"parent_test\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: parent.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tchild, err := ec2.NewVpcIpamPool(ctx, \"child\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: example.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t\tSourceIpamPoolId: parent.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidr(ctx, \"child_test\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: child.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/24\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var parent = new VpcIpamPool(\"parent\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(example.privateDefaultScopeId())\n .build());\n\n var parentTest = new VpcIpamPoolCidr(\"parentTest\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(parent.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var child = new VpcIpamPool(\"child\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(example.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .sourceIpamPoolId(parent.id())\n .build());\n\n var childTest = new VpcIpamPoolCidr(\"childTest\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(child.id())\n .cidr(\"172.20.0.0/24\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n parent:\n type: aws:ec2:VpcIpamPool\n properties:\n addressFamily: ipv4\n ipamScopeId: ${example.privateDefaultScopeId}\n parentTest:\n type: aws:ec2:VpcIpamPoolCidr\n name: parent_test\n properties:\n ipamPoolId: ${parent.id}\n cidr: 172.20.0.0/16\n child:\n type: aws:ec2:VpcIpamPool\n properties:\n addressFamily: ipv4\n ipamScopeId: ${example.privateDefaultScopeId}\n locale: ${current.name}\n sourceIpamPoolId: ${parent.id}\n childTest:\n type: aws:ec2:VpcIpamPoolCidr\n name: child_test\n properties:\n ipamPoolId: ${child.id}\n cidr: 172.20.0.0/24\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the IPAM pool `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamPool:VpcIpamPool example ipam-pool-0958f95207d978e1e\n```\n", "properties": { "addressFamily": { "type": "string", @@ -243389,7 +243389,7 @@ } }, "aws:ec2/vpcIpamPoolCidr:VpcIpamPoolCidr": { - "description": "Provisions a CIDR from an IPAM address pool.\n\n\u003e **NOTE:** Provisioning Public IPv4 or Public IPv6 require [steps outside the scope of this resource](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#prepare-for-byoip). The resource accepts `message` and `signature` as part of the `cidr_authorization_context` attribute but those must be generated ahead of time. Public IPv6 CIDRs that are provisioned into a Pool with `publicly_advertisable = true` and all public IPv4 CIDRs also require creating a Route Origin Authorization (ROA) object in your Regional Internet Registry (RIR).\n\n\u003e **NOTE:** In order to deprovision CIDRs all Allocations must be released. Allocations created by a VPC take up to 30 minutes to be released. However, for IPAM to properly manage the removal of allocation records created by VPCs and other resources, you must [grant it permissions](https://docs.aws.amazon.com/vpc/latest/ipam/choose-single-user-or-orgs-ipam.html) in\neither a single account or organizationally. If you are unable to deprovision a cidr after waiting over 30 minutes, you may be missing the Service Linked Role.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: example.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example.private_default_scope_id,\n locale=current.name)\nexample_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = example.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: example.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidr(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(example.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var exampleVpcIpamPoolCidr = new VpcIpamPoolCidr(\"exampleVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${example.privateDefaultScopeId}\n locale: ${current.name}\n exampleVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: example\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/16\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nProvision Public IPv6 Pool CIDRs:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst ipv6TestPublic = new aws.ec2.VpcIpamPool(\"ipv6_test_public\", {\n addressFamily: \"ipv6\",\n ipamScopeId: example.publicDefaultScopeId,\n locale: \"us-east-1\",\n description: \"public ipv6\",\n publiclyAdvertisable: false,\n publicIpSource: \"amazon\",\n awsService: \"ec2\",\n});\nconst ipv6TestPublicVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"ipv6_test_public\", {\n ipamPoolId: ipv6TestPublic.id,\n netmaskLength: 52,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nipv6_test_public = aws.ec2.VpcIpamPool(\"ipv6_test_public\",\n address_family=\"ipv6\",\n ipam_scope_id=example.public_default_scope_id,\n locale=\"us-east-1\",\n description=\"public ipv6\",\n publicly_advertisable=False,\n public_ip_source=\"amazon\",\n aws_service=\"ec2\")\nipv6_test_public_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"ipv6_test_public\",\n ipam_pool_id=ipv6_test_public.id,\n netmask_length=52)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var ipv6TestPublic = new Aws.Ec2.VpcIpamPool(\"ipv6_test_public\", new()\n {\n AddressFamily = \"ipv6\",\n IpamScopeId = example.PublicDefaultScopeId,\n Locale = \"us-east-1\",\n Description = \"public ipv6\",\n PubliclyAdvertisable = false,\n PublicIpSource = \"amazon\",\n AwsService = \"ec2\",\n });\n\n var ipv6TestPublicVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"ipv6_test_public\", new()\n {\n IpamPoolId = ipv6TestPublic.Id,\n NetmaskLength = 52,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tipv6TestPublic, err := ec2.NewVpcIpamPool(ctx, \"ipv6_test_public\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv6\"),\n\t\t\tIpamScopeId: example.PublicDefaultScopeId,\n\t\t\tLocale: pulumi.String(\"us-east-1\"),\n\t\t\tDescription: pulumi.String(\"public ipv6\"),\n\t\t\tPubliclyAdvertisable: pulumi.Bool(false),\n\t\t\tPublicIpSource: pulumi.String(\"amazon\"),\n\t\t\tAwsService: pulumi.String(\"ec2\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidr(ctx, \"ipv6_test_public\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: ipv6TestPublic.ID(),\n\t\t\tNetmaskLength: pulumi.Int(52),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var ipv6TestPublic = new VpcIpamPool(\"ipv6TestPublic\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv6\")\n .ipamScopeId(example.publicDefaultScopeId())\n .locale(\"us-east-1\")\n .description(\"public ipv6\")\n .publiclyAdvertisable(false)\n .publicIpSource(\"amazon\")\n .awsService(\"ec2\")\n .build());\n\n var ipv6TestPublicVpcIpamPoolCidr = new VpcIpamPoolCidr(\"ipv6TestPublicVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(ipv6TestPublic.id())\n .netmaskLength(52)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n ipv6TestPublic:\n type: aws:ec2:VpcIpamPool\n name: ipv6_test_public\n properties:\n addressFamily: ipv6\n ipamScopeId: ${example.publicDefaultScopeId}\n locale: us-east-1\n description: public ipv6\n publiclyAdvertisable: false\n publicIpSource: amazon\n awsService: ec2\n ipv6TestPublicVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: ipv6_test_public\n properties:\n ipamPoolId: ${ipv6TestPublic.id}\n netmaskLength: 52\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the `\u003ccidr\u003e_\u003cipam-pool-id\u003e`. For example:\n\n__NOTE:__ Do not use the IPAM Pool Cidr ID as this was introduced after the resource already existed.\n\n```sh\n$ pulumi import aws:ec2/vpcIpamPoolCidr:VpcIpamPoolCidr example 172.20.0.0/24_ipam-pool-0e634f5a1517cccdc\n```\n", + "description": "Provisions a CIDR from an IPAM address pool.\n\n\u003e **NOTE:** Provisioning Public IPv4 or Public IPv6 require [steps outside the scope of this resource](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#prepare-for-byoip). The resource accepts `message` and `signature` as part of the `cidr_authorization_context` attribute but those must be generated ahead of time. Public IPv6 CIDRs that are provisioned into a Pool with `publicly_advertisable = true` and all public IPv4 CIDRs also require creating a Route Origin Authorization (ROA) object in your Regional Internet Registry (RIR).\n\n\u003e **NOTE:** In order to deprovision CIDRs all Allocations must be released. Allocations created by a VPC take up to 30 minutes to be released. However, for IPAM to properly manage the removal of allocation records created by VPCs and other resources, you must [grant it permissions](https://docs.aws.amazon.com/vpc/latest/ipam/choose-single-user-or-orgs-ipam.html) in\neither a single account or organizationally. If you are unable to deprovision a cidr after waiting over 30 minutes, you may be missing the Service Linked Role.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: example.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example.private_default_scope_id,\n locale=current.name)\nexample_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = example.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: example.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidr(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(example.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var exampleVpcIpamPoolCidr = new VpcIpamPoolCidr(\"exampleVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${example.privateDefaultScopeId}\n locale: ${current.name}\n exampleVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: example\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/16\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nProvision Public IPv6 Pool CIDRs:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst ipv6TestPublic = new aws.ec2.VpcIpamPool(\"ipv6_test_public\", {\n addressFamily: \"ipv6\",\n ipamScopeId: example.publicDefaultScopeId,\n locale: \"us-east-1\",\n description: \"public ipv6\",\n publiclyAdvertisable: false,\n publicIpSource: \"amazon\",\n awsService: \"ec2\",\n});\nconst ipv6TestPublicVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"ipv6_test_public\", {\n ipamPoolId: ipv6TestPublic.id,\n netmaskLength: 52,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nipv6_test_public = aws.ec2.VpcIpamPool(\"ipv6_test_public\",\n address_family=\"ipv6\",\n ipam_scope_id=example.public_default_scope_id,\n locale=\"us-east-1\",\n description=\"public ipv6\",\n publicly_advertisable=False,\n public_ip_source=\"amazon\",\n aws_service=\"ec2\")\nipv6_test_public_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"ipv6_test_public\",\n ipam_pool_id=ipv6_test_public.id,\n netmask_length=52)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var ipv6TestPublic = new Aws.Ec2.VpcIpamPool(\"ipv6_test_public\", new()\n {\n AddressFamily = \"ipv6\",\n IpamScopeId = example.PublicDefaultScopeId,\n Locale = \"us-east-1\",\n Description = \"public ipv6\",\n PubliclyAdvertisable = false,\n PublicIpSource = \"amazon\",\n AwsService = \"ec2\",\n });\n\n var ipv6TestPublicVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"ipv6_test_public\", new()\n {\n IpamPoolId = ipv6TestPublic.Id,\n NetmaskLength = 52,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tipv6TestPublic, err := ec2.NewVpcIpamPool(ctx, \"ipv6_test_public\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv6\"),\n\t\t\tIpamScopeId: example.PublicDefaultScopeId,\n\t\t\tLocale: pulumi.String(\"us-east-1\"),\n\t\t\tDescription: pulumi.String(\"public ipv6\"),\n\t\t\tPubliclyAdvertisable: pulumi.Bool(false),\n\t\t\tPublicIpSource: pulumi.String(\"amazon\"),\n\t\t\tAwsService: pulumi.String(\"ec2\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidr(ctx, \"ipv6_test_public\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: ipv6TestPublic.ID(),\n\t\t\tNetmaskLength: pulumi.Int(52),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var ipv6TestPublic = new VpcIpamPool(\"ipv6TestPublic\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv6\")\n .ipamScopeId(example.publicDefaultScopeId())\n .locale(\"us-east-1\")\n .description(\"public ipv6\")\n .publiclyAdvertisable(false)\n .publicIpSource(\"amazon\")\n .awsService(\"ec2\")\n .build());\n\n var ipv6TestPublicVpcIpamPoolCidr = new VpcIpamPoolCidr(\"ipv6TestPublicVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(ipv6TestPublic.id())\n .netmaskLength(52)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n ipv6TestPublic:\n type: aws:ec2:VpcIpamPool\n name: ipv6_test_public\n properties:\n addressFamily: ipv6\n ipamScopeId: ${example.publicDefaultScopeId}\n locale: us-east-1\n description: public ipv6\n publiclyAdvertisable: false\n publicIpSource: amazon\n awsService: ec2\n ipv6TestPublicVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: ipv6_test_public\n properties:\n ipamPoolId: ${ipv6TestPublic.id}\n netmaskLength: 52\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the `\u003ccidr\u003e_\u003cipam-pool-id\u003e`. For example:\n\n__NOTE:__ Do not use the IPAM Pool Cidr ID as this was introduced after the resource already existed.\n\n```sh\n$ pulumi import aws:ec2/vpcIpamPoolCidr:VpcIpamPoolCidr example 172.20.0.0/24_ipam-pool-0e634f5a1517cccdc\n```\n", "properties": { "cidr": { "type": "string", @@ -243474,7 +243474,7 @@ } }, "aws:ec2/vpcIpamPoolCidrAllocation:VpcIpamPoolCidrAllocation": { - "description": "Allocates (reserves) a CIDR from an IPAM address pool, preventing usage by IPAM. Only works for private IPv4.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst exampleVpcIpam = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: exampleVpcIpam.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\nconst example = new aws.ec2.VpcIpamPoolCidrAllocation(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/24\",\n}, {\n dependsOn: [exampleVpcIpamPoolCidr],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample_vpc_ipam = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example_vpc_ipam.private_default_scope_id,\n locale=current.name)\nexample_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\nexample = aws.ec2.VpcIpamPoolCidrAllocation(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/24\",\n opts = pulumi.ResourceOptions(depends_on=[example_vpc_ipam_pool_cidr]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var exampleVpcIpam = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = exampleVpcIpam.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var example = new Aws.Ec2.VpcIpamPoolCidrAllocation(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/24\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleVpcIpamPoolCidr,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpam, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: exampleVpcIpam.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidrAllocation(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrAllocationArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/24\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleVpcIpamPoolCidr,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrAllocation;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrAllocationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var exampleVpcIpam = new VpcIpam(\"exampleVpcIpam\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(exampleVpcIpam.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var exampleVpcIpamPoolCidr = new VpcIpamPoolCidr(\"exampleVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var example = new VpcIpamPoolCidrAllocation(\"example\", VpcIpamPoolCidrAllocationArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/24\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleVpcIpamPoolCidr)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpamPoolCidrAllocation\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/24\n options:\n dependson:\n - ${exampleVpcIpamPoolCidr}\n exampleVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: example\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/16\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}\n locale: ${current.name}\n exampleVpcIpam:\n type: aws:ec2:VpcIpam\n name: example\n properties:\n operatingRegions:\n - regionName: ${current.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nWith the `disallowed_cidrs` attribute:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst exampleVpcIpam = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: exampleVpcIpam.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\nconst example = new aws.ec2.VpcIpamPoolCidrAllocation(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n netmaskLength: 28,\n disallowedCidrs: [\"172.20.0.0/28\"],\n}, {\n dependsOn: [exampleVpcIpamPoolCidr],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample_vpc_ipam = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example_vpc_ipam.private_default_scope_id,\n locale=current.name)\nexample_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\nexample = aws.ec2.VpcIpamPoolCidrAllocation(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n netmask_length=28,\n disallowed_cidrs=[\"172.20.0.0/28\"],\n opts = pulumi.ResourceOptions(depends_on=[example_vpc_ipam_pool_cidr]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var exampleVpcIpam = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = exampleVpcIpam.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var example = new Aws.Ec2.VpcIpamPoolCidrAllocation(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n NetmaskLength = 28,\n DisallowedCidrs = new[]\n {\n \"172.20.0.0/28\",\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleVpcIpamPoolCidr,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpam, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: exampleVpcIpam.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidrAllocation(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrAllocationArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tNetmaskLength: pulumi.Int(28),\n\t\t\tDisallowedCidrs: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"172.20.0.0/28\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleVpcIpamPoolCidr,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrAllocation;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrAllocationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var exampleVpcIpam = new VpcIpam(\"exampleVpcIpam\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(exampleVpcIpam.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var exampleVpcIpamPoolCidr = new VpcIpamPoolCidr(\"exampleVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var example = new VpcIpamPoolCidrAllocation(\"example\", VpcIpamPoolCidrAllocationArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .netmaskLength(28)\n .disallowedCidrs(\"172.20.0.0/28\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleVpcIpamPoolCidr)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpamPoolCidrAllocation\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n netmaskLength: 28\n disallowedCidrs:\n - 172.20.0.0/28\n options:\n dependson:\n - ${exampleVpcIpamPoolCidr}\n exampleVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: example\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/16\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}\n locale: ${current.name}\n exampleVpcIpam:\n type: aws:ec2:VpcIpam\n name: example\n properties:\n operatingRegions:\n - regionName: ${current.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAM allocations using the allocation `id` and `pool id`, separated by `_`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamPoolCidrAllocation:VpcIpamPoolCidrAllocation example ipam-pool-alloc-0dc6d196509c049ba8b549ff99f639736_ipam-pool-07cfb559e0921fcbe\n```\n", + "description": "Allocates (reserves) a CIDR from an IPAM address pool, preventing usage by IPAM. Only works for private IPv4.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst exampleVpcIpam = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: exampleVpcIpam.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\nconst example = new aws.ec2.VpcIpamPoolCidrAllocation(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/24\",\n}, {\n dependsOn: [exampleVpcIpamPoolCidr],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample_vpc_ipam = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example_vpc_ipam.private_default_scope_id,\n locale=current.name)\nexample_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\nexample = aws.ec2.VpcIpamPoolCidrAllocation(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/24\",\n opts = pulumi.ResourceOptions(depends_on=[example_vpc_ipam_pool_cidr]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var exampleVpcIpam = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = exampleVpcIpam.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var example = new Aws.Ec2.VpcIpamPoolCidrAllocation(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/24\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleVpcIpamPoolCidr,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpam, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: exampleVpcIpam.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidrAllocation(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrAllocationArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/24\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleVpcIpamPoolCidr,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrAllocation;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrAllocationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var exampleVpcIpam = new VpcIpam(\"exampleVpcIpam\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(exampleVpcIpam.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var exampleVpcIpamPoolCidr = new VpcIpamPoolCidr(\"exampleVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var example = new VpcIpamPoolCidrAllocation(\"example\", VpcIpamPoolCidrAllocationArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/24\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleVpcIpamPoolCidr)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpamPoolCidrAllocation\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/24\n options:\n dependson:\n - ${exampleVpcIpamPoolCidr}\n exampleVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: example\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/16\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}\n locale: ${current.name}\n exampleVpcIpam:\n type: aws:ec2:VpcIpam\n name: example\n properties:\n operatingRegions:\n - regionName: ${current.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nWith the `disallowed_cidrs` attribute:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst exampleVpcIpam = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: exampleVpcIpam.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\nconst example = new aws.ec2.VpcIpamPoolCidrAllocation(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n netmaskLength: 28,\n disallowedCidrs: [\"172.20.0.0/28\"],\n}, {\n dependsOn: [exampleVpcIpamPoolCidr],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample_vpc_ipam = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example_vpc_ipam.private_default_scope_id,\n locale=current.name)\nexample_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\nexample = aws.ec2.VpcIpamPoolCidrAllocation(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n netmask_length=28,\n disallowed_cidrs=[\"172.20.0.0/28\"],\n opts = pulumi.ResourceOptions(depends_on=[example_vpc_ipam_pool_cidr]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var exampleVpcIpam = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = exampleVpcIpam.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var example = new Aws.Ec2.VpcIpamPoolCidrAllocation(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n NetmaskLength = 28,\n DisallowedCidrs = new[]\n {\n \"172.20.0.0/28\",\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleVpcIpamPoolCidr,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpam, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: exampleVpcIpam.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPoolCidrAllocation(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrAllocationArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tNetmaskLength: pulumi.Int(28),\n\t\t\tDisallowedCidrs: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"172.20.0.0/28\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleVpcIpamPoolCidr,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrAllocation;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrAllocationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var exampleVpcIpam = new VpcIpam(\"exampleVpcIpam\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(exampleVpcIpam.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var exampleVpcIpamPoolCidr = new VpcIpamPoolCidr(\"exampleVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var example = new VpcIpamPoolCidrAllocation(\"example\", VpcIpamPoolCidrAllocationArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .netmaskLength(28)\n .disallowedCidrs(\"172.20.0.0/28\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleVpcIpamPoolCidr)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpamPoolCidrAllocation\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n netmaskLength: 28\n disallowedCidrs:\n - 172.20.0.0/28\n options:\n dependson:\n - ${exampleVpcIpamPoolCidr}\n exampleVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: example\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/16\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}\n locale: ${current.name}\n exampleVpcIpam:\n type: aws:ec2:VpcIpam\n name: example\n properties:\n operatingRegions:\n - regionName: ${current.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAM allocations using the allocation `id` and `pool id`, separated by `_`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamPoolCidrAllocation:VpcIpamPoolCidrAllocation example ipam-pool-alloc-0dc6d196509c049ba8b549ff99f639736_ipam-pool-07cfb559e0921fcbe\n```\n", "properties": { "cidr": { "type": "string", @@ -243608,7 +243608,7 @@ } }, "aws:ec2/vpcIpamPreviewNextCidr:VpcIpamPreviewNextCidr": { - "description": "Previews a CIDR from an IPAM address pool. Only works for private IPv4.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst exampleVpcIpam = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: exampleVpcIpam.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\nconst example = new aws.ec2.VpcIpamPreviewNextCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n netmaskLength: 28,\n disallowedCidrs: [\"172.2.0.0/32\"],\n}, {\n dependsOn: [exampleVpcIpamPoolCidr],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample_vpc_ipam = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example_vpc_ipam.private_default_scope_id,\n locale=current.name)\nexample_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\nexample = aws.ec2.VpcIpamPreviewNextCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n netmask_length=28,\n disallowed_cidrs=[\"172.2.0.0/32\"],\n opts = pulumi.ResourceOptions(depends_on=[example_vpc_ipam_pool_cidr]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var exampleVpcIpam = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = exampleVpcIpam.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var example = new Aws.Ec2.VpcIpamPreviewNextCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n NetmaskLength = 28,\n DisallowedCidrs = new[]\n {\n \"172.2.0.0/32\",\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleVpcIpamPoolCidr,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpam, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: exampleVpcIpam.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPreviewNextCidr(ctx, \"example\", \u0026ec2.VpcIpamPreviewNextCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tNetmaskLength: pulumi.Int(28),\n\t\t\tDisallowedCidrs: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"172.2.0.0/32\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleVpcIpamPoolCidr,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport com.pulumi.aws.ec2.VpcIpamPreviewNextCidr;\nimport com.pulumi.aws.ec2.VpcIpamPreviewNextCidrArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var exampleVpcIpam = new VpcIpam(\"exampleVpcIpam\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(exampleVpcIpam.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var exampleVpcIpamPoolCidr = new VpcIpamPoolCidr(\"exampleVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var example = new VpcIpamPreviewNextCidr(\"example\", VpcIpamPreviewNextCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .netmaskLength(28)\n .disallowedCidrs(\"172.2.0.0/32\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleVpcIpamPoolCidr)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpamPreviewNextCidr\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n netmaskLength: 28\n disallowedCidrs:\n - 172.2.0.0/32\n options:\n dependson:\n - ${exampleVpcIpamPoolCidr}\n exampleVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: example\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/16\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}\n locale: ${current.name}\n exampleVpcIpam:\n type: aws:ec2:VpcIpam\n name: example\n properties:\n operatingRegions:\n - regionName: ${current.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Previews a CIDR from an IPAM address pool. Only works for private IPv4.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst exampleVpcIpam = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamPool = new aws.ec2.VpcIpamPool(\"example\", {\n addressFamily: \"ipv4\",\n ipamScopeId: exampleVpcIpam.privateDefaultScopeId,\n locale: current.then(current =\u003e current.name),\n});\nconst exampleVpcIpamPoolCidr = new aws.ec2.VpcIpamPoolCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n cidr: \"172.20.0.0/16\",\n});\nconst example = new aws.ec2.VpcIpamPreviewNextCidr(\"example\", {\n ipamPoolId: exampleVpcIpamPool.id,\n netmaskLength: 28,\n disallowedCidrs: [\"172.2.0.0/32\"],\n}, {\n dependsOn: [exampleVpcIpamPoolCidr],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample_vpc_ipam = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_pool = aws.ec2.VpcIpamPool(\"example\",\n address_family=\"ipv4\",\n ipam_scope_id=example_vpc_ipam.private_default_scope_id,\n locale=current.name)\nexample_vpc_ipam_pool_cidr = aws.ec2.VpcIpamPoolCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n cidr=\"172.20.0.0/16\")\nexample = aws.ec2.VpcIpamPreviewNextCidr(\"example\",\n ipam_pool_id=example_vpc_ipam_pool.id,\n netmask_length=28,\n disallowed_cidrs=[\"172.2.0.0/32\"],\n opts = pulumi.ResourceOptions(depends_on=[example_vpc_ipam_pool_cidr]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var exampleVpcIpam = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamPool = new Aws.Ec2.VpcIpamPool(\"example\", new()\n {\n AddressFamily = \"ipv4\",\n IpamScopeId = exampleVpcIpam.PrivateDefaultScopeId,\n Locale = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n });\n\n var exampleVpcIpamPoolCidr = new Aws.Ec2.VpcIpamPoolCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n Cidr = \"172.20.0.0/16\",\n });\n\n var example = new Aws.Ec2.VpcIpamPreviewNextCidr(\"example\", new()\n {\n IpamPoolId = exampleVpcIpamPool.Id,\n NetmaskLength = 28,\n DisallowedCidrs = new[]\n {\n \"172.2.0.0/32\",\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleVpcIpamPoolCidr,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpam, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, \"example\", \u0026ec2.VpcIpamPoolArgs{\n\t\t\tAddressFamily: pulumi.String(\"ipv4\"),\n\t\t\tIpamScopeId: exampleVpcIpam.PrivateDefaultScopeId,\n\t\t\tLocale: pulumi.String(current.Name),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, \"example\", \u0026ec2.VpcIpamPoolCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tCidr: pulumi.String(\"172.20.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamPreviewNextCidr(ctx, \"example\", \u0026ec2.VpcIpamPreviewNextCidrArgs{\n\t\t\tIpamPoolId: exampleVpcIpamPool.ID(),\n\t\t\tNetmaskLength: pulumi.Int(28),\n\t\t\tDisallowedCidrs: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"172.2.0.0/32\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleVpcIpamPoolCidr,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamPool;\nimport com.pulumi.aws.ec2.VpcIpamPoolArgs;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidr;\nimport com.pulumi.aws.ec2.VpcIpamPoolCidrArgs;\nimport com.pulumi.aws.ec2.VpcIpamPreviewNextCidr;\nimport com.pulumi.aws.ec2.VpcIpamPreviewNextCidrArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var exampleVpcIpam = new VpcIpam(\"exampleVpcIpam\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamPool = new VpcIpamPool(\"exampleVpcIpamPool\", VpcIpamPoolArgs.builder()\n .addressFamily(\"ipv4\")\n .ipamScopeId(exampleVpcIpam.privateDefaultScopeId())\n .locale(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build());\n\n var exampleVpcIpamPoolCidr = new VpcIpamPoolCidr(\"exampleVpcIpamPoolCidr\", VpcIpamPoolCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .cidr(\"172.20.0.0/16\")\n .build());\n\n var example = new VpcIpamPreviewNextCidr(\"example\", VpcIpamPreviewNextCidrArgs.builder()\n .ipamPoolId(exampleVpcIpamPool.id())\n .netmaskLength(28)\n .disallowedCidrs(\"172.2.0.0/32\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleVpcIpamPoolCidr)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpamPreviewNextCidr\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n netmaskLength: 28\n disallowedCidrs:\n - 172.2.0.0/32\n options:\n dependson:\n - ${exampleVpcIpamPoolCidr}\n exampleVpcIpamPoolCidr:\n type: aws:ec2:VpcIpamPoolCidr\n name: example\n properties:\n ipamPoolId: ${exampleVpcIpamPool.id}\n cidr: 172.20.0.0/16\n exampleVpcIpamPool:\n type: aws:ec2:VpcIpamPool\n name: example\n properties:\n addressFamily: ipv4\n ipamScopeId: ${exampleVpcIpam.privateDefaultScopeId}\n locale: ${current.name}\n exampleVpcIpam:\n type: aws:ec2:VpcIpam\n name: example\n properties:\n operatingRegions:\n - regionName: ${current.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "cidr": { "type": "string", @@ -243687,7 +243687,7 @@ } }, "aws:ec2/vpcIpamResourceDiscovery:VpcIpamResourceDiscovery": { - "description": "Provides an IPAM Resource Discovery resource. IPAM Resource Discoveries are resources meant for multi-organization customers. If you wish to use a single IPAM across multiple orgs, a resource discovery can be created and shared from a subordinate organization to the management organizations IPAM delegated admin account. For a full deployment example, see `aws.ec2.VpcIpamResourceDiscoveryAssociation` resource.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst main = new aws.ec2.VpcIpamResourceDiscovery(\"main\", {\n description: \"My IPAM Resource Discovery\",\n operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n }],\n tags: {\n Test: \"Main\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nmain = aws.ec2.VpcIpamResourceDiscovery(\"main\",\n description=\"My IPAM Resource Discovery\",\n operating_regions=[{\n \"region_name\": current.name,\n }],\n tags={\n \"Test\": \"Main\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var main = new Aws.Ec2.VpcIpamResourceDiscovery(\"main\", new()\n {\n Description = \"My IPAM Resource Discovery\",\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamResourceDiscoveryOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n Tags = \n {\n { \"Test\", \"Main\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamResourceDiscovery(ctx, \"main\", \u0026ec2.VpcIpamResourceDiscoveryArgs{\n\t\t\tDescription: pulumi.String(\"My IPAM Resource Discovery\"),\n\t\t\tOperatingRegions: ec2.VpcIpamResourceDiscoveryOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamResourceDiscoveryOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Test\": pulumi.String(\"Main\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamResourceDiscovery;\nimport com.pulumi.aws.ec2.VpcIpamResourceDiscoveryArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamResourceDiscoveryOperatingRegionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var main = new VpcIpamResourceDiscovery(\"main\", VpcIpamResourceDiscoveryArgs.builder()\n .description(\"My IPAM Resource Discovery\")\n .operatingRegions(VpcIpamResourceDiscoveryOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .tags(Map.of(\"Test\", \"Main\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:VpcIpamResourceDiscovery\n properties:\n description: My IPAM Resource Discovery\n operatingRegions:\n - regionName: ${current.name}\n tags:\n Test: Main\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the IPAM resource discovery `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamResourceDiscovery:VpcIpamResourceDiscovery example ipam-res-disco-0178368ad2146a492\n```\n", + "description": "Provides an IPAM Resource Discovery resource. IPAM Resource Discoveries are resources meant for multi-organization customers. If you wish to use a single IPAM across multiple orgs, a resource discovery can be created and shared from a subordinate organization to the management organizations IPAM delegated admin account. For a full deployment example, see `aws.ec2.VpcIpamResourceDiscoveryAssociation` resource.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst main = new aws.ec2.VpcIpamResourceDiscovery(\"main\", {\n description: \"My IPAM Resource Discovery\",\n operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n }],\n tags: {\n Test: \"Main\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nmain = aws.ec2.VpcIpamResourceDiscovery(\"main\",\n description=\"My IPAM Resource Discovery\",\n operating_regions=[{\n \"region_name\": current.name,\n }],\n tags={\n \"Test\": \"Main\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var main = new Aws.Ec2.VpcIpamResourceDiscovery(\"main\", new()\n {\n Description = \"My IPAM Resource Discovery\",\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamResourceDiscoveryOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n Tags = \n {\n { \"Test\", \"Main\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamResourceDiscovery(ctx, \"main\", \u0026ec2.VpcIpamResourceDiscoveryArgs{\n\t\t\tDescription: pulumi.String(\"My IPAM Resource Discovery\"),\n\t\t\tOperatingRegions: ec2.VpcIpamResourceDiscoveryOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamResourceDiscoveryOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Test\": pulumi.String(\"Main\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamResourceDiscovery;\nimport com.pulumi.aws.ec2.VpcIpamResourceDiscoveryArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamResourceDiscoveryOperatingRegionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var main = new VpcIpamResourceDiscovery(\"main\", VpcIpamResourceDiscoveryArgs.builder()\n .description(\"My IPAM Resource Discovery\")\n .operatingRegions(VpcIpamResourceDiscoveryOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .tags(Map.of(\"Test\", \"Main\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:VpcIpamResourceDiscovery\n properties:\n description: My IPAM Resource Discovery\n operatingRegions:\n - regionName: ${current.name}\n tags:\n Test: Main\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the IPAM resource discovery `id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamResourceDiscovery:VpcIpamResourceDiscovery example ipam-res-disco-0178368ad2146a492\n```\n", "properties": { "arn": { "type": "string", @@ -243950,7 +243950,7 @@ } }, "aws:ec2/vpcIpamScope:VpcIpamScope": { - "description": "Creates a scope for AWS IPAM.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamScope = new aws.ec2.VpcIpamScope(\"example\", {\n ipamId: example.id,\n description: \"Another Scope\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_scope = aws.ec2.VpcIpamScope(\"example\",\n ipam_id=example.id,\n description=\"Another Scope\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamScope = new Aws.Ec2.VpcIpamScope(\"example\", new()\n {\n IpamId = example.Id,\n Description = \"Another Scope\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamScope(ctx, \"example\", \u0026ec2.VpcIpamScopeArgs{\n\t\t\tIpamId: example.ID(),\n\t\t\tDescription: pulumi.String(\"Another Scope\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamScope;\nimport com.pulumi.aws.ec2.VpcIpamScopeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamScope = new VpcIpamScope(\"exampleVpcIpamScope\", VpcIpamScopeArgs.builder()\n .ipamId(example.id())\n .description(\"Another Scope\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n exampleVpcIpamScope:\n type: aws:ec2:VpcIpamScope\n name: example\n properties:\n ipamId: ${example.id}\n description: Another Scope\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the `scope_id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamScope:VpcIpamScope example ipam-scope-0513c69f283d11dfb\n```\n", + "description": "Creates a scope for AWS IPAM.\n\n## Example Usage\n\nBasic usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.ec2.VpcIpam(\"example\", {operatingRegions: [{\n regionName: current.then(current =\u003e current.name),\n}]});\nconst exampleVpcIpamScope = new aws.ec2.VpcIpamScope(\"example\", {\n ipamId: example.id,\n description: \"Another Scope\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.VpcIpam(\"example\", operating_regions=[{\n \"region_name\": current.name,\n}])\nexample_vpc_ipam_scope = aws.ec2.VpcIpamScope(\"example\",\n ipam_id=example.id,\n description=\"Another Scope\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Ec2.VpcIpam(\"example\", new()\n {\n OperatingRegions = new[]\n {\n new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs\n {\n RegionName = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n },\n },\n });\n\n var exampleVpcIpamScope = new Aws.Ec2.VpcIpamScope(\"example\", new()\n {\n IpamId = example.Id,\n Description = \"Another Scope\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewVpcIpam(ctx, \"example\", \u0026ec2.VpcIpamArgs{\n\t\t\tOperatingRegions: ec2.VpcIpamOperatingRegionArray{\n\t\t\t\t\u0026ec2.VpcIpamOperatingRegionArgs{\n\t\t\t\t\tRegionName: pulumi.String(current.Name),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewVpcIpamScope(ctx, \"example\", \u0026ec2.VpcIpamScopeArgs{\n\t\t\tIpamId: example.ID(),\n\t\t\tDescription: pulumi.String(\"Another Scope\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpam;\nimport com.pulumi.aws.ec2.VpcIpamArgs;\nimport com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;\nimport com.pulumi.aws.ec2.VpcIpamScope;\nimport com.pulumi.aws.ec2.VpcIpamScopeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new VpcIpam(\"example\", VpcIpamArgs.builder()\n .operatingRegions(VpcIpamOperatingRegionArgs.builder()\n .regionName(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .build())\n .build());\n\n var exampleVpcIpamScope = new VpcIpamScope(\"exampleVpcIpamScope\", VpcIpamScopeArgs.builder()\n .ipamId(example.id())\n .description(\"Another Scope\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:VpcIpam\n properties:\n operatingRegions:\n - regionName: ${current.name}\n exampleVpcIpamScope:\n type: aws:ec2:VpcIpamScope\n name: example\n properties:\n ipamId: ${example.id}\n description: Another Scope\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IPAMs using the `scope_id`. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcIpamScope:VpcIpamScope example ipam-scope-0513c69f283d11dfb\n```\n", "properties": { "arn": { "type": "string", @@ -244504,7 +244504,7 @@ } }, "aws:ec2/vpcPeeringConnectionAccepter:VpcPeeringConnectionAccepter": { - "description": "Provides a resource to manage the accepter's side of a VPC Peering Connection.\n\nWhen a cross-account (requester's AWS account differs from the accepter's AWS account) or an inter-region\nVPC Peering Connection is created, a VPC Peering Connection resource is automatically created in the\naccepter's account.\nThe requester can use the `aws.ec2.VpcPeeringConnection` resource to manage its side of the connection\nand the accepter can use the `aws.ec2.VpcPeeringConnectionAccepter` resource to \"adopt\" its side of the\nconnection into management.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = new aws.ec2.Vpc(\"main\", {cidrBlock: \"10.0.0.0/16\"});\nconst peerVpc = new aws.ec2.Vpc(\"peer\", {cidrBlock: \"10.1.0.0/16\"});\nconst peer = aws.getCallerIdentity({});\n// Requester's side of the connection.\nconst peerVpcPeeringConnection = new aws.ec2.VpcPeeringConnection(\"peer\", {\n vpcId: main.id,\n peerVpcId: peerVpc.id,\n peerOwnerId: peer.then(peer =\u003e peer.accountId),\n peerRegion: \"us-west-2\",\n autoAccept: false,\n tags: {\n Side: \"Requester\",\n },\n});\n// Accepter's side of the connection.\nconst peerVpcPeeringConnectionAccepter = new aws.ec2.VpcPeeringConnectionAccepter(\"peer\", {\n vpcPeeringConnectionId: peerVpcPeeringConnection.id,\n autoAccept: true,\n tags: {\n Side: \"Accepter\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ec2.Vpc(\"main\", cidr_block=\"10.0.0.0/16\")\npeer_vpc = aws.ec2.Vpc(\"peer\", cidr_block=\"10.1.0.0/16\")\npeer = aws.get_caller_identity()\n# Requester's side of the connection.\npeer_vpc_peering_connection = aws.ec2.VpcPeeringConnection(\"peer\",\n vpc_id=main.id,\n peer_vpc_id=peer_vpc.id,\n peer_owner_id=peer.account_id,\n peer_region=\"us-west-2\",\n auto_accept=False,\n tags={\n \"Side\": \"Requester\",\n })\n# Accepter's side of the connection.\npeer_vpc_peering_connection_accepter = aws.ec2.VpcPeeringConnectionAccepter(\"peer\",\n vpc_peering_connection_id=peer_vpc_peering_connection.id,\n auto_accept=True,\n tags={\n \"Side\": \"Accepter\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = new Aws.Ec2.Vpc(\"main\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n });\n\n var peerVpc = new Aws.Ec2.Vpc(\"peer\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var peer = Aws.GetCallerIdentity.Invoke();\n\n // Requester's side of the connection.\n var peerVpcPeeringConnection = new Aws.Ec2.VpcPeeringConnection(\"peer\", new()\n {\n VpcId = main.Id,\n PeerVpcId = peerVpc.Id,\n PeerOwnerId = peer.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n PeerRegion = \"us-west-2\",\n AutoAccept = false,\n Tags = \n {\n { \"Side\", \"Requester\" },\n },\n });\n\n // Accepter's side of the connection.\n var peerVpcPeeringConnectionAccepter = new Aws.Ec2.VpcPeeringConnectionAccepter(\"peer\", new()\n {\n VpcPeeringConnectionId = peerVpcPeeringConnection.Id,\n AutoAccept = true,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := ec2.NewVpc(ctx, \"main\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeerVpc, err := ec2.NewVpc(ctx, \"peer\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeer, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Requester's side of the connection.\n\t\tpeerVpcPeeringConnection, err := ec2.NewVpcPeeringConnection(ctx, \"peer\", \u0026ec2.VpcPeeringConnectionArgs{\n\t\t\tVpcId: main.ID(),\n\t\t\tPeerVpcId: peerVpc.ID(),\n\t\t\tPeerOwnerId: pulumi.String(peer.AccountId),\n\t\t\tPeerRegion: pulumi.String(\"us-west-2\"),\n\t\t\tAutoAccept: pulumi.Bool(false),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Requester\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the connection.\n\t\t_, err = ec2.NewVpcPeeringConnectionAccepter(ctx, \"peer\", \u0026ec2.VpcPeeringConnectionAccepterArgs{\n\t\t\tVpcPeeringConnectionId: peerVpcPeeringConnection.ID(),\n\t\t\tAutoAccept: pulumi.Bool(true),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnection;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionAccepter;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var main = new Vpc(\"main\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .build());\n\n var peerVpc = new Vpc(\"peerVpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n final var peer = AwsFunctions.getCallerIdentity();\n\n // Requester's side of the connection.\n var peerVpcPeeringConnection = new VpcPeeringConnection(\"peerVpcPeeringConnection\", VpcPeeringConnectionArgs.builder()\n .vpcId(main.id())\n .peerVpcId(peerVpc.id())\n .peerOwnerId(peer.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .peerRegion(\"us-west-2\")\n .autoAccept(false)\n .tags(Map.of(\"Side\", \"Requester\"))\n .build());\n\n // Accepter's side of the connection.\n var peerVpcPeeringConnectionAccepter = new VpcPeeringConnectionAccepter(\"peerVpcPeeringConnectionAccepter\", VpcPeeringConnectionAccepterArgs.builder()\n .vpcPeeringConnectionId(peerVpcPeeringConnection.id())\n .autoAccept(true)\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n peerVpc:\n type: aws:ec2:Vpc\n name: peer\n properties:\n cidrBlock: 10.1.0.0/16\n # Requester's side of the connection.\n peerVpcPeeringConnection:\n type: aws:ec2:VpcPeeringConnection\n name: peer\n properties:\n vpcId: ${main.id}\n peerVpcId: ${peerVpc.id}\n peerOwnerId: ${peer.accountId}\n peerRegion: us-west-2\n autoAccept: false\n tags:\n Side: Requester\n # Accepter's side of the connection.\n peerVpcPeeringConnectionAccepter:\n type: aws:ec2:VpcPeeringConnectionAccepter\n name: peer\n properties:\n vpcPeeringConnectionId: ${peerVpcPeeringConnection.id}\n autoAccept: true\n tags:\n Side: Accepter\nvariables:\n peer:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPC Peering Connection Accepters using the Peering Connection ID. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcPeeringConnectionAccepter:VpcPeeringConnectionAccepter example pcx-12345678\n```\nCertain resource arguments, like `auto_accept`, do not have an EC2 API method for reading the information after peering connection creation. If the argument is set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignore_changes` to hide the difference. For example:\n\n", + "description": "Provides a resource to manage the accepter's side of a VPC Peering Connection.\n\nWhen a cross-account (requester's AWS account differs from the accepter's AWS account) or an inter-region\nVPC Peering Connection is created, a VPC Peering Connection resource is automatically created in the\naccepter's account.\nThe requester can use the `aws.ec2.VpcPeeringConnection` resource to manage its side of the connection\nand the accepter can use the `aws.ec2.VpcPeeringConnectionAccepter` resource to \"adopt\" its side of the\nconnection into management.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = new aws.ec2.Vpc(\"main\", {cidrBlock: \"10.0.0.0/16\"});\nconst peerVpc = new aws.ec2.Vpc(\"peer\", {cidrBlock: \"10.1.0.0/16\"});\nconst peer = aws.getCallerIdentity({});\n// Requester's side of the connection.\nconst peerVpcPeeringConnection = new aws.ec2.VpcPeeringConnection(\"peer\", {\n vpcId: main.id,\n peerVpcId: peerVpc.id,\n peerOwnerId: peer.then(peer =\u003e peer.accountId),\n peerRegion: \"us-west-2\",\n autoAccept: false,\n tags: {\n Side: \"Requester\",\n },\n});\n// Accepter's side of the connection.\nconst peerVpcPeeringConnectionAccepter = new aws.ec2.VpcPeeringConnectionAccepter(\"peer\", {\n vpcPeeringConnectionId: peerVpcPeeringConnection.id,\n autoAccept: true,\n tags: {\n Side: \"Accepter\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ec2.Vpc(\"main\", cidr_block=\"10.0.0.0/16\")\npeer_vpc = aws.ec2.Vpc(\"peer\", cidr_block=\"10.1.0.0/16\")\npeer = aws.get_caller_identity()\n# Requester's side of the connection.\npeer_vpc_peering_connection = aws.ec2.VpcPeeringConnection(\"peer\",\n vpc_id=main.id,\n peer_vpc_id=peer_vpc.id,\n peer_owner_id=peer.account_id,\n peer_region=\"us-west-2\",\n auto_accept=False,\n tags={\n \"Side\": \"Requester\",\n })\n# Accepter's side of the connection.\npeer_vpc_peering_connection_accepter = aws.ec2.VpcPeeringConnectionAccepter(\"peer\",\n vpc_peering_connection_id=peer_vpc_peering_connection.id,\n auto_accept=True,\n tags={\n \"Side\": \"Accepter\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = new Aws.Ec2.Vpc(\"main\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n });\n\n var peerVpc = new Aws.Ec2.Vpc(\"peer\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var peer = Aws.GetCallerIdentity.Invoke();\n\n // Requester's side of the connection.\n var peerVpcPeeringConnection = new Aws.Ec2.VpcPeeringConnection(\"peer\", new()\n {\n VpcId = main.Id,\n PeerVpcId = peerVpc.Id,\n PeerOwnerId = peer.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n PeerRegion = \"us-west-2\",\n AutoAccept = false,\n Tags = \n {\n { \"Side\", \"Requester\" },\n },\n });\n\n // Accepter's side of the connection.\n var peerVpcPeeringConnectionAccepter = new Aws.Ec2.VpcPeeringConnectionAccepter(\"peer\", new()\n {\n VpcPeeringConnectionId = peerVpcPeeringConnection.Id,\n AutoAccept = true,\n Tags = \n {\n { \"Side\", \"Accepter\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := ec2.NewVpc(ctx, \"main\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeerVpc, err := ec2.NewVpc(ctx, \"peer\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeer, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Requester's side of the connection.\n\t\tpeerVpcPeeringConnection, err := ec2.NewVpcPeeringConnection(ctx, \"peer\", \u0026ec2.VpcPeeringConnectionArgs{\n\t\t\tVpcId: main.ID(),\n\t\t\tPeerVpcId: peerVpc.ID(),\n\t\t\tPeerOwnerId: pulumi.String(peer.AccountId),\n\t\t\tPeerRegion: pulumi.String(\"us-west-2\"),\n\t\t\tAutoAccept: pulumi.Bool(false),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Requester\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Accepter's side of the connection.\n\t\t_, err = ec2.NewVpcPeeringConnectionAccepter(ctx, \"peer\", \u0026ec2.VpcPeeringConnectionAccepterArgs{\n\t\t\tVpcPeeringConnectionId: peerVpcPeeringConnection.ID(),\n\t\t\tAutoAccept: pulumi.Bool(true),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Side\": pulumi.String(\"Accepter\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnection;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionArgs;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionAccepter;\nimport com.pulumi.aws.ec2.VpcPeeringConnectionAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var main = new Vpc(\"main\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .build());\n\n var peerVpc = new Vpc(\"peerVpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n final var peer = AwsFunctions.getCallerIdentity();\n\n // Requester's side of the connection.\n var peerVpcPeeringConnection = new VpcPeeringConnection(\"peerVpcPeeringConnection\", VpcPeeringConnectionArgs.builder()\n .vpcId(main.id())\n .peerVpcId(peerVpc.id())\n .peerOwnerId(peer.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .peerRegion(\"us-west-2\")\n .autoAccept(false)\n .tags(Map.of(\"Side\", \"Requester\"))\n .build());\n\n // Accepter's side of the connection.\n var peerVpcPeeringConnectionAccepter = new VpcPeeringConnectionAccepter(\"peerVpcPeeringConnectionAccepter\", VpcPeeringConnectionAccepterArgs.builder()\n .vpcPeeringConnectionId(peerVpcPeeringConnection.id())\n .autoAccept(true)\n .tags(Map.of(\"Side\", \"Accepter\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n main:\n type: aws:ec2:Vpc\n properties:\n cidrBlock: 10.0.0.0/16\n peerVpc:\n type: aws:ec2:Vpc\n name: peer\n properties:\n cidrBlock: 10.1.0.0/16\n # Requester's side of the connection.\n peerVpcPeeringConnection:\n type: aws:ec2:VpcPeeringConnection\n name: peer\n properties:\n vpcId: ${main.id}\n peerVpcId: ${peerVpc.id}\n peerOwnerId: ${peer.accountId}\n peerRegion: us-west-2\n autoAccept: false\n tags:\n Side: Requester\n # Accepter's side of the connection.\n peerVpcPeeringConnectionAccepter:\n type: aws:ec2:VpcPeeringConnectionAccepter\n name: peer\n properties:\n vpcPeeringConnectionId: ${peerVpcPeeringConnection.id}\n autoAccept: true\n tags:\n Side: Accepter\nvariables:\n peer:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPC Peering Connection Accepters using the Peering Connection ID. For example:\n\n```sh\n$ pulumi import aws:ec2/vpcPeeringConnectionAccepter:VpcPeeringConnectionAccepter example pcx-12345678\n```\nCertain resource arguments, like `auto_accept`, do not have an EC2 API method for reading the information after peering connection creation. If the argument is set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignore_changes` to hide the difference. For example:\n\n", "properties": { "acceptStatus": { "type": "string", @@ -247486,7 +247486,7 @@ } }, "aws:ec2transitgateway/peeringAttachment:PeeringAttachment": { - "description": "Manages an EC2 Transit Gateway Peering Attachment.\nFor examples of custom route table association and propagation, see the [EC2 Transit Gateway Networking Examples Guide](https://docs.aws.amazon.com/vpc/latest/tgw/TGW_Scenarios.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst peer = aws.getRegion({});\nconst local = new aws.ec2transitgateway.TransitGateway(\"local\", {tags: {\n Name: \"Local TGW\",\n}});\nconst peerTransitGateway = new aws.ec2transitgateway.TransitGateway(\"peer\", {tags: {\n Name: \"Peer TGW\",\n}});\nconst example = new aws.ec2transitgateway.PeeringAttachment(\"example\", {\n peerAccountId: peerTransitGateway.ownerId,\n peerRegion: peer.then(peer =\u003e peer.name),\n peerTransitGatewayId: peerTransitGateway.id,\n transitGatewayId: local.id,\n tags: {\n Name: \"TGW Peering Requestor\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\npeer = aws.get_region()\nlocal = aws.ec2transitgateway.TransitGateway(\"local\", tags={\n \"Name\": \"Local TGW\",\n})\npeer_transit_gateway = aws.ec2transitgateway.TransitGateway(\"peer\", tags={\n \"Name\": \"Peer TGW\",\n})\nexample = aws.ec2transitgateway.PeeringAttachment(\"example\",\n peer_account_id=peer_transit_gateway.owner_id,\n peer_region=peer.name,\n peer_transit_gateway_id=peer_transit_gateway.id,\n transit_gateway_id=local.id,\n tags={\n \"Name\": \"TGW Peering Requestor\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var peer = Aws.GetRegion.Invoke();\n\n var local = new Aws.Ec2TransitGateway.TransitGateway(\"local\", new()\n {\n Tags = \n {\n { \"Name\", \"Local TGW\" },\n },\n });\n\n var peerTransitGateway = new Aws.Ec2TransitGateway.TransitGateway(\"peer\", new()\n {\n Tags = \n {\n { \"Name\", \"Peer TGW\" },\n },\n });\n\n var example = new Aws.Ec2TransitGateway.PeeringAttachment(\"example\", new()\n {\n PeerAccountId = peerTransitGateway.OwnerId,\n PeerRegion = peer.Apply(getRegionResult =\u003e getRegionResult.Name),\n PeerTransitGatewayId = peerTransitGateway.Id,\n TransitGatewayId = local.Id,\n Tags = \n {\n { \"Name\", \"TGW Peering Requestor\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpeer, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlocal, err := ec2transitgateway.NewTransitGateway(ctx, \"local\", \u0026ec2transitgateway.TransitGatewayArgs{\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Local TGW\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeerTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, \"peer\", \u0026ec2transitgateway.TransitGatewayArgs{\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Peer TGW\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2transitgateway.NewPeeringAttachment(ctx, \"example\", \u0026ec2transitgateway.PeeringAttachmentArgs{\n\t\t\tPeerAccountId: peerTransitGateway.OwnerId,\n\t\t\tPeerRegion: pulumi.String(peer.Name),\n\t\t\tPeerTransitGatewayId: peerTransitGateway.ID(),\n\t\t\tTransitGatewayId: local.ID(),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"TGW Peering Requestor\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2transitgateway.TransitGateway;\nimport com.pulumi.aws.ec2transitgateway.TransitGatewayArgs;\nimport com.pulumi.aws.ec2transitgateway.PeeringAttachment;\nimport com.pulumi.aws.ec2transitgateway.PeeringAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var peer = AwsFunctions.getRegion();\n\n var local = new TransitGateway(\"local\", TransitGatewayArgs.builder()\n .tags(Map.of(\"Name\", \"Local TGW\"))\n .build());\n\n var peerTransitGateway = new TransitGateway(\"peerTransitGateway\", TransitGatewayArgs.builder()\n .tags(Map.of(\"Name\", \"Peer TGW\"))\n .build());\n\n var example = new PeeringAttachment(\"example\", PeeringAttachmentArgs.builder()\n .peerAccountId(peerTransitGateway.ownerId())\n .peerRegion(peer.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .peerTransitGatewayId(peerTransitGateway.id())\n .transitGatewayId(local.id())\n .tags(Map.of(\"Name\", \"TGW Peering Requestor\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n local:\n type: aws:ec2transitgateway:TransitGateway\n properties:\n tags:\n Name: Local TGW\n peerTransitGateway:\n type: aws:ec2transitgateway:TransitGateway\n name: peer\n properties:\n tags:\n Name: Peer TGW\n example:\n type: aws:ec2transitgateway:PeeringAttachment\n properties:\n peerAccountId: ${peerTransitGateway.ownerId}\n peerRegion: ${peer.name}\n peerTransitGatewayId: ${peerTransitGateway.id}\n transitGatewayId: ${local.id}\n tags:\n Name: TGW Peering Requestor\nvariables:\n peer:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_ec2_transit_gateway_peering_attachment` using the EC2 Transit Gateway Attachment identifier. For example:\n\n```sh\n$ pulumi import aws:ec2transitgateway/peeringAttachment:PeeringAttachment example tgw-attach-12345678\n```\n", + "description": "Manages an EC2 Transit Gateway Peering Attachment.\nFor examples of custom route table association and propagation, see the [EC2 Transit Gateway Networking Examples Guide](https://docs.aws.amazon.com/vpc/latest/tgw/TGW_Scenarios.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst peer = aws.getRegion({});\nconst local = new aws.ec2transitgateway.TransitGateway(\"local\", {tags: {\n Name: \"Local TGW\",\n}});\nconst peerTransitGateway = new aws.ec2transitgateway.TransitGateway(\"peer\", {tags: {\n Name: \"Peer TGW\",\n}});\nconst example = new aws.ec2transitgateway.PeeringAttachment(\"example\", {\n peerAccountId: peerTransitGateway.ownerId,\n peerRegion: peer.then(peer =\u003e peer.name),\n peerTransitGatewayId: peerTransitGateway.id,\n transitGatewayId: local.id,\n tags: {\n Name: \"TGW Peering Requestor\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\npeer = aws.get_region()\nlocal = aws.ec2transitgateway.TransitGateway(\"local\", tags={\n \"Name\": \"Local TGW\",\n})\npeer_transit_gateway = aws.ec2transitgateway.TransitGateway(\"peer\", tags={\n \"Name\": \"Peer TGW\",\n})\nexample = aws.ec2transitgateway.PeeringAttachment(\"example\",\n peer_account_id=peer_transit_gateway.owner_id,\n peer_region=peer.name,\n peer_transit_gateway_id=peer_transit_gateway.id,\n transit_gateway_id=local.id,\n tags={\n \"Name\": \"TGW Peering Requestor\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var peer = Aws.GetRegion.Invoke();\n\n var local = new Aws.Ec2TransitGateway.TransitGateway(\"local\", new()\n {\n Tags = \n {\n { \"Name\", \"Local TGW\" },\n },\n });\n\n var peerTransitGateway = new Aws.Ec2TransitGateway.TransitGateway(\"peer\", new()\n {\n Tags = \n {\n { \"Name\", \"Peer TGW\" },\n },\n });\n\n var example = new Aws.Ec2TransitGateway.PeeringAttachment(\"example\", new()\n {\n PeerAccountId = peerTransitGateway.OwnerId,\n PeerRegion = peer.Apply(getRegionResult =\u003e getRegionResult.Name),\n PeerTransitGatewayId = peerTransitGateway.Id,\n TransitGatewayId = local.Id,\n Tags = \n {\n { \"Name\", \"TGW Peering Requestor\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpeer, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlocal, err := ec2transitgateway.NewTransitGateway(ctx, \"local\", \u0026ec2transitgateway.TransitGatewayArgs{\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Local TGW\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tpeerTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, \"peer\", \u0026ec2transitgateway.TransitGatewayArgs{\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"Peer TGW\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2transitgateway.NewPeeringAttachment(ctx, \"example\", \u0026ec2transitgateway.PeeringAttachmentArgs{\n\t\t\tPeerAccountId: peerTransitGateway.OwnerId,\n\t\t\tPeerRegion: pulumi.String(peer.Name),\n\t\t\tPeerTransitGatewayId: peerTransitGateway.ID(),\n\t\t\tTransitGatewayId: local.ID(),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"TGW Peering Requestor\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2transitgateway.TransitGateway;\nimport com.pulumi.aws.ec2transitgateway.TransitGatewayArgs;\nimport com.pulumi.aws.ec2transitgateway.PeeringAttachment;\nimport com.pulumi.aws.ec2transitgateway.PeeringAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var peer = AwsFunctions.getRegion();\n\n var local = new TransitGateway(\"local\", TransitGatewayArgs.builder()\n .tags(Map.of(\"Name\", \"Local TGW\"))\n .build());\n\n var peerTransitGateway = new TransitGateway(\"peerTransitGateway\", TransitGatewayArgs.builder()\n .tags(Map.of(\"Name\", \"Peer TGW\"))\n .build());\n\n var example = new PeeringAttachment(\"example\", PeeringAttachmentArgs.builder()\n .peerAccountId(peerTransitGateway.ownerId())\n .peerRegion(peer.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .peerTransitGatewayId(peerTransitGateway.id())\n .transitGatewayId(local.id())\n .tags(Map.of(\"Name\", \"TGW Peering Requestor\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n local:\n type: aws:ec2transitgateway:TransitGateway\n properties:\n tags:\n Name: Local TGW\n peerTransitGateway:\n type: aws:ec2transitgateway:TransitGateway\n name: peer\n properties:\n tags:\n Name: Peer TGW\n example:\n type: aws:ec2transitgateway:PeeringAttachment\n properties:\n peerAccountId: ${peerTransitGateway.ownerId}\n peerRegion: ${peer.name}\n peerTransitGatewayId: ${peerTransitGateway.id}\n transitGatewayId: ${local.id}\n tags:\n Name: TGW Peering Requestor\nvariables:\n peer:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_ec2_transit_gateway_peering_attachment` using the EC2 Transit Gateway Attachment identifier. For example:\n\n```sh\n$ pulumi import aws:ec2transitgateway/peeringAttachment:PeeringAttachment example tgw-attach-12345678\n```\n", "properties": { "options": { "$ref": "#/types/aws:ec2transitgateway/PeeringAttachmentOptions:PeeringAttachmentOptions", @@ -249027,7 +249027,7 @@ } }, "aws:ecr/registryPolicy:RegistryPolicy": { - "description": "Provides an Elastic Container Registry Policy.\n\n\u003e **NOTE on ECR Registry Policies:** While the AWS Management Console interface may suggest the ability to define multiple policies by creating multiple statements, ECR registry policies are effectively managed as singular entities at the regional level by the AWS APIs. Therefore, the `aws.ecr.RegistryPolicy` resource should be configured only once per region with all necessary statements defined in the same policy. Attempting to define multiple `aws.ecr.RegistryPolicy` resources may result in perpetual differences, with one policy overriding another.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetRegion = aws.getRegion({});\nconst currentGetPartition = aws.getPartition({});\nconst example = new aws.ecr.RegistryPolicy(\"example\", {policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Sid: \"testpolicy\",\n Effect: \"Allow\",\n Principal: {\n AWS: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:root`),\n },\n Action: [\"ecr:ReplicateImage\"],\n Resource: [Promise.all([currentGetPartition, currentGetRegion, current]).then(([currentGetPartition, currentGetRegion, current]) =\u003e `arn:${currentGetPartition.partition}:ecr:${currentGetRegion.name}:${current.accountId}:repository/*`)],\n }],\n})});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_region = aws.get_region()\ncurrent_get_partition = aws.get_partition()\nexample = aws.ecr.RegistryPolicy(\"example\", policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Sid\": \"testpolicy\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:root\",\n },\n \"Action\": [\"ecr:ReplicateImage\"],\n \"Resource\": [f\"arn:{current_get_partition.partition}:ecr:{current_get_region.name}:{current.account_id}:repository/*\"],\n }],\n}))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var example = new Aws.Ecr.RegistryPolicy(\"example\", new()\n {\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"testpolicy\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = Output.Tuple(currentGetPartition, current).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var current = values.Item2;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\";\n }),\n },\n [\"Action\"] = new[]\n {\n \"ecr:ReplicateImage\",\n },\n [\"Resource\"] = new[]\n {\n Output.Tuple(currentGetPartition, currentGetRegion, current).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var currentGetRegion = values.Item2;\n var current = values.Item3;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:ecr:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:repository/*\";\n }),\n },\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"testpolicy\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:%v:iam::%v:root\", currentGetPartition.Partition, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ecr:ReplicateImage\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:%v:ecr:%v:%v:repository/*\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = ecr.NewRegistryPolicy(ctx, \"example\", \u0026ecr.RegistryPolicyArgs{\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.ecr.RegistryPolicy;\nimport com.pulumi.aws.ecr.RegistryPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n var example = new RegistryPolicy(\"example\", RegistryPolicyArgs.builder()\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"testpolicy\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:%s:iam::%s:root\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\"ecr:ReplicateImage\")),\n jsonProperty(\"Resource\", jsonArray(String.format(\"arn:%s:ecr:%s:%s:repository/*\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))))\n )))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ecr:RegistryPolicy\n properties:\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Sid: testpolicy\n Effect: Allow\n Principal:\n AWS: arn:${currentGetPartition.partition}:iam::${current.accountId}:root\n Action:\n - ecr:ReplicateImage\n Resource:\n - arn:${currentGetPartition.partition}:ecr:${currentGetRegion.name}:${current.accountId}:repository/*\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECR Registry Policy using the registry id. For example:\n\n```sh\n$ pulumi import aws:ecr/registryPolicy:RegistryPolicy example 123456789012\n```\n", + "description": "Provides an Elastic Container Registry Policy.\n\n\u003e **NOTE on ECR Registry Policies:** While the AWS Management Console interface may suggest the ability to define multiple policies by creating multiple statements, ECR registry policies are effectively managed as singular entities at the regional level by the AWS APIs. Therefore, the `aws.ecr.RegistryPolicy` resource should be configured only once per region with all necessary statements defined in the same policy. Attempting to define multiple `aws.ecr.RegistryPolicy` resources may result in perpetual differences, with one policy overriding another.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetRegion = aws.getRegion({});\nconst currentGetPartition = aws.getPartition({});\nconst example = new aws.ecr.RegistryPolicy(\"example\", {policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Sid: \"testpolicy\",\n Effect: \"Allow\",\n Principal: {\n AWS: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:root`),\n },\n Action: [\"ecr:ReplicateImage\"],\n Resource: [Promise.all([currentGetPartition, currentGetRegion, current]).then(([currentGetPartition, currentGetRegion, current]) =\u003e `arn:${currentGetPartition.partition}:ecr:${currentGetRegion.name}:${current.accountId}:repository/*`)],\n }],\n})});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_region = aws.get_region()\ncurrent_get_partition = aws.get_partition()\nexample = aws.ecr.RegistryPolicy(\"example\", policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Sid\": \"testpolicy\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:root\",\n },\n \"Action\": [\"ecr:ReplicateImage\"],\n \"Resource\": [f\"arn:{current_get_partition.partition}:ecr:{current_get_region.name}:{current.account_id}:repository/*\"],\n }],\n}))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var example = new Aws.Ecr.RegistryPolicy(\"example\", new()\n {\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"testpolicy\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = Output.Tuple(currentGetPartition, current).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var current = values.Item2;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\";\n }),\n },\n [\"Action\"] = new[]\n {\n \"ecr:ReplicateImage\",\n },\n [\"Resource\"] = new[]\n {\n Output.Tuple(currentGetPartition, currentGetRegion, current).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var currentGetRegion = values.Item2;\n var current = values.Item3;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:ecr:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:repository/*\";\n }),\n },\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"testpolicy\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:%v:iam::%v:root\", currentGetPartition.Partition, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ecr:ReplicateImage\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:%v:ecr:%v:%v:repository/*\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = ecr.NewRegistryPolicy(ctx, \"example\", \u0026ecr.RegistryPolicyArgs{\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.ecr.RegistryPolicy;\nimport com.pulumi.aws.ecr.RegistryPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n var example = new RegistryPolicy(\"example\", RegistryPolicyArgs.builder()\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"testpolicy\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:%s:iam::%s:root\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\"ecr:ReplicateImage\")),\n jsonProperty(\"Resource\", jsonArray(String.format(\"arn:%s:ecr:%s:%s:repository/*\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))))\n )))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ecr:RegistryPolicy\n properties:\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Sid: testpolicy\n Effect: Allow\n Principal:\n AWS: arn:${currentGetPartition.partition}:iam::${current.accountId}:root\n Action:\n - ecr:ReplicateImage\n Resource:\n - arn:${currentGetPartition.partition}:ecr:${currentGetRegion.name}:${current.accountId}:repository/*\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECR Registry Policy using the registry id. For example:\n\n```sh\n$ pulumi import aws:ecr/registryPolicy:RegistryPolicy example 123456789012\n```\n", "properties": { "policy": { "type": "string", @@ -249146,7 +249146,7 @@ } }, "aws:ecr/replicationConfiguration:ReplicationConfiguration": { - "description": "Provides an Elastic Container Registry Replication Configuration.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = aws.getRegions({});\nconst exampleReplicationConfiguration = new aws.ecr.ReplicationConfiguration(\"example\", {replicationConfiguration: {\n rules: [{\n destinations: [{\n region: example.then(example =\u003e example.names?.[0]),\n registryId: current.then(current =\u003e current.accountId),\n }],\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.get_regions()\nexample_replication_configuration = aws.ecr.ReplicationConfiguration(\"example\", replication_configuration={\n \"rules\": [{\n \"destinations\": [{\n \"region\": example.names[0],\n \"registry_id\": current.account_id,\n }],\n }],\n})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.GetRegions.Invoke();\n\n var exampleReplicationConfiguration = new Aws.Ecr.ReplicationConfiguration(\"example\", new()\n {\n ReplicationConfigurationDetails = new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationArgs\n {\n Rules = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleArgs\n {\n Destinations = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs\n {\n Region = example.Apply(getRegionsResult =\u003e getRegionsResult.Names[0]),\n RegistryId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := aws.GetRegions(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecr.NewReplicationConfiguration(ctx, \"example\", \u0026ecr.ReplicationConfigurationArgs{\n\t\t\tReplicationConfiguration: \u0026ecr.ReplicationConfigurationReplicationConfigurationArgs{\n\t\t\t\tRules: ecr.ReplicationConfigurationReplicationConfigurationRuleArray{\n\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleArgs{\n\t\t\t\t\t\tDestinations: ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArray{\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs{\n\t\t\t\t\t\t\t\tRegion: pulumi.String(example.Names[0]),\n\t\t\t\t\t\t\t\tRegistryId: pulumi.String(current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport com.pulumi.aws.ecr.ReplicationConfiguration;\nimport com.pulumi.aws.ecr.ReplicationConfigurationArgs;\nimport com.pulumi.aws.ecr.inputs.ReplicationConfigurationReplicationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = AwsFunctions.getRegions();\n\n var exampleReplicationConfiguration = new ReplicationConfiguration(\"exampleReplicationConfiguration\", ReplicationConfigurationArgs.builder()\n .replicationConfiguration(ReplicationConfigurationReplicationConfigurationArgs.builder()\n .rules(ReplicationConfigurationReplicationConfigurationRuleArgs.builder()\n .destinations(ReplicationConfigurationReplicationConfigurationRuleDestinationArgs.builder()\n .region(example.applyValue(getRegionsResult -\u003e getRegionsResult.names()[0]))\n .registryId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleReplicationConfiguration:\n type: aws:ecr:ReplicationConfiguration\n name: example\n properties:\n replicationConfiguration:\n rules:\n - destinations:\n - region: ${example.names[0]}\n registryId: ${current.accountId}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:getRegions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Multiple Region Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = aws.getRegions({});\nconst exampleReplicationConfiguration = new aws.ecr.ReplicationConfiguration(\"example\", {replicationConfiguration: {\n rules: [{\n destinations: [\n {\n region: example.then(example =\u003e example.names?.[0]),\n registryId: current.then(current =\u003e current.accountId),\n },\n {\n region: example.then(example =\u003e example.names?.[1]),\n registryId: current.then(current =\u003e current.accountId),\n },\n ],\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.get_regions()\nexample_replication_configuration = aws.ecr.ReplicationConfiguration(\"example\", replication_configuration={\n \"rules\": [{\n \"destinations\": [\n {\n \"region\": example.names[0],\n \"registry_id\": current.account_id,\n },\n {\n \"region\": example.names[1],\n \"registry_id\": current.account_id,\n },\n ],\n }],\n})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.GetRegions.Invoke();\n\n var exampleReplicationConfiguration = new Aws.Ecr.ReplicationConfiguration(\"example\", new()\n {\n ReplicationConfigurationDetails = new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationArgs\n {\n Rules = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleArgs\n {\n Destinations = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs\n {\n Region = example.Apply(getRegionsResult =\u003e getRegionsResult.Names[0]),\n RegistryId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs\n {\n Region = example.Apply(getRegionsResult =\u003e getRegionsResult.Names[1]),\n RegistryId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := aws.GetRegions(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecr.NewReplicationConfiguration(ctx, \"example\", \u0026ecr.ReplicationConfigurationArgs{\n\t\t\tReplicationConfiguration: \u0026ecr.ReplicationConfigurationReplicationConfigurationArgs{\n\t\t\t\tRules: ecr.ReplicationConfigurationReplicationConfigurationRuleArray{\n\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleArgs{\n\t\t\t\t\t\tDestinations: ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArray{\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs{\n\t\t\t\t\t\t\t\tRegion: pulumi.String(example.Names[0]),\n\t\t\t\t\t\t\t\tRegistryId: pulumi.String(current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs{\n\t\t\t\t\t\t\t\tRegion: pulumi.String(example.Names[1]),\n\t\t\t\t\t\t\t\tRegistryId: pulumi.String(current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport com.pulumi.aws.ecr.ReplicationConfiguration;\nimport com.pulumi.aws.ecr.ReplicationConfigurationArgs;\nimport com.pulumi.aws.ecr.inputs.ReplicationConfigurationReplicationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = AwsFunctions.getRegions();\n\n var exampleReplicationConfiguration = new ReplicationConfiguration(\"exampleReplicationConfiguration\", ReplicationConfigurationArgs.builder()\n .replicationConfiguration(ReplicationConfigurationReplicationConfigurationArgs.builder()\n .rules(ReplicationConfigurationReplicationConfigurationRuleArgs.builder()\n .destinations( \n ReplicationConfigurationReplicationConfigurationRuleDestinationArgs.builder()\n .region(example.applyValue(getRegionsResult -\u003e getRegionsResult.names()[0]))\n .registryId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build(),\n ReplicationConfigurationReplicationConfigurationRuleDestinationArgs.builder()\n .region(example.applyValue(getRegionsResult -\u003e getRegionsResult.names()[1]))\n .registryId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleReplicationConfiguration:\n type: aws:ecr:ReplicationConfiguration\n name: example\n properties:\n replicationConfiguration:\n rules:\n - destinations:\n - region: ${example.names[0]}\n registryId: ${current.accountId}\n - region: ${example.names[1]}\n registryId: ${current.accountId}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:getRegions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Repository Filter Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = aws.getRegions({});\nconst exampleReplicationConfiguration = new aws.ecr.ReplicationConfiguration(\"example\", {replicationConfiguration: {\n rules: [{\n destinations: [{\n region: example.then(example =\u003e example.names?.[0]),\n registryId: current.then(current =\u003e current.accountId),\n }],\n repositoryFilters: [{\n filter: \"prod-microservice\",\n filterType: \"PREFIX_MATCH\",\n }],\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.get_regions()\nexample_replication_configuration = aws.ecr.ReplicationConfiguration(\"example\", replication_configuration={\n \"rules\": [{\n \"destinations\": [{\n \"region\": example.names[0],\n \"registry_id\": current.account_id,\n }],\n \"repository_filters\": [{\n \"filter\": \"prod-microservice\",\n \"filter_type\": \"PREFIX_MATCH\",\n }],\n }],\n})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.GetRegions.Invoke();\n\n var exampleReplicationConfiguration = new Aws.Ecr.ReplicationConfiguration(\"example\", new()\n {\n ReplicationConfigurationDetails = new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationArgs\n {\n Rules = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleArgs\n {\n Destinations = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs\n {\n Region = example.Apply(getRegionsResult =\u003e getRegionsResult.Names[0]),\n RegistryId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n RepositoryFilters = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleRepositoryFilterArgs\n {\n Filter = \"prod-microservice\",\n FilterType = \"PREFIX_MATCH\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := aws.GetRegions(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecr.NewReplicationConfiguration(ctx, \"example\", \u0026ecr.ReplicationConfigurationArgs{\n\t\t\tReplicationConfiguration: \u0026ecr.ReplicationConfigurationReplicationConfigurationArgs{\n\t\t\t\tRules: ecr.ReplicationConfigurationReplicationConfigurationRuleArray{\n\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleArgs{\n\t\t\t\t\t\tDestinations: ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArray{\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs{\n\t\t\t\t\t\t\t\tRegion: pulumi.String(example.Names[0]),\n\t\t\t\t\t\t\t\tRegistryId: pulumi.String(current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tRepositoryFilters: ecr.ReplicationConfigurationReplicationConfigurationRuleRepositoryFilterArray{\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleRepositoryFilterArgs{\n\t\t\t\t\t\t\t\tFilter: pulumi.String(\"prod-microservice\"),\n\t\t\t\t\t\t\t\tFilterType: pulumi.String(\"PREFIX_MATCH\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport com.pulumi.aws.ecr.ReplicationConfiguration;\nimport com.pulumi.aws.ecr.ReplicationConfigurationArgs;\nimport com.pulumi.aws.ecr.inputs.ReplicationConfigurationReplicationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = AwsFunctions.getRegions();\n\n var exampleReplicationConfiguration = new ReplicationConfiguration(\"exampleReplicationConfiguration\", ReplicationConfigurationArgs.builder()\n .replicationConfiguration(ReplicationConfigurationReplicationConfigurationArgs.builder()\n .rules(ReplicationConfigurationReplicationConfigurationRuleArgs.builder()\n .destinations(ReplicationConfigurationReplicationConfigurationRuleDestinationArgs.builder()\n .region(example.applyValue(getRegionsResult -\u003e getRegionsResult.names()[0]))\n .registryId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .repositoryFilters(ReplicationConfigurationReplicationConfigurationRuleRepositoryFilterArgs.builder()\n .filter(\"prod-microservice\")\n .filterType(\"PREFIX_MATCH\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleReplicationConfiguration:\n type: aws:ecr:ReplicationConfiguration\n name: example\n properties:\n replicationConfiguration:\n rules:\n - destinations:\n - region: ${example.names[0]}\n registryId: ${current.accountId}\n repositoryFilters:\n - filter: prod-microservice\n filterType: PREFIX_MATCH\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:getRegions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECR Replication Configuration using the `registry_id`. For example:\n\n```sh\n$ pulumi import aws:ecr/replicationConfiguration:ReplicationConfiguration service 012345678912\n```\n", + "description": "Provides an Elastic Container Registry Replication Configuration.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = aws.getRegions({});\nconst exampleReplicationConfiguration = new aws.ecr.ReplicationConfiguration(\"example\", {replicationConfiguration: {\n rules: [{\n destinations: [{\n region: example.then(example =\u003e example.names?.[0]),\n registryId: current.then(current =\u003e current.accountId),\n }],\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.get_regions()\nexample_replication_configuration = aws.ecr.ReplicationConfiguration(\"example\", replication_configuration={\n \"rules\": [{\n \"destinations\": [{\n \"region\": example.names[0],\n \"registry_id\": current.account_id,\n }],\n }],\n})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.GetRegions.Invoke();\n\n var exampleReplicationConfiguration = new Aws.Ecr.ReplicationConfiguration(\"example\", new()\n {\n ReplicationConfigurationDetails = new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationArgs\n {\n Rules = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleArgs\n {\n Destinations = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs\n {\n Region = example.Apply(getRegionsResult =\u003e getRegionsResult.Names[0]),\n RegistryId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := aws.GetRegions(ctx, \u0026aws.GetRegionsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecr.NewReplicationConfiguration(ctx, \"example\", \u0026ecr.ReplicationConfigurationArgs{\n\t\t\tReplicationConfiguration: \u0026ecr.ReplicationConfigurationReplicationConfigurationArgs{\n\t\t\t\tRules: ecr.ReplicationConfigurationReplicationConfigurationRuleArray{\n\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleArgs{\n\t\t\t\t\t\tDestinations: ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArray{\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs{\n\t\t\t\t\t\t\t\tRegion: pulumi.String(example.Names[0]),\n\t\t\t\t\t\t\t\tRegistryId: pulumi.String(current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport com.pulumi.aws.ecr.ReplicationConfiguration;\nimport com.pulumi.aws.ecr.ReplicationConfigurationArgs;\nimport com.pulumi.aws.ecr.inputs.ReplicationConfigurationReplicationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = AwsFunctions.getRegions();\n\n var exampleReplicationConfiguration = new ReplicationConfiguration(\"exampleReplicationConfiguration\", ReplicationConfigurationArgs.builder()\n .replicationConfiguration(ReplicationConfigurationReplicationConfigurationArgs.builder()\n .rules(ReplicationConfigurationReplicationConfigurationRuleArgs.builder()\n .destinations(ReplicationConfigurationReplicationConfigurationRuleDestinationArgs.builder()\n .region(example.applyValue(getRegionsResult -\u003e getRegionsResult.names()[0]))\n .registryId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleReplicationConfiguration:\n type: aws:ecr:ReplicationConfiguration\n name: example\n properties:\n replicationConfiguration:\n rules:\n - destinations:\n - region: ${example.names[0]}\n registryId: ${current.accountId}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:getRegions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Multiple Region Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = aws.getRegions({});\nconst exampleReplicationConfiguration = new aws.ecr.ReplicationConfiguration(\"example\", {replicationConfiguration: {\n rules: [{\n destinations: [\n {\n region: example.then(example =\u003e example.names?.[0]),\n registryId: current.then(current =\u003e current.accountId),\n },\n {\n region: example.then(example =\u003e example.names?.[1]),\n registryId: current.then(current =\u003e current.accountId),\n },\n ],\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.get_regions()\nexample_replication_configuration = aws.ecr.ReplicationConfiguration(\"example\", replication_configuration={\n \"rules\": [{\n \"destinations\": [\n {\n \"region\": example.names[0],\n \"registry_id\": current.account_id,\n },\n {\n \"region\": example.names[1],\n \"registry_id\": current.account_id,\n },\n ],\n }],\n})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.GetRegions.Invoke();\n\n var exampleReplicationConfiguration = new Aws.Ecr.ReplicationConfiguration(\"example\", new()\n {\n ReplicationConfigurationDetails = new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationArgs\n {\n Rules = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleArgs\n {\n Destinations = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs\n {\n Region = example.Apply(getRegionsResult =\u003e getRegionsResult.Names[0]),\n RegistryId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs\n {\n Region = example.Apply(getRegionsResult =\u003e getRegionsResult.Names[1]),\n RegistryId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := aws.GetRegions(ctx, \u0026aws.GetRegionsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecr.NewReplicationConfiguration(ctx, \"example\", \u0026ecr.ReplicationConfigurationArgs{\n\t\t\tReplicationConfiguration: \u0026ecr.ReplicationConfigurationReplicationConfigurationArgs{\n\t\t\t\tRules: ecr.ReplicationConfigurationReplicationConfigurationRuleArray{\n\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleArgs{\n\t\t\t\t\t\tDestinations: ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArray{\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs{\n\t\t\t\t\t\t\t\tRegion: pulumi.String(example.Names[0]),\n\t\t\t\t\t\t\t\tRegistryId: pulumi.String(current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs{\n\t\t\t\t\t\t\t\tRegion: pulumi.String(example.Names[1]),\n\t\t\t\t\t\t\t\tRegistryId: pulumi.String(current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport com.pulumi.aws.ecr.ReplicationConfiguration;\nimport com.pulumi.aws.ecr.ReplicationConfigurationArgs;\nimport com.pulumi.aws.ecr.inputs.ReplicationConfigurationReplicationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = AwsFunctions.getRegions();\n\n var exampleReplicationConfiguration = new ReplicationConfiguration(\"exampleReplicationConfiguration\", ReplicationConfigurationArgs.builder()\n .replicationConfiguration(ReplicationConfigurationReplicationConfigurationArgs.builder()\n .rules(ReplicationConfigurationReplicationConfigurationRuleArgs.builder()\n .destinations( \n ReplicationConfigurationReplicationConfigurationRuleDestinationArgs.builder()\n .region(example.applyValue(getRegionsResult -\u003e getRegionsResult.names()[0]))\n .registryId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build(),\n ReplicationConfigurationReplicationConfigurationRuleDestinationArgs.builder()\n .region(example.applyValue(getRegionsResult -\u003e getRegionsResult.names()[1]))\n .registryId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleReplicationConfiguration:\n type: aws:ecr:ReplicationConfiguration\n name: example\n properties:\n replicationConfiguration:\n rules:\n - destinations:\n - region: ${example.names[0]}\n registryId: ${current.accountId}\n - region: ${example.names[1]}\n registryId: ${current.accountId}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:getRegions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Repository Filter Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = aws.getRegions({});\nconst exampleReplicationConfiguration = new aws.ecr.ReplicationConfiguration(\"example\", {replicationConfiguration: {\n rules: [{\n destinations: [{\n region: example.then(example =\u003e example.names?.[0]),\n registryId: current.then(current =\u003e current.accountId),\n }],\n repositoryFilters: [{\n filter: \"prod-microservice\",\n filterType: \"PREFIX_MATCH\",\n }],\n }],\n}});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.get_regions()\nexample_replication_configuration = aws.ecr.ReplicationConfiguration(\"example\", replication_configuration={\n \"rules\": [{\n \"destinations\": [{\n \"region\": example.names[0],\n \"registry_id\": current.account_id,\n }],\n \"repository_filters\": [{\n \"filter\": \"prod-microservice\",\n \"filter_type\": \"PREFIX_MATCH\",\n }],\n }],\n})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.GetRegions.Invoke();\n\n var exampleReplicationConfiguration = new Aws.Ecr.ReplicationConfiguration(\"example\", new()\n {\n ReplicationConfigurationDetails = new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationArgs\n {\n Rules = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleArgs\n {\n Destinations = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs\n {\n Region = example.Apply(getRegionsResult =\u003e getRegionsResult.Names[0]),\n RegistryId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n RepositoryFilters = new[]\n {\n new Aws.Ecr.Inputs.ReplicationConfigurationReplicationConfigurationRuleRepositoryFilterArgs\n {\n Filter = \"prod-microservice\",\n FilterType = \"PREFIX_MATCH\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := aws.GetRegions(ctx, \u0026aws.GetRegionsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecr.NewReplicationConfiguration(ctx, \"example\", \u0026ecr.ReplicationConfigurationArgs{\n\t\t\tReplicationConfiguration: \u0026ecr.ReplicationConfigurationReplicationConfigurationArgs{\n\t\t\t\tRules: ecr.ReplicationConfigurationReplicationConfigurationRuleArray{\n\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleArgs{\n\t\t\t\t\t\tDestinations: ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArray{\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleDestinationArgs{\n\t\t\t\t\t\t\t\tRegion: pulumi.String(example.Names[0]),\n\t\t\t\t\t\t\t\tRegistryId: pulumi.String(current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tRepositoryFilters: ecr.ReplicationConfigurationReplicationConfigurationRuleRepositoryFilterArray{\n\t\t\t\t\t\t\t\u0026ecr.ReplicationConfigurationReplicationConfigurationRuleRepositoryFilterArgs{\n\t\t\t\t\t\t\t\tFilter: pulumi.String(\"prod-microservice\"),\n\t\t\t\t\t\t\t\tFilterType: pulumi.String(\"PREFIX_MATCH\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport com.pulumi.aws.ecr.ReplicationConfiguration;\nimport com.pulumi.aws.ecr.ReplicationConfigurationArgs;\nimport com.pulumi.aws.ecr.inputs.ReplicationConfigurationReplicationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = AwsFunctions.getRegions();\n\n var exampleReplicationConfiguration = new ReplicationConfiguration(\"exampleReplicationConfiguration\", ReplicationConfigurationArgs.builder()\n .replicationConfiguration(ReplicationConfigurationReplicationConfigurationArgs.builder()\n .rules(ReplicationConfigurationReplicationConfigurationRuleArgs.builder()\n .destinations(ReplicationConfigurationReplicationConfigurationRuleDestinationArgs.builder()\n .region(example.applyValue(getRegionsResult -\u003e getRegionsResult.names()[0]))\n .registryId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build())\n .repositoryFilters(ReplicationConfigurationReplicationConfigurationRuleRepositoryFilterArgs.builder()\n .filter(\"prod-microservice\")\n .filterType(\"PREFIX_MATCH\")\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleReplicationConfiguration:\n type: aws:ecr:ReplicationConfiguration\n name: example\n properties:\n replicationConfiguration:\n rules:\n - destinations:\n - region: ${example.names[0]}\n registryId: ${current.accountId}\n repositoryFilters:\n - filter: prod-microservice\n filterType: PREFIX_MATCH\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:getRegions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECR Replication Configuration using the `registry_id`. For example:\n\n```sh\n$ pulumi import aws:ecr/replicationConfiguration:ReplicationConfiguration service 012345678912\n```\n", "properties": { "registryId": { "type": "string", @@ -249912,7 +249912,7 @@ } }, "aws:ecs/cluster:Cluster": { - "description": "Provides an ECS cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst foo = new aws.ecs.Cluster(\"foo\", {\n name: \"white-hart\",\n settings: [{\n name: \"containerInsights\",\n value: \"enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ecs.Cluster(\"foo\",\n name=\"white-hart\",\n settings=[{\n \"name\": \"containerInsights\",\n \"value\": \"enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foo = new Aws.Ecs.Cluster(\"foo\", new()\n {\n Name = \"white-hart\",\n Settings = new[]\n {\n new Aws.Ecs.Inputs.ClusterSettingArgs\n {\n Name = \"containerInsights\",\n Value = \"enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecs.NewCluster(ctx, \"foo\", \u0026ecs.ClusterArgs{\n\t\t\tName: pulumi.String(\"white-hart\"),\n\t\t\tSettings: ecs.ClusterSettingArray{\n\t\t\t\t\u0026ecs.ClusterSettingArgs{\n\t\t\t\t\tName: pulumi.String(\"containerInsights\"),\n\t\t\t\t\tValue: pulumi.String(\"enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecs.Cluster;\nimport com.pulumi.aws.ecs.ClusterArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterSettingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foo = new Cluster(\"foo\", ClusterArgs.builder()\n .name(\"white-hart\")\n .settings(ClusterSettingArgs.builder()\n .name(\"containerInsights\")\n .value(\"enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ecs:Cluster\n properties:\n name: white-hart\n settings:\n - name: containerInsights\n value: enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Execute Command Configuration with Override Logging\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kms.Key(\"example\", {\n description: \"example\",\n deletionWindowInDays: 7,\n});\nconst exampleLogGroup = new aws.cloudwatch.LogGroup(\"example\", {name: \"example\"});\nconst test = new aws.ecs.Cluster(\"test\", {\n name: \"example\",\n configuration: {\n executeCommandConfiguration: {\n kmsKeyId: example.arn,\n logging: \"OVERRIDE\",\n logConfiguration: {\n cloudWatchEncryptionEnabled: true,\n cloudWatchLogGroupName: exampleLogGroup.name,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kms.Key(\"example\",\n description=\"example\",\n deletion_window_in_days=7)\nexample_log_group = aws.cloudwatch.LogGroup(\"example\", name=\"example\")\ntest = aws.ecs.Cluster(\"test\",\n name=\"example\",\n configuration={\n \"execute_command_configuration\": {\n \"kms_key_id\": example.arn,\n \"logging\": \"OVERRIDE\",\n \"log_configuration\": {\n \"cloud_watch_encryption_enabled\": True,\n \"cloud_watch_log_group_name\": example_log_group.name,\n },\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"example\",\n DeletionWindowInDays = 7,\n });\n\n var exampleLogGroup = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example\",\n });\n\n var test = new Aws.Ecs.Cluster(\"test\", new()\n {\n Name = \"example\",\n Configuration = new Aws.Ecs.Inputs.ClusterConfigurationArgs\n {\n ExecuteCommandConfiguration = new Aws.Ecs.Inputs.ClusterConfigurationExecuteCommandConfigurationArgs\n {\n KmsKeyId = example.Arn,\n Logging = \"OVERRIDE\",\n LogConfiguration = new Aws.Ecs.Inputs.ClusterConfigurationExecuteCommandConfigurationLogConfigurationArgs\n {\n CloudWatchEncryptionEnabled = true,\n CloudWatchLogGroupName = exampleLogGroup.Name,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleLogGroup, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewCluster(ctx, \"test\", \u0026ecs.ClusterArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tConfiguration: \u0026ecs.ClusterConfigurationArgs{\n\t\t\t\tExecuteCommandConfiguration: \u0026ecs.ClusterConfigurationExecuteCommandConfigurationArgs{\n\t\t\t\t\tKmsKeyId: example.Arn,\n\t\t\t\t\tLogging: pulumi.String(\"OVERRIDE\"),\n\t\t\t\t\tLogConfiguration: \u0026ecs.ClusterConfigurationExecuteCommandConfigurationLogConfigurationArgs{\n\t\t\t\t\t\tCloudWatchEncryptionEnabled: pulumi.Bool(true),\n\t\t\t\t\t\tCloudWatchLogGroupName: exampleLogGroup.Name,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.ecs.Cluster;\nimport com.pulumi.aws.ecs.ClusterArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationExecuteCommandConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationExecuteCommandConfigurationLogConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"example\")\n .deletionWindowInDays(7)\n .build());\n\n var exampleLogGroup = new LogGroup(\"exampleLogGroup\", LogGroupArgs.builder()\n .name(\"example\")\n .build());\n\n var test = new Cluster(\"test\", ClusterArgs.builder()\n .name(\"example\")\n .configuration(ClusterConfigurationArgs.builder()\n .executeCommandConfiguration(ClusterConfigurationExecuteCommandConfigurationArgs.builder()\n .kmsKeyId(example.arn())\n .logging(\"OVERRIDE\")\n .logConfiguration(ClusterConfigurationExecuteCommandConfigurationLogConfigurationArgs.builder()\n .cloudWatchEncryptionEnabled(true)\n .cloudWatchLogGroupName(exampleLogGroup.name())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: example\n deletionWindowInDays: 7\n exampleLogGroup:\n type: aws:cloudwatch:LogGroup\n name: example\n properties:\n name: example\n test:\n type: aws:ecs:Cluster\n properties:\n name: example\n configuration:\n executeCommandConfiguration:\n kmsKeyId: ${example.arn}\n logging: OVERRIDE\n logConfiguration:\n cloudWatchEncryptionEnabled: true\n cloudWatchLogGroupName: ${exampleLogGroup.name}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Fargate Ephemeral Storage Encryption with Customer-Managed KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"example\",\n deletionWindowInDays: 7,\n});\nconst exampleKeyPolicy = new aws.kms.KeyPolicy(\"example\", {\n keyId: example.id,\n policy: JSON.stringify({\n Id: \"ECSClusterFargatePolicy\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: \"*\",\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow generate data key access for Fargate tasks.\",\n Effect: \"Allow\",\n Principal: {\n Service: \"fargate.amazonaws.com\",\n },\n Action: [\"kms:GenerateDataKeyWithoutPlaintext\"],\n Condition: {\n StringEquals: {\n \"kms:EncryptionContext:aws:ecs:clusterAccount\": [current.then(current =\u003e current.accountId)],\n \"kms:EncryptionContext:aws:ecs:clusterName\": [\"example\"],\n },\n },\n Resource: \"*\",\n },\n {\n Sid: \"Allow grant creation permission for Fargate tasks.\",\n Effect: \"Allow\",\n Principal: {\n Service: \"fargate.amazonaws.com\",\n },\n Action: [\"kms:CreateGrant\"],\n Condition: {\n StringEquals: {\n \"kms:EncryptionContext:aws:ecs:clusterAccount\": [current.then(current =\u003e current.accountId)],\n \"kms:EncryptionContext:aws:ecs:clusterName\": [\"example\"],\n },\n \"ForAllValues:StringEquals\": {\n \"kms:GrantOperations\": [\"Decrypt\"],\n },\n },\n Resource: \"*\",\n },\n ],\n Version: \"2012-10-17\",\n }),\n});\nconst test = new aws.ecs.Cluster(\"test\", {\n name: \"example\",\n configuration: {\n managedStorageConfiguration: {\n fargateEphemeralStorageKmsKeyId: example.id,\n },\n },\n}, {\n dependsOn: [exampleKeyPolicy],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"example\",\n deletion_window_in_days=7)\nexample_key_policy = aws.kms.KeyPolicy(\"example\",\n key_id=example.id,\n policy=json.dumps({\n \"Id\": \"ECSClusterFargatePolicy\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"*\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow generate data key access for Fargate tasks.\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"fargate.amazonaws.com\",\n },\n \"Action\": [\"kms:GenerateDataKeyWithoutPlaintext\"],\n \"Condition\": {\n \"StringEquals\": {\n \"kms:EncryptionContext:aws:ecs:clusterAccount\": [current.account_id],\n \"kms:EncryptionContext:aws:ecs:clusterName\": [\"example\"],\n },\n },\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow grant creation permission for Fargate tasks.\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"fargate.amazonaws.com\",\n },\n \"Action\": [\"kms:CreateGrant\"],\n \"Condition\": {\n \"StringEquals\": {\n \"kms:EncryptionContext:aws:ecs:clusterAccount\": [current.account_id],\n \"kms:EncryptionContext:aws:ecs:clusterName\": [\"example\"],\n },\n \"ForAllValues:StringEquals\": {\n \"kms:GrantOperations\": [\"Decrypt\"],\n },\n },\n \"Resource\": \"*\",\n },\n ],\n \"Version\": \"2012-10-17\",\n }))\ntest = aws.ecs.Cluster(\"test\",\n name=\"example\",\n configuration={\n \"managed_storage_configuration\": {\n \"fargate_ephemeral_storage_kms_key_id\": example.id,\n },\n },\n opts = pulumi.ResourceOptions(depends_on=[example_key_policy]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"example\",\n DeletionWindowInDays = 7,\n });\n\n var exampleKeyPolicy = new Aws.Kms.KeyPolicy(\"example\", new()\n {\n KeyId = example.Id,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Id\"] = \"ECSClusterFargatePolicy\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = \"*\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow generate data key access for Fargate tasks.\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"fargate.amazonaws.com\",\n },\n [\"Action\"] = new[]\n {\n \"kms:GenerateDataKeyWithoutPlaintext\",\n },\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:EncryptionContext:aws:ecs:clusterAccount\"] = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"kms:EncryptionContext:aws:ecs:clusterName\"] = new[]\n {\n \"example\",\n },\n },\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow grant creation permission for Fargate tasks.\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"fargate.amazonaws.com\",\n },\n [\"Action\"] = new[]\n {\n \"kms:CreateGrant\",\n },\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:EncryptionContext:aws:ecs:clusterAccount\"] = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"kms:EncryptionContext:aws:ecs:clusterName\"] = new[]\n {\n \"example\",\n },\n },\n [\"ForAllValues:StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:GrantOperations\"] = new[]\n {\n \"Decrypt\",\n },\n },\n },\n [\"Resource\"] = \"*\",\n },\n },\n [\"Version\"] = \"2012-10-17\",\n }),\n });\n\n var test = new Aws.Ecs.Cluster(\"test\", new()\n {\n Name = \"example\",\n Configuration = new Aws.Ecs.Inputs.ClusterConfigurationArgs\n {\n ManagedStorageConfiguration = new Aws.Ecs.Inputs.ClusterConfigurationManagedStorageConfigurationArgs\n {\n FargateEphemeralStorageKmsKeyId = example.Id,\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleKeyPolicy,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Id\": \"ECSClusterFargatePolicy\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": \"*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow generate data key access for Fargate tasks.\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"fargate.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:GenerateDataKeyWithoutPlaintext\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:EncryptionContext:aws:ecs:clusterAccount\": []*string{\n\t\t\t\t\t\t\t\tcurrent.AccountId,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kms:EncryptionContext:aws:ecs:clusterName\": []string{\n\t\t\t\t\t\t\t\t\"example\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow grant creation permission for Fargate tasks.\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"fargate.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:CreateGrant\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:EncryptionContext:aws:ecs:clusterAccount\": []*string{\n\t\t\t\t\t\t\t\tcurrent.AccountId,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kms:EncryptionContext:aws:ecs:clusterName\": []string{\n\t\t\t\t\t\t\t\t\"example\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"ForAllValues:StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:GrantOperations\": []string{\n\t\t\t\t\t\t\t\t\"Decrypt\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texampleKeyPolicy, err := kms.NewKeyPolicy(ctx, \"example\", \u0026kms.KeyPolicyArgs{\n\t\t\tKeyId: example.ID(),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewCluster(ctx, \"test\", \u0026ecs.ClusterArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tConfiguration: \u0026ecs.ClusterConfigurationArgs{\n\t\t\t\tManagedStorageConfiguration: \u0026ecs.ClusterConfigurationManagedStorageConfigurationArgs{\n\t\t\t\t\tFargateEphemeralStorageKmsKeyId: example.ID(),\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleKeyPolicy,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.kms.KeyPolicy;\nimport com.pulumi.aws.kms.KeyPolicyArgs;\nimport com.pulumi.aws.ecs.Cluster;\nimport com.pulumi.aws.ecs.ClusterArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationManagedStorageConfigurationArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"example\")\n .deletionWindowInDays(7)\n .build());\n\n var exampleKeyPolicy = new KeyPolicy(\"exampleKeyPolicy\", KeyPolicyArgs.builder()\n .keyId(example.id())\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Id\", \"ECSClusterFargatePolicy\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", \"*\")\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow generate data key access for Fargate tasks.\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"fargate.amazonaws.com\")\n )),\n jsonProperty(\"Action\", jsonArray(\"kms:GenerateDataKeyWithoutPlaintext\")),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"kms:EncryptionContext:aws:ecs:clusterAccount\", jsonArray(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))),\n jsonProperty(\"kms:EncryptionContext:aws:ecs:clusterName\", jsonArray(\"example\"))\n ))\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow grant creation permission for Fargate tasks.\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"fargate.amazonaws.com\")\n )),\n jsonProperty(\"Action\", jsonArray(\"kms:CreateGrant\")),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"kms:EncryptionContext:aws:ecs:clusterAccount\", jsonArray(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))),\n jsonProperty(\"kms:EncryptionContext:aws:ecs:clusterName\", jsonArray(\"example\"))\n )),\n jsonProperty(\"ForAllValues:StringEquals\", jsonObject(\n jsonProperty(\"kms:GrantOperations\", jsonArray(\"Decrypt\"))\n ))\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n )),\n jsonProperty(\"Version\", \"2012-10-17\")\n )))\n .build());\n\n var test = new Cluster(\"test\", ClusterArgs.builder()\n .name(\"example\")\n .configuration(ClusterConfigurationArgs.builder()\n .managedStorageConfiguration(ClusterConfigurationManagedStorageConfigurationArgs.builder()\n .fargateEphemeralStorageKmsKeyId(example.id())\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleKeyPolicy)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: example\n deletionWindowInDays: 7\n exampleKeyPolicy:\n type: aws:kms:KeyPolicy\n name: example\n properties:\n keyId: ${example.id}\n policy:\n fn::toJSON:\n Id: ECSClusterFargatePolicy\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: '*'\n Action: kms:*\n Resource: '*'\n - Sid: Allow generate data key access for Fargate tasks.\n Effect: Allow\n Principal:\n Service: fargate.amazonaws.com\n Action:\n - kms:GenerateDataKeyWithoutPlaintext\n Condition:\n StringEquals:\n kms:EncryptionContext:aws:ecs:clusterAccount:\n - ${current.accountId}\n kms:EncryptionContext:aws:ecs:clusterName:\n - example\n Resource: '*'\n - Sid: Allow grant creation permission for Fargate tasks.\n Effect: Allow\n Principal:\n Service: fargate.amazonaws.com\n Action:\n - kms:CreateGrant\n Condition:\n StringEquals:\n kms:EncryptionContext:aws:ecs:clusterAccount:\n - ${current.accountId}\n kms:EncryptionContext:aws:ecs:clusterName:\n - example\n ForAllValues:StringEquals:\n kms:GrantOperations:\n - Decrypt\n Resource: '*'\n Version: 2012-10-17\n test:\n type: aws:ecs:Cluster\n properties:\n name: example\n configuration:\n managedStorageConfiguration:\n fargateEphemeralStorageKmsKeyId: ${example.id}\n options:\n dependson:\n - ${exampleKeyPolicy}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECS clusters using the cluster name. For example:\n\n```sh\n$ pulumi import aws:ecs/cluster:Cluster stateless stateless-app\n```\n", + "description": "Provides an ECS cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst foo = new aws.ecs.Cluster(\"foo\", {\n name: \"white-hart\",\n settings: [{\n name: \"containerInsights\",\n value: \"enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ecs.Cluster(\"foo\",\n name=\"white-hart\",\n settings=[{\n \"name\": \"containerInsights\",\n \"value\": \"enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foo = new Aws.Ecs.Cluster(\"foo\", new()\n {\n Name = \"white-hart\",\n Settings = new[]\n {\n new Aws.Ecs.Inputs.ClusterSettingArgs\n {\n Name = \"containerInsights\",\n Value = \"enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecs.NewCluster(ctx, \"foo\", \u0026ecs.ClusterArgs{\n\t\t\tName: pulumi.String(\"white-hart\"),\n\t\t\tSettings: ecs.ClusterSettingArray{\n\t\t\t\t\u0026ecs.ClusterSettingArgs{\n\t\t\t\t\tName: pulumi.String(\"containerInsights\"),\n\t\t\t\t\tValue: pulumi.String(\"enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecs.Cluster;\nimport com.pulumi.aws.ecs.ClusterArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterSettingArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var foo = new Cluster(\"foo\", ClusterArgs.builder()\n .name(\"white-hart\")\n .settings(ClusterSettingArgs.builder()\n .name(\"containerInsights\")\n .value(\"enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:ecs:Cluster\n properties:\n name: white-hart\n settings:\n - name: containerInsights\n value: enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Execute Command Configuration with Override Logging\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kms.Key(\"example\", {\n description: \"example\",\n deletionWindowInDays: 7,\n});\nconst exampleLogGroup = new aws.cloudwatch.LogGroup(\"example\", {name: \"example\"});\nconst test = new aws.ecs.Cluster(\"test\", {\n name: \"example\",\n configuration: {\n executeCommandConfiguration: {\n kmsKeyId: example.arn,\n logging: \"OVERRIDE\",\n logConfiguration: {\n cloudWatchEncryptionEnabled: true,\n cloudWatchLogGroupName: exampleLogGroup.name,\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kms.Key(\"example\",\n description=\"example\",\n deletion_window_in_days=7)\nexample_log_group = aws.cloudwatch.LogGroup(\"example\", name=\"example\")\ntest = aws.ecs.Cluster(\"test\",\n name=\"example\",\n configuration={\n \"execute_command_configuration\": {\n \"kms_key_id\": example.arn,\n \"logging\": \"OVERRIDE\",\n \"log_configuration\": {\n \"cloud_watch_encryption_enabled\": True,\n \"cloud_watch_log_group_name\": example_log_group.name,\n },\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"example\",\n DeletionWindowInDays = 7,\n });\n\n var exampleLogGroup = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example\",\n });\n\n var test = new Aws.Ecs.Cluster(\"test\", new()\n {\n Name = \"example\",\n Configuration = new Aws.Ecs.Inputs.ClusterConfigurationArgs\n {\n ExecuteCommandConfiguration = new Aws.Ecs.Inputs.ClusterConfigurationExecuteCommandConfigurationArgs\n {\n KmsKeyId = example.Arn,\n Logging = \"OVERRIDE\",\n LogConfiguration = new Aws.Ecs.Inputs.ClusterConfigurationExecuteCommandConfigurationLogConfigurationArgs\n {\n CloudWatchEncryptionEnabled = true,\n CloudWatchLogGroupName = exampleLogGroup.Name,\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleLogGroup, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewCluster(ctx, \"test\", \u0026ecs.ClusterArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tConfiguration: \u0026ecs.ClusterConfigurationArgs{\n\t\t\t\tExecuteCommandConfiguration: \u0026ecs.ClusterConfigurationExecuteCommandConfigurationArgs{\n\t\t\t\t\tKmsKeyId: example.Arn,\n\t\t\t\t\tLogging: pulumi.String(\"OVERRIDE\"),\n\t\t\t\t\tLogConfiguration: \u0026ecs.ClusterConfigurationExecuteCommandConfigurationLogConfigurationArgs{\n\t\t\t\t\t\tCloudWatchEncryptionEnabled: pulumi.Bool(true),\n\t\t\t\t\t\tCloudWatchLogGroupName: exampleLogGroup.Name,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.ecs.Cluster;\nimport com.pulumi.aws.ecs.ClusterArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationExecuteCommandConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationExecuteCommandConfigurationLogConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"example\")\n .deletionWindowInDays(7)\n .build());\n\n var exampleLogGroup = new LogGroup(\"exampleLogGroup\", LogGroupArgs.builder()\n .name(\"example\")\n .build());\n\n var test = new Cluster(\"test\", ClusterArgs.builder()\n .name(\"example\")\n .configuration(ClusterConfigurationArgs.builder()\n .executeCommandConfiguration(ClusterConfigurationExecuteCommandConfigurationArgs.builder()\n .kmsKeyId(example.arn())\n .logging(\"OVERRIDE\")\n .logConfiguration(ClusterConfigurationExecuteCommandConfigurationLogConfigurationArgs.builder()\n .cloudWatchEncryptionEnabled(true)\n .cloudWatchLogGroupName(exampleLogGroup.name())\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: example\n deletionWindowInDays: 7\n exampleLogGroup:\n type: aws:cloudwatch:LogGroup\n name: example\n properties:\n name: example\n test:\n type: aws:ecs:Cluster\n properties:\n name: example\n configuration:\n executeCommandConfiguration:\n kmsKeyId: ${example.arn}\n logging: OVERRIDE\n logConfiguration:\n cloudWatchEncryptionEnabled: true\n cloudWatchLogGroupName: ${exampleLogGroup.name}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Fargate Ephemeral Storage Encryption with Customer-Managed KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"example\",\n deletionWindowInDays: 7,\n});\nconst exampleKeyPolicy = new aws.kms.KeyPolicy(\"example\", {\n keyId: example.id,\n policy: JSON.stringify({\n Id: \"ECSClusterFargatePolicy\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: \"*\",\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow generate data key access for Fargate tasks.\",\n Effect: \"Allow\",\n Principal: {\n Service: \"fargate.amazonaws.com\",\n },\n Action: [\"kms:GenerateDataKeyWithoutPlaintext\"],\n Condition: {\n StringEquals: {\n \"kms:EncryptionContext:aws:ecs:clusterAccount\": [current.then(current =\u003e current.accountId)],\n \"kms:EncryptionContext:aws:ecs:clusterName\": [\"example\"],\n },\n },\n Resource: \"*\",\n },\n {\n Sid: \"Allow grant creation permission for Fargate tasks.\",\n Effect: \"Allow\",\n Principal: {\n Service: \"fargate.amazonaws.com\",\n },\n Action: [\"kms:CreateGrant\"],\n Condition: {\n StringEquals: {\n \"kms:EncryptionContext:aws:ecs:clusterAccount\": [current.then(current =\u003e current.accountId)],\n \"kms:EncryptionContext:aws:ecs:clusterName\": [\"example\"],\n },\n \"ForAllValues:StringEquals\": {\n \"kms:GrantOperations\": [\"Decrypt\"],\n },\n },\n Resource: \"*\",\n },\n ],\n Version: \"2012-10-17\",\n }),\n});\nconst test = new aws.ecs.Cluster(\"test\", {\n name: \"example\",\n configuration: {\n managedStorageConfiguration: {\n fargateEphemeralStorageKmsKeyId: example.id,\n },\n },\n}, {\n dependsOn: [exampleKeyPolicy],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"example\",\n deletion_window_in_days=7)\nexample_key_policy = aws.kms.KeyPolicy(\"example\",\n key_id=example.id,\n policy=json.dumps({\n \"Id\": \"ECSClusterFargatePolicy\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"*\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow generate data key access for Fargate tasks.\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"fargate.amazonaws.com\",\n },\n \"Action\": [\"kms:GenerateDataKeyWithoutPlaintext\"],\n \"Condition\": {\n \"StringEquals\": {\n \"kms:EncryptionContext:aws:ecs:clusterAccount\": [current.account_id],\n \"kms:EncryptionContext:aws:ecs:clusterName\": [\"example\"],\n },\n },\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow grant creation permission for Fargate tasks.\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"fargate.amazonaws.com\",\n },\n \"Action\": [\"kms:CreateGrant\"],\n \"Condition\": {\n \"StringEquals\": {\n \"kms:EncryptionContext:aws:ecs:clusterAccount\": [current.account_id],\n \"kms:EncryptionContext:aws:ecs:clusterName\": [\"example\"],\n },\n \"ForAllValues:StringEquals\": {\n \"kms:GrantOperations\": [\"Decrypt\"],\n },\n },\n \"Resource\": \"*\",\n },\n ],\n \"Version\": \"2012-10-17\",\n }))\ntest = aws.ecs.Cluster(\"test\",\n name=\"example\",\n configuration={\n \"managed_storage_configuration\": {\n \"fargate_ephemeral_storage_kms_key_id\": example.id,\n },\n },\n opts = pulumi.ResourceOptions(depends_on=[example_key_policy]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"example\",\n DeletionWindowInDays = 7,\n });\n\n var exampleKeyPolicy = new Aws.Kms.KeyPolicy(\"example\", new()\n {\n KeyId = example.Id,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Id\"] = \"ECSClusterFargatePolicy\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = \"*\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow generate data key access for Fargate tasks.\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"fargate.amazonaws.com\",\n },\n [\"Action\"] = new[]\n {\n \"kms:GenerateDataKeyWithoutPlaintext\",\n },\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:EncryptionContext:aws:ecs:clusterAccount\"] = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"kms:EncryptionContext:aws:ecs:clusterName\"] = new[]\n {\n \"example\",\n },\n },\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow grant creation permission for Fargate tasks.\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"fargate.amazonaws.com\",\n },\n [\"Action\"] = new[]\n {\n \"kms:CreateGrant\",\n },\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:EncryptionContext:aws:ecs:clusterAccount\"] = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"kms:EncryptionContext:aws:ecs:clusterName\"] = new[]\n {\n \"example\",\n },\n },\n [\"ForAllValues:StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:GrantOperations\"] = new[]\n {\n \"Decrypt\",\n },\n },\n },\n [\"Resource\"] = \"*\",\n },\n },\n [\"Version\"] = \"2012-10-17\",\n }),\n });\n\n var test = new Aws.Ecs.Cluster(\"test\", new()\n {\n Name = \"example\",\n Configuration = new Aws.Ecs.Inputs.ClusterConfigurationArgs\n {\n ManagedStorageConfiguration = new Aws.Ecs.Inputs.ClusterConfigurationManagedStorageConfigurationArgs\n {\n FargateEphemeralStorageKmsKeyId = example.Id,\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleKeyPolicy,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Id\": \"ECSClusterFargatePolicy\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": \"*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow generate data key access for Fargate tasks.\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"fargate.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:GenerateDataKeyWithoutPlaintext\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:EncryptionContext:aws:ecs:clusterAccount\": []*string{\n\t\t\t\t\t\t\t\tcurrent.AccountId,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kms:EncryptionContext:aws:ecs:clusterName\": []string{\n\t\t\t\t\t\t\t\t\"example\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow grant creation permission for Fargate tasks.\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"fargate.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:CreateGrant\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:EncryptionContext:aws:ecs:clusterAccount\": []*string{\n\t\t\t\t\t\t\t\tcurrent.AccountId,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"kms:EncryptionContext:aws:ecs:clusterName\": []string{\n\t\t\t\t\t\t\t\t\"example\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"ForAllValues:StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:GrantOperations\": []string{\n\t\t\t\t\t\t\t\t\"Decrypt\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texampleKeyPolicy, err := kms.NewKeyPolicy(ctx, \"example\", \u0026kms.KeyPolicyArgs{\n\t\t\tKeyId: example.ID(),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ecs.NewCluster(ctx, \"test\", \u0026ecs.ClusterArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tConfiguration: \u0026ecs.ClusterConfigurationArgs{\n\t\t\t\tManagedStorageConfiguration: \u0026ecs.ClusterConfigurationManagedStorageConfigurationArgs{\n\t\t\t\t\tFargateEphemeralStorageKmsKeyId: example.ID(),\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleKeyPolicy,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.kms.KeyPolicy;\nimport com.pulumi.aws.kms.KeyPolicyArgs;\nimport com.pulumi.aws.ecs.Cluster;\nimport com.pulumi.aws.ecs.ClusterArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationArgs;\nimport com.pulumi.aws.ecs.inputs.ClusterConfigurationManagedStorageConfigurationArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"example\")\n .deletionWindowInDays(7)\n .build());\n\n var exampleKeyPolicy = new KeyPolicy(\"exampleKeyPolicy\", KeyPolicyArgs.builder()\n .keyId(example.id())\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Id\", \"ECSClusterFargatePolicy\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", \"*\")\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow generate data key access for Fargate tasks.\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"fargate.amazonaws.com\")\n )),\n jsonProperty(\"Action\", jsonArray(\"kms:GenerateDataKeyWithoutPlaintext\")),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"kms:EncryptionContext:aws:ecs:clusterAccount\", jsonArray(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))),\n jsonProperty(\"kms:EncryptionContext:aws:ecs:clusterName\", jsonArray(\"example\"))\n ))\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow grant creation permission for Fargate tasks.\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"fargate.amazonaws.com\")\n )),\n jsonProperty(\"Action\", jsonArray(\"kms:CreateGrant\")),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"kms:EncryptionContext:aws:ecs:clusterAccount\", jsonArray(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))),\n jsonProperty(\"kms:EncryptionContext:aws:ecs:clusterName\", jsonArray(\"example\"))\n )),\n jsonProperty(\"ForAllValues:StringEquals\", jsonObject(\n jsonProperty(\"kms:GrantOperations\", jsonArray(\"Decrypt\"))\n ))\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n )),\n jsonProperty(\"Version\", \"2012-10-17\")\n )))\n .build());\n\n var test = new Cluster(\"test\", ClusterArgs.builder()\n .name(\"example\")\n .configuration(ClusterConfigurationArgs.builder()\n .managedStorageConfiguration(ClusterConfigurationManagedStorageConfigurationArgs.builder()\n .fargateEphemeralStorageKmsKeyId(example.id())\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleKeyPolicy)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: example\n deletionWindowInDays: 7\n exampleKeyPolicy:\n type: aws:kms:KeyPolicy\n name: example\n properties:\n keyId: ${example.id}\n policy:\n fn::toJSON:\n Id: ECSClusterFargatePolicy\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: '*'\n Action: kms:*\n Resource: '*'\n - Sid: Allow generate data key access for Fargate tasks.\n Effect: Allow\n Principal:\n Service: fargate.amazonaws.com\n Action:\n - kms:GenerateDataKeyWithoutPlaintext\n Condition:\n StringEquals:\n kms:EncryptionContext:aws:ecs:clusterAccount:\n - ${current.accountId}\n kms:EncryptionContext:aws:ecs:clusterName:\n - example\n Resource: '*'\n - Sid: Allow grant creation permission for Fargate tasks.\n Effect: Allow\n Principal:\n Service: fargate.amazonaws.com\n Action:\n - kms:CreateGrant\n Condition:\n StringEquals:\n kms:EncryptionContext:aws:ecs:clusterAccount:\n - ${current.accountId}\n kms:EncryptionContext:aws:ecs:clusterName:\n - example\n ForAllValues:StringEquals:\n kms:GrantOperations:\n - Decrypt\n Resource: '*'\n Version: 2012-10-17\n test:\n type: aws:ecs:Cluster\n properties:\n name: example\n configuration:\n managedStorageConfiguration:\n fargateEphemeralStorageKmsKeyId: ${example.id}\n options:\n dependson:\n - ${exampleKeyPolicy}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ECS clusters using the cluster name. For example:\n\n```sh\n$ pulumi import aws:ecs/cluster:Cluster stateless stateless-app\n```\n", "properties": { "arn": { "type": "string", @@ -253612,7 +253612,7 @@ } }, "aws:elasticache/cluster:Cluster": { - "description": "Provides an ElastiCache Cluster resource, which manages either a\n[Memcached cluster](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/WhatIs.html), a\n[single-node Redis instance](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html), or a\n[read replica in a Redis (Cluster Mode Enabled) replication group].\n\nFor working with Redis (Cluster Mode Enabled) replication groups, see the\n`aws.elasticache.ReplicationGroup` resource.\n\n\u003e **Note:** When you change an attribute, such as `num_cache_nodes`, by default\nit is applied in the next maintenance window. Because of this, this provider may report\na difference in its planning phase because the actual modification has not yet taken\nplace. You can use the `apply_immediately` flag to instruct the service to apply the\nchange immediately. Using `apply_immediately` can result in a brief downtime as the server reboots.\nSee the AWS Documentation on Modifying an ElastiCache Cache Cluster for\n[ElastiCache for Memcached](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/Clusters.Modify.html) or\n[ElastiCache for Redis](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Modify.html)\nfor more information.\n\n\u003e **Note:** Any attribute changes that re-create the resource will be applied immediately, regardless of the value of `apply_immediately`.\n\n## Example Usage\n\n### Memcached Cluster\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.elasticache.Cluster(\"example\", {\n clusterId: \"cluster-example\",\n engine: \"memcached\",\n nodeType: \"cache.m4.large\",\n numCacheNodes: 2,\n parameterGroupName: \"default.memcached1.4\",\n port: 11211,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.elasticache.Cluster(\"example\",\n cluster_id=\"cluster-example\",\n engine=\"memcached\",\n node_type=\"cache.m4.large\",\n num_cache_nodes=2,\n parameter_group_name=\"default.memcached1.4\",\n port=11211)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.ElastiCache.Cluster(\"example\", new()\n {\n ClusterId = \"cluster-example\",\n Engine = \"memcached\",\n NodeType = \"cache.m4.large\",\n NumCacheNodes = 2,\n ParameterGroupName = \"default.memcached1.4\",\n Port = 11211,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticache.NewCluster(ctx, \"example\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"cluster-example\"),\n\t\t\tEngine: pulumi.String(\"memcached\"),\n\t\t\tNodeType: pulumi.String(\"cache.m4.large\"),\n\t\t\tNumCacheNodes: pulumi.Int(2),\n\t\t\tParameterGroupName: pulumi.String(\"default.memcached1.4\"),\n\t\t\tPort: pulumi.Int(11211),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Cluster(\"example\", ClusterArgs.builder()\n .clusterId(\"cluster-example\")\n .engine(\"memcached\")\n .nodeType(\"cache.m4.large\")\n .numCacheNodes(2)\n .parameterGroupName(\"default.memcached1.4\")\n .port(11211)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:elasticache:Cluster\n properties:\n clusterId: cluster-example\n engine: memcached\n nodeType: cache.m4.large\n numCacheNodes: 2\n parameterGroupName: default.memcached1.4\n port: 11211\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Redis Instance\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.elasticache.Cluster(\"example\", {\n clusterId: \"cluster-example\",\n engine: \"redis\",\n nodeType: \"cache.m4.large\",\n numCacheNodes: 1,\n parameterGroupName: \"default.redis3.2\",\n engineVersion: \"3.2.10\",\n port: 6379,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.elasticache.Cluster(\"example\",\n cluster_id=\"cluster-example\",\n engine=\"redis\",\n node_type=\"cache.m4.large\",\n num_cache_nodes=1,\n parameter_group_name=\"default.redis3.2\",\n engine_version=\"3.2.10\",\n port=6379)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.ElastiCache.Cluster(\"example\", new()\n {\n ClusterId = \"cluster-example\",\n Engine = \"redis\",\n NodeType = \"cache.m4.large\",\n NumCacheNodes = 1,\n ParameterGroupName = \"default.redis3.2\",\n EngineVersion = \"3.2.10\",\n Port = 6379,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticache.NewCluster(ctx, \"example\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"cluster-example\"),\n\t\t\tEngine: pulumi.String(\"redis\"),\n\t\t\tNodeType: pulumi.String(\"cache.m4.large\"),\n\t\t\tNumCacheNodes: pulumi.Int(1),\n\t\t\tParameterGroupName: pulumi.String(\"default.redis3.2\"),\n\t\t\tEngineVersion: pulumi.String(\"3.2.10\"),\n\t\t\tPort: pulumi.Int(6379),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Cluster(\"example\", ClusterArgs.builder()\n .clusterId(\"cluster-example\")\n .engine(\"redis\")\n .nodeType(\"cache.m4.large\")\n .numCacheNodes(1)\n .parameterGroupName(\"default.redis3.2\")\n .engineVersion(\"3.2.10\")\n .port(6379)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:elasticache:Cluster\n properties:\n clusterId: cluster-example\n engine: redis\n nodeType: cache.m4.large\n numCacheNodes: 1\n parameterGroupName: default.redis3.2\n engineVersion: 3.2.10\n port: 6379\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Redis Cluster Mode Disabled Read Replica Instance\n\nThese inherit their settings from the replication group.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst replica = new aws.elasticache.Cluster(\"replica\", {\n clusterId: \"cluster-example\",\n replicationGroupId: example.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nreplica = aws.elasticache.Cluster(\"replica\",\n cluster_id=\"cluster-example\",\n replication_group_id=example[\"id\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var replica = new Aws.ElastiCache.Cluster(\"replica\", new()\n {\n ClusterId = \"cluster-example\",\n ReplicationGroupId = example.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticache.NewCluster(ctx, \"replica\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"cluster-example\"),\n\t\t\tReplicationGroupId: pulumi.Any(example.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var replica = new Cluster(\"replica\", ClusterArgs.builder()\n .clusterId(\"cluster-example\")\n .replicationGroupId(example.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n replica:\n type: aws:elasticache:Cluster\n properties:\n clusterId: cluster-example\n replicationGroupId: ${example.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Redis Log Delivery configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = new aws.elasticache.Cluster(\"test\", {\n clusterId: \"mycluster\",\n engine: \"redis\",\n nodeType: \"cache.t3.micro\",\n numCacheNodes: 1,\n port: 6379,\n applyImmediately: true,\n logDeliveryConfigurations: [\n {\n destination: example.name,\n destinationType: \"cloudwatch-logs\",\n logFormat: \"text\",\n logType: \"slow-log\",\n },\n {\n destination: exampleAwsKinesisFirehoseDeliveryStream.name,\n destinationType: \"kinesis-firehose\",\n logFormat: \"json\",\n logType: \"engine-log\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.elasticache.Cluster(\"test\",\n cluster_id=\"mycluster\",\n engine=\"redis\",\n node_type=\"cache.t3.micro\",\n num_cache_nodes=1,\n port=6379,\n apply_immediately=True,\n log_delivery_configurations=[\n {\n \"destination\": example[\"name\"],\n \"destination_type\": \"cloudwatch-logs\",\n \"log_format\": \"text\",\n \"log_type\": \"slow-log\",\n },\n {\n \"destination\": example_aws_kinesis_firehose_delivery_stream[\"name\"],\n \"destination_type\": \"kinesis-firehose\",\n \"log_format\": \"json\",\n \"log_type\": \"engine-log\",\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.ElastiCache.Cluster(\"test\", new()\n {\n ClusterId = \"mycluster\",\n Engine = \"redis\",\n NodeType = \"cache.t3.micro\",\n NumCacheNodes = 1,\n Port = 6379,\n ApplyImmediately = true,\n LogDeliveryConfigurations = new[]\n {\n new Aws.ElastiCache.Inputs.ClusterLogDeliveryConfigurationArgs\n {\n Destination = example.Name,\n DestinationType = \"cloudwatch-logs\",\n LogFormat = \"text\",\n LogType = \"slow-log\",\n },\n new Aws.ElastiCache.Inputs.ClusterLogDeliveryConfigurationArgs\n {\n Destination = exampleAwsKinesisFirehoseDeliveryStream.Name,\n DestinationType = \"kinesis-firehose\",\n LogFormat = \"json\",\n LogType = \"engine-log\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticache.NewCluster(ctx, \"test\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"mycluster\"),\n\t\t\tEngine: pulumi.String(\"redis\"),\n\t\t\tNodeType: pulumi.String(\"cache.t3.micro\"),\n\t\t\tNumCacheNodes: pulumi.Int(1),\n\t\t\tPort: pulumi.Int(6379),\n\t\t\tApplyImmediately: pulumi.Bool(true),\n\t\t\tLogDeliveryConfigurations: elasticache.ClusterLogDeliveryConfigurationArray{\n\t\t\t\t\u0026elasticache.ClusterLogDeliveryConfigurationArgs{\n\t\t\t\t\tDestination: pulumi.Any(example.Name),\n\t\t\t\t\tDestinationType: pulumi.String(\"cloudwatch-logs\"),\n\t\t\t\t\tLogFormat: pulumi.String(\"text\"),\n\t\t\t\t\tLogType: pulumi.String(\"slow-log\"),\n\t\t\t\t},\n\t\t\t\t\u0026elasticache.ClusterLogDeliveryConfigurationArgs{\n\t\t\t\t\tDestination: pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.Name),\n\t\t\t\t\tDestinationType: pulumi.String(\"kinesis-firehose\"),\n\t\t\t\t\tLogFormat: pulumi.String(\"json\"),\n\t\t\t\t\tLogType: pulumi.String(\"engine-log\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport com.pulumi.aws.elasticache.inputs.ClusterLogDeliveryConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Cluster(\"test\", ClusterArgs.builder()\n .clusterId(\"mycluster\")\n .engine(\"redis\")\n .nodeType(\"cache.t3.micro\")\n .numCacheNodes(1)\n .port(6379)\n .applyImmediately(true)\n .logDeliveryConfigurations( \n ClusterLogDeliveryConfigurationArgs.builder()\n .destination(example.name())\n .destinationType(\"cloudwatch-logs\")\n .logFormat(\"text\")\n .logType(\"slow-log\")\n .build(),\n ClusterLogDeliveryConfigurationArgs.builder()\n .destination(exampleAwsKinesisFirehoseDeliveryStream.name())\n .destinationType(\"kinesis-firehose\")\n .logFormat(\"json\")\n .logType(\"engine-log\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:elasticache:Cluster\n properties:\n clusterId: mycluster\n engine: redis\n nodeType: cache.t3.micro\n numCacheNodes: 1\n port: 6379\n applyImmediately: true\n logDeliveryConfigurations:\n - destination: ${example.name}\n destinationType: cloudwatch-logs\n logFormat: text\n logType: slow-log\n - destination: ${exampleAwsKinesisFirehoseDeliveryStream.name}\n destinationType: kinesis-firehose\n logFormat: json\n logType: engine-log\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Elasticache Cluster in Outpost\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.outposts.getOutposts({});\nconst exampleGetOutpost = example.then(example =\u003e aws.outposts.getOutpost({\n id: example.ids?.[0],\n}));\nconst exampleVpc = new aws.ec2.Vpc(\"example\", {cidrBlock: \"10.0.0.0/16\"});\nconst exampleSubnet = new aws.ec2.Subnet(\"example\", {\n vpcId: exampleVpc.id,\n cidrBlock: \"10.0.1.0/24\",\n tags: {\n Name: \"my-subnet\",\n },\n});\nconst exampleSubnetGroup = new aws.elasticache.SubnetGroup(\"example\", {\n name: \"my-cache-subnet\",\n subnetIds: [exampleSubnet.id],\n});\nconst exampleCluster = new aws.elasticache.Cluster(\"example\", {\n clusterId: \"cluster-example\",\n outpostMode: \"single-outpost\",\n preferredOutpostArn: exampleGetOutpost.then(exampleGetOutpost =\u003e exampleGetOutpost.arn),\n engine: \"memcached\",\n nodeType: \"cache.r5.large\",\n numCacheNodes: 2,\n parameterGroupName: \"default.memcached1.4\",\n port: 11211,\n subnetGroupName: exampleSubnetGroup.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.outposts.get_outposts()\nexample_get_outpost = aws.outposts.get_outpost(id=example.ids[0])\nexample_vpc = aws.ec2.Vpc(\"example\", cidr_block=\"10.0.0.0/16\")\nexample_subnet = aws.ec2.Subnet(\"example\",\n vpc_id=example_vpc.id,\n cidr_block=\"10.0.1.0/24\",\n tags={\n \"Name\": \"my-subnet\",\n })\nexample_subnet_group = aws.elasticache.SubnetGroup(\"example\",\n name=\"my-cache-subnet\",\n subnet_ids=[example_subnet.id])\nexample_cluster = aws.elasticache.Cluster(\"example\",\n cluster_id=\"cluster-example\",\n outpost_mode=\"single-outpost\",\n preferred_outpost_arn=example_get_outpost.arn,\n engine=\"memcached\",\n node_type=\"cache.r5.large\",\n num_cache_nodes=2,\n parameter_group_name=\"default.memcached1.4\",\n port=11211,\n subnet_group_name=example_subnet_group.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Outposts.GetOutposts.Invoke();\n\n var exampleGetOutpost = Aws.Outposts.GetOutpost.Invoke(new()\n {\n Id = example.Apply(getOutpostsResult =\u003e getOutpostsResult.Ids[0]),\n });\n\n var exampleVpc = new Aws.Ec2.Vpc(\"example\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n });\n\n var exampleSubnet = new Aws.Ec2.Subnet(\"example\", new()\n {\n VpcId = exampleVpc.Id,\n CidrBlock = \"10.0.1.0/24\",\n Tags = \n {\n { \"Name\", \"my-subnet\" },\n },\n });\n\n var exampleSubnetGroup = new Aws.ElastiCache.SubnetGroup(\"example\", new()\n {\n Name = \"my-cache-subnet\",\n SubnetIds = new[]\n {\n exampleSubnet.Id,\n },\n });\n\n var exampleCluster = new Aws.ElastiCache.Cluster(\"example\", new()\n {\n ClusterId = \"cluster-example\",\n OutpostMode = \"single-outpost\",\n PreferredOutpostArn = exampleGetOutpost.Apply(getOutpostResult =\u003e getOutpostResult.Arn),\n Engine = \"memcached\",\n NodeType = \"cache.r5.large\",\n NumCacheNodes = 2,\n ParameterGroupName = \"default.memcached1.4\",\n Port = 11211,\n SubnetGroupName = exampleSubnetGroup.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/outposts\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := outposts.GetOutposts(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetOutpost, err := outposts.GetOutpost(ctx, \u0026outposts.GetOutpostArgs{\n\t\t\tId: pulumi.StringRef(example.Ids[0]),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpc, err := ec2.NewVpc(ctx, \"example\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleSubnet, err := ec2.NewSubnet(ctx, \"example\", \u0026ec2.SubnetArgs{\n\t\t\tVpcId: exampleVpc.ID(),\n\t\t\tCidrBlock: pulumi.String(\"10.0.1.0/24\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"my-subnet\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleSubnetGroup, err := elasticache.NewSubnetGroup(ctx, \"example\", \u0026elasticache.SubnetGroupArgs{\n\t\t\tName: pulumi.String(\"my-cache-subnet\"),\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texampleSubnet.ID(),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = elasticache.NewCluster(ctx, \"example\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"cluster-example\"),\n\t\t\tOutpostMode: pulumi.String(\"single-outpost\"),\n\t\t\tPreferredOutpostArn: pulumi.String(exampleGetOutpost.Arn),\n\t\t\tEngine: pulumi.String(\"memcached\"),\n\t\t\tNodeType: pulumi.String(\"cache.r5.large\"),\n\t\t\tNumCacheNodes: pulumi.Int(2),\n\t\t\tParameterGroupName: pulumi.String(\"default.memcached1.4\"),\n\t\t\tPort: pulumi.Int(11211),\n\t\t\tSubnetGroupName: exampleSubnetGroup.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.outposts.OutpostsFunctions;\nimport com.pulumi.aws.outposts.inputs.GetOutpostsArgs;\nimport com.pulumi.aws.outposts.inputs.GetOutpostArgs;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.Subnet;\nimport com.pulumi.aws.ec2.SubnetArgs;\nimport com.pulumi.aws.elasticache.SubnetGroup;\nimport com.pulumi.aws.elasticache.SubnetGroupArgs;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OutpostsFunctions.getOutposts();\n\n final var exampleGetOutpost = OutpostsFunctions.getOutpost(GetOutpostArgs.builder()\n .id(example.applyValue(getOutpostsResult -\u003e getOutpostsResult.ids()[0]))\n .build());\n\n var exampleVpc = new Vpc(\"exampleVpc\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .build());\n\n var exampleSubnet = new Subnet(\"exampleSubnet\", SubnetArgs.builder()\n .vpcId(exampleVpc.id())\n .cidrBlock(\"10.0.1.0/24\")\n .tags(Map.of(\"Name\", \"my-subnet\"))\n .build());\n\n var exampleSubnetGroup = new SubnetGroup(\"exampleSubnetGroup\", SubnetGroupArgs.builder()\n .name(\"my-cache-subnet\")\n .subnetIds(exampleSubnet.id())\n .build());\n\n var exampleCluster = new Cluster(\"exampleCluster\", ClusterArgs.builder()\n .clusterId(\"cluster-example\")\n .outpostMode(\"single-outpost\")\n .preferredOutpostArn(exampleGetOutpost.applyValue(getOutpostResult -\u003e getOutpostResult.arn()))\n .engine(\"memcached\")\n .nodeType(\"cache.r5.large\")\n .numCacheNodes(2)\n .parameterGroupName(\"default.memcached1.4\")\n .port(11211)\n .subnetGroupName(exampleSubnetGroup.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleVpc:\n type: aws:ec2:Vpc\n name: example\n properties:\n cidrBlock: 10.0.0.0/16\n exampleSubnet:\n type: aws:ec2:Subnet\n name: example\n properties:\n vpcId: ${exampleVpc.id}\n cidrBlock: 10.0.1.0/24\n tags:\n Name: my-subnet\n exampleSubnetGroup:\n type: aws:elasticache:SubnetGroup\n name: example\n properties:\n name: my-cache-subnet\n subnetIds:\n - ${exampleSubnet.id}\n exampleCluster:\n type: aws:elasticache:Cluster\n name: example\n properties:\n clusterId: cluster-example\n outpostMode: single-outpost\n preferredOutpostArn: ${exampleGetOutpost.arn}\n engine: memcached\n nodeType: cache.r5.large\n numCacheNodes: 2\n parameterGroupName: default.memcached1.4\n port: 11211\n subnetGroupName: ${exampleSubnetGroup.name}\nvariables:\n example:\n fn::invoke:\n Function: aws:outposts:getOutposts\n Arguments: {}\n exampleGetOutpost:\n fn::invoke:\n Function: aws:outposts:getOutpost\n Arguments:\n id: ${example.ids[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ElastiCache Clusters using the `cluster_id`. For example:\n\n```sh\n$ pulumi import aws:elasticache/cluster:Cluster my_cluster my_cluster\n```\n", + "description": "Provides an ElastiCache Cluster resource, which manages either a\n[Memcached cluster](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/WhatIs.html), a\n[single-node Redis instance](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html), or a\n[read replica in a Redis (Cluster Mode Enabled) replication group].\n\nFor working with Redis (Cluster Mode Enabled) replication groups, see the\n`aws.elasticache.ReplicationGroup` resource.\n\n\u003e **Note:** When you change an attribute, such as `num_cache_nodes`, by default\nit is applied in the next maintenance window. Because of this, this provider may report\na difference in its planning phase because the actual modification has not yet taken\nplace. You can use the `apply_immediately` flag to instruct the service to apply the\nchange immediately. Using `apply_immediately` can result in a brief downtime as the server reboots.\nSee the AWS Documentation on Modifying an ElastiCache Cache Cluster for\n[ElastiCache for Memcached](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/Clusters.Modify.html) or\n[ElastiCache for Redis](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Modify.html)\nfor more information.\n\n\u003e **Note:** Any attribute changes that re-create the resource will be applied immediately, regardless of the value of `apply_immediately`.\n\n## Example Usage\n\n### Memcached Cluster\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.elasticache.Cluster(\"example\", {\n clusterId: \"cluster-example\",\n engine: \"memcached\",\n nodeType: \"cache.m4.large\",\n numCacheNodes: 2,\n parameterGroupName: \"default.memcached1.4\",\n port: 11211,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.elasticache.Cluster(\"example\",\n cluster_id=\"cluster-example\",\n engine=\"memcached\",\n node_type=\"cache.m4.large\",\n num_cache_nodes=2,\n parameter_group_name=\"default.memcached1.4\",\n port=11211)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.ElastiCache.Cluster(\"example\", new()\n {\n ClusterId = \"cluster-example\",\n Engine = \"memcached\",\n NodeType = \"cache.m4.large\",\n NumCacheNodes = 2,\n ParameterGroupName = \"default.memcached1.4\",\n Port = 11211,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticache.NewCluster(ctx, \"example\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"cluster-example\"),\n\t\t\tEngine: pulumi.String(\"memcached\"),\n\t\t\tNodeType: pulumi.String(\"cache.m4.large\"),\n\t\t\tNumCacheNodes: pulumi.Int(2),\n\t\t\tParameterGroupName: pulumi.String(\"default.memcached1.4\"),\n\t\t\tPort: pulumi.Int(11211),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Cluster(\"example\", ClusterArgs.builder()\n .clusterId(\"cluster-example\")\n .engine(\"memcached\")\n .nodeType(\"cache.m4.large\")\n .numCacheNodes(2)\n .parameterGroupName(\"default.memcached1.4\")\n .port(11211)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:elasticache:Cluster\n properties:\n clusterId: cluster-example\n engine: memcached\n nodeType: cache.m4.large\n numCacheNodes: 2\n parameterGroupName: default.memcached1.4\n port: 11211\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Redis Instance\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.elasticache.Cluster(\"example\", {\n clusterId: \"cluster-example\",\n engine: \"redis\",\n nodeType: \"cache.m4.large\",\n numCacheNodes: 1,\n parameterGroupName: \"default.redis3.2\",\n engineVersion: \"3.2.10\",\n port: 6379,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.elasticache.Cluster(\"example\",\n cluster_id=\"cluster-example\",\n engine=\"redis\",\n node_type=\"cache.m4.large\",\n num_cache_nodes=1,\n parameter_group_name=\"default.redis3.2\",\n engine_version=\"3.2.10\",\n port=6379)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.ElastiCache.Cluster(\"example\", new()\n {\n ClusterId = \"cluster-example\",\n Engine = \"redis\",\n NodeType = \"cache.m4.large\",\n NumCacheNodes = 1,\n ParameterGroupName = \"default.redis3.2\",\n EngineVersion = \"3.2.10\",\n Port = 6379,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticache.NewCluster(ctx, \"example\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"cluster-example\"),\n\t\t\tEngine: pulumi.String(\"redis\"),\n\t\t\tNodeType: pulumi.String(\"cache.m4.large\"),\n\t\t\tNumCacheNodes: pulumi.Int(1),\n\t\t\tParameterGroupName: pulumi.String(\"default.redis3.2\"),\n\t\t\tEngineVersion: pulumi.String(\"3.2.10\"),\n\t\t\tPort: pulumi.Int(6379),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Cluster(\"example\", ClusterArgs.builder()\n .clusterId(\"cluster-example\")\n .engine(\"redis\")\n .nodeType(\"cache.m4.large\")\n .numCacheNodes(1)\n .parameterGroupName(\"default.redis3.2\")\n .engineVersion(\"3.2.10\")\n .port(6379)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:elasticache:Cluster\n properties:\n clusterId: cluster-example\n engine: redis\n nodeType: cache.m4.large\n numCacheNodes: 1\n parameterGroupName: default.redis3.2\n engineVersion: 3.2.10\n port: 6379\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Redis Cluster Mode Disabled Read Replica Instance\n\nThese inherit their settings from the replication group.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst replica = new aws.elasticache.Cluster(\"replica\", {\n clusterId: \"cluster-example\",\n replicationGroupId: example.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nreplica = aws.elasticache.Cluster(\"replica\",\n cluster_id=\"cluster-example\",\n replication_group_id=example[\"id\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var replica = new Aws.ElastiCache.Cluster(\"replica\", new()\n {\n ClusterId = \"cluster-example\",\n ReplicationGroupId = example.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticache.NewCluster(ctx, \"replica\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"cluster-example\"),\n\t\t\tReplicationGroupId: pulumi.Any(example.Id),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var replica = new Cluster(\"replica\", ClusterArgs.builder()\n .clusterId(\"cluster-example\")\n .replicationGroupId(example.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n replica:\n type: aws:elasticache:Cluster\n properties:\n clusterId: cluster-example\n replicationGroupId: ${example.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Redis Log Delivery configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = new aws.elasticache.Cluster(\"test\", {\n clusterId: \"mycluster\",\n engine: \"redis\",\n nodeType: \"cache.t3.micro\",\n numCacheNodes: 1,\n port: 6379,\n applyImmediately: true,\n logDeliveryConfigurations: [\n {\n destination: example.name,\n destinationType: \"cloudwatch-logs\",\n logFormat: \"text\",\n logType: \"slow-log\",\n },\n {\n destination: exampleAwsKinesisFirehoseDeliveryStream.name,\n destinationType: \"kinesis-firehose\",\n logFormat: \"json\",\n logType: \"engine-log\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.elasticache.Cluster(\"test\",\n cluster_id=\"mycluster\",\n engine=\"redis\",\n node_type=\"cache.t3.micro\",\n num_cache_nodes=1,\n port=6379,\n apply_immediately=True,\n log_delivery_configurations=[\n {\n \"destination\": example[\"name\"],\n \"destination_type\": \"cloudwatch-logs\",\n \"log_format\": \"text\",\n \"log_type\": \"slow-log\",\n },\n {\n \"destination\": example_aws_kinesis_firehose_delivery_stream[\"name\"],\n \"destination_type\": \"kinesis-firehose\",\n \"log_format\": \"json\",\n \"log_type\": \"engine-log\",\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.ElastiCache.Cluster(\"test\", new()\n {\n ClusterId = \"mycluster\",\n Engine = \"redis\",\n NodeType = \"cache.t3.micro\",\n NumCacheNodes = 1,\n Port = 6379,\n ApplyImmediately = true,\n LogDeliveryConfigurations = new[]\n {\n new Aws.ElastiCache.Inputs.ClusterLogDeliveryConfigurationArgs\n {\n Destination = example.Name,\n DestinationType = \"cloudwatch-logs\",\n LogFormat = \"text\",\n LogType = \"slow-log\",\n },\n new Aws.ElastiCache.Inputs.ClusterLogDeliveryConfigurationArgs\n {\n Destination = exampleAwsKinesisFirehoseDeliveryStream.Name,\n DestinationType = \"kinesis-firehose\",\n LogFormat = \"json\",\n LogType = \"engine-log\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticache.NewCluster(ctx, \"test\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"mycluster\"),\n\t\t\tEngine: pulumi.String(\"redis\"),\n\t\t\tNodeType: pulumi.String(\"cache.t3.micro\"),\n\t\t\tNumCacheNodes: pulumi.Int(1),\n\t\t\tPort: pulumi.Int(6379),\n\t\t\tApplyImmediately: pulumi.Bool(true),\n\t\t\tLogDeliveryConfigurations: elasticache.ClusterLogDeliveryConfigurationArray{\n\t\t\t\t\u0026elasticache.ClusterLogDeliveryConfigurationArgs{\n\t\t\t\t\tDestination: pulumi.Any(example.Name),\n\t\t\t\t\tDestinationType: pulumi.String(\"cloudwatch-logs\"),\n\t\t\t\t\tLogFormat: pulumi.String(\"text\"),\n\t\t\t\t\tLogType: pulumi.String(\"slow-log\"),\n\t\t\t\t},\n\t\t\t\t\u0026elasticache.ClusterLogDeliveryConfigurationArgs{\n\t\t\t\t\tDestination: pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.Name),\n\t\t\t\t\tDestinationType: pulumi.String(\"kinesis-firehose\"),\n\t\t\t\t\tLogFormat: pulumi.String(\"json\"),\n\t\t\t\t\tLogType: pulumi.String(\"engine-log\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport com.pulumi.aws.elasticache.inputs.ClusterLogDeliveryConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Cluster(\"test\", ClusterArgs.builder()\n .clusterId(\"mycluster\")\n .engine(\"redis\")\n .nodeType(\"cache.t3.micro\")\n .numCacheNodes(1)\n .port(6379)\n .applyImmediately(true)\n .logDeliveryConfigurations( \n ClusterLogDeliveryConfigurationArgs.builder()\n .destination(example.name())\n .destinationType(\"cloudwatch-logs\")\n .logFormat(\"text\")\n .logType(\"slow-log\")\n .build(),\n ClusterLogDeliveryConfigurationArgs.builder()\n .destination(exampleAwsKinesisFirehoseDeliveryStream.name())\n .destinationType(\"kinesis-firehose\")\n .logFormat(\"json\")\n .logType(\"engine-log\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:elasticache:Cluster\n properties:\n clusterId: mycluster\n engine: redis\n nodeType: cache.t3.micro\n numCacheNodes: 1\n port: 6379\n applyImmediately: true\n logDeliveryConfigurations:\n - destination: ${example.name}\n destinationType: cloudwatch-logs\n logFormat: text\n logType: slow-log\n - destination: ${exampleAwsKinesisFirehoseDeliveryStream.name}\n destinationType: kinesis-firehose\n logFormat: json\n logType: engine-log\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Elasticache Cluster in Outpost\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.outposts.getOutposts({});\nconst exampleGetOutpost = example.then(example =\u003e aws.outposts.getOutpost({\n id: example.ids?.[0],\n}));\nconst exampleVpc = new aws.ec2.Vpc(\"example\", {cidrBlock: \"10.0.0.0/16\"});\nconst exampleSubnet = new aws.ec2.Subnet(\"example\", {\n vpcId: exampleVpc.id,\n cidrBlock: \"10.0.1.0/24\",\n tags: {\n Name: \"my-subnet\",\n },\n});\nconst exampleSubnetGroup = new aws.elasticache.SubnetGroup(\"example\", {\n name: \"my-cache-subnet\",\n subnetIds: [exampleSubnet.id],\n});\nconst exampleCluster = new aws.elasticache.Cluster(\"example\", {\n clusterId: \"cluster-example\",\n outpostMode: \"single-outpost\",\n preferredOutpostArn: exampleGetOutpost.then(exampleGetOutpost =\u003e exampleGetOutpost.arn),\n engine: \"memcached\",\n nodeType: \"cache.r5.large\",\n numCacheNodes: 2,\n parameterGroupName: \"default.memcached1.4\",\n port: 11211,\n subnetGroupName: exampleSubnetGroup.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.outposts.get_outposts()\nexample_get_outpost = aws.outposts.get_outpost(id=example.ids[0])\nexample_vpc = aws.ec2.Vpc(\"example\", cidr_block=\"10.0.0.0/16\")\nexample_subnet = aws.ec2.Subnet(\"example\",\n vpc_id=example_vpc.id,\n cidr_block=\"10.0.1.0/24\",\n tags={\n \"Name\": \"my-subnet\",\n })\nexample_subnet_group = aws.elasticache.SubnetGroup(\"example\",\n name=\"my-cache-subnet\",\n subnet_ids=[example_subnet.id])\nexample_cluster = aws.elasticache.Cluster(\"example\",\n cluster_id=\"cluster-example\",\n outpost_mode=\"single-outpost\",\n preferred_outpost_arn=example_get_outpost.arn,\n engine=\"memcached\",\n node_type=\"cache.r5.large\",\n num_cache_nodes=2,\n parameter_group_name=\"default.memcached1.4\",\n port=11211,\n subnet_group_name=example_subnet_group.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Outposts.GetOutposts.Invoke();\n\n var exampleGetOutpost = Aws.Outposts.GetOutpost.Invoke(new()\n {\n Id = example.Apply(getOutpostsResult =\u003e getOutpostsResult.Ids[0]),\n });\n\n var exampleVpc = new Aws.Ec2.Vpc(\"example\", new()\n {\n CidrBlock = \"10.0.0.0/16\",\n });\n\n var exampleSubnet = new Aws.Ec2.Subnet(\"example\", new()\n {\n VpcId = exampleVpc.Id,\n CidrBlock = \"10.0.1.0/24\",\n Tags = \n {\n { \"Name\", \"my-subnet\" },\n },\n });\n\n var exampleSubnetGroup = new Aws.ElastiCache.SubnetGroup(\"example\", new()\n {\n Name = \"my-cache-subnet\",\n SubnetIds = new[]\n {\n exampleSubnet.Id,\n },\n });\n\n var exampleCluster = new Aws.ElastiCache.Cluster(\"example\", new()\n {\n ClusterId = \"cluster-example\",\n OutpostMode = \"single-outpost\",\n PreferredOutpostArn = exampleGetOutpost.Apply(getOutpostResult =\u003e getOutpostResult.Arn),\n Engine = \"memcached\",\n NodeType = \"cache.r5.large\",\n NumCacheNodes = 2,\n ParameterGroupName = \"default.memcached1.4\",\n Port = 11211,\n SubnetGroupName = exampleSubnetGroup.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/outposts\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := outposts.GetOutposts(ctx, \u0026outposts.GetOutpostsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetOutpost, err := outposts.GetOutpost(ctx, \u0026outposts.GetOutpostArgs{\n\t\t\tId: pulumi.StringRef(example.Ids[0]),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleVpc, err := ec2.NewVpc(ctx, \"example\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.0.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleSubnet, err := ec2.NewSubnet(ctx, \"example\", \u0026ec2.SubnetArgs{\n\t\t\tVpcId: exampleVpc.ID(),\n\t\t\tCidrBlock: pulumi.String(\"10.0.1.0/24\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"my-subnet\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleSubnetGroup, err := elasticache.NewSubnetGroup(ctx, \"example\", \u0026elasticache.SubnetGroupArgs{\n\t\t\tName: pulumi.String(\"my-cache-subnet\"),\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texampleSubnet.ID(),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = elasticache.NewCluster(ctx, \"example\", \u0026elasticache.ClusterArgs{\n\t\t\tClusterId: pulumi.String(\"cluster-example\"),\n\t\t\tOutpostMode: pulumi.String(\"single-outpost\"),\n\t\t\tPreferredOutpostArn: pulumi.String(exampleGetOutpost.Arn),\n\t\t\tEngine: pulumi.String(\"memcached\"),\n\t\t\tNodeType: pulumi.String(\"cache.r5.large\"),\n\t\t\tNumCacheNodes: pulumi.Int(2),\n\t\t\tParameterGroupName: pulumi.String(\"default.memcached1.4\"),\n\t\t\tPort: pulumi.Int(11211),\n\t\t\tSubnetGroupName: exampleSubnetGroup.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.outposts.OutpostsFunctions;\nimport com.pulumi.aws.outposts.inputs.GetOutpostsArgs;\nimport com.pulumi.aws.outposts.inputs.GetOutpostArgs;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.ec2.Subnet;\nimport com.pulumi.aws.ec2.SubnetArgs;\nimport com.pulumi.aws.elasticache.SubnetGroup;\nimport com.pulumi.aws.elasticache.SubnetGroupArgs;\nimport com.pulumi.aws.elasticache.Cluster;\nimport com.pulumi.aws.elasticache.ClusterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OutpostsFunctions.getOutposts();\n\n final var exampleGetOutpost = OutpostsFunctions.getOutpost(GetOutpostArgs.builder()\n .id(example.applyValue(getOutpostsResult -\u003e getOutpostsResult.ids()[0]))\n .build());\n\n var exampleVpc = new Vpc(\"exampleVpc\", VpcArgs.builder()\n .cidrBlock(\"10.0.0.0/16\")\n .build());\n\n var exampleSubnet = new Subnet(\"exampleSubnet\", SubnetArgs.builder()\n .vpcId(exampleVpc.id())\n .cidrBlock(\"10.0.1.0/24\")\n .tags(Map.of(\"Name\", \"my-subnet\"))\n .build());\n\n var exampleSubnetGroup = new SubnetGroup(\"exampleSubnetGroup\", SubnetGroupArgs.builder()\n .name(\"my-cache-subnet\")\n .subnetIds(exampleSubnet.id())\n .build());\n\n var exampleCluster = new Cluster(\"exampleCluster\", ClusterArgs.builder()\n .clusterId(\"cluster-example\")\n .outpostMode(\"single-outpost\")\n .preferredOutpostArn(exampleGetOutpost.applyValue(getOutpostResult -\u003e getOutpostResult.arn()))\n .engine(\"memcached\")\n .nodeType(\"cache.r5.large\")\n .numCacheNodes(2)\n .parameterGroupName(\"default.memcached1.4\")\n .port(11211)\n .subnetGroupName(exampleSubnetGroup.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleVpc:\n type: aws:ec2:Vpc\n name: example\n properties:\n cidrBlock: 10.0.0.0/16\n exampleSubnet:\n type: aws:ec2:Subnet\n name: example\n properties:\n vpcId: ${exampleVpc.id}\n cidrBlock: 10.0.1.0/24\n tags:\n Name: my-subnet\n exampleSubnetGroup:\n type: aws:elasticache:SubnetGroup\n name: example\n properties:\n name: my-cache-subnet\n subnetIds:\n - ${exampleSubnet.id}\n exampleCluster:\n type: aws:elasticache:Cluster\n name: example\n properties:\n clusterId: cluster-example\n outpostMode: single-outpost\n preferredOutpostArn: ${exampleGetOutpost.arn}\n engine: memcached\n nodeType: cache.r5.large\n numCacheNodes: 2\n parameterGroupName: default.memcached1.4\n port: 11211\n subnetGroupName: ${exampleSubnetGroup.name}\nvariables:\n example:\n fn::invoke:\n Function: aws:outposts:getOutposts\n Arguments: {}\n exampleGetOutpost:\n fn::invoke:\n Function: aws:outposts:getOutpost\n Arguments:\n id: ${example.ids[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import ElastiCache Clusters using the `cluster_id`. For example:\n\n```sh\n$ pulumi import aws:elasticache/cluster:Cluster my_cluster my_cluster\n```\n", "properties": { "applyImmediately": { "type": "boolean", @@ -256891,7 +256891,7 @@ } }, "aws:elasticsearch/domain:Domain": { - "description": "Manages an AWS Elasticsearch Domain.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.elasticsearch.Domain(\"example\", {\n domainName: \"example\",\n elasticsearchVersion: \"7.10\",\n clusterConfig: {\n instanceType: \"r4.large.elasticsearch\",\n },\n tags: {\n Domain: \"TestDomain\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.elasticsearch.Domain(\"example\",\n domain_name=\"example\",\n elasticsearch_version=\"7.10\",\n cluster_config={\n \"instance_type\": \"r4.large.elasticsearch\",\n },\n tags={\n \"Domain\": \"TestDomain\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.ElasticSearch.Domain(\"example\", new()\n {\n DomainName = \"example\",\n ElasticsearchVersion = \"7.10\",\n ClusterConfig = new Aws.ElasticSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"r4.large.elasticsearch\",\n },\n Tags = \n {\n { \"Domain\", \"TestDomain\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticsearch.NewDomain(ctx, \"example\", \u0026elasticsearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"example\"),\n\t\t\tElasticsearchVersion: pulumi.String(\"7.10\"),\n\t\t\tClusterConfig: \u0026elasticsearch.DomainClusterConfigArgs{\n\t\t\t\tInstanceType: pulumi.String(\"r4.large.elasticsearch\"),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Domain\": pulumi.String(\"TestDomain\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticsearch.Domain;\nimport com.pulumi.aws.elasticsearch.DomainArgs;\nimport com.pulumi.aws.elasticsearch.inputs.DomainClusterConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(\"example\")\n .elasticsearchVersion(\"7.10\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"r4.large.elasticsearch\")\n .build())\n .tags(Map.of(\"Domain\", \"TestDomain\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:elasticsearch:Domain\n properties:\n domainName: example\n elasticsearchVersion: '7.10'\n clusterConfig:\n instanceType: r4.large.elasticsearch\n tags:\n Domain: TestDomain\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Access Policy\n\n\u003e See also: `aws.elasticsearch.DomainPolicy` resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst config = new pulumi.Config();\nconst domain = config.get(\"domain\") || \"tf-test\";\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst example = new aws.elasticsearch.Domain(\"example\", {\n domainName: domain,\n accessPolicies: Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e `{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\",\n \"Condition\": {\n \"IpAddress\": {\"aws:SourceIp\": [\"66.193.100.22/32\"]}\n }\n }\n ]\n}\n`),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\ndomain = config.get(\"domain\")\nif domain is None:\n domain = \"tf-test\"\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample = aws.elasticsearch.Domain(\"example\",\n domain_name=domain,\n access_policies=f\"\"\"{{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {{\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:{current.name}:{current_get_caller_identity.account_id}:domain/{domain}/*\",\n \"Condition\": {{\n \"IpAddress\": {{\"aws:SourceIp\": [\"66.193.100.22/32\"]}}\n }}\n }}\n ]\n}}\n\"\"\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var domain = config.Get(\"domain\") ?? \"tf-test\";\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.ElasticSearch.Domain(\"example\", new()\n {\n DomainName = domain,\n AccessPolicies = Output.Tuple(current, currentGetCallerIdentity).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n return @$\"{{\n \"\"Version\"\": \"\"2012-10-17\"\",\n \"\"Statement\"\": [\n {{\n \"\"Action\"\": \"\"es:*\"\",\n \"\"Principal\"\": \"\"*\"\",\n \"\"Effect\"\": \"\"Allow\"\",\n \"\"Resource\"\": \"\"arn:aws:es:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:domain/{domain}/*\"\",\n \"\"Condition\"\": {{\n \"\"IpAddress\"\": {{\"\"aws:SourceIp\"\": [\"\"66.193.100.22/32\"\"]}}\n }}\n }}\n ]\n}}\n\";\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdomain := \"tf-test\"\n\t\tif param := cfg.Get(\"domain\"); param != \"\" {\n\t\t\tdomain = param\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = elasticsearch.NewDomain(ctx, \"example\", \u0026elasticsearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(domain),\n\t\t\tAccessPolicies: pulumi.Any(fmt.Sprintf(`{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:%v:%v:domain/%v/*\",\n \"Condition\": {\n \"IpAddress\": {\"aws:SourceIp\": [\"66.193.100.22/32\"]}\n }\n }\n ]\n}\n`, current.Name, currentGetCallerIdentity.AccountId, domain)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.elasticsearch.Domain;\nimport com.pulumi.aws.elasticsearch.DomainArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var domain = config.get(\"domain\").orElse(\"tf-test\");\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(domain)\n .accessPolicies(\"\"\"\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:%s:%s:domain/%s/*\",\n \"Condition\": {\n \"IpAddress\": {\"aws:SourceIp\": [\"66.193.100.22/32\"]}\n }\n }\n ]\n}\n\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),domain))\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n domain:\n type: string\n default: tf-test\nresources:\n example:\n type: aws:elasticsearch:Domain\n properties:\n domainName: ${domain}\n accessPolicies: |\n {\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\",\n \"Condition\": {\n \"IpAddress\": {\"aws:SourceIp\": [\"66.193.100.22/32\"]}\n }\n }\n ]\n }\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Log Publishing to CloudWatch Logs\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleLogGroup = new aws.cloudwatch.LogGroup(\"example\", {name: \"example\"});\nconst example = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"es.amazonaws.com\"],\n }],\n actions: [\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n ],\n resources: [\"arn:aws:logs:*\"],\n }],\n});\nconst exampleLogResourcePolicy = new aws.cloudwatch.LogResourcePolicy(\"example\", {\n policyName: \"example\",\n policyDocument: example.then(example =\u003e example.json),\n});\nconst exampleDomain = new aws.elasticsearch.Domain(\"example\", {logPublishingOptions: [{\n cloudwatchLogGroupArn: exampleLogGroup.arn,\n logType: \"INDEX_SLOW_LOGS\",\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_log_group = aws.cloudwatch.LogGroup(\"example\", name=\"example\")\nexample = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"es.amazonaws.com\"],\n }],\n \"actions\": [\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n ],\n \"resources\": [\"arn:aws:logs:*\"],\n}])\nexample_log_resource_policy = aws.cloudwatch.LogResourcePolicy(\"example\",\n policy_name=\"example\",\n policy_document=example.json)\nexample_domain = aws.elasticsearch.Domain(\"example\", log_publishing_options=[{\n \"cloudwatch_log_group_arn\": example_log_group.arn,\n \"log_type\": \"INDEX_SLOW_LOGS\",\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleLogGroup = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example\",\n });\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"es.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n },\n Resources = new[]\n {\n \"arn:aws:logs:*\",\n },\n },\n },\n });\n\n var exampleLogResourcePolicy = new Aws.CloudWatch.LogResourcePolicy(\"example\", new()\n {\n PolicyName = \"example\",\n PolicyDocument = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleDomain = new Aws.ElasticSearch.Domain(\"example\", new()\n {\n LogPublishingOptions = new[]\n {\n new Aws.ElasticSearch.Inputs.DomainLogPublishingOptionArgs\n {\n CloudwatchLogGroupArn = exampleLogGroup.Arn,\n LogType = \"INDEX_SLOW_LOGS\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleLogGroup, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"es.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"logs:PutLogEvents\",\n\t\t\t\t\t\t\"logs:PutLogEventsBatch\",\n\t\t\t\t\t\t\"logs:CreateLogStream\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:logs:*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewLogResourcePolicy(ctx, \"example\", \u0026cloudwatch.LogResourcePolicyArgs{\n\t\t\tPolicyName: pulumi.String(\"example\"),\n\t\t\tPolicyDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = elasticsearch.NewDomain(ctx, \"example\", \u0026elasticsearch.DomainArgs{\n\t\t\tLogPublishingOptions: elasticsearch.DomainLogPublishingOptionArray{\n\t\t\t\t\u0026elasticsearch.DomainLogPublishingOptionArgs{\n\t\t\t\t\tCloudwatchLogGroupArn: exampleLogGroup.Arn,\n\t\t\t\t\tLogType: pulumi.String(\"INDEX_SLOW_LOGS\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicy;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicyArgs;\nimport com.pulumi.aws.elasticsearch.Domain;\nimport com.pulumi.aws.elasticsearch.DomainArgs;\nimport com.pulumi.aws.elasticsearch.inputs.DomainLogPublishingOptionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleLogGroup = new LogGroup(\"exampleLogGroup\", LogGroupArgs.builder()\n .name(\"example\")\n .build());\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"es.amazonaws.com\")\n .build())\n .actions( \n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\")\n .resources(\"arn:aws:logs:*\")\n .build())\n .build());\n\n var exampleLogResourcePolicy = new LogResourcePolicy(\"exampleLogResourcePolicy\", LogResourcePolicyArgs.builder()\n .policyName(\"example\")\n .policyDocument(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .logPublishingOptions(DomainLogPublishingOptionArgs.builder()\n .cloudwatchLogGroupArn(exampleLogGroup.arn())\n .logType(\"INDEX_SLOW_LOGS\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleLogGroup:\n type: aws:cloudwatch:LogGroup\n name: example\n properties:\n name: example\n exampleLogResourcePolicy:\n type: aws:cloudwatch:LogResourcePolicy\n name: example\n properties:\n policyName: example\n policyDocument: ${example.json}\n exampleDomain:\n type: aws:elasticsearch:Domain\n name: example\n properties:\n logPublishingOptions:\n - cloudwatchLogGroupArn: ${exampleLogGroup.arn}\n logType: INDEX_SLOW_LOGS\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - es.amazonaws.com\n actions:\n - logs:PutLogEvents\n - logs:PutLogEventsBatch\n - logs:CreateLogStream\n resources:\n - arn:aws:logs:*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### VPC based ES\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst config = new pulumi.Config();\nconst vpc = config.requireObject(\"vpc\");\nconst domain = config.get(\"domain\") || \"tf-test\";\nconst selected = aws.ec2.getVpc({\n tags: {\n Name: vpc,\n },\n});\nconst selectedGetSubnets = selected.then(selected =\u003e aws.ec2.getSubnets({\n filters: [{\n name: \"vpc-id\",\n values: [selected.id],\n }],\n tags: {\n Tier: \"private\",\n },\n}));\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst es = new aws.ec2.SecurityGroup(\"es\", {\n name: `${vpc}-elasticsearch-${domain}`,\n description: \"Managed by Pulumi\",\n vpcId: selected.then(selected =\u003e selected.id),\n ingress: [{\n fromPort: 443,\n toPort: 443,\n protocol: \"tcp\",\n cidrBlocks: [selected.then(selected =\u003e selected.cidrBlock)],\n }],\n});\nconst esServiceLinkedRole = new aws.iam.ServiceLinkedRole(\"es\", {awsServiceName: \"opensearchservice.amazonaws.com\"});\nconst esDomain = new aws.elasticsearch.Domain(\"es\", {\n domainName: domain,\n elasticsearchVersion: \"6.3\",\n clusterConfig: {\n instanceType: \"m4.large.elasticsearch\",\n zoneAwarenessEnabled: true,\n },\n vpcOptions: {\n subnetIds: [\n selectedGetSubnets.then(selectedGetSubnets =\u003e selectedGetSubnets.ids?.[0]),\n selectedGetSubnets.then(selectedGetSubnets =\u003e selectedGetSubnets.ids?.[1]),\n ],\n securityGroupIds: [es.id],\n },\n advancedOptions: {\n \"rest.action.multi.allow_explicit_index\": \"true\",\n },\n accessPolicies: Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e `{\n\t\"Version\": \"2012-10-17\",\n\t\"Statement\": [\n\t\t{\n\t\t\t\"Action\": \"es:*\",\n\t\t\t\"Principal\": \"*\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Resource\": \"arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\"\n\t\t}\n\t]\n}\n`),\n tags: {\n Domain: \"TestDomain\",\n },\n}, {\n dependsOn: [esServiceLinkedRole],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\nvpc = config.require_object(\"vpc\")\ndomain = config.get(\"domain\")\nif domain is None:\n domain = \"tf-test\"\nselected = aws.ec2.get_vpc(tags={\n \"Name\": vpc,\n})\nselected_get_subnets = aws.ec2.get_subnets(filters=[{\n \"name\": \"vpc-id\",\n \"values\": [selected.id],\n }],\n tags={\n \"Tier\": \"private\",\n })\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nes = aws.ec2.SecurityGroup(\"es\",\n name=f\"{vpc}-elasticsearch-{domain}\",\n description=\"Managed by Pulumi\",\n vpc_id=selected.id,\n ingress=[{\n \"from_port\": 443,\n \"to_port\": 443,\n \"protocol\": \"tcp\",\n \"cidr_blocks\": [selected.cidr_block],\n }])\nes_service_linked_role = aws.iam.ServiceLinkedRole(\"es\", aws_service_name=\"opensearchservice.amazonaws.com\")\nes_domain = aws.elasticsearch.Domain(\"es\",\n domain_name=domain,\n elasticsearch_version=\"6.3\",\n cluster_config={\n \"instance_type\": \"m4.large.elasticsearch\",\n \"zone_awareness_enabled\": True,\n },\n vpc_options={\n \"subnet_ids\": [\n selected_get_subnets.ids[0],\n selected_get_subnets.ids[1],\n ],\n \"security_group_ids\": [es.id],\n },\n advanced_options={\n \"rest.action.multi.allow_explicit_index\": \"true\",\n },\n access_policies=f\"\"\"{{\n\\x09\"Version\": \"2012-10-17\",\n\\x09\"Statement\": [\n\\x09\\x09{{\n\\x09\\x09\\x09\"Action\": \"es:*\",\n\\x09\\x09\\x09\"Principal\": \"*\",\n\\x09\\x09\\x09\"Effect\": \"Allow\",\n\\x09\\x09\\x09\"Resource\": \"arn:aws:es:{current.name}:{current_get_caller_identity.account_id}:domain/{domain}/*\"\n\\x09\\x09}}\n\\x09]\n}}\n\"\"\",\n tags={\n \"Domain\": \"TestDomain\",\n },\n opts = pulumi.ResourceOptions(depends_on=[es_service_linked_role]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var vpc = config.RequireObject\u003cdynamic\u003e(\"vpc\");\n var domain = config.Get(\"domain\") ?? \"tf-test\";\n var selected = Aws.Ec2.GetVpc.Invoke(new()\n {\n Tags = \n {\n { \"Name\", vpc },\n },\n });\n\n var selectedGetSubnets = Aws.Ec2.GetSubnets.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetSubnetsFilterInputArgs\n {\n Name = \"vpc-id\",\n Values = new[]\n {\n selected.Apply(getVpcResult =\u003e getVpcResult.Id),\n },\n },\n },\n Tags = \n {\n { \"Tier\", \"private\" },\n },\n });\n\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var es = new Aws.Ec2.SecurityGroup(\"es\", new()\n {\n Name = $\"{vpc}-elasticsearch-{domain}\",\n Description = \"Managed by Pulumi\",\n VpcId = selected.Apply(getVpcResult =\u003e getVpcResult.Id),\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.SecurityGroupIngressArgs\n {\n FromPort = 443,\n ToPort = 443,\n Protocol = \"tcp\",\n CidrBlocks = new[]\n {\n selected.Apply(getVpcResult =\u003e getVpcResult.CidrBlock),\n },\n },\n },\n });\n\n var esServiceLinkedRole = new Aws.Iam.ServiceLinkedRole(\"es\", new()\n {\n AwsServiceName = \"opensearchservice.amazonaws.com\",\n });\n\n var esDomain = new Aws.ElasticSearch.Domain(\"es\", new()\n {\n DomainName = domain,\n ElasticsearchVersion = \"6.3\",\n ClusterConfig = new Aws.ElasticSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"m4.large.elasticsearch\",\n ZoneAwarenessEnabled = true,\n },\n VpcOptions = new Aws.ElasticSearch.Inputs.DomainVpcOptionsArgs\n {\n SubnetIds = new[]\n {\n selectedGetSubnets.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[0]),\n selectedGetSubnets.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[1]),\n },\n SecurityGroupIds = new[]\n {\n es.Id,\n },\n },\n AdvancedOptions = \n {\n { \"rest.action.multi.allow_explicit_index\", \"true\" },\n },\n AccessPolicies = Output.Tuple(current, currentGetCallerIdentity).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n return @$\"{{\n\t\"\"Version\"\": \"\"2012-10-17\"\",\n\t\"\"Statement\"\": [\n\t\t{{\n\t\t\t\"\"Action\"\": \"\"es:*\"\",\n\t\t\t\"\"Principal\"\": \"\"*\"\",\n\t\t\t\"\"Effect\"\": \"\"Allow\"\",\n\t\t\t\"\"Resource\"\": \"\"arn:aws:es:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:domain/{domain}/*\"\"\n\t\t}}\n\t]\n}}\n\";\n }),\n Tags = \n {\n { \"Domain\", \"TestDomain\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n esServiceLinkedRole,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\ncfg := config.New(ctx, \"\")\nvpc := cfg.RequireObject(\"vpc\")\ndomain := \"tf-test\";\nif param := cfg.Get(\"domain\"); param != \"\"{\ndomain = param\n}\nselected, err := ec2.LookupVpc(ctx, \u0026ec2.LookupVpcArgs{\nTags: pulumi.StringMap{\n\"Name\": vpc,\n},\n}, nil);\nif err != nil {\nreturn err\n}\nselectedGetSubnets, err := ec2.GetSubnets(ctx, \u0026ec2.GetSubnetsArgs{\nFilters: []ec2.GetSubnetsFilter{\n{\nName: \"vpc-id\",\nValues: interface{}{\nselected.Id,\n},\n},\n},\nTags: map[string]interface{}{\n\"Tier\": \"private\",\n},\n}, nil);\nif err != nil {\nreturn err\n}\ncurrent, err := aws.GetRegion(ctx, nil, nil);\nif err != nil {\nreturn err\n}\ncurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nes, err := ec2.NewSecurityGroup(ctx, \"es\", \u0026ec2.SecurityGroupArgs{\nName: pulumi.Sprintf(\"%v-elasticsearch-%v\", vpc, domain),\nDescription: pulumi.String(\"Managed by Pulumi\"),\nVpcId: pulumi.String(selected.Id),\nIngress: ec2.SecurityGroupIngressArray{\n\u0026ec2.SecurityGroupIngressArgs{\nFromPort: pulumi.Int(443),\nToPort: pulumi.Int(443),\nProtocol: pulumi.String(\"tcp\"),\nCidrBlocks: pulumi.StringArray{\npulumi.String(selected.CidrBlock),\n},\n},\n},\n})\nif err != nil {\nreturn err\n}\nesServiceLinkedRole, err := iam.NewServiceLinkedRole(ctx, \"es\", \u0026iam.ServiceLinkedRoleArgs{\nAwsServiceName: pulumi.String(\"opensearchservice.amazonaws.com\"),\n})\nif err != nil {\nreturn err\n}\n_, err = elasticsearch.NewDomain(ctx, \"es\", \u0026elasticsearch.DomainArgs{\nDomainName: pulumi.String(domain),\nElasticsearchVersion: pulumi.String(\"6.3\"),\nClusterConfig: \u0026elasticsearch.DomainClusterConfigArgs{\nInstanceType: pulumi.String(\"m4.large.elasticsearch\"),\nZoneAwarenessEnabled: pulumi.Bool(true),\n},\nVpcOptions: \u0026elasticsearch.DomainVpcOptionsArgs{\nSubnetIds: pulumi.StringArray{\npulumi.String(selectedGetSubnets.Ids[0]),\npulumi.String(selectedGetSubnets.Ids[1]),\n},\nSecurityGroupIds: pulumi.StringArray{\nes.ID(),\n},\n},\nAdvancedOptions: pulumi.StringMap{\n\"rest.action.multi.allow_explicit_index\": pulumi.String(\"true\"),\n},\nAccessPolicies: pulumi.Any(fmt.Sprintf(`{\n\t\"Version\": \"2012-10-17\",\n\t\"Statement\": [\n\t\t{\n\t\t\t\"Action\": \"es:*\",\n\t\t\t\"Principal\": \"*\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Resource\": \"arn:aws:es:%v:%v:domain/%v/*\"\n\t\t}\n\t]\n}\n`, current.Name, currentGetCallerIdentity.AccountId, domain)),\nTags: pulumi.StringMap{\n\"Domain\": pulumi.String(\"TestDomain\"),\n},\n}, pulumi.DependsOn([]pulumi.Resource{\nesServiceLinkedRole,\n}))\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetVpcArgs;\nimport com.pulumi.aws.ec2.inputs.GetSubnetsArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.SecurityGroup;\nimport com.pulumi.aws.ec2.SecurityGroupArgs;\nimport com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;\nimport com.pulumi.aws.iam.ServiceLinkedRole;\nimport com.pulumi.aws.iam.ServiceLinkedRoleArgs;\nimport com.pulumi.aws.elasticsearch.Domain;\nimport com.pulumi.aws.elasticsearch.DomainArgs;\nimport com.pulumi.aws.elasticsearch.inputs.DomainClusterConfigArgs;\nimport com.pulumi.aws.elasticsearch.inputs.DomainVpcOptionsArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var vpc = config.get(\"vpc\");\n final var domain = config.get(\"domain\").orElse(\"tf-test\");\n final var selected = Ec2Functions.getVpc(GetVpcArgs.builder()\n .tags(Map.of(\"Name\", vpc))\n .build());\n\n final var selectedGetSubnets = Ec2Functions.getSubnets(GetSubnetsArgs.builder()\n .filters(GetSubnetsFilterArgs.builder()\n .name(\"vpc-id\")\n .values(selected.applyValue(getVpcResult -\u003e getVpcResult.id()))\n .build())\n .tags(Map.of(\"Tier\", \"private\"))\n .build());\n\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var es = new SecurityGroup(\"es\", SecurityGroupArgs.builder()\n .name(String.format(\"%s-elasticsearch-%s\", vpc,domain))\n .description(\"Managed by Pulumi\")\n .vpcId(selected.applyValue(getVpcResult -\u003e getVpcResult.id()))\n .ingress(SecurityGroupIngressArgs.builder()\n .fromPort(443)\n .toPort(443)\n .protocol(\"tcp\")\n .cidrBlocks(selected.applyValue(getVpcResult -\u003e getVpcResult.cidrBlock()))\n .build())\n .build());\n\n var esServiceLinkedRole = new ServiceLinkedRole(\"esServiceLinkedRole\", ServiceLinkedRoleArgs.builder()\n .awsServiceName(\"opensearchservice.amazonaws.com\")\n .build());\n\n var esDomain = new Domain(\"esDomain\", DomainArgs.builder()\n .domainName(domain)\n .elasticsearchVersion(\"6.3\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"m4.large.elasticsearch\")\n .zoneAwarenessEnabled(true)\n .build())\n .vpcOptions(DomainVpcOptionsArgs.builder()\n .subnetIds( \n selectedGetSubnets.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[0]),\n selectedGetSubnets.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[1]))\n .securityGroupIds(es.id())\n .build())\n .advancedOptions(Map.of(\"rest.action.multi.allow_explicit_index\", \"true\"))\n .accessPolicies(\"\"\"\n{\n\t\"Version\": \"2012-10-17\",\n\t\"Statement\": [\n\t\t{\n\t\t\t\"Action\": \"es:*\",\n\t\t\t\"Principal\": \"*\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Resource\": \"arn:aws:es:%s:%s:domain/%s/*\"\n\t\t}\n\t]\n}\n\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),domain))\n .tags(Map.of(\"Domain\", \"TestDomain\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(esServiceLinkedRole)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n vpc:\n type: dynamic\n domain:\n type: string\n default: tf-test\nresources:\n es:\n type: aws:ec2:SecurityGroup\n properties:\n name: ${vpc}-elasticsearch-${domain}\n description: Managed by Pulumi\n vpcId: ${selected.id}\n ingress:\n - fromPort: 443\n toPort: 443\n protocol: tcp\n cidrBlocks:\n - ${selected.cidrBlock}\n esServiceLinkedRole:\n type: aws:iam:ServiceLinkedRole\n name: es\n properties:\n awsServiceName: opensearchservice.amazonaws.com\n esDomain:\n type: aws:elasticsearch:Domain\n name: es\n properties:\n domainName: ${domain}\n elasticsearchVersion: '6.3'\n clusterConfig:\n instanceType: m4.large.elasticsearch\n zoneAwarenessEnabled: true\n vpcOptions:\n subnetIds:\n - ${selectedGetSubnets.ids[0]}\n - ${selectedGetSubnets.ids[1]}\n securityGroupIds:\n - ${es.id}\n advancedOptions:\n rest.action.multi.allow_explicit_index: 'true'\n accessPolicies: |\n {\n \t\"Version\": \"2012-10-17\",\n \t\"Statement\": [\n \t\t{\n \t\t\t\"Action\": \"es:*\",\n \t\t\t\"Principal\": \"*\",\n \t\t\t\"Effect\": \"Allow\",\n \t\t\t\"Resource\": \"arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\"\n \t\t}\n \t]\n }\n tags:\n Domain: TestDomain\n options:\n dependson:\n - ${esServiceLinkedRole}\nvariables:\n selected:\n fn::invoke:\n Function: aws:ec2:getVpc\n Arguments:\n tags:\n Name: ${vpc}\n selectedGetSubnets:\n fn::invoke:\n Function: aws:ec2:getSubnets\n Arguments:\n filters:\n - name: vpc-id\n values:\n - ${selected.id}\n tags:\n Tier: private\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Elasticsearch domains using the `domain_name`. For example:\n\n```sh\n$ pulumi import aws:elasticsearch/domain:Domain example domain_name\n```\n", + "description": "Manages an AWS Elasticsearch Domain.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.elasticsearch.Domain(\"example\", {\n domainName: \"example\",\n elasticsearchVersion: \"7.10\",\n clusterConfig: {\n instanceType: \"r4.large.elasticsearch\",\n },\n tags: {\n Domain: \"TestDomain\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.elasticsearch.Domain(\"example\",\n domain_name=\"example\",\n elasticsearch_version=\"7.10\",\n cluster_config={\n \"instance_type\": \"r4.large.elasticsearch\",\n },\n tags={\n \"Domain\": \"TestDomain\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.ElasticSearch.Domain(\"example\", new()\n {\n DomainName = \"example\",\n ElasticsearchVersion = \"7.10\",\n ClusterConfig = new Aws.ElasticSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"r4.large.elasticsearch\",\n },\n Tags = \n {\n { \"Domain\", \"TestDomain\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticsearch.NewDomain(ctx, \"example\", \u0026elasticsearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"example\"),\n\t\t\tElasticsearchVersion: pulumi.String(\"7.10\"),\n\t\t\tClusterConfig: \u0026elasticsearch.DomainClusterConfigArgs{\n\t\t\t\tInstanceType: pulumi.String(\"r4.large.elasticsearch\"),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Domain\": pulumi.String(\"TestDomain\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticsearch.Domain;\nimport com.pulumi.aws.elasticsearch.DomainArgs;\nimport com.pulumi.aws.elasticsearch.inputs.DomainClusterConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(\"example\")\n .elasticsearchVersion(\"7.10\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"r4.large.elasticsearch\")\n .build())\n .tags(Map.of(\"Domain\", \"TestDomain\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:elasticsearch:Domain\n properties:\n domainName: example\n elasticsearchVersion: '7.10'\n clusterConfig:\n instanceType: r4.large.elasticsearch\n tags:\n Domain: TestDomain\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Access Policy\n\n\u003e See also: `aws.elasticsearch.DomainPolicy` resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst config = new pulumi.Config();\nconst domain = config.get(\"domain\") || \"tf-test\";\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst example = new aws.elasticsearch.Domain(\"example\", {\n domainName: domain,\n accessPolicies: Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e `{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\",\n \"Condition\": {\n \"IpAddress\": {\"aws:SourceIp\": [\"66.193.100.22/32\"]}\n }\n }\n ]\n}\n`),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\ndomain = config.get(\"domain\")\nif domain is None:\n domain = \"tf-test\"\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample = aws.elasticsearch.Domain(\"example\",\n domain_name=domain,\n access_policies=f\"\"\"{{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {{\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:{current.name}:{current_get_caller_identity.account_id}:domain/{domain}/*\",\n \"Condition\": {{\n \"IpAddress\": {{\"aws:SourceIp\": [\"66.193.100.22/32\"]}}\n }}\n }}\n ]\n}}\n\"\"\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var domain = config.Get(\"domain\") ?? \"tf-test\";\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.ElasticSearch.Domain(\"example\", new()\n {\n DomainName = domain,\n AccessPolicies = Output.Tuple(current, currentGetCallerIdentity).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n return @$\"{{\n \"\"Version\"\": \"\"2012-10-17\"\",\n \"\"Statement\"\": [\n {{\n \"\"Action\"\": \"\"es:*\"\",\n \"\"Principal\"\": \"\"*\"\",\n \"\"Effect\"\": \"\"Allow\"\",\n \"\"Resource\"\": \"\"arn:aws:es:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:domain/{domain}/*\"\",\n \"\"Condition\"\": {{\n \"\"IpAddress\"\": {{\"\"aws:SourceIp\"\": [\"\"66.193.100.22/32\"\"]}}\n }}\n }}\n ]\n}}\n\";\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdomain := \"tf-test\"\n\t\tif param := cfg.Get(\"domain\"); param != \"\" {\n\t\t\tdomain = param\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = elasticsearch.NewDomain(ctx, \"example\", \u0026elasticsearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(domain),\n\t\t\tAccessPolicies: pulumi.Any(fmt.Sprintf(`{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:%v:%v:domain/%v/*\",\n \"Condition\": {\n \"IpAddress\": {\"aws:SourceIp\": [\"66.193.100.22/32\"]}\n }\n }\n ]\n}\n`, current.Name, currentGetCallerIdentity.AccountId, domain)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.elasticsearch.Domain;\nimport com.pulumi.aws.elasticsearch.DomainArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var domain = config.get(\"domain\").orElse(\"tf-test\");\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(domain)\n .accessPolicies(\"\"\"\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:%s:%s:domain/%s/*\",\n \"Condition\": {\n \"IpAddress\": {\"aws:SourceIp\": [\"66.193.100.22/32\"]}\n }\n }\n ]\n}\n\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),domain))\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n domain:\n type: string\n default: tf-test\nresources:\n example:\n type: aws:elasticsearch:Domain\n properties:\n domainName: ${domain}\n accessPolicies: |\n {\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"es:*\",\n \"Principal\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\",\n \"Condition\": {\n \"IpAddress\": {\"aws:SourceIp\": [\"66.193.100.22/32\"]}\n }\n }\n ]\n }\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Log Publishing to CloudWatch Logs\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleLogGroup = new aws.cloudwatch.LogGroup(\"example\", {name: \"example\"});\nconst example = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"es.amazonaws.com\"],\n }],\n actions: [\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n ],\n resources: [\"arn:aws:logs:*\"],\n }],\n});\nconst exampleLogResourcePolicy = new aws.cloudwatch.LogResourcePolicy(\"example\", {\n policyName: \"example\",\n policyDocument: example.then(example =\u003e example.json),\n});\nconst exampleDomain = new aws.elasticsearch.Domain(\"example\", {logPublishingOptions: [{\n cloudwatchLogGroupArn: exampleLogGroup.arn,\n logType: \"INDEX_SLOW_LOGS\",\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_log_group = aws.cloudwatch.LogGroup(\"example\", name=\"example\")\nexample = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"es.amazonaws.com\"],\n }],\n \"actions\": [\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n ],\n \"resources\": [\"arn:aws:logs:*\"],\n}])\nexample_log_resource_policy = aws.cloudwatch.LogResourcePolicy(\"example\",\n policy_name=\"example\",\n policy_document=example.json)\nexample_domain = aws.elasticsearch.Domain(\"example\", log_publishing_options=[{\n \"cloudwatch_log_group_arn\": example_log_group.arn,\n \"log_type\": \"INDEX_SLOW_LOGS\",\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleLogGroup = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example\",\n });\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"es.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n },\n Resources = new[]\n {\n \"arn:aws:logs:*\",\n },\n },\n },\n });\n\n var exampleLogResourcePolicy = new Aws.CloudWatch.LogResourcePolicy(\"example\", new()\n {\n PolicyName = \"example\",\n PolicyDocument = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleDomain = new Aws.ElasticSearch.Domain(\"example\", new()\n {\n LogPublishingOptions = new[]\n {\n new Aws.ElasticSearch.Inputs.DomainLogPublishingOptionArgs\n {\n CloudwatchLogGroupArn = exampleLogGroup.Arn,\n LogType = \"INDEX_SLOW_LOGS\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleLogGroup, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"es.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"logs:PutLogEvents\",\n\t\t\t\t\t\t\"logs:PutLogEventsBatch\",\n\t\t\t\t\t\t\"logs:CreateLogStream\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:logs:*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewLogResourcePolicy(ctx, \"example\", \u0026cloudwatch.LogResourcePolicyArgs{\n\t\t\tPolicyName: pulumi.String(\"example\"),\n\t\t\tPolicyDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = elasticsearch.NewDomain(ctx, \"example\", \u0026elasticsearch.DomainArgs{\n\t\t\tLogPublishingOptions: elasticsearch.DomainLogPublishingOptionArray{\n\t\t\t\t\u0026elasticsearch.DomainLogPublishingOptionArgs{\n\t\t\t\t\tCloudwatchLogGroupArn: exampleLogGroup.Arn,\n\t\t\t\t\tLogType: pulumi.String(\"INDEX_SLOW_LOGS\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicy;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicyArgs;\nimport com.pulumi.aws.elasticsearch.Domain;\nimport com.pulumi.aws.elasticsearch.DomainArgs;\nimport com.pulumi.aws.elasticsearch.inputs.DomainLogPublishingOptionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleLogGroup = new LogGroup(\"exampleLogGroup\", LogGroupArgs.builder()\n .name(\"example\")\n .build());\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"es.amazonaws.com\")\n .build())\n .actions( \n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\")\n .resources(\"arn:aws:logs:*\")\n .build())\n .build());\n\n var exampleLogResourcePolicy = new LogResourcePolicy(\"exampleLogResourcePolicy\", LogResourcePolicyArgs.builder()\n .policyName(\"example\")\n .policyDocument(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .logPublishingOptions(DomainLogPublishingOptionArgs.builder()\n .cloudwatchLogGroupArn(exampleLogGroup.arn())\n .logType(\"INDEX_SLOW_LOGS\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleLogGroup:\n type: aws:cloudwatch:LogGroup\n name: example\n properties:\n name: example\n exampleLogResourcePolicy:\n type: aws:cloudwatch:LogResourcePolicy\n name: example\n properties:\n policyName: example\n policyDocument: ${example.json}\n exampleDomain:\n type: aws:elasticsearch:Domain\n name: example\n properties:\n logPublishingOptions:\n - cloudwatchLogGroupArn: ${exampleLogGroup.arn}\n logType: INDEX_SLOW_LOGS\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - es.amazonaws.com\n actions:\n - logs:PutLogEvents\n - logs:PutLogEventsBatch\n - logs:CreateLogStream\n resources:\n - arn:aws:logs:*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### VPC based ES\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst config = new pulumi.Config();\nconst vpc = config.requireObject(\"vpc\");\nconst domain = config.get(\"domain\") || \"tf-test\";\nconst selected = aws.ec2.getVpc({\n tags: {\n Name: vpc,\n },\n});\nconst selectedGetSubnets = selected.then(selected =\u003e aws.ec2.getSubnets({\n filters: [{\n name: \"vpc-id\",\n values: [selected.id],\n }],\n tags: {\n Tier: \"private\",\n },\n}));\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst es = new aws.ec2.SecurityGroup(\"es\", {\n name: `${vpc}-elasticsearch-${domain}`,\n description: \"Managed by Pulumi\",\n vpcId: selected.then(selected =\u003e selected.id),\n ingress: [{\n fromPort: 443,\n toPort: 443,\n protocol: \"tcp\",\n cidrBlocks: [selected.then(selected =\u003e selected.cidrBlock)],\n }],\n});\nconst esServiceLinkedRole = new aws.iam.ServiceLinkedRole(\"es\", {awsServiceName: \"opensearchservice.amazonaws.com\"});\nconst esDomain = new aws.elasticsearch.Domain(\"es\", {\n domainName: domain,\n elasticsearchVersion: \"6.3\",\n clusterConfig: {\n instanceType: \"m4.large.elasticsearch\",\n zoneAwarenessEnabled: true,\n },\n vpcOptions: {\n subnetIds: [\n selectedGetSubnets.then(selectedGetSubnets =\u003e selectedGetSubnets.ids?.[0]),\n selectedGetSubnets.then(selectedGetSubnets =\u003e selectedGetSubnets.ids?.[1]),\n ],\n securityGroupIds: [es.id],\n },\n advancedOptions: {\n \"rest.action.multi.allow_explicit_index\": \"true\",\n },\n accessPolicies: Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e `{\n\t\"Version\": \"2012-10-17\",\n\t\"Statement\": [\n\t\t{\n\t\t\t\"Action\": \"es:*\",\n\t\t\t\"Principal\": \"*\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Resource\": \"arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\"\n\t\t}\n\t]\n}\n`),\n tags: {\n Domain: \"TestDomain\",\n },\n}, {\n dependsOn: [esServiceLinkedRole],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\nvpc = config.require_object(\"vpc\")\ndomain = config.get(\"domain\")\nif domain is None:\n domain = \"tf-test\"\nselected = aws.ec2.get_vpc(tags={\n \"Name\": vpc,\n})\nselected_get_subnets = aws.ec2.get_subnets(filters=[{\n \"name\": \"vpc-id\",\n \"values\": [selected.id],\n }],\n tags={\n \"Tier\": \"private\",\n })\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nes = aws.ec2.SecurityGroup(\"es\",\n name=f\"{vpc}-elasticsearch-{domain}\",\n description=\"Managed by Pulumi\",\n vpc_id=selected.id,\n ingress=[{\n \"from_port\": 443,\n \"to_port\": 443,\n \"protocol\": \"tcp\",\n \"cidr_blocks\": [selected.cidr_block],\n }])\nes_service_linked_role = aws.iam.ServiceLinkedRole(\"es\", aws_service_name=\"opensearchservice.amazonaws.com\")\nes_domain = aws.elasticsearch.Domain(\"es\",\n domain_name=domain,\n elasticsearch_version=\"6.3\",\n cluster_config={\n \"instance_type\": \"m4.large.elasticsearch\",\n \"zone_awareness_enabled\": True,\n },\n vpc_options={\n \"subnet_ids\": [\n selected_get_subnets.ids[0],\n selected_get_subnets.ids[1],\n ],\n \"security_group_ids\": [es.id],\n },\n advanced_options={\n \"rest.action.multi.allow_explicit_index\": \"true\",\n },\n access_policies=f\"\"\"{{\n\\x09\"Version\": \"2012-10-17\",\n\\x09\"Statement\": [\n\\x09\\x09{{\n\\x09\\x09\\x09\"Action\": \"es:*\",\n\\x09\\x09\\x09\"Principal\": \"*\",\n\\x09\\x09\\x09\"Effect\": \"Allow\",\n\\x09\\x09\\x09\"Resource\": \"arn:aws:es:{current.name}:{current_get_caller_identity.account_id}:domain/{domain}/*\"\n\\x09\\x09}}\n\\x09]\n}}\n\"\"\",\n tags={\n \"Domain\": \"TestDomain\",\n },\n opts = pulumi.ResourceOptions(depends_on=[es_service_linked_role]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var vpc = config.RequireObject\u003cdynamic\u003e(\"vpc\");\n var domain = config.Get(\"domain\") ?? \"tf-test\";\n var selected = Aws.Ec2.GetVpc.Invoke(new()\n {\n Tags = \n {\n { \"Name\", vpc },\n },\n });\n\n var selectedGetSubnets = Aws.Ec2.GetSubnets.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetSubnetsFilterInputArgs\n {\n Name = \"vpc-id\",\n Values = new[]\n {\n selected.Apply(getVpcResult =\u003e getVpcResult.Id),\n },\n },\n },\n Tags = \n {\n { \"Tier\", \"private\" },\n },\n });\n\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var es = new Aws.Ec2.SecurityGroup(\"es\", new()\n {\n Name = $\"{vpc}-elasticsearch-{domain}\",\n Description = \"Managed by Pulumi\",\n VpcId = selected.Apply(getVpcResult =\u003e getVpcResult.Id),\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.SecurityGroupIngressArgs\n {\n FromPort = 443,\n ToPort = 443,\n Protocol = \"tcp\",\n CidrBlocks = new[]\n {\n selected.Apply(getVpcResult =\u003e getVpcResult.CidrBlock),\n },\n },\n },\n });\n\n var esServiceLinkedRole = new Aws.Iam.ServiceLinkedRole(\"es\", new()\n {\n AwsServiceName = \"opensearchservice.amazonaws.com\",\n });\n\n var esDomain = new Aws.ElasticSearch.Domain(\"es\", new()\n {\n DomainName = domain,\n ElasticsearchVersion = \"6.3\",\n ClusterConfig = new Aws.ElasticSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"m4.large.elasticsearch\",\n ZoneAwarenessEnabled = true,\n },\n VpcOptions = new Aws.ElasticSearch.Inputs.DomainVpcOptionsArgs\n {\n SubnetIds = new[]\n {\n selectedGetSubnets.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[0]),\n selectedGetSubnets.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[1]),\n },\n SecurityGroupIds = new[]\n {\n es.Id,\n },\n },\n AdvancedOptions = \n {\n { \"rest.action.multi.allow_explicit_index\", \"true\" },\n },\n AccessPolicies = Output.Tuple(current, currentGetCallerIdentity).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n return @$\"{{\n\t\"\"Version\"\": \"\"2012-10-17\"\",\n\t\"\"Statement\"\": [\n\t\t{{\n\t\t\t\"\"Action\"\": \"\"es:*\"\",\n\t\t\t\"\"Principal\"\": \"\"*\"\",\n\t\t\t\"\"Effect\"\": \"\"Allow\"\",\n\t\t\t\"\"Resource\"\": \"\"arn:aws:es:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:domain/{domain}/*\"\"\n\t\t}}\n\t]\n}}\n\";\n }),\n Tags = \n {\n { \"Domain\", \"TestDomain\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n esServiceLinkedRole,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticsearch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\ncfg := config.New(ctx, \"\")\nvpc := cfg.RequireObject(\"vpc\")\ndomain := \"tf-test\";\nif param := cfg.Get(\"domain\"); param != \"\"{\ndomain = param\n}\nselected, err := ec2.LookupVpc(ctx, \u0026ec2.LookupVpcArgs{\nTags: pulumi.StringMap{\n\"Name\": vpc,\n},\n}, nil);\nif err != nil {\nreturn err\n}\nselectedGetSubnets, err := ec2.GetSubnets(ctx, \u0026ec2.GetSubnetsArgs{\nFilters: []ec2.GetSubnetsFilter{\n{\nName: \"vpc-id\",\nValues: interface{}{\nselected.Id,\n},\n},\n},\nTags: map[string]interface{}{\n\"Tier\": \"private\",\n},\n}, nil);\nif err != nil {\nreturn err\n}\ncurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{\n}, nil);\nif err != nil {\nreturn err\n}\ncurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{\n}, nil);\nif err != nil {\nreturn err\n}\nes, err := ec2.NewSecurityGroup(ctx, \"es\", \u0026ec2.SecurityGroupArgs{\nName: pulumi.Sprintf(\"%v-elasticsearch-%v\", vpc, domain),\nDescription: pulumi.String(\"Managed by Pulumi\"),\nVpcId: pulumi.String(selected.Id),\nIngress: ec2.SecurityGroupIngressArray{\n\u0026ec2.SecurityGroupIngressArgs{\nFromPort: pulumi.Int(443),\nToPort: pulumi.Int(443),\nProtocol: pulumi.String(\"tcp\"),\nCidrBlocks: pulumi.StringArray{\npulumi.String(selected.CidrBlock),\n},\n},\n},\n})\nif err != nil {\nreturn err\n}\nesServiceLinkedRole, err := iam.NewServiceLinkedRole(ctx, \"es\", \u0026iam.ServiceLinkedRoleArgs{\nAwsServiceName: pulumi.String(\"opensearchservice.amazonaws.com\"),\n})\nif err != nil {\nreturn err\n}\n_, err = elasticsearch.NewDomain(ctx, \"es\", \u0026elasticsearch.DomainArgs{\nDomainName: pulumi.String(domain),\nElasticsearchVersion: pulumi.String(\"6.3\"),\nClusterConfig: \u0026elasticsearch.DomainClusterConfigArgs{\nInstanceType: pulumi.String(\"m4.large.elasticsearch\"),\nZoneAwarenessEnabled: pulumi.Bool(true),\n},\nVpcOptions: \u0026elasticsearch.DomainVpcOptionsArgs{\nSubnetIds: pulumi.StringArray{\npulumi.String(selectedGetSubnets.Ids[0]),\npulumi.String(selectedGetSubnets.Ids[1]),\n},\nSecurityGroupIds: pulumi.StringArray{\nes.ID(),\n},\n},\nAdvancedOptions: pulumi.StringMap{\n\"rest.action.multi.allow_explicit_index\": pulumi.String(\"true\"),\n},\nAccessPolicies: pulumi.Any(fmt.Sprintf(`{\n\t\"Version\": \"2012-10-17\",\n\t\"Statement\": [\n\t\t{\n\t\t\t\"Action\": \"es:*\",\n\t\t\t\"Principal\": \"*\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Resource\": \"arn:aws:es:%v:%v:domain/%v/*\"\n\t\t}\n\t]\n}\n`, current.Name, currentGetCallerIdentity.AccountId, domain)),\nTags: pulumi.StringMap{\n\"Domain\": pulumi.String(\"TestDomain\"),\n},\n}, pulumi.DependsOn([]pulumi.Resource{\nesServiceLinkedRole,\n}))\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetVpcArgs;\nimport com.pulumi.aws.ec2.inputs.GetSubnetsArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.SecurityGroup;\nimport com.pulumi.aws.ec2.SecurityGroupArgs;\nimport com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;\nimport com.pulumi.aws.iam.ServiceLinkedRole;\nimport com.pulumi.aws.iam.ServiceLinkedRoleArgs;\nimport com.pulumi.aws.elasticsearch.Domain;\nimport com.pulumi.aws.elasticsearch.DomainArgs;\nimport com.pulumi.aws.elasticsearch.inputs.DomainClusterConfigArgs;\nimport com.pulumi.aws.elasticsearch.inputs.DomainVpcOptionsArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var vpc = config.get(\"vpc\");\n final var domain = config.get(\"domain\").orElse(\"tf-test\");\n final var selected = Ec2Functions.getVpc(GetVpcArgs.builder()\n .tags(Map.of(\"Name\", vpc))\n .build());\n\n final var selectedGetSubnets = Ec2Functions.getSubnets(GetSubnetsArgs.builder()\n .filters(GetSubnetsFilterArgs.builder()\n .name(\"vpc-id\")\n .values(selected.applyValue(getVpcResult -\u003e getVpcResult.id()))\n .build())\n .tags(Map.of(\"Tier\", \"private\"))\n .build());\n\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var es = new SecurityGroup(\"es\", SecurityGroupArgs.builder()\n .name(String.format(\"%s-elasticsearch-%s\", vpc,domain))\n .description(\"Managed by Pulumi\")\n .vpcId(selected.applyValue(getVpcResult -\u003e getVpcResult.id()))\n .ingress(SecurityGroupIngressArgs.builder()\n .fromPort(443)\n .toPort(443)\n .protocol(\"tcp\")\n .cidrBlocks(selected.applyValue(getVpcResult -\u003e getVpcResult.cidrBlock()))\n .build())\n .build());\n\n var esServiceLinkedRole = new ServiceLinkedRole(\"esServiceLinkedRole\", ServiceLinkedRoleArgs.builder()\n .awsServiceName(\"opensearchservice.amazonaws.com\")\n .build());\n\n var esDomain = new Domain(\"esDomain\", DomainArgs.builder()\n .domainName(domain)\n .elasticsearchVersion(\"6.3\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"m4.large.elasticsearch\")\n .zoneAwarenessEnabled(true)\n .build())\n .vpcOptions(DomainVpcOptionsArgs.builder()\n .subnetIds( \n selectedGetSubnets.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[0]),\n selectedGetSubnets.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[1]))\n .securityGroupIds(es.id())\n .build())\n .advancedOptions(Map.of(\"rest.action.multi.allow_explicit_index\", \"true\"))\n .accessPolicies(\"\"\"\n{\n\t\"Version\": \"2012-10-17\",\n\t\"Statement\": [\n\t\t{\n\t\t\t\"Action\": \"es:*\",\n\t\t\t\"Principal\": \"*\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Resource\": \"arn:aws:es:%s:%s:domain/%s/*\"\n\t\t}\n\t]\n}\n\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),domain))\n .tags(Map.of(\"Domain\", \"TestDomain\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(esServiceLinkedRole)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n vpc:\n type: dynamic\n domain:\n type: string\n default: tf-test\nresources:\n es:\n type: aws:ec2:SecurityGroup\n properties:\n name: ${vpc}-elasticsearch-${domain}\n description: Managed by Pulumi\n vpcId: ${selected.id}\n ingress:\n - fromPort: 443\n toPort: 443\n protocol: tcp\n cidrBlocks:\n - ${selected.cidrBlock}\n esServiceLinkedRole:\n type: aws:iam:ServiceLinkedRole\n name: es\n properties:\n awsServiceName: opensearchservice.amazonaws.com\n esDomain:\n type: aws:elasticsearch:Domain\n name: es\n properties:\n domainName: ${domain}\n elasticsearchVersion: '6.3'\n clusterConfig:\n instanceType: m4.large.elasticsearch\n zoneAwarenessEnabled: true\n vpcOptions:\n subnetIds:\n - ${selectedGetSubnets.ids[0]}\n - ${selectedGetSubnets.ids[1]}\n securityGroupIds:\n - ${es.id}\n advancedOptions:\n rest.action.multi.allow_explicit_index: 'true'\n accessPolicies: |\n {\n \t\"Version\": \"2012-10-17\",\n \t\"Statement\": [\n \t\t{\n \t\t\t\"Action\": \"es:*\",\n \t\t\t\"Principal\": \"*\",\n \t\t\t\"Effect\": \"Allow\",\n \t\t\t\"Resource\": \"arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\"\n \t\t}\n \t]\n }\n tags:\n Domain: TestDomain\n options:\n dependson:\n - ${esServiceLinkedRole}\nvariables:\n selected:\n fn::invoke:\n Function: aws:ec2:getVpc\n Arguments:\n tags:\n Name: ${vpc}\n selectedGetSubnets:\n fn::invoke:\n Function: aws:ec2:getSubnets\n Arguments:\n filters:\n - name: vpc-id\n values:\n - ${selected.id}\n tags:\n Tier: private\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Elasticsearch domains using the `domain_name`. For example:\n\n```sh\n$ pulumi import aws:elasticsearch/domain:Domain example domain_name\n```\n", "properties": { "accessPolicies": { "type": "string", @@ -258732,7 +258732,7 @@ } }, "aws:emr/cluster:Cluster": { - "description": "Provides an Elastic MapReduce Cluster, a web service that makes it easy to process large amounts of data efficiently. See [Amazon Elastic MapReduce Documentation](https://aws.amazon.com/documentation/elastic-mapreduce/) for more information.\n\nTo configure [Instance Groups](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for [task nodes](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-task), see the `aws.emr.InstanceGroup` resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst cluster = new aws.emr.Cluster(\"cluster\", {\n name: \"emr-test-arn\",\n releaseLabel: \"emr-4.6.0\",\n applications: [\"Spark\"],\n additionalInfo: `{\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n}\n`,\n terminationProtection: false,\n keepJobFlowAliveWhenNoSteps: true,\n ec2Attributes: {\n subnetId: main.id,\n emrManagedMasterSecurityGroup: sg.id,\n emrManagedSlaveSecurityGroup: sg.id,\n instanceProfile: emrProfile.arn,\n },\n masterInstanceGroup: {\n instanceType: \"m4.large\",\n },\n coreInstanceGroup: {\n instanceType: \"c4.large\",\n instanceCount: 1,\n ebsConfigs: [{\n size: 40,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n bidPrice: \"0.30\",\n autoscalingPolicy: `{\n\"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n},\n\"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n]\n}\n`,\n },\n ebsRootVolumeSize: 100,\n tags: {\n role: \"rolename\",\n env: \"env\",\n },\n bootstrapActions: [{\n path: \"s3://elasticmapreduce/bootstrap-actions/run-if\",\n name: \"runif\",\n args: [\n \"instance.isMaster=true\",\n \"echo running on master node\",\n ],\n }],\n configurationsJson: ` [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n`,\n serviceRole: iamEmrServiceRole.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncluster = aws.emr.Cluster(\"cluster\",\n name=\"emr-test-arn\",\n release_label=\"emr-4.6.0\",\n applications=[\"Spark\"],\n additional_info=\"\"\"{\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n}\n\"\"\",\n termination_protection=False,\n keep_job_flow_alive_when_no_steps=True,\n ec2_attributes={\n \"subnet_id\": main[\"id\"],\n \"emr_managed_master_security_group\": sg[\"id\"],\n \"emr_managed_slave_security_group\": sg[\"id\"],\n \"instance_profile\": emr_profile[\"arn\"],\n },\n master_instance_group={\n \"instance_type\": \"m4.large\",\n },\n core_instance_group={\n \"instance_type\": \"c4.large\",\n \"instance_count\": 1,\n \"ebs_configs\": [{\n \"size\": 40,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"bid_price\": \"0.30\",\n \"autoscaling_policy\": \"\"\"{\n\"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n},\n\"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n]\n}\n\"\"\",\n },\n ebs_root_volume_size=100,\n tags={\n \"role\": \"rolename\",\n \"env\": \"env\",\n },\n bootstrap_actions=[{\n \"path\": \"s3://elasticmapreduce/bootstrap-actions/run-if\",\n \"name\": \"runif\",\n \"args\": [\n \"instance.isMaster=true\",\n \"echo running on master node\",\n ],\n }],\n configurations_json=\"\"\" [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n\"\"\",\n service_role=iam_emr_service_role[\"arn\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var cluster = new Aws.Emr.Cluster(\"cluster\", new()\n {\n Name = \"emr-test-arn\",\n ReleaseLabel = \"emr-4.6.0\",\n Applications = new[]\n {\n \"Spark\",\n },\n AdditionalInfo = @\"{\n \"\"instanceAwsClientConfiguration\"\": {\n \"\"proxyPort\"\": 8099,\n \"\"proxyHost\"\": \"\"myproxy.example.com\"\"\n }\n}\n\",\n TerminationProtection = false,\n KeepJobFlowAliveWhenNoSteps = true,\n Ec2Attributes = new Aws.Emr.Inputs.ClusterEc2AttributesArgs\n {\n SubnetId = main.Id,\n EmrManagedMasterSecurityGroup = sg.Id,\n EmrManagedSlaveSecurityGroup = sg.Id,\n InstanceProfile = emrProfile.Arn,\n },\n MasterInstanceGroup = new Aws.Emr.Inputs.ClusterMasterInstanceGroupArgs\n {\n InstanceType = \"m4.large\",\n },\n CoreInstanceGroup = new Aws.Emr.Inputs.ClusterCoreInstanceGroupArgs\n {\n InstanceType = \"c4.large\",\n InstanceCount = 1,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceGroupEbsConfigArgs\n {\n Size = 40,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n BidPrice = \"0.30\",\n AutoscalingPolicy = @\"{\n\"\"Constraints\"\": {\n \"\"MinCapacity\"\": 1,\n \"\"MaxCapacity\"\": 2\n},\n\"\"Rules\"\": [\n {\n \"\"Name\"\": \"\"ScaleOutMemoryPercentage\"\",\n \"\"Description\"\": \"\"Scale out if YARNMemoryAvailablePercentage is less than 15\"\",\n \"\"Action\"\": {\n \"\"SimpleScalingPolicyConfiguration\"\": {\n \"\"AdjustmentType\"\": \"\"CHANGE_IN_CAPACITY\"\",\n \"\"ScalingAdjustment\"\": 1,\n \"\"CoolDown\"\": 300\n }\n },\n \"\"Trigger\"\": {\n \"\"CloudWatchAlarmDefinition\"\": {\n \"\"ComparisonOperator\"\": \"\"LESS_THAN\"\",\n \"\"EvaluationPeriods\"\": 1,\n \"\"MetricName\"\": \"\"YARNMemoryAvailablePercentage\"\",\n \"\"Namespace\"\": \"\"AWS/ElasticMapReduce\"\",\n \"\"Period\"\": 300,\n \"\"Statistic\"\": \"\"AVERAGE\"\",\n \"\"Threshold\"\": 15.0,\n \"\"Unit\"\": \"\"PERCENT\"\"\n }\n }\n }\n]\n}\n\",\n },\n EbsRootVolumeSize = 100,\n Tags = \n {\n { \"role\", \"rolename\" },\n { \"env\", \"env\" },\n },\n BootstrapActions = new[]\n {\n new Aws.Emr.Inputs.ClusterBootstrapActionArgs\n {\n Path = \"s3://elasticmapreduce/bootstrap-actions/run-if\",\n Name = \"runif\",\n Args = new[]\n {\n \"instance.isMaster=true\",\n \"echo running on master node\",\n },\n },\n },\n ConfigurationsJson = @\" [\n {\n \"\"Classification\"\": \"\"hadoop-env\"\",\n \"\"Configurations\"\": [\n {\n \"\"Classification\"\": \"\"export\"\",\n \"\"Properties\"\": {\n \"\"JAVA_HOME\"\": \"\"/usr/lib/jvm/java-1.8.0\"\"\n }\n }\n ],\n \"\"Properties\"\": {}\n },\n {\n \"\"Classification\"\": \"\"spark-env\"\",\n \"\"Configurations\"\": [\n {\n \"\"Classification\"\": \"\"export\"\",\n \"\"Properties\"\": {\n \"\"JAVA_HOME\"\": \"\"/usr/lib/jvm/java-1.8.0\"\"\n }\n }\n ],\n \"\"Properties\"\": {}\n }\n ]\n\",\n ServiceRole = iamEmrServiceRole.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := emr.NewCluster(ctx, \"cluster\", \u0026emr.ClusterArgs{\n\t\t\tName: pulumi.String(\"emr-test-arn\"),\n\t\t\tReleaseLabel: pulumi.String(\"emr-4.6.0\"),\n\t\t\tApplications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Spark\"),\n\t\t\t},\n\t\t\tAdditionalInfo: pulumi.String(`{\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n}\n`),\n\t\t\tTerminationProtection: pulumi.Bool(false),\n\t\t\tKeepJobFlowAliveWhenNoSteps: pulumi.Bool(true),\n\t\t\tEc2Attributes: \u0026emr.ClusterEc2AttributesArgs{\n\t\t\t\tSubnetId: pulumi.Any(main.Id),\n\t\t\t\tEmrManagedMasterSecurityGroup: pulumi.Any(sg.Id),\n\t\t\t\tEmrManagedSlaveSecurityGroup: pulumi.Any(sg.Id),\n\t\t\t\tInstanceProfile: pulumi.Any(emrProfile.Arn),\n\t\t\t},\n\t\t\tMasterInstanceGroup: \u0026emr.ClusterMasterInstanceGroupArgs{\n\t\t\t\tInstanceType: pulumi.String(\"m4.large\"),\n\t\t\t},\n\t\t\tCoreInstanceGroup: \u0026emr.ClusterCoreInstanceGroupArgs{\n\t\t\t\tInstanceType: pulumi.String(\"c4.large\"),\n\t\t\t\tInstanceCount: pulumi.Int(1),\n\t\t\t\tEbsConfigs: emr.ClusterCoreInstanceGroupEbsConfigArray{\n\t\t\t\t\t\u0026emr.ClusterCoreInstanceGroupEbsConfigArgs{\n\t\t\t\t\t\tSize: pulumi.Int(40),\n\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tBidPrice: pulumi.String(\"0.30\"),\n\t\t\t\tAutoscalingPolicy: pulumi.String(`{\n\"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n},\n\"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n]\n}\n`),\n\t\t\t},\n\t\t\tEbsRootVolumeSize: pulumi.Int(100),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"role\": pulumi.String(\"rolename\"),\n\t\t\t\t\"env\": pulumi.String(\"env\"),\n\t\t\t},\n\t\t\tBootstrapActions: emr.ClusterBootstrapActionArray{\n\t\t\t\t\u0026emr.ClusterBootstrapActionArgs{\n\t\t\t\t\tPath: pulumi.String(\"s3://elasticmapreduce/bootstrap-actions/run-if\"),\n\t\t\t\t\tName: pulumi.String(\"runif\"),\n\t\t\t\t\tArgs: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"instance.isMaster=true\"),\n\t\t\t\t\t\tpulumi.String(\"echo running on master node\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tConfigurationsJson: pulumi.String(` [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n`),\n\t\t\tServiceRole: pulumi.Any(iamEmrServiceRole.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.emr.Cluster;\nimport com.pulumi.aws.emr.ClusterArgs;\nimport com.pulumi.aws.emr.inputs.ClusterEc2AttributesArgs;\nimport com.pulumi.aws.emr.inputs.ClusterMasterInstanceGroupArgs;\nimport com.pulumi.aws.emr.inputs.ClusterCoreInstanceGroupArgs;\nimport com.pulumi.aws.emr.inputs.ClusterBootstrapActionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var cluster = new Cluster(\"cluster\", ClusterArgs.builder()\n .name(\"emr-test-arn\")\n .releaseLabel(\"emr-4.6.0\")\n .applications(\"Spark\")\n .additionalInfo(\"\"\"\n{\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n}\n \"\"\")\n .terminationProtection(false)\n .keepJobFlowAliveWhenNoSteps(true)\n .ec2Attributes(ClusterEc2AttributesArgs.builder()\n .subnetId(main.id())\n .emrManagedMasterSecurityGroup(sg.id())\n .emrManagedSlaveSecurityGroup(sg.id())\n .instanceProfile(emrProfile.arn())\n .build())\n .masterInstanceGroup(ClusterMasterInstanceGroupArgs.builder()\n .instanceType(\"m4.large\")\n .build())\n .coreInstanceGroup(ClusterCoreInstanceGroupArgs.builder()\n .instanceType(\"c4.large\")\n .instanceCount(1)\n .ebsConfigs(ClusterCoreInstanceGroupEbsConfigArgs.builder()\n .size(\"40\")\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .bidPrice(\"0.30\")\n .autoscalingPolicy(\"\"\"\n{\n\"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n},\n\"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n]\n}\n \"\"\")\n .build())\n .ebsRootVolumeSize(100)\n .tags(Map.ofEntries(\n Map.entry(\"role\", \"rolename\"),\n Map.entry(\"env\", \"env\")\n ))\n .bootstrapActions(ClusterBootstrapActionArgs.builder()\n .path(\"s3://elasticmapreduce/bootstrap-actions/run-if\")\n .name(\"runif\")\n .args( \n \"instance.isMaster=true\",\n \"echo running on master node\")\n .build())\n .configurationsJson(\"\"\"\n [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n \"\"\")\n .serviceRole(iamEmrServiceRole.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n cluster:\n type: aws:emr:Cluster\n properties:\n name: emr-test-arn\n releaseLabel: emr-4.6.0\n applications:\n - Spark\n additionalInfo: |\n {\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n }\n terminationProtection: false\n keepJobFlowAliveWhenNoSteps: true\n ec2Attributes:\n subnetId: ${main.id}\n emrManagedMasterSecurityGroup: ${sg.id}\n emrManagedSlaveSecurityGroup: ${sg.id}\n instanceProfile: ${emrProfile.arn}\n masterInstanceGroup:\n instanceType: m4.large\n coreInstanceGroup:\n instanceType: c4.large\n instanceCount: 1\n ebsConfigs:\n - size: '40'\n type: gp2\n volumesPerInstance: 1\n bidPrice: '0.30'\n autoscalingPolicy: |\n {\n \"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n },\n \"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n ]\n }\n ebsRootVolumeSize: 100\n tags:\n role: rolename\n env: env\n bootstrapActions:\n - path: s3://elasticmapreduce/bootstrap-actions/run-if\n name: runif\n args:\n - instance.isMaster=true\n - echo running on master node\n configurationsJson: |2\n [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n serviceRole: ${iamEmrServiceRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe `aws.emr.Cluster` resource typically requires two IAM roles, one for the EMR Cluster to use as a service role, and another is assigned to every EC2 instance in a cluster and each application process that runs on a cluster assumes this role for permissions to interact with other AWS services. An additional role, the Auto Scaling role, is required if your cluster uses automatic scaling in Amazon EMR.\n\nThe default AWS managed EMR service role is called `EMR_DefaultRole` with Amazon managed policy `AmazonEMRServicePolicy_v2` attached. The name of default instance profile role is `EMR_EC2_DefaultRole` with default managed policy `AmazonElasticMapReduceforEC2Role` attached, but it is on the path to deprecation and will not be replaced with another default managed policy. You'll need to create and specify an instance profile to replace the deprecated role and default policy. See the [Configure IAM service roles for Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-roles.html) guide for more information on these IAM roles. There is also a fully-bootable example Pulumi configuration at the bottom of this page.\n\n### Instance Fleet\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.emr.Cluster(\"example\", {\n masterInstanceFleet: {\n instanceTypeConfigs: [{\n instanceType: \"m4.xlarge\",\n }],\n targetOnDemandCapacity: 1,\n },\n coreInstanceFleet: {\n instanceTypeConfigs: [\n {\n bidPriceAsPercentageOfOnDemandPrice: 80,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m3.xlarge\",\n weightedCapacity: 1,\n },\n {\n bidPriceAsPercentageOfOnDemandPrice: 100,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m4.xlarge\",\n weightedCapacity: 1,\n },\n {\n bidPriceAsPercentageOfOnDemandPrice: 100,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m4.2xlarge\",\n weightedCapacity: 2,\n },\n ],\n launchSpecifications: {\n spotSpecifications: [{\n allocationStrategy: \"capacity-optimized\",\n blockDurationMinutes: 0,\n timeoutAction: \"SWITCH_TO_ON_DEMAND\",\n timeoutDurationMinutes: 10,\n }],\n },\n name: \"core fleet\",\n targetOnDemandCapacity: 2,\n targetSpotCapacity: 2,\n },\n});\nconst task = new aws.emr.InstanceFleet(\"task\", {\n clusterId: example.id,\n instanceTypeConfigs: [\n {\n bidPriceAsPercentageOfOnDemandPrice: 100,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m4.xlarge\",\n weightedCapacity: 1,\n },\n {\n bidPriceAsPercentageOfOnDemandPrice: 100,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m4.2xlarge\",\n weightedCapacity: 2,\n },\n ],\n launchSpecifications: {\n spotSpecifications: [{\n allocationStrategy: \"capacity-optimized\",\n blockDurationMinutes: 0,\n timeoutAction: \"TERMINATE_CLUSTER\",\n timeoutDurationMinutes: 10,\n }],\n },\n name: \"task fleet\",\n targetOnDemandCapacity: 1,\n targetSpotCapacity: 1,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.emr.Cluster(\"example\",\n master_instance_fleet={\n \"instance_type_configs\": [{\n \"instance_type\": \"m4.xlarge\",\n }],\n \"target_on_demand_capacity\": 1,\n },\n core_instance_fleet={\n \"instance_type_configs\": [\n {\n \"bid_price_as_percentage_of_on_demand_price\": 80,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m3.xlarge\",\n \"weighted_capacity\": 1,\n },\n {\n \"bid_price_as_percentage_of_on_demand_price\": 100,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m4.xlarge\",\n \"weighted_capacity\": 1,\n },\n {\n \"bid_price_as_percentage_of_on_demand_price\": 100,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m4.2xlarge\",\n \"weighted_capacity\": 2,\n },\n ],\n \"launch_specifications\": {\n \"spot_specifications\": [{\n \"allocation_strategy\": \"capacity-optimized\",\n \"block_duration_minutes\": 0,\n \"timeout_action\": \"SWITCH_TO_ON_DEMAND\",\n \"timeout_duration_minutes\": 10,\n }],\n },\n \"name\": \"core fleet\",\n \"target_on_demand_capacity\": 2,\n \"target_spot_capacity\": 2,\n })\ntask = aws.emr.InstanceFleet(\"task\",\n cluster_id=example.id,\n instance_type_configs=[\n {\n \"bid_price_as_percentage_of_on_demand_price\": 100,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m4.xlarge\",\n \"weighted_capacity\": 1,\n },\n {\n \"bid_price_as_percentage_of_on_demand_price\": 100,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m4.2xlarge\",\n \"weighted_capacity\": 2,\n },\n ],\n launch_specifications={\n \"spot_specifications\": [{\n \"allocation_strategy\": \"capacity-optimized\",\n \"block_duration_minutes\": 0,\n \"timeout_action\": \"TERMINATE_CLUSTER\",\n \"timeout_duration_minutes\": 10,\n }],\n },\n name=\"task fleet\",\n target_on_demand_capacity=1,\n target_spot_capacity=1)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Emr.Cluster(\"example\", new()\n {\n MasterInstanceFleet = new Aws.Emr.Inputs.ClusterMasterInstanceFleetArgs\n {\n InstanceTypeConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterMasterInstanceFleetInstanceTypeConfigArgs\n {\n InstanceType = \"m4.xlarge\",\n },\n },\n TargetOnDemandCapacity = 1,\n },\n CoreInstanceFleet = new Aws.Emr.Inputs.ClusterCoreInstanceFleetArgs\n {\n InstanceTypeConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 80,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m3.xlarge\",\n WeightedCapacity = 1,\n },\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 100,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m4.xlarge\",\n WeightedCapacity = 1,\n },\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 100,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m4.2xlarge\",\n WeightedCapacity = 2,\n },\n },\n LaunchSpecifications = new Aws.Emr.Inputs.ClusterCoreInstanceFleetLaunchSpecificationsArgs\n {\n SpotSpecifications = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs\n {\n AllocationStrategy = \"capacity-optimized\",\n BlockDurationMinutes = 0,\n TimeoutAction = \"SWITCH_TO_ON_DEMAND\",\n TimeoutDurationMinutes = 10,\n },\n },\n },\n Name = \"core fleet\",\n TargetOnDemandCapacity = 2,\n TargetSpotCapacity = 2,\n },\n });\n\n var task = new Aws.Emr.InstanceFleet(\"task\", new()\n {\n ClusterId = example.Id,\n InstanceTypeConfigs = new[]\n {\n new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 100,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m4.xlarge\",\n WeightedCapacity = 1,\n },\n new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 100,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m4.2xlarge\",\n WeightedCapacity = 2,\n },\n },\n LaunchSpecifications = new Aws.Emr.Inputs.InstanceFleetLaunchSpecificationsArgs\n {\n SpotSpecifications = new[]\n {\n new Aws.Emr.Inputs.InstanceFleetLaunchSpecificationsSpotSpecificationArgs\n {\n AllocationStrategy = \"capacity-optimized\",\n BlockDurationMinutes = 0,\n TimeoutAction = \"TERMINATE_CLUSTER\",\n TimeoutDurationMinutes = 10,\n },\n },\n },\n Name = \"task fleet\",\n TargetOnDemandCapacity = 1,\n TargetSpotCapacity = 1,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := emr.NewCluster(ctx, \"example\", \u0026emr.ClusterArgs{\n\t\t\tMasterInstanceFleet: \u0026emr.ClusterMasterInstanceFleetArgs{\n\t\t\t\tInstanceTypeConfigs: emr.ClusterMasterInstanceFleetInstanceTypeConfigArray{\n\t\t\t\t\t\u0026emr.ClusterMasterInstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\t\tInstanceType: pulumi.String(\"m4.xlarge\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tTargetOnDemandCapacity: pulumi.Int(1),\n\t\t\t},\n\t\t\tCoreInstanceFleet: \u0026emr.ClusterCoreInstanceFleetArgs{\n\t\t\t\tInstanceTypeConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigArray{\n\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(80),\n\t\t\t\t\t\tEbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInstanceType: pulumi.String(\"m3.xlarge\"),\n\t\t\t\t\t\tWeightedCapacity: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),\n\t\t\t\t\t\tEbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInstanceType: pulumi.String(\"m4.xlarge\"),\n\t\t\t\t\t\tWeightedCapacity: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),\n\t\t\t\t\t\tEbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInstanceType: pulumi.String(\"m4.2xlarge\"),\n\t\t\t\t\t\tWeightedCapacity: pulumi.Int(2),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tLaunchSpecifications: \u0026emr.ClusterCoreInstanceFleetLaunchSpecificationsArgs{\n\t\t\t\t\tSpotSpecifications: emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArray{\n\t\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs{\n\t\t\t\t\t\t\tAllocationStrategy: pulumi.String(\"capacity-optimized\"),\n\t\t\t\t\t\t\tBlockDurationMinutes: pulumi.Int(0),\n\t\t\t\t\t\t\tTimeoutAction: pulumi.String(\"SWITCH_TO_ON_DEMAND\"),\n\t\t\t\t\t\t\tTimeoutDurationMinutes: pulumi.Int(10),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tName: pulumi.String(\"core fleet\"),\n\t\t\t\tTargetOnDemandCapacity: pulumi.Int(2),\n\t\t\t\tTargetSpotCapacity: pulumi.Int(2),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = emr.NewInstanceFleet(ctx, \"task\", \u0026emr.InstanceFleetArgs{\n\t\t\tClusterId: example.ID(),\n\t\t\tInstanceTypeConfigs: emr.InstanceFleetInstanceTypeConfigArray{\n\t\t\t\t\u0026emr.InstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),\n\t\t\t\t\tEbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\u0026emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.xlarge\"),\n\t\t\t\t\tWeightedCapacity: pulumi.Int(1),\n\t\t\t\t},\n\t\t\t\t\u0026emr.InstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),\n\t\t\t\t\tEbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\u0026emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.2xlarge\"),\n\t\t\t\t\tWeightedCapacity: pulumi.Int(2),\n\t\t\t\t},\n\t\t\t},\n\t\t\tLaunchSpecifications: \u0026emr.InstanceFleetLaunchSpecificationsArgs{\n\t\t\t\tSpotSpecifications: emr.InstanceFleetLaunchSpecificationsSpotSpecificationArray{\n\t\t\t\t\t\u0026emr.InstanceFleetLaunchSpecificationsSpotSpecificationArgs{\n\t\t\t\t\t\tAllocationStrategy: pulumi.String(\"capacity-optimized\"),\n\t\t\t\t\t\tBlockDurationMinutes: pulumi.Int(0),\n\t\t\t\t\t\tTimeoutAction: pulumi.String(\"TERMINATE_CLUSTER\"),\n\t\t\t\t\t\tTimeoutDurationMinutes: pulumi.Int(10),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tName: pulumi.String(\"task fleet\"),\n\t\t\tTargetOnDemandCapacity: pulumi.Int(1),\n\t\t\tTargetSpotCapacity: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.emr.Cluster;\nimport com.pulumi.aws.emr.ClusterArgs;\nimport com.pulumi.aws.emr.inputs.ClusterMasterInstanceFleetArgs;\nimport com.pulumi.aws.emr.inputs.ClusterCoreInstanceFleetArgs;\nimport com.pulumi.aws.emr.inputs.ClusterCoreInstanceFleetLaunchSpecificationsArgs;\nimport com.pulumi.aws.emr.InstanceFleet;\nimport com.pulumi.aws.emr.InstanceFleetArgs;\nimport com.pulumi.aws.emr.inputs.InstanceFleetInstanceTypeConfigArgs;\nimport com.pulumi.aws.emr.inputs.InstanceFleetLaunchSpecificationsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Cluster(\"example\", ClusterArgs.builder()\n .masterInstanceFleet(ClusterMasterInstanceFleetArgs.builder()\n .instanceTypeConfigs(ClusterMasterInstanceFleetInstanceTypeConfigArgs.builder()\n .instanceType(\"m4.xlarge\")\n .build())\n .targetOnDemandCapacity(1)\n .build())\n .coreInstanceFleet(ClusterCoreInstanceFleetArgs.builder()\n .instanceTypeConfigs( \n ClusterCoreInstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(80)\n .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m3.xlarge\")\n .weightedCapacity(1)\n .build(),\n ClusterCoreInstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(100)\n .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m4.xlarge\")\n .weightedCapacity(1)\n .build(),\n ClusterCoreInstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(100)\n .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m4.2xlarge\")\n .weightedCapacity(2)\n .build())\n .launchSpecifications(ClusterCoreInstanceFleetLaunchSpecificationsArgs.builder()\n .spotSpecifications(ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs.builder()\n .allocationStrategy(\"capacity-optimized\")\n .blockDurationMinutes(0)\n .timeoutAction(\"SWITCH_TO_ON_DEMAND\")\n .timeoutDurationMinutes(10)\n .build())\n .build())\n .name(\"core fleet\")\n .targetOnDemandCapacity(2)\n .targetSpotCapacity(2)\n .build())\n .build());\n\n var task = new InstanceFleet(\"task\", InstanceFleetArgs.builder()\n .clusterId(example.id())\n .instanceTypeConfigs( \n InstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(100)\n .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m4.xlarge\")\n .weightedCapacity(1)\n .build(),\n InstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(100)\n .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m4.2xlarge\")\n .weightedCapacity(2)\n .build())\n .launchSpecifications(InstanceFleetLaunchSpecificationsArgs.builder()\n .spotSpecifications(InstanceFleetLaunchSpecificationsSpotSpecificationArgs.builder()\n .allocationStrategy(\"capacity-optimized\")\n .blockDurationMinutes(0)\n .timeoutAction(\"TERMINATE_CLUSTER\")\n .timeoutDurationMinutes(10)\n .build())\n .build())\n .name(\"task fleet\")\n .targetOnDemandCapacity(1)\n .targetSpotCapacity(1)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:emr:Cluster\n properties:\n masterInstanceFleet:\n instanceTypeConfigs:\n - instanceType: m4.xlarge\n targetOnDemandCapacity: 1\n coreInstanceFleet:\n instanceTypeConfigs:\n - bidPriceAsPercentageOfOnDemandPrice: 80\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m3.xlarge\n weightedCapacity: 1\n - bidPriceAsPercentageOfOnDemandPrice: 100\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m4.xlarge\n weightedCapacity: 1\n - bidPriceAsPercentageOfOnDemandPrice: 100\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m4.2xlarge\n weightedCapacity: 2\n launchSpecifications:\n spotSpecifications:\n - allocationStrategy: capacity-optimized\n blockDurationMinutes: 0\n timeoutAction: SWITCH_TO_ON_DEMAND\n timeoutDurationMinutes: 10\n name: core fleet\n targetOnDemandCapacity: 2\n targetSpotCapacity: 2\n task:\n type: aws:emr:InstanceFleet\n properties:\n clusterId: ${example.id}\n instanceTypeConfigs:\n - bidPriceAsPercentageOfOnDemandPrice: 100\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m4.xlarge\n weightedCapacity: 1\n - bidPriceAsPercentageOfOnDemandPrice: 100\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m4.2xlarge\n weightedCapacity: 2\n launchSpecifications:\n spotSpecifications:\n - allocationStrategy: capacity-optimized\n blockDurationMinutes: 0\n timeoutAction: TERMINATE_CLUSTER\n timeoutDurationMinutes: 10\n name: task fleet\n targetOnDemandCapacity: 1\n targetSpotCapacity: 1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Enable Debug Logging\n\n[Debug logging in EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-debugging.html) is implemented as a step. It is highly recommended that you utilize the resource options configuration with `ignoreChanges` if other steps are being managed outside of this provider.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.emr.Cluster(\"example\", {steps: [{\n actionOnFailure: \"TERMINATE_CLUSTER\",\n name: \"Setup Hadoop Debugging\",\n hadoopJarStep: {\n jar: \"command-runner.jar\",\n args: [\"state-pusher-script\"],\n },\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.emr.Cluster(\"example\", steps=[{\n \"action_on_failure\": \"TERMINATE_CLUSTER\",\n \"name\": \"Setup Hadoop Debugging\",\n \"hadoop_jar_step\": {\n \"jar\": \"command-runner.jar\",\n \"args\": [\"state-pusher-script\"],\n },\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Emr.Cluster(\"example\", new()\n {\n Steps = new[]\n {\n new Aws.Emr.Inputs.ClusterStepArgs\n {\n ActionOnFailure = \"TERMINATE_CLUSTER\",\n Name = \"Setup Hadoop Debugging\",\n HadoopJarStep = new Aws.Emr.Inputs.ClusterStepHadoopJarStepArgs\n {\n Jar = \"command-runner.jar\",\n Args = new[]\n {\n \"state-pusher-script\",\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := emr.NewCluster(ctx, \"example\", \u0026emr.ClusterArgs{\n\t\t\tSteps: emr.ClusterStepArray{\n\t\t\t\t\u0026emr.ClusterStepArgs{\n\t\t\t\t\tActionOnFailure: pulumi.String(\"TERMINATE_CLUSTER\"),\n\t\t\t\t\tName: pulumi.String(\"Setup Hadoop Debugging\"),\n\t\t\t\t\tHadoopJarStep: \u0026emr.ClusterStepHadoopJarStepArgs{\n\t\t\t\t\t\tJar: pulumi.String(\"command-runner.jar\"),\n\t\t\t\t\t\tArgs: pulumi.StringArray{\n\t\t\t\t\t\t\tpulumi.String(\"state-pusher-script\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.emr.Cluster;\nimport com.pulumi.aws.emr.ClusterArgs;\nimport com.pulumi.aws.emr.inputs.ClusterStepArgs;\nimport com.pulumi.aws.emr.inputs.ClusterStepHadoopJarStepArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Cluster(\"example\", ClusterArgs.builder()\n .steps(ClusterStepArgs.builder()\n .actionOnFailure(\"TERMINATE_CLUSTER\")\n .name(\"Setup Hadoop Debugging\")\n .hadoopJarStep(ClusterStepHadoopJarStepArgs.builder()\n .jar(\"command-runner.jar\")\n .args(\"state-pusher-script\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:emr:Cluster\n properties:\n steps:\n - actionOnFailure: TERMINATE_CLUSTER\n name: Setup Hadoop Debugging\n hadoopJarStep:\n jar: command-runner.jar\n args:\n - state-pusher-script\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Multiple Node Master Instance Group\n\nAvailable in EMR version 5.23.0 and later, an EMR Cluster can be launched with three master nodes for high availability. Additional information about this functionality and its requirements can be found in the [EMR Management Guide](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-ha.html).\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// This configuration is for illustrative purposes and highlights\n// only relevant configurations for working with this functionality.\n// Map public IP on launch must be enabled for public (Internet accessible) subnets\nconst example = new aws.ec2.Subnet(\"example\", {mapPublicIpOnLaunch: true});\nconst exampleCluster = new aws.emr.Cluster(\"example\", {\n releaseLabel: \"emr-5.24.1\",\n terminationProtection: true,\n ec2Attributes: {\n subnetId: example.id,\n },\n masterInstanceGroup: {\n instanceCount: 3,\n },\n coreInstanceGroup: {},\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# This configuration is for illustrative purposes and highlights\n# only relevant configurations for working with this functionality.\n# Map public IP on launch must be enabled for public (Internet accessible) subnets\nexample = aws.ec2.Subnet(\"example\", map_public_ip_on_launch=True)\nexample_cluster = aws.emr.Cluster(\"example\",\n release_label=\"emr-5.24.1\",\n termination_protection=True,\n ec2_attributes={\n \"subnet_id\": example.id,\n },\n master_instance_group={\n \"instance_count\": 3,\n },\n core_instance_group={})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // This configuration is for illustrative purposes and highlights\n // only relevant configurations for working with this functionality.\n // Map public IP on launch must be enabled for public (Internet accessible) subnets\n var example = new Aws.Ec2.Subnet(\"example\", new()\n {\n MapPublicIpOnLaunch = true,\n });\n\n var exampleCluster = new Aws.Emr.Cluster(\"example\", new()\n {\n ReleaseLabel = \"emr-5.24.1\",\n TerminationProtection = true,\n Ec2Attributes = new Aws.Emr.Inputs.ClusterEc2AttributesArgs\n {\n SubnetId = example.Id,\n },\n MasterInstanceGroup = new Aws.Emr.Inputs.ClusterMasterInstanceGroupArgs\n {\n InstanceCount = 3,\n },\n CoreInstanceGroup = null,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// This configuration is for illustrative purposes and highlights\n\t\t// only relevant configurations for working with this functionality.\n\t\t// Map public IP on launch must be enabled for public (Internet accessible) subnets\n\t\texample, err := ec2.NewSubnet(ctx, \"example\", \u0026ec2.SubnetArgs{\n\t\t\tMapPublicIpOnLaunch: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = emr.NewCluster(ctx, \"example\", \u0026emr.ClusterArgs{\n\t\t\tReleaseLabel: pulumi.String(\"emr-5.24.1\"),\n\t\t\tTerminationProtection: pulumi.Bool(true),\n\t\t\tEc2Attributes: \u0026emr.ClusterEc2AttributesArgs{\n\t\t\t\tSubnetId: example.ID(),\n\t\t\t},\n\t\t\tMasterInstanceGroup: \u0026emr.ClusterMasterInstanceGroupArgs{\n\t\t\t\tInstanceCount: pulumi.Int(3),\n\t\t\t},\n\t\t\tCoreInstanceGroup: nil,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Subnet;\nimport com.pulumi.aws.ec2.SubnetArgs;\nimport com.pulumi.aws.emr.Cluster;\nimport com.pulumi.aws.emr.ClusterArgs;\nimport com.pulumi.aws.emr.inputs.ClusterEc2AttributesArgs;\nimport com.pulumi.aws.emr.inputs.ClusterMasterInstanceGroupArgs;\nimport com.pulumi.aws.emr.inputs.ClusterCoreInstanceGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // This configuration is for illustrative purposes and highlights\n // only relevant configurations for working with this functionality.\n // Map public IP on launch must be enabled for public (Internet accessible) subnets\n var example = new Subnet(\"example\", SubnetArgs.builder()\n .mapPublicIpOnLaunch(true)\n .build());\n\n var exampleCluster = new Cluster(\"exampleCluster\", ClusterArgs.builder()\n .releaseLabel(\"emr-5.24.1\")\n .terminationProtection(true)\n .ec2Attributes(ClusterEc2AttributesArgs.builder()\n .subnetId(example.id())\n .build())\n .masterInstanceGroup(ClusterMasterInstanceGroupArgs.builder()\n .instanceCount(3)\n .build())\n .coreInstanceGroup()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # This configuration is for illustrative purposes and highlights\n # only relevant configurations for working with this functionality.\n\n # Map public IP on launch must be enabled for public (Internet accessible) subnets\n example:\n type: aws:ec2:Subnet\n properties:\n mapPublicIpOnLaunch: true\n exampleCluster:\n type: aws:emr:Cluster\n name: example\n properties:\n releaseLabel: emr-5.24.1\n terminationProtection: true\n ec2Attributes:\n subnetId: ${example.id}\n masterInstanceGroup:\n instanceCount: 3\n coreInstanceGroup: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import EMR clusters using the `id`. For example:\n\n```sh\n$ pulumi import aws:emr/cluster:Cluster cluster j-123456ABCDEF\n```\nSince the API does not return the actual values for Kerberos configurations, environments with those options set will need to use the `lifecycle` configuration block `ignore_changes` argument available to all Pulumi resources to prevent perpetual differences. For example:\n\n", + "description": "Provides an Elastic MapReduce Cluster, a web service that makes it easy to process large amounts of data efficiently. See [Amazon Elastic MapReduce Documentation](https://aws.amazon.com/documentation/elastic-mapreduce/) for more information.\n\nTo configure [Instance Groups](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for [task nodes](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-task), see the `aws.emr.InstanceGroup` resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst cluster = new aws.emr.Cluster(\"cluster\", {\n name: \"emr-test-arn\",\n releaseLabel: \"emr-4.6.0\",\n applications: [\"Spark\"],\n additionalInfo: `{\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n}\n`,\n terminationProtection: false,\n keepJobFlowAliveWhenNoSteps: true,\n ec2Attributes: {\n subnetId: main.id,\n emrManagedMasterSecurityGroup: sg.id,\n emrManagedSlaveSecurityGroup: sg.id,\n instanceProfile: emrProfile.arn,\n },\n masterInstanceGroup: {\n instanceType: \"m4.large\",\n },\n coreInstanceGroup: {\n instanceType: \"c4.large\",\n instanceCount: 1,\n ebsConfigs: [{\n size: 40,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n bidPrice: \"0.30\",\n autoscalingPolicy: `{\n\"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n},\n\"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n]\n}\n`,\n },\n ebsRootVolumeSize: 100,\n tags: {\n role: \"rolename\",\n env: \"env\",\n },\n bootstrapActions: [{\n path: \"s3://elasticmapreduce/bootstrap-actions/run-if\",\n name: \"runif\",\n args: [\n \"instance.isMaster=true\",\n \"echo running on master node\",\n ],\n }],\n configurationsJson: ` [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n`,\n serviceRole: iamEmrServiceRole.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncluster = aws.emr.Cluster(\"cluster\",\n name=\"emr-test-arn\",\n release_label=\"emr-4.6.0\",\n applications=[\"Spark\"],\n additional_info=\"\"\"{\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n}\n\"\"\",\n termination_protection=False,\n keep_job_flow_alive_when_no_steps=True,\n ec2_attributes={\n \"subnet_id\": main[\"id\"],\n \"emr_managed_master_security_group\": sg[\"id\"],\n \"emr_managed_slave_security_group\": sg[\"id\"],\n \"instance_profile\": emr_profile[\"arn\"],\n },\n master_instance_group={\n \"instance_type\": \"m4.large\",\n },\n core_instance_group={\n \"instance_type\": \"c4.large\",\n \"instance_count\": 1,\n \"ebs_configs\": [{\n \"size\": 40,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"bid_price\": \"0.30\",\n \"autoscaling_policy\": \"\"\"{\n\"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n},\n\"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n]\n}\n\"\"\",\n },\n ebs_root_volume_size=100,\n tags={\n \"role\": \"rolename\",\n \"env\": \"env\",\n },\n bootstrap_actions=[{\n \"path\": \"s3://elasticmapreduce/bootstrap-actions/run-if\",\n \"name\": \"runif\",\n \"args\": [\n \"instance.isMaster=true\",\n \"echo running on master node\",\n ],\n }],\n configurations_json=\"\"\" [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n\"\"\",\n service_role=iam_emr_service_role[\"arn\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var cluster = new Aws.Emr.Cluster(\"cluster\", new()\n {\n Name = \"emr-test-arn\",\n ReleaseLabel = \"emr-4.6.0\",\n Applications = new[]\n {\n \"Spark\",\n },\n AdditionalInfo = @\"{\n \"\"instanceAwsClientConfiguration\"\": {\n \"\"proxyPort\"\": 8099,\n \"\"proxyHost\"\": \"\"myproxy.example.com\"\"\n }\n}\n\",\n TerminationProtection = false,\n KeepJobFlowAliveWhenNoSteps = true,\n Ec2Attributes = new Aws.Emr.Inputs.ClusterEc2AttributesArgs\n {\n SubnetId = main.Id,\n EmrManagedMasterSecurityGroup = sg.Id,\n EmrManagedSlaveSecurityGroup = sg.Id,\n InstanceProfile = emrProfile.Arn,\n },\n MasterInstanceGroup = new Aws.Emr.Inputs.ClusterMasterInstanceGroupArgs\n {\n InstanceType = \"m4.large\",\n },\n CoreInstanceGroup = new Aws.Emr.Inputs.ClusterCoreInstanceGroupArgs\n {\n InstanceType = \"c4.large\",\n InstanceCount = 1,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceGroupEbsConfigArgs\n {\n Size = 40,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n BidPrice = \"0.30\",\n AutoscalingPolicy = @\"{\n\"\"Constraints\"\": {\n \"\"MinCapacity\"\": 1,\n \"\"MaxCapacity\"\": 2\n},\n\"\"Rules\"\": [\n {\n \"\"Name\"\": \"\"ScaleOutMemoryPercentage\"\",\n \"\"Description\"\": \"\"Scale out if YARNMemoryAvailablePercentage is less than 15\"\",\n \"\"Action\"\": {\n \"\"SimpleScalingPolicyConfiguration\"\": {\n \"\"AdjustmentType\"\": \"\"CHANGE_IN_CAPACITY\"\",\n \"\"ScalingAdjustment\"\": 1,\n \"\"CoolDown\"\": 300\n }\n },\n \"\"Trigger\"\": {\n \"\"CloudWatchAlarmDefinition\"\": {\n \"\"ComparisonOperator\"\": \"\"LESS_THAN\"\",\n \"\"EvaluationPeriods\"\": 1,\n \"\"MetricName\"\": \"\"YARNMemoryAvailablePercentage\"\",\n \"\"Namespace\"\": \"\"AWS/ElasticMapReduce\"\",\n \"\"Period\"\": 300,\n \"\"Statistic\"\": \"\"AVERAGE\"\",\n \"\"Threshold\"\": 15.0,\n \"\"Unit\"\": \"\"PERCENT\"\"\n }\n }\n }\n]\n}\n\",\n },\n EbsRootVolumeSize = 100,\n Tags = \n {\n { \"role\", \"rolename\" },\n { \"env\", \"env\" },\n },\n BootstrapActions = new[]\n {\n new Aws.Emr.Inputs.ClusterBootstrapActionArgs\n {\n Path = \"s3://elasticmapreduce/bootstrap-actions/run-if\",\n Name = \"runif\",\n Args = new[]\n {\n \"instance.isMaster=true\",\n \"echo running on master node\",\n },\n },\n },\n ConfigurationsJson = @\" [\n {\n \"\"Classification\"\": \"\"hadoop-env\"\",\n \"\"Configurations\"\": [\n {\n \"\"Classification\"\": \"\"export\"\",\n \"\"Properties\"\": {\n \"\"JAVA_HOME\"\": \"\"/usr/lib/jvm/java-1.8.0\"\"\n }\n }\n ],\n \"\"Properties\"\": {}\n },\n {\n \"\"Classification\"\": \"\"spark-env\"\",\n \"\"Configurations\"\": [\n {\n \"\"Classification\"\": \"\"export\"\",\n \"\"Properties\"\": {\n \"\"JAVA_HOME\"\": \"\"/usr/lib/jvm/java-1.8.0\"\"\n }\n }\n ],\n \"\"Properties\"\": {}\n }\n ]\n\",\n ServiceRole = iamEmrServiceRole.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := emr.NewCluster(ctx, \"cluster\", \u0026emr.ClusterArgs{\n\t\t\tName: pulumi.String(\"emr-test-arn\"),\n\t\t\tReleaseLabel: pulumi.String(\"emr-4.6.0\"),\n\t\t\tApplications: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"Spark\"),\n\t\t\t},\n\t\t\tAdditionalInfo: pulumi.String(`{\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n}\n`),\n\t\t\tTerminationProtection: pulumi.Bool(false),\n\t\t\tKeepJobFlowAliveWhenNoSteps: pulumi.Bool(true),\n\t\t\tEc2Attributes: \u0026emr.ClusterEc2AttributesArgs{\n\t\t\t\tSubnetId: pulumi.Any(main.Id),\n\t\t\t\tEmrManagedMasterSecurityGroup: pulumi.Any(sg.Id),\n\t\t\t\tEmrManagedSlaveSecurityGroup: pulumi.Any(sg.Id),\n\t\t\t\tInstanceProfile: pulumi.Any(emrProfile.Arn),\n\t\t\t},\n\t\t\tMasterInstanceGroup: \u0026emr.ClusterMasterInstanceGroupArgs{\n\t\t\t\tInstanceType: pulumi.String(\"m4.large\"),\n\t\t\t},\n\t\t\tCoreInstanceGroup: \u0026emr.ClusterCoreInstanceGroupArgs{\n\t\t\t\tInstanceType: pulumi.String(\"c4.large\"),\n\t\t\t\tInstanceCount: pulumi.Int(1),\n\t\t\t\tEbsConfigs: emr.ClusterCoreInstanceGroupEbsConfigArray{\n\t\t\t\t\t\u0026emr.ClusterCoreInstanceGroupEbsConfigArgs{\n\t\t\t\t\t\tSize: pulumi.Int(40),\n\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tBidPrice: pulumi.String(\"0.30\"),\n\t\t\t\tAutoscalingPolicy: pulumi.String(`{\n\"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n},\n\"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n]\n}\n`),\n\t\t\t},\n\t\t\tEbsRootVolumeSize: pulumi.Int(100),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"role\": pulumi.String(\"rolename\"),\n\t\t\t\t\"env\": pulumi.String(\"env\"),\n\t\t\t},\n\t\t\tBootstrapActions: emr.ClusterBootstrapActionArray{\n\t\t\t\t\u0026emr.ClusterBootstrapActionArgs{\n\t\t\t\t\tPath: pulumi.String(\"s3://elasticmapreduce/bootstrap-actions/run-if\"),\n\t\t\t\t\tName: pulumi.String(\"runif\"),\n\t\t\t\t\tArgs: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"instance.isMaster=true\"),\n\t\t\t\t\t\tpulumi.String(\"echo running on master node\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tConfigurationsJson: pulumi.String(` [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n`),\n\t\t\tServiceRole: pulumi.Any(iamEmrServiceRole.Arn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.emr.Cluster;\nimport com.pulumi.aws.emr.ClusterArgs;\nimport com.pulumi.aws.emr.inputs.ClusterEc2AttributesArgs;\nimport com.pulumi.aws.emr.inputs.ClusterMasterInstanceGroupArgs;\nimport com.pulumi.aws.emr.inputs.ClusterCoreInstanceGroupArgs;\nimport com.pulumi.aws.emr.inputs.ClusterBootstrapActionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var cluster = new Cluster(\"cluster\", ClusterArgs.builder()\n .name(\"emr-test-arn\")\n .releaseLabel(\"emr-4.6.0\")\n .applications(\"Spark\")\n .additionalInfo(\"\"\"\n{\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n}\n \"\"\")\n .terminationProtection(false)\n .keepJobFlowAliveWhenNoSteps(true)\n .ec2Attributes(ClusterEc2AttributesArgs.builder()\n .subnetId(main.id())\n .emrManagedMasterSecurityGroup(sg.id())\n .emrManagedSlaveSecurityGroup(sg.id())\n .instanceProfile(emrProfile.arn())\n .build())\n .masterInstanceGroup(ClusterMasterInstanceGroupArgs.builder()\n .instanceType(\"m4.large\")\n .build())\n .coreInstanceGroup(ClusterCoreInstanceGroupArgs.builder()\n .instanceType(\"c4.large\")\n .instanceCount(1)\n .ebsConfigs(ClusterCoreInstanceGroupEbsConfigArgs.builder()\n .size(\"40\")\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .bidPrice(\"0.30\")\n .autoscalingPolicy(\"\"\"\n{\n\"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n},\n\"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n]\n}\n \"\"\")\n .build())\n .ebsRootVolumeSize(100)\n .tags(Map.ofEntries(\n Map.entry(\"role\", \"rolename\"),\n Map.entry(\"env\", \"env\")\n ))\n .bootstrapActions(ClusterBootstrapActionArgs.builder()\n .path(\"s3://elasticmapreduce/bootstrap-actions/run-if\")\n .name(\"runif\")\n .args( \n \"instance.isMaster=true\",\n \"echo running on master node\")\n .build())\n .configurationsJson(\"\"\"\n [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n \"\"\")\n .serviceRole(iamEmrServiceRole.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n cluster:\n type: aws:emr:Cluster\n properties:\n name: emr-test-arn\n releaseLabel: emr-4.6.0\n applications:\n - Spark\n additionalInfo: |\n {\n \"instanceAwsClientConfiguration\": {\n \"proxyPort\": 8099,\n \"proxyHost\": \"myproxy.example.com\"\n }\n }\n terminationProtection: false\n keepJobFlowAliveWhenNoSteps: true\n ec2Attributes:\n subnetId: ${main.id}\n emrManagedMasterSecurityGroup: ${sg.id}\n emrManagedSlaveSecurityGroup: ${sg.id}\n instanceProfile: ${emrProfile.arn}\n masterInstanceGroup:\n instanceType: m4.large\n coreInstanceGroup:\n instanceType: c4.large\n instanceCount: 1\n ebsConfigs:\n - size: '40'\n type: gp2\n volumesPerInstance: 1\n bidPrice: '0.30'\n autoscalingPolicy: |\n {\n \"Constraints\": {\n \"MinCapacity\": 1,\n \"MaxCapacity\": 2\n },\n \"Rules\": [\n {\n \"Name\": \"ScaleOutMemoryPercentage\",\n \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n \"Action\": {\n \"SimpleScalingPolicyConfiguration\": {\n \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n \"ScalingAdjustment\": 1,\n \"CoolDown\": 300\n }\n },\n \"Trigger\": {\n \"CloudWatchAlarmDefinition\": {\n \"ComparisonOperator\": \"LESS_THAN\",\n \"EvaluationPeriods\": 1,\n \"MetricName\": \"YARNMemoryAvailablePercentage\",\n \"Namespace\": \"AWS/ElasticMapReduce\",\n \"Period\": 300,\n \"Statistic\": \"AVERAGE\",\n \"Threshold\": 15.0,\n \"Unit\": \"PERCENT\"\n }\n }\n }\n ]\n }\n ebsRootVolumeSize: 100\n tags:\n role: rolename\n env: env\n bootstrapActions:\n - path: s3://elasticmapreduce/bootstrap-actions/run-if\n name: runif\n args:\n - instance.isMaster=true\n - echo running on master node\n configurationsJson: |2\n [\n {\n \"Classification\": \"hadoop-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n },\n {\n \"Classification\": \"spark-env\",\n \"Configurations\": [\n {\n \"Classification\": \"export\",\n \"Properties\": {\n \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n }\n }\n ],\n \"Properties\": {}\n }\n ]\n serviceRole: ${iamEmrServiceRole.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe `aws.emr.Cluster` resource typically requires two IAM roles, one for the EMR Cluster to use as a service role, and another is assigned to every EC2 instance in a cluster and each application process that runs on a cluster assumes this role for permissions to interact with other AWS services. An additional role, the Auto Scaling role, is required if your cluster uses automatic scaling in Amazon EMR.\n\nThe default AWS managed EMR service role is called `EMR_DefaultRole` with Amazon managed policy `AmazonEMRServicePolicy_v2` attached. The name of default instance profile role is `EMR_EC2_DefaultRole` with default managed policy `AmazonElasticMapReduceforEC2Role` attached, but it is on the path to deprecation and will not be replaced with another default managed policy. You'll need to create and specify an instance profile to replace the deprecated role and default policy. See the [Configure IAM service roles for Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-roles.html) guide for more information on these IAM roles. There is also a fully-bootable example Pulumi configuration at the bottom of this page.\n\n### Instance Fleet\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.emr.Cluster(\"example\", {\n masterInstanceFleet: {\n instanceTypeConfigs: [{\n instanceType: \"m4.xlarge\",\n }],\n targetOnDemandCapacity: 1,\n },\n coreInstanceFleet: {\n instanceTypeConfigs: [\n {\n bidPriceAsPercentageOfOnDemandPrice: 80,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m3.xlarge\",\n weightedCapacity: 1,\n },\n {\n bidPriceAsPercentageOfOnDemandPrice: 100,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m4.xlarge\",\n weightedCapacity: 1,\n },\n {\n bidPriceAsPercentageOfOnDemandPrice: 100,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m4.2xlarge\",\n weightedCapacity: 2,\n },\n ],\n launchSpecifications: {\n spotSpecifications: [{\n allocationStrategy: \"capacity-optimized\",\n blockDurationMinutes: 0,\n timeoutAction: \"SWITCH_TO_ON_DEMAND\",\n timeoutDurationMinutes: 10,\n }],\n },\n name: \"core fleet\",\n targetOnDemandCapacity: 2,\n targetSpotCapacity: 2,\n },\n});\nconst task = new aws.emr.InstanceFleet(\"task\", {\n clusterId: example.id,\n instanceTypeConfigs: [\n {\n bidPriceAsPercentageOfOnDemandPrice: 100,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m4.xlarge\",\n weightedCapacity: 1,\n },\n {\n bidPriceAsPercentageOfOnDemandPrice: 100,\n ebsConfigs: [{\n size: 100,\n type: \"gp2\",\n volumesPerInstance: 1,\n }],\n instanceType: \"m4.2xlarge\",\n weightedCapacity: 2,\n },\n ],\n launchSpecifications: {\n spotSpecifications: [{\n allocationStrategy: \"capacity-optimized\",\n blockDurationMinutes: 0,\n timeoutAction: \"TERMINATE_CLUSTER\",\n timeoutDurationMinutes: 10,\n }],\n },\n name: \"task fleet\",\n targetOnDemandCapacity: 1,\n targetSpotCapacity: 1,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.emr.Cluster(\"example\",\n master_instance_fleet={\n \"instance_type_configs\": [{\n \"instance_type\": \"m4.xlarge\",\n }],\n \"target_on_demand_capacity\": 1,\n },\n core_instance_fleet={\n \"instance_type_configs\": [\n {\n \"bid_price_as_percentage_of_on_demand_price\": 80,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m3.xlarge\",\n \"weighted_capacity\": 1,\n },\n {\n \"bid_price_as_percentage_of_on_demand_price\": 100,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m4.xlarge\",\n \"weighted_capacity\": 1,\n },\n {\n \"bid_price_as_percentage_of_on_demand_price\": 100,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m4.2xlarge\",\n \"weighted_capacity\": 2,\n },\n ],\n \"launch_specifications\": {\n \"spot_specifications\": [{\n \"allocation_strategy\": \"capacity-optimized\",\n \"block_duration_minutes\": 0,\n \"timeout_action\": \"SWITCH_TO_ON_DEMAND\",\n \"timeout_duration_minutes\": 10,\n }],\n },\n \"name\": \"core fleet\",\n \"target_on_demand_capacity\": 2,\n \"target_spot_capacity\": 2,\n })\ntask = aws.emr.InstanceFleet(\"task\",\n cluster_id=example.id,\n instance_type_configs=[\n {\n \"bid_price_as_percentage_of_on_demand_price\": 100,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m4.xlarge\",\n \"weighted_capacity\": 1,\n },\n {\n \"bid_price_as_percentage_of_on_demand_price\": 100,\n \"ebs_configs\": [{\n \"size\": 100,\n \"type\": \"gp2\",\n \"volumes_per_instance\": 1,\n }],\n \"instance_type\": \"m4.2xlarge\",\n \"weighted_capacity\": 2,\n },\n ],\n launch_specifications={\n \"spot_specifications\": [{\n \"allocation_strategy\": \"capacity-optimized\",\n \"block_duration_minutes\": 0,\n \"timeout_action\": \"TERMINATE_CLUSTER\",\n \"timeout_duration_minutes\": 10,\n }],\n },\n name=\"task fleet\",\n target_on_demand_capacity=1,\n target_spot_capacity=1)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Emr.Cluster(\"example\", new()\n {\n MasterInstanceFleet = new Aws.Emr.Inputs.ClusterMasterInstanceFleetArgs\n {\n InstanceTypeConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterMasterInstanceFleetInstanceTypeConfigArgs\n {\n InstanceType = \"m4.xlarge\",\n },\n },\n TargetOnDemandCapacity = 1,\n },\n CoreInstanceFleet = new Aws.Emr.Inputs.ClusterCoreInstanceFleetArgs\n {\n InstanceTypeConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 80,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m3.xlarge\",\n WeightedCapacity = 1,\n },\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 100,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m4.xlarge\",\n WeightedCapacity = 1,\n },\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 100,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m4.2xlarge\",\n WeightedCapacity = 2,\n },\n },\n LaunchSpecifications = new Aws.Emr.Inputs.ClusterCoreInstanceFleetLaunchSpecificationsArgs\n {\n SpotSpecifications = new[]\n {\n new Aws.Emr.Inputs.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs\n {\n AllocationStrategy = \"capacity-optimized\",\n BlockDurationMinutes = 0,\n TimeoutAction = \"SWITCH_TO_ON_DEMAND\",\n TimeoutDurationMinutes = 10,\n },\n },\n },\n Name = \"core fleet\",\n TargetOnDemandCapacity = 2,\n TargetSpotCapacity = 2,\n },\n });\n\n var task = new Aws.Emr.InstanceFleet(\"task\", new()\n {\n ClusterId = example.Id,\n InstanceTypeConfigs = new[]\n {\n new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 100,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m4.xlarge\",\n WeightedCapacity = 1,\n },\n new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigArgs\n {\n BidPriceAsPercentageOfOnDemandPrice = 100,\n EbsConfigs = new[]\n {\n new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigEbsConfigArgs\n {\n Size = 100,\n Type = \"gp2\",\n VolumesPerInstance = 1,\n },\n },\n InstanceType = \"m4.2xlarge\",\n WeightedCapacity = 2,\n },\n },\n LaunchSpecifications = new Aws.Emr.Inputs.InstanceFleetLaunchSpecificationsArgs\n {\n SpotSpecifications = new[]\n {\n new Aws.Emr.Inputs.InstanceFleetLaunchSpecificationsSpotSpecificationArgs\n {\n AllocationStrategy = \"capacity-optimized\",\n BlockDurationMinutes = 0,\n TimeoutAction = \"TERMINATE_CLUSTER\",\n TimeoutDurationMinutes = 10,\n },\n },\n },\n Name = \"task fleet\",\n TargetOnDemandCapacity = 1,\n TargetSpotCapacity = 1,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := emr.NewCluster(ctx, \"example\", \u0026emr.ClusterArgs{\n\t\t\tMasterInstanceFleet: \u0026emr.ClusterMasterInstanceFleetArgs{\n\t\t\t\tInstanceTypeConfigs: emr.ClusterMasterInstanceFleetInstanceTypeConfigArray{\n\t\t\t\t\t\u0026emr.ClusterMasterInstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\t\tInstanceType: pulumi.String(\"m4.xlarge\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tTargetOnDemandCapacity: pulumi.Int(1),\n\t\t\t},\n\t\t\tCoreInstanceFleet: \u0026emr.ClusterCoreInstanceFleetArgs{\n\t\t\t\tInstanceTypeConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigArray{\n\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(80),\n\t\t\t\t\t\tEbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInstanceType: pulumi.String(\"m3.xlarge\"),\n\t\t\t\t\t\tWeightedCapacity: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),\n\t\t\t\t\t\tEbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInstanceType: pulumi.String(\"m4.xlarge\"),\n\t\t\t\t\t\tWeightedCapacity: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),\n\t\t\t\t\t\tEbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tInstanceType: pulumi.String(\"m4.2xlarge\"),\n\t\t\t\t\t\tWeightedCapacity: pulumi.Int(2),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tLaunchSpecifications: \u0026emr.ClusterCoreInstanceFleetLaunchSpecificationsArgs{\n\t\t\t\t\tSpotSpecifications: emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArray{\n\t\t\t\t\t\t\u0026emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs{\n\t\t\t\t\t\t\tAllocationStrategy: pulumi.String(\"capacity-optimized\"),\n\t\t\t\t\t\t\tBlockDurationMinutes: pulumi.Int(0),\n\t\t\t\t\t\t\tTimeoutAction: pulumi.String(\"SWITCH_TO_ON_DEMAND\"),\n\t\t\t\t\t\t\tTimeoutDurationMinutes: pulumi.Int(10),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tName: pulumi.String(\"core fleet\"),\n\t\t\t\tTargetOnDemandCapacity: pulumi.Int(2),\n\t\t\t\tTargetSpotCapacity: pulumi.Int(2),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = emr.NewInstanceFleet(ctx, \"task\", \u0026emr.InstanceFleetArgs{\n\t\t\tClusterId: example.ID(),\n\t\t\tInstanceTypeConfigs: emr.InstanceFleetInstanceTypeConfigArray{\n\t\t\t\t\u0026emr.InstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),\n\t\t\t\t\tEbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\u0026emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.xlarge\"),\n\t\t\t\t\tWeightedCapacity: pulumi.Int(1),\n\t\t\t\t},\n\t\t\t\t\u0026emr.InstanceFleetInstanceTypeConfigArgs{\n\t\t\t\t\tBidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),\n\t\t\t\t\tEbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{\n\t\t\t\t\t\t\u0026emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{\n\t\t\t\t\t\t\tSize: pulumi.Int(100),\n\t\t\t\t\t\t\tType: pulumi.String(\"gp2\"),\n\t\t\t\t\t\t\tVolumesPerInstance: pulumi.Int(1),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tInstanceType: pulumi.String(\"m4.2xlarge\"),\n\t\t\t\t\tWeightedCapacity: pulumi.Int(2),\n\t\t\t\t},\n\t\t\t},\n\t\t\tLaunchSpecifications: \u0026emr.InstanceFleetLaunchSpecificationsArgs{\n\t\t\t\tSpotSpecifications: emr.InstanceFleetLaunchSpecificationsSpotSpecificationArray{\n\t\t\t\t\t\u0026emr.InstanceFleetLaunchSpecificationsSpotSpecificationArgs{\n\t\t\t\t\t\tAllocationStrategy: pulumi.String(\"capacity-optimized\"),\n\t\t\t\t\t\tBlockDurationMinutes: pulumi.Int(0),\n\t\t\t\t\t\tTimeoutAction: pulumi.String(\"TERMINATE_CLUSTER\"),\n\t\t\t\t\t\tTimeoutDurationMinutes: pulumi.Int(10),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tName: pulumi.String(\"task fleet\"),\n\t\t\tTargetOnDemandCapacity: pulumi.Int(1),\n\t\t\tTargetSpotCapacity: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.emr.Cluster;\nimport com.pulumi.aws.emr.ClusterArgs;\nimport com.pulumi.aws.emr.inputs.ClusterMasterInstanceFleetArgs;\nimport com.pulumi.aws.emr.inputs.ClusterCoreInstanceFleetArgs;\nimport com.pulumi.aws.emr.inputs.ClusterCoreInstanceFleetLaunchSpecificationsArgs;\nimport com.pulumi.aws.emr.InstanceFleet;\nimport com.pulumi.aws.emr.InstanceFleetArgs;\nimport com.pulumi.aws.emr.inputs.InstanceFleetInstanceTypeConfigArgs;\nimport com.pulumi.aws.emr.inputs.InstanceFleetLaunchSpecificationsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Cluster(\"example\", ClusterArgs.builder()\n .masterInstanceFleet(ClusterMasterInstanceFleetArgs.builder()\n .instanceTypeConfigs(ClusterMasterInstanceFleetInstanceTypeConfigArgs.builder()\n .instanceType(\"m4.xlarge\")\n .build())\n .targetOnDemandCapacity(1)\n .build())\n .coreInstanceFleet(ClusterCoreInstanceFleetArgs.builder()\n .instanceTypeConfigs( \n ClusterCoreInstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(80)\n .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m3.xlarge\")\n .weightedCapacity(1)\n .build(),\n ClusterCoreInstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(100)\n .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m4.xlarge\")\n .weightedCapacity(1)\n .build(),\n ClusterCoreInstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(100)\n .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m4.2xlarge\")\n .weightedCapacity(2)\n .build())\n .launchSpecifications(ClusterCoreInstanceFleetLaunchSpecificationsArgs.builder()\n .spotSpecifications(ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs.builder()\n .allocationStrategy(\"capacity-optimized\")\n .blockDurationMinutes(0)\n .timeoutAction(\"SWITCH_TO_ON_DEMAND\")\n .timeoutDurationMinutes(10)\n .build())\n .build())\n .name(\"core fleet\")\n .targetOnDemandCapacity(2)\n .targetSpotCapacity(2)\n .build())\n .build());\n\n var task = new InstanceFleet(\"task\", InstanceFleetArgs.builder()\n .clusterId(example.id())\n .instanceTypeConfigs( \n InstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(100)\n .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m4.xlarge\")\n .weightedCapacity(1)\n .build(),\n InstanceFleetInstanceTypeConfigArgs.builder()\n .bidPriceAsPercentageOfOnDemandPrice(100)\n .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfigArgs.builder()\n .size(100)\n .type(\"gp2\")\n .volumesPerInstance(1)\n .build())\n .instanceType(\"m4.2xlarge\")\n .weightedCapacity(2)\n .build())\n .launchSpecifications(InstanceFleetLaunchSpecificationsArgs.builder()\n .spotSpecifications(InstanceFleetLaunchSpecificationsSpotSpecificationArgs.builder()\n .allocationStrategy(\"capacity-optimized\")\n .blockDurationMinutes(0)\n .timeoutAction(\"TERMINATE_CLUSTER\")\n .timeoutDurationMinutes(10)\n .build())\n .build())\n .name(\"task fleet\")\n .targetOnDemandCapacity(1)\n .targetSpotCapacity(1)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:emr:Cluster\n properties:\n masterInstanceFleet:\n instanceTypeConfigs:\n - instanceType: m4.xlarge\n targetOnDemandCapacity: 1\n coreInstanceFleet:\n instanceTypeConfigs:\n - bidPriceAsPercentageOfOnDemandPrice: 80\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m3.xlarge\n weightedCapacity: 1\n - bidPriceAsPercentageOfOnDemandPrice: 100\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m4.xlarge\n weightedCapacity: 1\n - bidPriceAsPercentageOfOnDemandPrice: 100\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m4.2xlarge\n weightedCapacity: 2\n launchSpecifications:\n spotSpecifications:\n - allocationStrategy: capacity-optimized\n blockDurationMinutes: 0\n timeoutAction: SWITCH_TO_ON_DEMAND\n timeoutDurationMinutes: 10\n name: core fleet\n targetOnDemandCapacity: 2\n targetSpotCapacity: 2\n task:\n type: aws:emr:InstanceFleet\n properties:\n clusterId: ${example.id}\n instanceTypeConfigs:\n - bidPriceAsPercentageOfOnDemandPrice: 100\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m4.xlarge\n weightedCapacity: 1\n - bidPriceAsPercentageOfOnDemandPrice: 100\n ebsConfigs:\n - size: 100\n type: gp2\n volumesPerInstance: 1\n instanceType: m4.2xlarge\n weightedCapacity: 2\n launchSpecifications:\n spotSpecifications:\n - allocationStrategy: capacity-optimized\n blockDurationMinutes: 0\n timeoutAction: TERMINATE_CLUSTER\n timeoutDurationMinutes: 10\n name: task fleet\n targetOnDemandCapacity: 1\n targetSpotCapacity: 1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Enable Debug Logging\n\n[Debug logging in EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-debugging.html) is implemented as a step. It is highly recommended that you utilize the resource options configuration with `ignoreChanges` if other steps are being managed outside of this provider.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.emr.Cluster(\"example\", {steps: [{\n actionOnFailure: \"TERMINATE_CLUSTER\",\n name: \"Setup Hadoop Debugging\",\n hadoopJarStep: {\n jar: \"command-runner.jar\",\n args: [\"state-pusher-script\"],\n },\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.emr.Cluster(\"example\", steps=[{\n \"action_on_failure\": \"TERMINATE_CLUSTER\",\n \"name\": \"Setup Hadoop Debugging\",\n \"hadoop_jar_step\": {\n \"jar\": \"command-runner.jar\",\n \"args\": [\"state-pusher-script\"],\n },\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Emr.Cluster(\"example\", new()\n {\n Steps = new[]\n {\n new Aws.Emr.Inputs.ClusterStepArgs\n {\n ActionOnFailure = \"TERMINATE_CLUSTER\",\n Name = \"Setup Hadoop Debugging\",\n HadoopJarStep = new Aws.Emr.Inputs.ClusterStepHadoopJarStepArgs\n {\n Jar = \"command-runner.jar\",\n Args = new[]\n {\n \"state-pusher-script\",\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := emr.NewCluster(ctx, \"example\", \u0026emr.ClusterArgs{\n\t\t\tSteps: emr.ClusterStepArray{\n\t\t\t\t\u0026emr.ClusterStepArgs{\n\t\t\t\t\tActionOnFailure: pulumi.String(\"TERMINATE_CLUSTER\"),\n\t\t\t\t\tName: pulumi.String(\"Setup Hadoop Debugging\"),\n\t\t\t\t\tHadoopJarStep: \u0026emr.ClusterStepHadoopJarStepArgs{\n\t\t\t\t\t\tJar: pulumi.String(\"command-runner.jar\"),\n\t\t\t\t\t\tArgs: pulumi.StringArray{\n\t\t\t\t\t\t\tpulumi.String(\"state-pusher-script\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.emr.Cluster;\nimport com.pulumi.aws.emr.ClusterArgs;\nimport com.pulumi.aws.emr.inputs.ClusterStepArgs;\nimport com.pulumi.aws.emr.inputs.ClusterStepHadoopJarStepArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Cluster(\"example\", ClusterArgs.builder()\n .steps(ClusterStepArgs.builder()\n .actionOnFailure(\"TERMINATE_CLUSTER\")\n .name(\"Setup Hadoop Debugging\")\n .hadoopJarStep(ClusterStepHadoopJarStepArgs.builder()\n .jar(\"command-runner.jar\")\n .args(\"state-pusher-script\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:emr:Cluster\n properties:\n steps:\n - actionOnFailure: TERMINATE_CLUSTER\n name: Setup Hadoop Debugging\n hadoopJarStep:\n jar: command-runner.jar\n args:\n - state-pusher-script\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Multiple Node Master Instance Group\n\nAvailable in EMR version 5.23.0 and later, an EMR Cluster can be launched with three master nodes for high availability. Additional information about this functionality and its requirements can be found in the [EMR Management Guide](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-ha.html).\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// This configuration is for illustrative purposes and highlights\n// only relevant configurations for working with this functionality.\n// Map public IP on launch must be enabled for public (Internet accessible) subnets\nconst example = new aws.ec2.Subnet(\"example\", {mapPublicIpOnLaunch: true});\nconst exampleCluster = new aws.emr.Cluster(\"example\", {\n releaseLabel: \"emr-5.24.1\",\n terminationProtection: true,\n ec2Attributes: {\n subnetId: example.id,\n },\n masterInstanceGroup: {\n instanceCount: 3,\n },\n coreInstanceGroup: {},\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# This configuration is for illustrative purposes and highlights\n# only relevant configurations for working with this functionality.\n# Map public IP on launch must be enabled for public (Internet accessible) subnets\nexample = aws.ec2.Subnet(\"example\", map_public_ip_on_launch=True)\nexample_cluster = aws.emr.Cluster(\"example\",\n release_label=\"emr-5.24.1\",\n termination_protection=True,\n ec2_attributes={\n \"subnet_id\": example.id,\n },\n master_instance_group={\n \"instance_count\": 3,\n },\n core_instance_group={})\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // This configuration is for illustrative purposes and highlights\n // only relevant configurations for working with this functionality.\n // Map public IP on launch must be enabled for public (Internet accessible) subnets\n var example = new Aws.Ec2.Subnet(\"example\", new()\n {\n MapPublicIpOnLaunch = true,\n });\n\n var exampleCluster = new Aws.Emr.Cluster(\"example\", new()\n {\n ReleaseLabel = \"emr-5.24.1\",\n TerminationProtection = true,\n Ec2Attributes = new Aws.Emr.Inputs.ClusterEc2AttributesArgs\n {\n SubnetId = example.Id,\n },\n MasterInstanceGroup = new Aws.Emr.Inputs.ClusterMasterInstanceGroupArgs\n {\n InstanceCount = 3,\n },\n CoreInstanceGroup = null,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// This configuration is for illustrative purposes and highlights\n\t\t// only relevant configurations for working with this functionality.\n\t\t// Map public IP on launch must be enabled for public (Internet accessible) subnets\n\t\texample, err := ec2.NewSubnet(ctx, \"example\", \u0026ec2.SubnetArgs{\n\t\t\tMapPublicIpOnLaunch: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = emr.NewCluster(ctx, \"example\", \u0026emr.ClusterArgs{\n\t\t\tReleaseLabel: pulumi.String(\"emr-5.24.1\"),\n\t\t\tTerminationProtection: pulumi.Bool(true),\n\t\t\tEc2Attributes: \u0026emr.ClusterEc2AttributesArgs{\n\t\t\t\tSubnetId: example.ID(),\n\t\t\t},\n\t\t\tMasterInstanceGroup: \u0026emr.ClusterMasterInstanceGroupArgs{\n\t\t\t\tInstanceCount: pulumi.Int(3),\n\t\t\t},\n\t\t\tCoreInstanceGroup: \u0026emr.ClusterCoreInstanceGroupArgs{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Subnet;\nimport com.pulumi.aws.ec2.SubnetArgs;\nimport com.pulumi.aws.emr.Cluster;\nimport com.pulumi.aws.emr.ClusterArgs;\nimport com.pulumi.aws.emr.inputs.ClusterEc2AttributesArgs;\nimport com.pulumi.aws.emr.inputs.ClusterMasterInstanceGroupArgs;\nimport com.pulumi.aws.emr.inputs.ClusterCoreInstanceGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // This configuration is for illustrative purposes and highlights\n // only relevant configurations for working with this functionality.\n // Map public IP on launch must be enabled for public (Internet accessible) subnets\n var example = new Subnet(\"example\", SubnetArgs.builder()\n .mapPublicIpOnLaunch(true)\n .build());\n\n var exampleCluster = new Cluster(\"exampleCluster\", ClusterArgs.builder()\n .releaseLabel(\"emr-5.24.1\")\n .terminationProtection(true)\n .ec2Attributes(ClusterEc2AttributesArgs.builder()\n .subnetId(example.id())\n .build())\n .masterInstanceGroup(ClusterMasterInstanceGroupArgs.builder()\n .instanceCount(3)\n .build())\n .coreInstanceGroup()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # This configuration is for illustrative purposes and highlights\n # only relevant configurations for working with this functionality.\n\n # Map public IP on launch must be enabled for public (Internet accessible) subnets\n example:\n type: aws:ec2:Subnet\n properties:\n mapPublicIpOnLaunch: true\n exampleCluster:\n type: aws:emr:Cluster\n name: example\n properties:\n releaseLabel: emr-5.24.1\n terminationProtection: true\n ec2Attributes:\n subnetId: ${example.id}\n masterInstanceGroup:\n instanceCount: 3\n coreInstanceGroup: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import EMR clusters using the `id`. For example:\n\n```sh\n$ pulumi import aws:emr/cluster:Cluster cluster j-123456ABCDEF\n```\nSince the API does not return the actual values for Kerberos configurations, environments with those options set will need to use the `lifecycle` configuration block `ignore_changes` argument available to all Pulumi resources to prevent perpetual differences. For example:\n\n", "properties": { "additionalInfo": { "type": "string", @@ -262038,7 +262038,7 @@ } }, "aws:finspace/kxEnvironment:KxEnvironment": { - "description": "Resource for managing an AWS FinSpace Kx Environment.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kms.Key(\"example\", {\n description: \"Sample KMS Key\",\n deletionWindowInDays: 7,\n});\nconst exampleKxEnvironment = new aws.finspace.KxEnvironment(\"example\", {\n name: \"my-tf-kx-environment\",\n kmsKeyId: example.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kms.Key(\"example\",\n description=\"Sample KMS Key\",\n deletion_window_in_days=7)\nexample_kx_environment = aws.finspace.KxEnvironment(\"example\",\n name=\"my-tf-kx-environment\",\n kms_key_id=example.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"Sample KMS Key\",\n DeletionWindowInDays = 7,\n });\n\n var exampleKxEnvironment = new Aws.FinSpace.KxEnvironment(\"example\", new()\n {\n Name = \"my-tf-kx-environment\",\n KmsKeyId = example.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/finspace\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Sample KMS Key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = finspace.NewKxEnvironment(ctx, \"example\", \u0026finspace.KxEnvironmentArgs{\n\t\t\tName: pulumi.String(\"my-tf-kx-environment\"),\n\t\t\tKmsKeyId: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.finspace.KxEnvironment;\nimport com.pulumi.aws.finspace.KxEnvironmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"Sample KMS Key\")\n .deletionWindowInDays(7)\n .build());\n\n var exampleKxEnvironment = new KxEnvironment(\"exampleKxEnvironment\", KxEnvironmentArgs.builder()\n .name(\"my-tf-kx-environment\")\n .kmsKeyId(example.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: Sample KMS Key\n deletionWindowInDays: 7\n exampleKxEnvironment:\n type: aws:finspace:KxEnvironment\n name: example\n properties:\n name: my-tf-kx-environment\n kmsKeyId: ${example.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Transit Gateway Configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kms.Key(\"example\", {\n description: \"Sample KMS Key\",\n deletionWindowInDays: 7,\n});\nconst exampleTransitGateway = new aws.ec2transitgateway.TransitGateway(\"example\", {description: \"example\"});\nconst exampleEnv = new aws.finspace.KxEnvironment(\"example_env\", {\n name: \"my-tf-kx-environment\",\n description: \"Environment description\",\n kmsKeyId: example.arn,\n transitGatewayConfiguration: {\n transitGatewayId: exampleTransitGateway.id,\n routableCidrSpace: \"100.64.0.0/26\",\n },\n customDnsConfigurations: [{\n customDnsServerName: \"example.finspace.amazonaws.com\",\n customDnsServerIp: \"10.0.0.76\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kms.Key(\"example\",\n description=\"Sample KMS Key\",\n deletion_window_in_days=7)\nexample_transit_gateway = aws.ec2transitgateway.TransitGateway(\"example\", description=\"example\")\nexample_env = aws.finspace.KxEnvironment(\"example_env\",\n name=\"my-tf-kx-environment\",\n description=\"Environment description\",\n kms_key_id=example.arn,\n transit_gateway_configuration={\n \"transit_gateway_id\": example_transit_gateway.id,\n \"routable_cidr_space\": \"100.64.0.0/26\",\n },\n custom_dns_configurations=[{\n \"custom_dns_server_name\": \"example.finspace.amazonaws.com\",\n \"custom_dns_server_ip\": \"10.0.0.76\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"Sample KMS Key\",\n DeletionWindowInDays = 7,\n });\n\n var exampleTransitGateway = new Aws.Ec2TransitGateway.TransitGateway(\"example\", new()\n {\n Description = \"example\",\n });\n\n var exampleEnv = new Aws.FinSpace.KxEnvironment(\"example_env\", new()\n {\n Name = \"my-tf-kx-environment\",\n Description = \"Environment description\",\n KmsKeyId = example.Arn,\n TransitGatewayConfiguration = new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationArgs\n {\n TransitGatewayId = exampleTransitGateway.Id,\n RoutableCidrSpace = \"100.64.0.0/26\",\n },\n CustomDnsConfigurations = new[]\n {\n new Aws.FinSpace.Inputs.KxEnvironmentCustomDnsConfigurationArgs\n {\n CustomDnsServerName = \"example.finspace.amazonaws.com\",\n CustomDnsServerIp = \"10.0.0.76\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/finspace\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Sample KMS Key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, \"example\", \u0026ec2transitgateway.TransitGatewayArgs{\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = finspace.NewKxEnvironment(ctx, \"example_env\", \u0026finspace.KxEnvironmentArgs{\n\t\t\tName: pulumi.String(\"my-tf-kx-environment\"),\n\t\t\tDescription: pulumi.String(\"Environment description\"),\n\t\t\tKmsKeyId: example.Arn,\n\t\t\tTransitGatewayConfiguration: \u0026finspace.KxEnvironmentTransitGatewayConfigurationArgs{\n\t\t\t\tTransitGatewayId: exampleTransitGateway.ID(),\n\t\t\t\tRoutableCidrSpace: pulumi.String(\"100.64.0.0/26\"),\n\t\t\t},\n\t\t\tCustomDnsConfigurations: finspace.KxEnvironmentCustomDnsConfigurationArray{\n\t\t\t\t\u0026finspace.KxEnvironmentCustomDnsConfigurationArgs{\n\t\t\t\t\tCustomDnsServerName: pulumi.String(\"example.finspace.amazonaws.com\"),\n\t\t\t\t\tCustomDnsServerIp: pulumi.String(\"10.0.0.76\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.ec2transitgateway.TransitGateway;\nimport com.pulumi.aws.ec2transitgateway.TransitGatewayArgs;\nimport com.pulumi.aws.finspace.KxEnvironment;\nimport com.pulumi.aws.finspace.KxEnvironmentArgs;\nimport com.pulumi.aws.finspace.inputs.KxEnvironmentTransitGatewayConfigurationArgs;\nimport com.pulumi.aws.finspace.inputs.KxEnvironmentCustomDnsConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"Sample KMS Key\")\n .deletionWindowInDays(7)\n .build());\n\n var exampleTransitGateway = new TransitGateway(\"exampleTransitGateway\", TransitGatewayArgs.builder()\n .description(\"example\")\n .build());\n\n var exampleEnv = new KxEnvironment(\"exampleEnv\", KxEnvironmentArgs.builder()\n .name(\"my-tf-kx-environment\")\n .description(\"Environment description\")\n .kmsKeyId(example.arn())\n .transitGatewayConfiguration(KxEnvironmentTransitGatewayConfigurationArgs.builder()\n .transitGatewayId(exampleTransitGateway.id())\n .routableCidrSpace(\"100.64.0.0/26\")\n .build())\n .customDnsConfigurations(KxEnvironmentCustomDnsConfigurationArgs.builder()\n .customDnsServerName(\"example.finspace.amazonaws.com\")\n .customDnsServerIp(\"10.0.0.76\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: Sample KMS Key\n deletionWindowInDays: 7\n exampleTransitGateway:\n type: aws:ec2transitgateway:TransitGateway\n name: example\n properties:\n description: example\n exampleEnv:\n type: aws:finspace:KxEnvironment\n name: example_env\n properties:\n name: my-tf-kx-environment\n description: Environment description\n kmsKeyId: ${example.arn}\n transitGatewayConfiguration:\n transitGatewayId: ${exampleTransitGateway.id}\n routableCidrSpace: 100.64.0.0/26\n customDnsConfigurations:\n - customDnsServerName: example.finspace.amazonaws.com\n customDnsServerIp: 10.0.0.76\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Transit Gateway Attachment Network ACL Configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kms.Key(\"example\", {\n description: \"Sample KMS Key\",\n deletionWindowInDays: 7,\n});\nconst exampleTransitGateway = new aws.ec2transitgateway.TransitGateway(\"example\", {description: \"example\"});\nconst exampleEnv = new aws.finspace.KxEnvironment(\"example_env\", {\n name: \"my-tf-kx-environment\",\n description: \"Environment description\",\n kmsKeyId: example.arn,\n transitGatewayConfiguration: {\n transitGatewayId: exampleTransitGateway.id,\n routableCidrSpace: \"100.64.0.0/26\",\n attachmentNetworkAclConfigurations: [{\n ruleNumber: 1,\n protocol: \"6\",\n ruleAction: \"allow\",\n cidrBlock: \"0.0.0.0/0\",\n portRange: {\n from: 53,\n to: 53,\n },\n icmpTypeCode: {\n type: -1,\n code: -1,\n },\n }],\n },\n customDnsConfigurations: [{\n customDnsServerName: \"example.finspace.amazonaws.com\",\n customDnsServerIp: \"10.0.0.76\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kms.Key(\"example\",\n description=\"Sample KMS Key\",\n deletion_window_in_days=7)\nexample_transit_gateway = aws.ec2transitgateway.TransitGateway(\"example\", description=\"example\")\nexample_env = aws.finspace.KxEnvironment(\"example_env\",\n name=\"my-tf-kx-environment\",\n description=\"Environment description\",\n kms_key_id=example.arn,\n transit_gateway_configuration={\n \"transit_gateway_id\": example_transit_gateway.id,\n \"routable_cidr_space\": \"100.64.0.0/26\",\n \"attachment_network_acl_configurations\": [{\n \"rule_number\": 1,\n \"protocol\": \"6\",\n \"rule_action\": \"allow\",\n \"cidr_block\": \"0.0.0.0/0\",\n \"port_range\": {\n \"from_\": 53,\n \"to\": 53,\n },\n \"icmp_type_code\": {\n \"type\": -1,\n \"code\": -1,\n },\n }],\n },\n custom_dns_configurations=[{\n \"custom_dns_server_name\": \"example.finspace.amazonaws.com\",\n \"custom_dns_server_ip\": \"10.0.0.76\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"Sample KMS Key\",\n DeletionWindowInDays = 7,\n });\n\n var exampleTransitGateway = new Aws.Ec2TransitGateway.TransitGateway(\"example\", new()\n {\n Description = \"example\",\n });\n\n var exampleEnv = new Aws.FinSpace.KxEnvironment(\"example_env\", new()\n {\n Name = \"my-tf-kx-environment\",\n Description = \"Environment description\",\n KmsKeyId = example.Arn,\n TransitGatewayConfiguration = new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationArgs\n {\n TransitGatewayId = exampleTransitGateway.Id,\n RoutableCidrSpace = \"100.64.0.0/26\",\n AttachmentNetworkAclConfigurations = new[]\n {\n new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationArgs\n {\n RuleNumber = 1,\n Protocol = \"6\",\n RuleAction = \"allow\",\n CidrBlock = \"0.0.0.0/0\",\n PortRange = new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationPortRangeArgs\n {\n From = 53,\n To = 53,\n },\n IcmpTypeCode = new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationIcmpTypeCodeArgs\n {\n Type = -1,\n Code = -1,\n },\n },\n },\n },\n CustomDnsConfigurations = new[]\n {\n new Aws.FinSpace.Inputs.KxEnvironmentCustomDnsConfigurationArgs\n {\n CustomDnsServerName = \"example.finspace.amazonaws.com\",\n CustomDnsServerIp = \"10.0.0.76\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/finspace\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Sample KMS Key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, \"example\", \u0026ec2transitgateway.TransitGatewayArgs{\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = finspace.NewKxEnvironment(ctx, \"example_env\", \u0026finspace.KxEnvironmentArgs{\n\t\t\tName: pulumi.String(\"my-tf-kx-environment\"),\n\t\t\tDescription: pulumi.String(\"Environment description\"),\n\t\t\tKmsKeyId: example.Arn,\n\t\t\tTransitGatewayConfiguration: \u0026finspace.KxEnvironmentTransitGatewayConfigurationArgs{\n\t\t\t\tTransitGatewayId: exampleTransitGateway.ID(),\n\t\t\t\tRoutableCidrSpace: pulumi.String(\"100.64.0.0/26\"),\n\t\t\t\tAttachmentNetworkAclConfigurations: finspace.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationArray{\n\t\t\t\t\t\u0026finspace.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationArgs{\n\t\t\t\t\t\tRuleNumber: pulumi.Int(1),\n\t\t\t\t\t\tProtocol: pulumi.String(\"6\"),\n\t\t\t\t\t\tRuleAction: pulumi.String(\"allow\"),\n\t\t\t\t\t\tCidrBlock: pulumi.String(\"0.0.0.0/0\"),\n\t\t\t\t\t\tPortRange: \u0026finspace.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationPortRangeArgs{\n\t\t\t\t\t\t\tFrom: pulumi.Int(53),\n\t\t\t\t\t\t\tTo: pulumi.Int(53),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tIcmpTypeCode: \u0026finspace.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationIcmpTypeCodeArgs{\n\t\t\t\t\t\t\tType: int(-1),\n\t\t\t\t\t\t\tCode: int(-1),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCustomDnsConfigurations: finspace.KxEnvironmentCustomDnsConfigurationArray{\n\t\t\t\t\u0026finspace.KxEnvironmentCustomDnsConfigurationArgs{\n\t\t\t\t\tCustomDnsServerName: pulumi.String(\"example.finspace.amazonaws.com\"),\n\t\t\t\t\tCustomDnsServerIp: pulumi.String(\"10.0.0.76\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: Sample KMS Key\n deletionWindowInDays: 7\n exampleTransitGateway:\n type: aws:ec2transitgateway:TransitGateway\n name: example\n properties:\n description: example\n exampleEnv:\n type: aws:finspace:KxEnvironment\n name: example_env\n properties:\n name: my-tf-kx-environment\n description: Environment description\n kmsKeyId: ${example.arn}\n transitGatewayConfiguration:\n transitGatewayId: ${exampleTransitGateway.id}\n routableCidrSpace: 100.64.0.0/26\n attachmentNetworkAclConfigurations:\n - ruleNumber: 1\n protocol: '6'\n ruleAction: allow\n cidrBlock: 0.0.0.0/0\n portRange:\n from: 53\n to: 53\n icmpTypeCode:\n type: -1\n code: -1\n customDnsConfigurations:\n - customDnsServerName: example.finspace.amazonaws.com\n customDnsServerIp: 10.0.0.76\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import an AWS FinSpace Kx Environment using the `id`. For example:\n\n```sh\n$ pulumi import aws:finspace/kxEnvironment:KxEnvironment example n3ceo7wqxoxcti5tujqwzs\n```\n", + "description": "Resource for managing an AWS FinSpace Kx Environment.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kms.Key(\"example\", {\n description: \"Sample KMS Key\",\n deletionWindowInDays: 7,\n});\nconst exampleKxEnvironment = new aws.finspace.KxEnvironment(\"example\", {\n name: \"my-tf-kx-environment\",\n kmsKeyId: example.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kms.Key(\"example\",\n description=\"Sample KMS Key\",\n deletion_window_in_days=7)\nexample_kx_environment = aws.finspace.KxEnvironment(\"example\",\n name=\"my-tf-kx-environment\",\n kms_key_id=example.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"Sample KMS Key\",\n DeletionWindowInDays = 7,\n });\n\n var exampleKxEnvironment = new Aws.FinSpace.KxEnvironment(\"example\", new()\n {\n Name = \"my-tf-kx-environment\",\n KmsKeyId = example.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/finspace\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Sample KMS Key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = finspace.NewKxEnvironment(ctx, \"example\", \u0026finspace.KxEnvironmentArgs{\n\t\t\tName: pulumi.String(\"my-tf-kx-environment\"),\n\t\t\tKmsKeyId: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.finspace.KxEnvironment;\nimport com.pulumi.aws.finspace.KxEnvironmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"Sample KMS Key\")\n .deletionWindowInDays(7)\n .build());\n\n var exampleKxEnvironment = new KxEnvironment(\"exampleKxEnvironment\", KxEnvironmentArgs.builder()\n .name(\"my-tf-kx-environment\")\n .kmsKeyId(example.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: Sample KMS Key\n deletionWindowInDays: 7\n exampleKxEnvironment:\n type: aws:finspace:KxEnvironment\n name: example\n properties:\n name: my-tf-kx-environment\n kmsKeyId: ${example.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Transit Gateway Configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kms.Key(\"example\", {\n description: \"Sample KMS Key\",\n deletionWindowInDays: 7,\n});\nconst exampleTransitGateway = new aws.ec2transitgateway.TransitGateway(\"example\", {description: \"example\"});\nconst exampleEnv = new aws.finspace.KxEnvironment(\"example_env\", {\n name: \"my-tf-kx-environment\",\n description: \"Environment description\",\n kmsKeyId: example.arn,\n transitGatewayConfiguration: {\n transitGatewayId: exampleTransitGateway.id,\n routableCidrSpace: \"100.64.0.0/26\",\n },\n customDnsConfigurations: [{\n customDnsServerName: \"example.finspace.amazonaws.com\",\n customDnsServerIp: \"10.0.0.76\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kms.Key(\"example\",\n description=\"Sample KMS Key\",\n deletion_window_in_days=7)\nexample_transit_gateway = aws.ec2transitgateway.TransitGateway(\"example\", description=\"example\")\nexample_env = aws.finspace.KxEnvironment(\"example_env\",\n name=\"my-tf-kx-environment\",\n description=\"Environment description\",\n kms_key_id=example.arn,\n transit_gateway_configuration={\n \"transit_gateway_id\": example_transit_gateway.id,\n \"routable_cidr_space\": \"100.64.0.0/26\",\n },\n custom_dns_configurations=[{\n \"custom_dns_server_name\": \"example.finspace.amazonaws.com\",\n \"custom_dns_server_ip\": \"10.0.0.76\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"Sample KMS Key\",\n DeletionWindowInDays = 7,\n });\n\n var exampleTransitGateway = new Aws.Ec2TransitGateway.TransitGateway(\"example\", new()\n {\n Description = \"example\",\n });\n\n var exampleEnv = new Aws.FinSpace.KxEnvironment(\"example_env\", new()\n {\n Name = \"my-tf-kx-environment\",\n Description = \"Environment description\",\n KmsKeyId = example.Arn,\n TransitGatewayConfiguration = new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationArgs\n {\n TransitGatewayId = exampleTransitGateway.Id,\n RoutableCidrSpace = \"100.64.0.0/26\",\n },\n CustomDnsConfigurations = new[]\n {\n new Aws.FinSpace.Inputs.KxEnvironmentCustomDnsConfigurationArgs\n {\n CustomDnsServerName = \"example.finspace.amazonaws.com\",\n CustomDnsServerIp = \"10.0.0.76\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/finspace\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Sample KMS Key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, \"example\", \u0026ec2transitgateway.TransitGatewayArgs{\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = finspace.NewKxEnvironment(ctx, \"example_env\", \u0026finspace.KxEnvironmentArgs{\n\t\t\tName: pulumi.String(\"my-tf-kx-environment\"),\n\t\t\tDescription: pulumi.String(\"Environment description\"),\n\t\t\tKmsKeyId: example.Arn,\n\t\t\tTransitGatewayConfiguration: \u0026finspace.KxEnvironmentTransitGatewayConfigurationArgs{\n\t\t\t\tTransitGatewayId: exampleTransitGateway.ID(),\n\t\t\t\tRoutableCidrSpace: pulumi.String(\"100.64.0.0/26\"),\n\t\t\t},\n\t\t\tCustomDnsConfigurations: finspace.KxEnvironmentCustomDnsConfigurationArray{\n\t\t\t\t\u0026finspace.KxEnvironmentCustomDnsConfigurationArgs{\n\t\t\t\t\tCustomDnsServerName: pulumi.String(\"example.finspace.amazonaws.com\"),\n\t\t\t\t\tCustomDnsServerIp: pulumi.String(\"10.0.0.76\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.ec2transitgateway.TransitGateway;\nimport com.pulumi.aws.ec2transitgateway.TransitGatewayArgs;\nimport com.pulumi.aws.finspace.KxEnvironment;\nimport com.pulumi.aws.finspace.KxEnvironmentArgs;\nimport com.pulumi.aws.finspace.inputs.KxEnvironmentTransitGatewayConfigurationArgs;\nimport com.pulumi.aws.finspace.inputs.KxEnvironmentCustomDnsConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"Sample KMS Key\")\n .deletionWindowInDays(7)\n .build());\n\n var exampleTransitGateway = new TransitGateway(\"exampleTransitGateway\", TransitGatewayArgs.builder()\n .description(\"example\")\n .build());\n\n var exampleEnv = new KxEnvironment(\"exampleEnv\", KxEnvironmentArgs.builder()\n .name(\"my-tf-kx-environment\")\n .description(\"Environment description\")\n .kmsKeyId(example.arn())\n .transitGatewayConfiguration(KxEnvironmentTransitGatewayConfigurationArgs.builder()\n .transitGatewayId(exampleTransitGateway.id())\n .routableCidrSpace(\"100.64.0.0/26\")\n .build())\n .customDnsConfigurations(KxEnvironmentCustomDnsConfigurationArgs.builder()\n .customDnsServerName(\"example.finspace.amazonaws.com\")\n .customDnsServerIp(\"10.0.0.76\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: Sample KMS Key\n deletionWindowInDays: 7\n exampleTransitGateway:\n type: aws:ec2transitgateway:TransitGateway\n name: example\n properties:\n description: example\n exampleEnv:\n type: aws:finspace:KxEnvironment\n name: example_env\n properties:\n name: my-tf-kx-environment\n description: Environment description\n kmsKeyId: ${example.arn}\n transitGatewayConfiguration:\n transitGatewayId: ${exampleTransitGateway.id}\n routableCidrSpace: 100.64.0.0/26\n customDnsConfigurations:\n - customDnsServerName: example.finspace.amazonaws.com\n customDnsServerIp: 10.0.0.76\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Transit Gateway Attachment Network ACL Configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kms.Key(\"example\", {\n description: \"Sample KMS Key\",\n deletionWindowInDays: 7,\n});\nconst exampleTransitGateway = new aws.ec2transitgateway.TransitGateway(\"example\", {description: \"example\"});\nconst exampleEnv = new aws.finspace.KxEnvironment(\"example_env\", {\n name: \"my-tf-kx-environment\",\n description: \"Environment description\",\n kmsKeyId: example.arn,\n transitGatewayConfiguration: {\n transitGatewayId: exampleTransitGateway.id,\n routableCidrSpace: \"100.64.0.0/26\",\n attachmentNetworkAclConfigurations: [{\n ruleNumber: 1,\n protocol: \"6\",\n ruleAction: \"allow\",\n cidrBlock: \"0.0.0.0/0\",\n portRange: {\n from: 53,\n to: 53,\n },\n icmpTypeCode: {\n type: -1,\n code: -1,\n },\n }],\n },\n customDnsConfigurations: [{\n customDnsServerName: \"example.finspace.amazonaws.com\",\n customDnsServerIp: \"10.0.0.76\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kms.Key(\"example\",\n description=\"Sample KMS Key\",\n deletion_window_in_days=7)\nexample_transit_gateway = aws.ec2transitgateway.TransitGateway(\"example\", description=\"example\")\nexample_env = aws.finspace.KxEnvironment(\"example_env\",\n name=\"my-tf-kx-environment\",\n description=\"Environment description\",\n kms_key_id=example.arn,\n transit_gateway_configuration={\n \"transit_gateway_id\": example_transit_gateway.id,\n \"routable_cidr_space\": \"100.64.0.0/26\",\n \"attachment_network_acl_configurations\": [{\n \"rule_number\": 1,\n \"protocol\": \"6\",\n \"rule_action\": \"allow\",\n \"cidr_block\": \"0.0.0.0/0\",\n \"port_range\": {\n \"from_\": 53,\n \"to\": 53,\n },\n \"icmp_type_code\": {\n \"type\": -1,\n \"code\": -1,\n },\n }],\n },\n custom_dns_configurations=[{\n \"custom_dns_server_name\": \"example.finspace.amazonaws.com\",\n \"custom_dns_server_ip\": \"10.0.0.76\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"Sample KMS Key\",\n DeletionWindowInDays = 7,\n });\n\n var exampleTransitGateway = new Aws.Ec2TransitGateway.TransitGateway(\"example\", new()\n {\n Description = \"example\",\n });\n\n var exampleEnv = new Aws.FinSpace.KxEnvironment(\"example_env\", new()\n {\n Name = \"my-tf-kx-environment\",\n Description = \"Environment description\",\n KmsKeyId = example.Arn,\n TransitGatewayConfiguration = new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationArgs\n {\n TransitGatewayId = exampleTransitGateway.Id,\n RoutableCidrSpace = \"100.64.0.0/26\",\n AttachmentNetworkAclConfigurations = new[]\n {\n new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationArgs\n {\n RuleNumber = 1,\n Protocol = \"6\",\n RuleAction = \"allow\",\n CidrBlock = \"0.0.0.0/0\",\n PortRange = new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationPortRangeArgs\n {\n From = 53,\n To = 53,\n },\n IcmpTypeCode = new Aws.FinSpace.Inputs.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationIcmpTypeCodeArgs\n {\n Type = -1,\n Code = -1,\n },\n },\n },\n },\n CustomDnsConfigurations = new[]\n {\n new Aws.FinSpace.Inputs.KxEnvironmentCustomDnsConfigurationArgs\n {\n CustomDnsServerName = \"example.finspace.amazonaws.com\",\n CustomDnsServerIp = \"10.0.0.76\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/finspace\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Sample KMS Key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, \"example\", \u0026ec2transitgateway.TransitGatewayArgs{\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = finspace.NewKxEnvironment(ctx, \"example_env\", \u0026finspace.KxEnvironmentArgs{\n\t\t\tName: pulumi.String(\"my-tf-kx-environment\"),\n\t\t\tDescription: pulumi.String(\"Environment description\"),\n\t\t\tKmsKeyId: example.Arn,\n\t\t\tTransitGatewayConfiguration: \u0026finspace.KxEnvironmentTransitGatewayConfigurationArgs{\n\t\t\t\tTransitGatewayId: exampleTransitGateway.ID(),\n\t\t\t\tRoutableCidrSpace: pulumi.String(\"100.64.0.0/26\"),\n\t\t\t\tAttachmentNetworkAclConfigurations: finspace.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationArray{\n\t\t\t\t\t\u0026finspace.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationArgs{\n\t\t\t\t\t\tRuleNumber: pulumi.Int(1),\n\t\t\t\t\t\tProtocol: pulumi.String(\"6\"),\n\t\t\t\t\t\tRuleAction: pulumi.String(\"allow\"),\n\t\t\t\t\t\tCidrBlock: pulumi.String(\"0.0.0.0/0\"),\n\t\t\t\t\t\tPortRange: \u0026finspace.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationPortRangeArgs{\n\t\t\t\t\t\t\tFrom: pulumi.Int(53),\n\t\t\t\t\t\t\tTo: pulumi.Int(53),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tIcmpTypeCode: \u0026finspace.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationIcmpTypeCodeArgs{\n\t\t\t\t\t\t\tType: pulumi.Int(-1),\n\t\t\t\t\t\t\tCode: pulumi.Int(-1),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCustomDnsConfigurations: finspace.KxEnvironmentCustomDnsConfigurationArray{\n\t\t\t\t\u0026finspace.KxEnvironmentCustomDnsConfigurationArgs{\n\t\t\t\t\tCustomDnsServerName: pulumi.String(\"example.finspace.amazonaws.com\"),\n\t\t\t\t\tCustomDnsServerIp: pulumi.String(\"10.0.0.76\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.ec2transitgateway.TransitGateway;\nimport com.pulumi.aws.ec2transitgateway.TransitGatewayArgs;\nimport com.pulumi.aws.finspace.KxEnvironment;\nimport com.pulumi.aws.finspace.KxEnvironmentArgs;\nimport com.pulumi.aws.finspace.inputs.KxEnvironmentTransitGatewayConfigurationArgs;\nimport com.pulumi.aws.finspace.inputs.KxEnvironmentCustomDnsConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"Sample KMS Key\")\n .deletionWindowInDays(7)\n .build());\n\n var exampleTransitGateway = new TransitGateway(\"exampleTransitGateway\", TransitGatewayArgs.builder()\n .description(\"example\")\n .build());\n\n var exampleEnv = new KxEnvironment(\"exampleEnv\", KxEnvironmentArgs.builder()\n .name(\"my-tf-kx-environment\")\n .description(\"Environment description\")\n .kmsKeyId(example.arn())\n .transitGatewayConfiguration(KxEnvironmentTransitGatewayConfigurationArgs.builder()\n .transitGatewayId(exampleTransitGateway.id())\n .routableCidrSpace(\"100.64.0.0/26\")\n .attachmentNetworkAclConfigurations(KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationArgs.builder()\n .ruleNumber(1)\n .protocol(\"6\")\n .ruleAction(\"allow\")\n .cidrBlock(\"0.0.0.0/0\")\n .portRange(KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationPortRangeArgs.builder()\n .from(53)\n .to(53)\n .build())\n .icmpTypeCode(KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationIcmpTypeCodeArgs.builder()\n .type(-1)\n .code(-1)\n .build())\n .build())\n .build())\n .customDnsConfigurations(KxEnvironmentCustomDnsConfigurationArgs.builder()\n .customDnsServerName(\"example.finspace.amazonaws.com\")\n .customDnsServerIp(\"10.0.0.76\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: Sample KMS Key\n deletionWindowInDays: 7\n exampleTransitGateway:\n type: aws:ec2transitgateway:TransitGateway\n name: example\n properties:\n description: example\n exampleEnv:\n type: aws:finspace:KxEnvironment\n name: example_env\n properties:\n name: my-tf-kx-environment\n description: Environment description\n kmsKeyId: ${example.arn}\n transitGatewayConfiguration:\n transitGatewayId: ${exampleTransitGateway.id}\n routableCidrSpace: 100.64.0.0/26\n attachmentNetworkAclConfigurations:\n - ruleNumber: 1\n protocol: '6'\n ruleAction: allow\n cidrBlock: 0.0.0.0/0\n portRange:\n from: 53\n to: 53\n icmpTypeCode:\n type: -1\n code: -1\n customDnsConfigurations:\n - customDnsServerName: example.finspace.amazonaws.com\n customDnsServerIp: 10.0.0.76\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import an AWS FinSpace Kx Environment using the `id`. For example:\n\n```sh\n$ pulumi import aws:finspace/kxEnvironment:KxEnvironment example n3ceo7wqxoxcti5tujqwzs\n```\n", "properties": { "arn": { "type": "string", @@ -266962,7 +266962,7 @@ } }, "aws:gamelift/gameServerGroup:GameServerGroup": { - "description": "Provides an GameLift Game Server Group resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.gamelift.GameServerGroup(\"example\", {\n gameServerGroupName: \"example\",\n instanceDefinitions: [\n {\n instanceType: \"c5.large\",\n },\n {\n instanceType: \"c5a.large\",\n },\n ],\n launchTemplate: {\n id: exampleAwsLaunchTemplate.id,\n },\n maxSize: 1,\n minSize: 1,\n roleArn: exampleAwsIamRole.arn,\n}, {\n dependsOn: [exampleAwsIamRolePolicyAttachment],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.gamelift.GameServerGroup(\"example\",\n game_server_group_name=\"example\",\n instance_definitions=[\n {\n \"instance_type\": \"c5.large\",\n },\n {\n \"instance_type\": \"c5a.large\",\n },\n ],\n launch_template={\n \"id\": example_aws_launch_template[\"id\"],\n },\n max_size=1,\n min_size=1,\n role_arn=example_aws_iam_role[\"arn\"],\n opts = pulumi.ResourceOptions(depends_on=[example_aws_iam_role_policy_attachment]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.GameLift.GameServerGroup(\"example\", new()\n {\n GameServerGroupName = \"example\",\n InstanceDefinitions = new[]\n {\n new Aws.GameLift.Inputs.GameServerGroupInstanceDefinitionArgs\n {\n InstanceType = \"c5.large\",\n },\n new Aws.GameLift.Inputs.GameServerGroupInstanceDefinitionArgs\n {\n InstanceType = \"c5a.large\",\n },\n },\n LaunchTemplate = new Aws.GameLift.Inputs.GameServerGroupLaunchTemplateArgs\n {\n Id = exampleAwsLaunchTemplate.Id,\n },\n MaxSize = 1,\n MinSize = 1,\n RoleArn = exampleAwsIamRole.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsIamRolePolicyAttachment,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/gamelift\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := gamelift.NewGameServerGroup(ctx, \"example\", \u0026gamelift.GameServerGroupArgs{\n\t\t\tGameServerGroupName: pulumi.String(\"example\"),\n\t\t\tInstanceDefinitions: gamelift.GameServerGroupInstanceDefinitionArray{\n\t\t\t\t\u0026gamelift.GameServerGroupInstanceDefinitionArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"c5.large\"),\n\t\t\t\t},\n\t\t\t\t\u0026gamelift.GameServerGroupInstanceDefinitionArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"c5a.large\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tLaunchTemplate: \u0026gamelift.GameServerGroupLaunchTemplateArgs{\n\t\t\t\tId: pulumi.Any(exampleAwsLaunchTemplate.Id),\n\t\t\t},\n\t\t\tMaxSize: pulumi.Int(1),\n\t\t\tMinSize: pulumi.Int(1),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsIamRolePolicyAttachment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.gamelift.GameServerGroup;\nimport com.pulumi.aws.gamelift.GameServerGroupArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupInstanceDefinitionArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupLaunchTemplateArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new GameServerGroup(\"example\", GameServerGroupArgs.builder()\n .gameServerGroupName(\"example\")\n .instanceDefinitions( \n GameServerGroupInstanceDefinitionArgs.builder()\n .instanceType(\"c5.large\")\n .build(),\n GameServerGroupInstanceDefinitionArgs.builder()\n .instanceType(\"c5a.large\")\n .build())\n .launchTemplate(GameServerGroupLaunchTemplateArgs.builder()\n .id(exampleAwsLaunchTemplate.id())\n .build())\n .maxSize(1)\n .minSize(1)\n .roleArn(exampleAwsIamRole.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsIamRolePolicyAttachment)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:gamelift:GameServerGroup\n properties:\n gameServerGroupName: example\n instanceDefinitions:\n - instanceType: c5.large\n - instanceType: c5a.large\n launchTemplate:\n id: ${exampleAwsLaunchTemplate.id}\n maxSize: 1\n minSize: 1\n roleArn: ${exampleAwsIamRole.arn}\n options:\n dependson:\n - ${exampleAwsIamRolePolicyAttachment}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nFull usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.gamelift.GameServerGroup(\"example\", {\n autoScalingPolicy: {\n estimatedInstanceWarmup: 60,\n targetTrackingConfiguration: {\n targetValue: 75,\n },\n },\n balancingStrategy: \"SPOT_ONLY\",\n gameServerGroupName: \"example\",\n gameServerProtectionPolicy: \"FULL_PROTECTION\",\n instanceDefinitions: [\n {\n instanceType: \"c5.large\",\n weightedCapacity: \"1\",\n },\n {\n instanceType: \"c5.2xlarge\",\n weightedCapacity: \"2\",\n },\n ],\n launchTemplate: {\n id: exampleAwsLaunchTemplate.id,\n version: \"1\",\n },\n maxSize: 1,\n minSize: 1,\n roleArn: exampleAwsIamRole.arn,\n tags: {\n Name: \"example\",\n },\n vpcSubnets: [\n \"subnet-12345678\",\n \"subnet-23456789\",\n ],\n}, {\n dependsOn: [exampleAwsIamRolePolicyAttachment],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.gamelift.GameServerGroup(\"example\",\n auto_scaling_policy={\n \"estimated_instance_warmup\": 60,\n \"target_tracking_configuration\": {\n \"target_value\": 75,\n },\n },\n balancing_strategy=\"SPOT_ONLY\",\n game_server_group_name=\"example\",\n game_server_protection_policy=\"FULL_PROTECTION\",\n instance_definitions=[\n {\n \"instance_type\": \"c5.large\",\n \"weighted_capacity\": \"1\",\n },\n {\n \"instance_type\": \"c5.2xlarge\",\n \"weighted_capacity\": \"2\",\n },\n ],\n launch_template={\n \"id\": example_aws_launch_template[\"id\"],\n \"version\": \"1\",\n },\n max_size=1,\n min_size=1,\n role_arn=example_aws_iam_role[\"arn\"],\n tags={\n \"Name\": \"example\",\n },\n vpc_subnets=[\n \"subnet-12345678\",\n \"subnet-23456789\",\n ],\n opts = pulumi.ResourceOptions(depends_on=[example_aws_iam_role_policy_attachment]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.GameLift.GameServerGroup(\"example\", new()\n {\n AutoScalingPolicy = new Aws.GameLift.Inputs.GameServerGroupAutoScalingPolicyArgs\n {\n EstimatedInstanceWarmup = 60,\n TargetTrackingConfiguration = new Aws.GameLift.Inputs.GameServerGroupAutoScalingPolicyTargetTrackingConfigurationArgs\n {\n TargetValue = 75,\n },\n },\n BalancingStrategy = \"SPOT_ONLY\",\n GameServerGroupName = \"example\",\n GameServerProtectionPolicy = \"FULL_PROTECTION\",\n InstanceDefinitions = new[]\n {\n new Aws.GameLift.Inputs.GameServerGroupInstanceDefinitionArgs\n {\n InstanceType = \"c5.large\",\n WeightedCapacity = \"1\",\n },\n new Aws.GameLift.Inputs.GameServerGroupInstanceDefinitionArgs\n {\n InstanceType = \"c5.2xlarge\",\n WeightedCapacity = \"2\",\n },\n },\n LaunchTemplate = new Aws.GameLift.Inputs.GameServerGroupLaunchTemplateArgs\n {\n Id = exampleAwsLaunchTemplate.Id,\n Version = \"1\",\n },\n MaxSize = 1,\n MinSize = 1,\n RoleArn = exampleAwsIamRole.Arn,\n Tags = \n {\n { \"Name\", \"example\" },\n },\n VpcSubnets = new[]\n {\n \"subnet-12345678\",\n \"subnet-23456789\",\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsIamRolePolicyAttachment,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/gamelift\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := gamelift.NewGameServerGroup(ctx, \"example\", \u0026gamelift.GameServerGroupArgs{\n\t\t\tAutoScalingPolicy: \u0026gamelift.GameServerGroupAutoScalingPolicyArgs{\n\t\t\t\tEstimatedInstanceWarmup: pulumi.Int(60),\n\t\t\t\tTargetTrackingConfiguration: \u0026gamelift.GameServerGroupAutoScalingPolicyTargetTrackingConfigurationArgs{\n\t\t\t\t\tTargetValue: pulumi.Float64(75),\n\t\t\t\t},\n\t\t\t},\n\t\t\tBalancingStrategy: pulumi.String(\"SPOT_ONLY\"),\n\t\t\tGameServerGroupName: pulumi.String(\"example\"),\n\t\t\tGameServerProtectionPolicy: pulumi.String(\"FULL_PROTECTION\"),\n\t\t\tInstanceDefinitions: gamelift.GameServerGroupInstanceDefinitionArray{\n\t\t\t\t\u0026gamelift.GameServerGroupInstanceDefinitionArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"c5.large\"),\n\t\t\t\t\tWeightedCapacity: pulumi.String(\"1\"),\n\t\t\t\t},\n\t\t\t\t\u0026gamelift.GameServerGroupInstanceDefinitionArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"c5.2xlarge\"),\n\t\t\t\t\tWeightedCapacity: pulumi.String(\"2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tLaunchTemplate: \u0026gamelift.GameServerGroupLaunchTemplateArgs{\n\t\t\t\tId: pulumi.Any(exampleAwsLaunchTemplate.Id),\n\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t},\n\t\t\tMaxSize: pulumi.Int(1),\n\t\t\tMinSize: pulumi.Int(1),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"example\"),\n\t\t\t},\n\t\t\tVpcSubnets: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"subnet-12345678\"),\n\t\t\t\tpulumi.String(\"subnet-23456789\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsIamRolePolicyAttachment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.gamelift.GameServerGroup;\nimport com.pulumi.aws.gamelift.GameServerGroupArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupAutoScalingPolicyArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupAutoScalingPolicyTargetTrackingConfigurationArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupInstanceDefinitionArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupLaunchTemplateArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new GameServerGroup(\"example\", GameServerGroupArgs.builder()\n .autoScalingPolicy(GameServerGroupAutoScalingPolicyArgs.builder()\n .estimatedInstanceWarmup(60)\n .targetTrackingConfiguration(GameServerGroupAutoScalingPolicyTargetTrackingConfigurationArgs.builder()\n .targetValue(75)\n .build())\n .build())\n .balancingStrategy(\"SPOT_ONLY\")\n .gameServerGroupName(\"example\")\n .gameServerProtectionPolicy(\"FULL_PROTECTION\")\n .instanceDefinitions( \n GameServerGroupInstanceDefinitionArgs.builder()\n .instanceType(\"c5.large\")\n .weightedCapacity(\"1\")\n .build(),\n GameServerGroupInstanceDefinitionArgs.builder()\n .instanceType(\"c5.2xlarge\")\n .weightedCapacity(\"2\")\n .build())\n .launchTemplate(GameServerGroupLaunchTemplateArgs.builder()\n .id(exampleAwsLaunchTemplate.id())\n .version(\"1\")\n .build())\n .maxSize(1)\n .minSize(1)\n .roleArn(exampleAwsIamRole.arn())\n .tags(Map.of(\"Name\", \"example\"))\n .vpcSubnets( \n \"subnet-12345678\",\n \"subnet-23456789\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsIamRolePolicyAttachment)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:gamelift:GameServerGroup\n properties:\n autoScalingPolicy:\n estimatedInstanceWarmup: 60\n targetTrackingConfiguration:\n targetValue: 75\n balancingStrategy: SPOT_ONLY\n gameServerGroupName: example\n gameServerProtectionPolicy: FULL_PROTECTION\n instanceDefinitions:\n - instanceType: c5.large\n weightedCapacity: '1'\n - instanceType: c5.2xlarge\n weightedCapacity: '2'\n launchTemplate:\n id: ${exampleAwsLaunchTemplate.id}\n version: '1'\n maxSize: 1\n minSize: 1\n roleArn: ${exampleAwsIamRole.arn}\n tags:\n Name: example\n vpcSubnets:\n - subnet-12345678\n - subnet-23456789\n options:\n dependson:\n - ${exampleAwsIamRolePolicyAttachment}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example IAM Role for GameLift Game Server Group\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getPartition({});\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\n \"autoscaling.amazonaws.com\",\n \"gamelift.amazonaws.com\",\n ],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst example = new aws.iam.Role(\"example\", {\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n name: \"gamelift-game-server-group-example\",\n});\nconst exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"example\", {\n policyArn: current.then(current =\u003e `arn:${current.partition}:iam::aws:policy/GameLiftGameServerGroupPolicy`),\n role: example.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_partition()\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\n \"autoscaling.amazonaws.com\",\n \"gamelift.amazonaws.com\",\n ],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\nexample = aws.iam.Role(\"example\",\n assume_role_policy=assume_role.json,\n name=\"gamelift-game-server-group-example\")\nexample_role_policy_attachment = aws.iam.RolePolicyAttachment(\"example\",\n policy_arn=f\"arn:{current.partition}:iam::aws:policy/GameLiftGameServerGroupPolicy\",\n role=example.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetPartition.Invoke();\n\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"autoscaling.amazonaws.com\",\n \"gamelift.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n Name = \"gamelift-game-server-group-example\",\n });\n\n var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"example\", new()\n {\n PolicyArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::aws:policy/GameLiftGameServerGroupPolicy\",\n Role = example.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"autoscaling.amazonaws.com\",\n\t\t\t\t\t\t\t\t\"gamelift.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t\tName: pulumi.String(\"gamelift-game-server-group-example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicyAttachment(ctx, \"example\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tPolicyArn: pulumi.Sprintf(\"arn:%v:iam::aws:policy/GameLiftGameServerGroupPolicy\", current.Partition),\n\t\t\tRole: example.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getPartition();\n\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers( \n \"autoscaling.amazonaws.com\",\n \"gamelift.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var example = new Role(\"example\", RoleArgs.builder()\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .name(\"gamelift-game-server-group-example\")\n .build());\n\n var exampleRolePolicyAttachment = new RolePolicyAttachment(\"exampleRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .policyArn(String.format(\"arn:%s:iam::aws:policy/GameLiftGameServerGroupPolicy\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .role(example.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n assumeRolePolicy: ${assumeRole.json}\n name: gamelift-game-server-group-example\n exampleRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: example\n properties:\n policyArn: arn:${current.partition}:iam::aws:policy/GameLiftGameServerGroupPolicy\n role: ${example.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - autoscaling.amazonaws.com\n - gamelift.amazonaws.com\n actions:\n - sts:AssumeRole\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import GameLift Game Server Group using the `name`. For example:\n\n```sh\n$ pulumi import aws:gamelift/gameServerGroup:GameServerGroup example example\n```\n", + "description": "Provides an GameLift Game Server Group resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.gamelift.GameServerGroup(\"example\", {\n gameServerGroupName: \"example\",\n instanceDefinitions: [\n {\n instanceType: \"c5.large\",\n },\n {\n instanceType: \"c5a.large\",\n },\n ],\n launchTemplate: {\n id: exampleAwsLaunchTemplate.id,\n },\n maxSize: 1,\n minSize: 1,\n roleArn: exampleAwsIamRole.arn,\n}, {\n dependsOn: [exampleAwsIamRolePolicyAttachment],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.gamelift.GameServerGroup(\"example\",\n game_server_group_name=\"example\",\n instance_definitions=[\n {\n \"instance_type\": \"c5.large\",\n },\n {\n \"instance_type\": \"c5a.large\",\n },\n ],\n launch_template={\n \"id\": example_aws_launch_template[\"id\"],\n },\n max_size=1,\n min_size=1,\n role_arn=example_aws_iam_role[\"arn\"],\n opts = pulumi.ResourceOptions(depends_on=[example_aws_iam_role_policy_attachment]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.GameLift.GameServerGroup(\"example\", new()\n {\n GameServerGroupName = \"example\",\n InstanceDefinitions = new[]\n {\n new Aws.GameLift.Inputs.GameServerGroupInstanceDefinitionArgs\n {\n InstanceType = \"c5.large\",\n },\n new Aws.GameLift.Inputs.GameServerGroupInstanceDefinitionArgs\n {\n InstanceType = \"c5a.large\",\n },\n },\n LaunchTemplate = new Aws.GameLift.Inputs.GameServerGroupLaunchTemplateArgs\n {\n Id = exampleAwsLaunchTemplate.Id,\n },\n MaxSize = 1,\n MinSize = 1,\n RoleArn = exampleAwsIamRole.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsIamRolePolicyAttachment,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/gamelift\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := gamelift.NewGameServerGroup(ctx, \"example\", \u0026gamelift.GameServerGroupArgs{\n\t\t\tGameServerGroupName: pulumi.String(\"example\"),\n\t\t\tInstanceDefinitions: gamelift.GameServerGroupInstanceDefinitionArray{\n\t\t\t\t\u0026gamelift.GameServerGroupInstanceDefinitionArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"c5.large\"),\n\t\t\t\t},\n\t\t\t\t\u0026gamelift.GameServerGroupInstanceDefinitionArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"c5a.large\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tLaunchTemplate: \u0026gamelift.GameServerGroupLaunchTemplateArgs{\n\t\t\t\tId: pulumi.Any(exampleAwsLaunchTemplate.Id),\n\t\t\t},\n\t\t\tMaxSize: pulumi.Int(1),\n\t\t\tMinSize: pulumi.Int(1),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsIamRolePolicyAttachment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.gamelift.GameServerGroup;\nimport com.pulumi.aws.gamelift.GameServerGroupArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupInstanceDefinitionArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupLaunchTemplateArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new GameServerGroup(\"example\", GameServerGroupArgs.builder()\n .gameServerGroupName(\"example\")\n .instanceDefinitions( \n GameServerGroupInstanceDefinitionArgs.builder()\n .instanceType(\"c5.large\")\n .build(),\n GameServerGroupInstanceDefinitionArgs.builder()\n .instanceType(\"c5a.large\")\n .build())\n .launchTemplate(GameServerGroupLaunchTemplateArgs.builder()\n .id(exampleAwsLaunchTemplate.id())\n .build())\n .maxSize(1)\n .minSize(1)\n .roleArn(exampleAwsIamRole.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsIamRolePolicyAttachment)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:gamelift:GameServerGroup\n properties:\n gameServerGroupName: example\n instanceDefinitions:\n - instanceType: c5.large\n - instanceType: c5a.large\n launchTemplate:\n id: ${exampleAwsLaunchTemplate.id}\n maxSize: 1\n minSize: 1\n roleArn: ${exampleAwsIamRole.arn}\n options:\n dependson:\n - ${exampleAwsIamRolePolicyAttachment}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nFull usage:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.gamelift.GameServerGroup(\"example\", {\n autoScalingPolicy: {\n estimatedInstanceWarmup: 60,\n targetTrackingConfiguration: {\n targetValue: 75,\n },\n },\n balancingStrategy: \"SPOT_ONLY\",\n gameServerGroupName: \"example\",\n gameServerProtectionPolicy: \"FULL_PROTECTION\",\n instanceDefinitions: [\n {\n instanceType: \"c5.large\",\n weightedCapacity: \"1\",\n },\n {\n instanceType: \"c5.2xlarge\",\n weightedCapacity: \"2\",\n },\n ],\n launchTemplate: {\n id: exampleAwsLaunchTemplate.id,\n version: \"1\",\n },\n maxSize: 1,\n minSize: 1,\n roleArn: exampleAwsIamRole.arn,\n tags: {\n Name: \"example\",\n },\n vpcSubnets: [\n \"subnet-12345678\",\n \"subnet-23456789\",\n ],\n}, {\n dependsOn: [exampleAwsIamRolePolicyAttachment],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.gamelift.GameServerGroup(\"example\",\n auto_scaling_policy={\n \"estimated_instance_warmup\": 60,\n \"target_tracking_configuration\": {\n \"target_value\": 75,\n },\n },\n balancing_strategy=\"SPOT_ONLY\",\n game_server_group_name=\"example\",\n game_server_protection_policy=\"FULL_PROTECTION\",\n instance_definitions=[\n {\n \"instance_type\": \"c5.large\",\n \"weighted_capacity\": \"1\",\n },\n {\n \"instance_type\": \"c5.2xlarge\",\n \"weighted_capacity\": \"2\",\n },\n ],\n launch_template={\n \"id\": example_aws_launch_template[\"id\"],\n \"version\": \"1\",\n },\n max_size=1,\n min_size=1,\n role_arn=example_aws_iam_role[\"arn\"],\n tags={\n \"Name\": \"example\",\n },\n vpc_subnets=[\n \"subnet-12345678\",\n \"subnet-23456789\",\n ],\n opts = pulumi.ResourceOptions(depends_on=[example_aws_iam_role_policy_attachment]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.GameLift.GameServerGroup(\"example\", new()\n {\n AutoScalingPolicy = new Aws.GameLift.Inputs.GameServerGroupAutoScalingPolicyArgs\n {\n EstimatedInstanceWarmup = 60,\n TargetTrackingConfiguration = new Aws.GameLift.Inputs.GameServerGroupAutoScalingPolicyTargetTrackingConfigurationArgs\n {\n TargetValue = 75,\n },\n },\n BalancingStrategy = \"SPOT_ONLY\",\n GameServerGroupName = \"example\",\n GameServerProtectionPolicy = \"FULL_PROTECTION\",\n InstanceDefinitions = new[]\n {\n new Aws.GameLift.Inputs.GameServerGroupInstanceDefinitionArgs\n {\n InstanceType = \"c5.large\",\n WeightedCapacity = \"1\",\n },\n new Aws.GameLift.Inputs.GameServerGroupInstanceDefinitionArgs\n {\n InstanceType = \"c5.2xlarge\",\n WeightedCapacity = \"2\",\n },\n },\n LaunchTemplate = new Aws.GameLift.Inputs.GameServerGroupLaunchTemplateArgs\n {\n Id = exampleAwsLaunchTemplate.Id,\n Version = \"1\",\n },\n MaxSize = 1,\n MinSize = 1,\n RoleArn = exampleAwsIamRole.Arn,\n Tags = \n {\n { \"Name\", \"example\" },\n },\n VpcSubnets = new[]\n {\n \"subnet-12345678\",\n \"subnet-23456789\",\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsIamRolePolicyAttachment,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/gamelift\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := gamelift.NewGameServerGroup(ctx, \"example\", \u0026gamelift.GameServerGroupArgs{\n\t\t\tAutoScalingPolicy: \u0026gamelift.GameServerGroupAutoScalingPolicyArgs{\n\t\t\t\tEstimatedInstanceWarmup: pulumi.Int(60),\n\t\t\t\tTargetTrackingConfiguration: \u0026gamelift.GameServerGroupAutoScalingPolicyTargetTrackingConfigurationArgs{\n\t\t\t\t\tTargetValue: pulumi.Float64(75),\n\t\t\t\t},\n\t\t\t},\n\t\t\tBalancingStrategy: pulumi.String(\"SPOT_ONLY\"),\n\t\t\tGameServerGroupName: pulumi.String(\"example\"),\n\t\t\tGameServerProtectionPolicy: pulumi.String(\"FULL_PROTECTION\"),\n\t\t\tInstanceDefinitions: gamelift.GameServerGroupInstanceDefinitionArray{\n\t\t\t\t\u0026gamelift.GameServerGroupInstanceDefinitionArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"c5.large\"),\n\t\t\t\t\tWeightedCapacity: pulumi.String(\"1\"),\n\t\t\t\t},\n\t\t\t\t\u0026gamelift.GameServerGroupInstanceDefinitionArgs{\n\t\t\t\t\tInstanceType: pulumi.String(\"c5.2xlarge\"),\n\t\t\t\t\tWeightedCapacity: pulumi.String(\"2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tLaunchTemplate: \u0026gamelift.GameServerGroupLaunchTemplateArgs{\n\t\t\t\tId: pulumi.Any(exampleAwsLaunchTemplate.Id),\n\t\t\t\tVersion: pulumi.String(\"1\"),\n\t\t\t},\n\t\t\tMaxSize: pulumi.Int(1),\n\t\t\tMinSize: pulumi.Int(1),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"example\"),\n\t\t\t},\n\t\t\tVpcSubnets: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"subnet-12345678\"),\n\t\t\t\tpulumi.String(\"subnet-23456789\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsIamRolePolicyAttachment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.gamelift.GameServerGroup;\nimport com.pulumi.aws.gamelift.GameServerGroupArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupAutoScalingPolicyArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupAutoScalingPolicyTargetTrackingConfigurationArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupInstanceDefinitionArgs;\nimport com.pulumi.aws.gamelift.inputs.GameServerGroupLaunchTemplateArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new GameServerGroup(\"example\", GameServerGroupArgs.builder()\n .autoScalingPolicy(GameServerGroupAutoScalingPolicyArgs.builder()\n .estimatedInstanceWarmup(60)\n .targetTrackingConfiguration(GameServerGroupAutoScalingPolicyTargetTrackingConfigurationArgs.builder()\n .targetValue(75)\n .build())\n .build())\n .balancingStrategy(\"SPOT_ONLY\")\n .gameServerGroupName(\"example\")\n .gameServerProtectionPolicy(\"FULL_PROTECTION\")\n .instanceDefinitions( \n GameServerGroupInstanceDefinitionArgs.builder()\n .instanceType(\"c5.large\")\n .weightedCapacity(\"1\")\n .build(),\n GameServerGroupInstanceDefinitionArgs.builder()\n .instanceType(\"c5.2xlarge\")\n .weightedCapacity(\"2\")\n .build())\n .launchTemplate(GameServerGroupLaunchTemplateArgs.builder()\n .id(exampleAwsLaunchTemplate.id())\n .version(\"1\")\n .build())\n .maxSize(1)\n .minSize(1)\n .roleArn(exampleAwsIamRole.arn())\n .tags(Map.of(\"Name\", \"example\"))\n .vpcSubnets( \n \"subnet-12345678\",\n \"subnet-23456789\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsIamRolePolicyAttachment)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:gamelift:GameServerGroup\n properties:\n autoScalingPolicy:\n estimatedInstanceWarmup: 60\n targetTrackingConfiguration:\n targetValue: 75\n balancingStrategy: SPOT_ONLY\n gameServerGroupName: example\n gameServerProtectionPolicy: FULL_PROTECTION\n instanceDefinitions:\n - instanceType: c5.large\n weightedCapacity: '1'\n - instanceType: c5.2xlarge\n weightedCapacity: '2'\n launchTemplate:\n id: ${exampleAwsLaunchTemplate.id}\n version: '1'\n maxSize: 1\n minSize: 1\n roleArn: ${exampleAwsIamRole.arn}\n tags:\n Name: example\n vpcSubnets:\n - subnet-12345678\n - subnet-23456789\n options:\n dependson:\n - ${exampleAwsIamRolePolicyAttachment}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example IAM Role for GameLift Game Server Group\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getPartition({});\nconst assumeRole = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\n \"autoscaling.amazonaws.com\",\n \"gamelift.amazonaws.com\",\n ],\n }],\n actions: [\"sts:AssumeRole\"],\n }],\n});\nconst example = new aws.iam.Role(\"example\", {\n assumeRolePolicy: assumeRole.then(assumeRole =\u003e assumeRole.json),\n name: \"gamelift-game-server-group-example\",\n});\nconst exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment(\"example\", {\n policyArn: current.then(current =\u003e `arn:${current.partition}:iam::aws:policy/GameLiftGameServerGroupPolicy`),\n role: example.name,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_partition()\nassume_role = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\n \"autoscaling.amazonaws.com\",\n \"gamelift.amazonaws.com\",\n ],\n }],\n \"actions\": [\"sts:AssumeRole\"],\n}])\nexample = aws.iam.Role(\"example\",\n assume_role_policy=assume_role.json,\n name=\"gamelift-game-server-group-example\")\nexample_role_policy_attachment = aws.iam.RolePolicyAttachment(\"example\",\n policy_arn=f\"arn:{current.partition}:iam::aws:policy/GameLiftGameServerGroupPolicy\",\n role=example.name)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetPartition.Invoke();\n\n var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"autoscaling.amazonaws.com\",\n \"gamelift.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n },\n },\n });\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n Name = \"gamelift-game-server-group-example\",\n });\n\n var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment(\"example\", new()\n {\n PolicyArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::aws:policy/GameLiftGameServerGroupPolicy\",\n Role = example.Name,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tassumeRole, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"autoscaling.amazonaws.com\",\n\t\t\t\t\t\t\t\t\"gamelift.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tAssumeRolePolicy: pulumi.String(assumeRole.Json),\n\t\t\tName: pulumi.String(\"gamelift-game-server-group-example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRolePolicyAttachment(ctx, \"example\", \u0026iam.RolePolicyAttachmentArgs{\n\t\t\tPolicyArn: pulumi.Sprintf(\"arn:%v:iam::aws:policy/GameLiftGameServerGroupPolicy\", current.Partition),\n\t\t\tRole: example.Name,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.RolePolicyAttachment;\nimport com.pulumi.aws.iam.RolePolicyAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getPartition();\n\n final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers( \n \"autoscaling.amazonaws.com\",\n \"gamelift.amazonaws.com\")\n .build())\n .actions(\"sts:AssumeRole\")\n .build())\n .build());\n\n var example = new Role(\"example\", RoleArgs.builder()\n .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .name(\"gamelift-game-server-group-example\")\n .build());\n\n var exampleRolePolicyAttachment = new RolePolicyAttachment(\"exampleRolePolicyAttachment\", RolePolicyAttachmentArgs.builder()\n .policyArn(String.format(\"arn:%s:iam::aws:policy/GameLiftGameServerGroupPolicy\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .role(example.name())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n assumeRolePolicy: ${assumeRole.json}\n name: gamelift-game-server-group-example\n exampleRolePolicyAttachment:\n type: aws:iam:RolePolicyAttachment\n name: example\n properties:\n policyArn: arn:${current.partition}:iam::aws:policy/GameLiftGameServerGroupPolicy\n role: ${example.name}\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n assumeRole:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - autoscaling.amazonaws.com\n - gamelift.amazonaws.com\n actions:\n - sts:AssumeRole\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import GameLift Game Server Group using the `name`. For example:\n\n```sh\n$ pulumi import aws:gamelift/gameServerGroup:GameServerGroup example example\n```\n", "properties": { "arn": { "type": "string", @@ -271529,7 +271529,7 @@ } }, "aws:glue/resourcePolicy:ResourcePolicy": { - "description": "Provides a Glue resource policy. Only one can exist per region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst glue-example-policy = Promise.all([currentGetPartition, currentGetRegion, current]).then(([currentGetPartition, currentGetRegion, current]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"glue:CreateTable\"],\n resources: [`arn:${currentGetPartition.partition}:glue:${currentGetRegion.name}:${current.accountId}:*`],\n principals: [{\n identifiers: [\"*\"],\n type: \"AWS\",\n }],\n }],\n}));\nconst example = new aws.glue.ResourcePolicy(\"example\", {policy: glue_example_policy.then(glue_example_policy =\u003e glue_example_policy.json)});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\ncurrent_get_region = aws.get_region()\nglue_example_policy = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"glue:CreateTable\"],\n \"resources\": [f\"arn:{current_get_partition.partition}:glue:{current_get_region.name}:{current.account_id}:*\"],\n \"principals\": [{\n \"identifiers\": [\"*\"],\n \"type\": \"AWS\",\n }],\n}])\nexample = aws.glue.ResourcePolicy(\"example\", policy=glue_example_policy.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var glue_example_policy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"glue:CreateTable\",\n },\n Resources = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:glue:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Identifiers = new[]\n {\n \"*\",\n },\n Type = \"AWS\",\n },\n },\n },\n },\n });\n\n var example = new Aws.Glue.ResourcePolicy(\"example\", new()\n {\n Policy = glue_example_policy.Apply(glue_example_policy =\u003e glue_example_policy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json)),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tglue_example_policy, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"glue:CreateTable\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:%v:glue:%v:%v:*\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"*\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = glue.NewResourcePolicy(ctx, \"example\", \u0026glue.ResourcePolicyArgs{\n\t\t\tPolicy: pulumi.String(glue_example_policy.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.glue.ResourcePolicy;\nimport com.pulumi.aws.glue.ResourcePolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n final var glue-example-policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"glue:CreateTable\")\n .resources(String.format(\"arn:%s:glue:%s:%s:*\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .identifiers(\"*\")\n .type(\"AWS\")\n .build())\n .build())\n .build());\n\n var example = new ResourcePolicy(\"example\", ResourcePolicyArgs.builder()\n .policy(glue_example_policy.json())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:glue:ResourcePolicy\n properties:\n policy: ${[\"glue-example-policy\"].json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n glue-example-policy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - glue:CreateTable\n resources:\n - arn:${currentGetPartition.partition}:glue:${currentGetRegion.name}:${current.accountId}:*\n principals:\n - identifiers:\n - '*'\n type: AWS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Glue Resource Policy using the account ID. For example:\n\n```sh\n$ pulumi import aws:glue/resourcePolicy:ResourcePolicy Test 12356789012\n```\n", + "description": "Provides a Glue resource policy. Only one can exist per region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst glue-example-policy = Promise.all([currentGetPartition, currentGetRegion, current]).then(([currentGetPartition, currentGetRegion, current]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"glue:CreateTable\"],\n resources: [`arn:${currentGetPartition.partition}:glue:${currentGetRegion.name}:${current.accountId}:*`],\n principals: [{\n identifiers: [\"*\"],\n type: \"AWS\",\n }],\n }],\n}));\nconst example = new aws.glue.ResourcePolicy(\"example\", {policy: glue_example_policy.then(glue_example_policy =\u003e glue_example_policy.json)});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\ncurrent_get_region = aws.get_region()\nglue_example_policy = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"glue:CreateTable\"],\n \"resources\": [f\"arn:{current_get_partition.partition}:glue:{current_get_region.name}:{current.account_id}:*\"],\n \"principals\": [{\n \"identifiers\": [\"*\"],\n \"type\": \"AWS\",\n }],\n}])\nexample = aws.glue.ResourcePolicy(\"example\", policy=glue_example_policy.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var glue_example_policy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"glue:CreateTable\",\n },\n Resources = new[]\n {\n $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:glue:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Identifiers = new[]\n {\n \"*\",\n },\n Type = \"AWS\",\n },\n },\n },\n },\n });\n\n var example = new Aws.Glue.ResourcePolicy(\"example\", new()\n {\n Policy = glue_example_policy.Apply(glue_example_policy =\u003e glue_example_policy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json)),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tglue_example_policy, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"glue:CreateTable\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:%v:glue:%v:%v:*\", currentGetPartition.Partition, currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"*\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = glue.NewResourcePolicy(ctx, \"example\", \u0026glue.ResourcePolicyArgs{\n\t\t\tPolicy: pulumi.String(glue_example_policy.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.glue.ResourcePolicy;\nimport com.pulumi.aws.glue.ResourcePolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n final var glue-example-policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"glue:CreateTable\")\n .resources(String.format(\"arn:%s:glue:%s:%s:*\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .identifiers(\"*\")\n .type(\"AWS\")\n .build())\n .build())\n .build());\n\n var example = new ResourcePolicy(\"example\", ResourcePolicyArgs.builder()\n .policy(glue_example_policy.json())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:glue:ResourcePolicy\n properties:\n policy: ${[\"glue-example-policy\"].json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n glue-example-policy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - glue:CreateTable\n resources:\n - arn:${currentGetPartition.partition}:glue:${currentGetRegion.name}:${current.accountId}:*\n principals:\n - identifiers:\n - '*'\n type: AWS\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Glue Resource Policy using the account ID. For example:\n\n```sh\n$ pulumi import aws:glue/resourcePolicy:ResourcePolicy Test 12356789012\n```\n", "properties": { "enableHybrid": { "type": "string", @@ -274217,7 +274217,7 @@ } }, "aws:guardduty/publishingDestination:PublishingDestination": { - "description": "Provides a resource to manage a GuardDuty PublishingDestination. Requires an existing GuardDuty Detector.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetRegion = aws.getRegion({});\nconst gdBucket = new aws.s3.BucketV2(\"gd_bucket\", {\n bucket: \"example\",\n forceDestroy: true,\n});\nconst bucketPol = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n sid: \"Allow PutObject\",\n actions: [\"s3:PutObject\"],\n resources: [pulumi.interpolate`${gdBucket.arn}/*`],\n principals: [{\n type: \"Service\",\n identifiers: [\"guardduty.amazonaws.com\"],\n }],\n },\n {\n sid: \"Allow GetBucketLocation\",\n actions: [\"s3:GetBucketLocation\"],\n resources: [gdBucket.arn],\n principals: [{\n type: \"Service\",\n identifiers: [\"guardduty.amazonaws.com\"],\n }],\n },\n ],\n});\nconst kmsPol = Promise.all([currentGetRegion, current, currentGetRegion, current, current]).then(([currentGetRegion, current, currentGetRegion1, current1, current2]) =\u003e aws.iam.getPolicyDocument({\n statements: [\n {\n sid: \"Allow GuardDuty to encrypt findings\",\n actions: [\"kms:GenerateDataKey\"],\n resources: [`arn:aws:kms:${currentGetRegion.name}:${current.accountId}:key/*`],\n principals: [{\n type: \"Service\",\n identifiers: [\"guardduty.amazonaws.com\"],\n }],\n },\n {\n sid: \"Allow all users to modify/delete key (test only)\",\n actions: [\"kms:*\"],\n resources: [`arn:aws:kms:${currentGetRegion1.name}:${current1.accountId}:key/*`],\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current2.accountId}:root`],\n }],\n },\n ],\n}));\nconst testGd = new aws.guardduty.Detector(\"test_gd\", {enable: true});\nconst gdBucketAcl = new aws.s3.BucketAclV2(\"gd_bucket_acl\", {\n bucket: gdBucket.id,\n acl: \"private\",\n});\nconst gdBucketPolicy = new aws.s3.BucketPolicy(\"gd_bucket_policy\", {\n bucket: gdBucket.id,\n policy: bucketPol.apply(bucketPol =\u003e bucketPol.json),\n});\nconst gdKey = new aws.kms.Key(\"gd_key\", {\n description: \"Temporary key for AccTest of TF\",\n deletionWindowInDays: 7,\n policy: kmsPol.then(kmsPol =\u003e kmsPol.json),\n});\nconst test = new aws.guardduty.PublishingDestination(\"test\", {\n detectorId: testGd.id,\n destinationArn: gdBucket.arn,\n kmsKeyArn: gdKey.arn,\n}, {\n dependsOn: [gdBucketPolicy],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_region = aws.get_region()\ngd_bucket = aws.s3.BucketV2(\"gd_bucket\",\n bucket=\"example\",\n force_destroy=True)\nbucket_pol = aws.iam.get_policy_document_output(statements=[\n {\n \"sid\": \"Allow PutObject\",\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [gd_bucket.arn.apply(lambda arn: f\"{arn}/*\")],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"guardduty.amazonaws.com\"],\n }],\n },\n {\n \"sid\": \"Allow GetBucketLocation\",\n \"actions\": [\"s3:GetBucketLocation\"],\n \"resources\": [gd_bucket.arn],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"guardduty.amazonaws.com\"],\n }],\n },\n])\nkms_pol = aws.iam.get_policy_document(statements=[\n {\n \"sid\": \"Allow GuardDuty to encrypt findings\",\n \"actions\": [\"kms:GenerateDataKey\"],\n \"resources\": [f\"arn:aws:kms:{current_get_region.name}:{current.account_id}:key/*\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"guardduty.amazonaws.com\"],\n }],\n },\n {\n \"sid\": \"Allow all users to modify/delete key (test only)\",\n \"actions\": [\"kms:*\"],\n \"resources\": [f\"arn:aws:kms:{current_get_region.name}:{current.account_id}:key/*\"],\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n },\n])\ntest_gd = aws.guardduty.Detector(\"test_gd\", enable=True)\ngd_bucket_acl = aws.s3.BucketAclV2(\"gd_bucket_acl\",\n bucket=gd_bucket.id,\n acl=\"private\")\ngd_bucket_policy = aws.s3.BucketPolicy(\"gd_bucket_policy\",\n bucket=gd_bucket.id,\n policy=bucket_pol.json)\ngd_key = aws.kms.Key(\"gd_key\",\n description=\"Temporary key for AccTest of TF\",\n deletion_window_in_days=7,\n policy=kms_pol.json)\ntest = aws.guardduty.PublishingDestination(\"test\",\n detector_id=test_gd.id,\n destination_arn=gd_bucket.arn,\n kms_key_arn=gd_key.arn,\n opts = pulumi.ResourceOptions(depends_on=[gd_bucket_policy]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var gdBucket = new Aws.S3.BucketV2(\"gd_bucket\", new()\n {\n Bucket = \"example\",\n ForceDestroy = true,\n });\n\n var bucketPol = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Allow PutObject\",\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{gdBucket.Arn}/*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"guardduty.amazonaws.com\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Allow GetBucketLocation\",\n Actions = new[]\n {\n \"s3:GetBucketLocation\",\n },\n Resources = new[]\n {\n gdBucket.Arn,\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"guardduty.amazonaws.com\",\n },\n },\n },\n },\n },\n });\n\n var kmsPol = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Allow GuardDuty to encrypt findings\",\n Actions = new[]\n {\n \"kms:GenerateDataKey\",\n },\n Resources = new[]\n {\n $\"arn:aws:kms:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:key/*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"guardduty.amazonaws.com\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Allow all users to modify/delete key (test only)\",\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n $\"arn:aws:kms:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:key/*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n },\n },\n });\n\n var testGd = new Aws.GuardDuty.Detector(\"test_gd\", new()\n {\n Enable = true,\n });\n\n var gdBucketAcl = new Aws.S3.BucketAclV2(\"gd_bucket_acl\", new()\n {\n Bucket = gdBucket.Id,\n Acl = \"private\",\n });\n\n var gdBucketPolicy = new Aws.S3.BucketPolicy(\"gd_bucket_policy\", new()\n {\n Bucket = gdBucket.Id,\n Policy = bucketPol.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var gdKey = new Aws.Kms.Key(\"gd_key\", new()\n {\n Description = \"Temporary key for AccTest of TF\",\n DeletionWindowInDays = 7,\n Policy = kmsPol.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var test = new Aws.GuardDuty.PublishingDestination(\"test\", new()\n {\n DetectorId = testGd.Id,\n DestinationArn = gdBucket.Arn,\n KmsKeyArn = gdKey.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n gdBucketPolicy,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/guardduty\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tgdBucket, err := s3.NewBucketV2(ctx, \"gd_bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example\"),\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbucketPol := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"Allow PutObject\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"s3:PutObject\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tgdBucket.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v/*\", arn), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"guardduty.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"Allow GetBucketLocation\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"s3:GetBucketLocation\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tgdBucket.Arn,\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"guardduty.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tkmsPol, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Allow GuardDuty to encrypt findings\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:GenerateDataKey\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:kms:%v:%v:key/*\", currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"guardduty.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Allow all users to modify/delete key (test only)\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:kms:%v:%v:key/*\", currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestGd, err := guardduty.NewDetector(ctx, \"test_gd\", \u0026guardduty.DetectorArgs{\n\t\t\tEnable: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"gd_bucket_acl\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: gdBucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tgdBucketPolicy, err := s3.NewBucketPolicy(ctx, \"gd_bucket_policy\", \u0026s3.BucketPolicyArgs{\n\t\t\tBucket: gdBucket.ID(),\n\t\t\tPolicy: pulumi.String(bucketPol.ApplyT(func(bucketPol iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026bucketPol.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tgdKey, err := kms.NewKey(ctx, \"gd_key\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Temporary key for AccTest of TF\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tPolicy: pulumi.String(kmsPol.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = guardduty.NewPublishingDestination(ctx, \"test\", \u0026guardduty.PublishingDestinationArgs{\n\t\t\tDetectorId: testGd.ID(),\n\t\t\tDestinationArn: gdBucket.Arn,\n\t\t\tKmsKeyArn: gdKey.Arn,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tgdBucketPolicy,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.guardduty.Detector;\nimport com.pulumi.aws.guardduty.DetectorArgs;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.guardduty.PublishingDestination;\nimport com.pulumi.aws.guardduty.PublishingDestinationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n var gdBucket = new BucketV2(\"gdBucket\", BucketV2Args.builder()\n .bucket(\"example\")\n .forceDestroy(true)\n .build());\n\n final var bucketPol = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Allow PutObject\")\n .actions(\"s3:PutObject\")\n .resources(gdBucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"guardduty.amazonaws.com\")\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Allow GetBucketLocation\")\n .actions(\"s3:GetBucketLocation\")\n .resources(gdBucket.arn())\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"guardduty.amazonaws.com\")\n .build())\n .build())\n .build());\n\n final var kmsPol = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Allow GuardDuty to encrypt findings\")\n .actions(\"kms:GenerateDataKey\")\n .resources(String.format(\"arn:aws:kms:%s:%s:key/*\", currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"guardduty.amazonaws.com\")\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Allow all users to modify/delete key (test only)\")\n .actions(\"kms:*\")\n .resources(String.format(\"arn:aws:kms:%s:%s:key/*\", currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build())\n .build());\n\n var testGd = new Detector(\"testGd\", DetectorArgs.builder()\n .enable(true)\n .build());\n\n var gdBucketAcl = new BucketAclV2(\"gdBucketAcl\", BucketAclV2Args.builder()\n .bucket(gdBucket.id())\n .acl(\"private\")\n .build());\n\n var gdBucketPolicy = new BucketPolicy(\"gdBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(gdBucket.id())\n .policy(bucketPol.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(bucketPol -\u003e bucketPol.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var gdKey = new Key(\"gdKey\", KeyArgs.builder()\n .description(\"Temporary key for AccTest of TF\")\n .deletionWindowInDays(7)\n .policy(kmsPol.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var test = new PublishingDestination(\"test\", PublishingDestinationArgs.builder()\n .detectorId(testGd.id())\n .destinationArn(gdBucket.arn())\n .kmsKeyArn(gdKey.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn(gdBucketPolicy)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testGd:\n type: aws:guardduty:Detector\n name: test_gd\n properties:\n enable: true\n gdBucket:\n type: aws:s3:BucketV2\n name: gd_bucket\n properties:\n bucket: example\n forceDestroy: true\n gdBucketAcl:\n type: aws:s3:BucketAclV2\n name: gd_bucket_acl\n properties:\n bucket: ${gdBucket.id}\n acl: private\n gdBucketPolicy:\n type: aws:s3:BucketPolicy\n name: gd_bucket_policy\n properties:\n bucket: ${gdBucket.id}\n policy: ${bucketPol.json}\n gdKey:\n type: aws:kms:Key\n name: gd_key\n properties:\n description: Temporary key for AccTest of TF\n deletionWindowInDays: 7\n policy: ${kmsPol.json}\n test:\n type: aws:guardduty:PublishingDestination\n properties:\n detectorId: ${testGd.id}\n destinationArn: ${gdBucket.arn}\n kmsKeyArn: ${gdKey.arn}\n options:\n dependson:\n - ${gdBucketPolicy}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n bucketPol:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Allow PutObject\n actions:\n - s3:PutObject\n resources:\n - ${gdBucket.arn}/*\n principals:\n - type: Service\n identifiers:\n - guardduty.amazonaws.com\n - sid: Allow GetBucketLocation\n actions:\n - s3:GetBucketLocation\n resources:\n - ${gdBucket.arn}\n principals:\n - type: Service\n identifiers:\n - guardduty.amazonaws.com\n kmsPol:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Allow GuardDuty to encrypt findings\n actions:\n - kms:GenerateDataKey\n resources:\n - arn:aws:kms:${currentGetRegion.name}:${current.accountId}:key/*\n principals:\n - type: Service\n identifiers:\n - guardduty.amazonaws.com\n - sid: Allow all users to modify/delete key (test only)\n actions:\n - kms:*\n resources:\n - arn:aws:kms:${currentGetRegion.name}:${current.accountId}:key/*\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **Note:** Please do not use this simple example for Bucket-Policy and KMS Key Policy in a production environment. It is much too open for such a use-case. Refer to the AWS documentation here: https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_exportfindings.html\n\n## Import\n\nUsing `pulumi import`, import GuardDuty PublishingDestination using the master GuardDuty detector ID and PublishingDestinationID. For example:\n\n```sh\n$ pulumi import aws:guardduty/publishingDestination:PublishingDestination test a4b86f26fa42e7e7cf0d1c333ea77777:a4b86f27a0e464e4a7e0516d242f1234\n```\n", + "description": "Provides a resource to manage a GuardDuty PublishingDestination. Requires an existing GuardDuty Detector.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetRegion = aws.getRegion({});\nconst gdBucket = new aws.s3.BucketV2(\"gd_bucket\", {\n bucket: \"example\",\n forceDestroy: true,\n});\nconst bucketPol = aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n sid: \"Allow PutObject\",\n actions: [\"s3:PutObject\"],\n resources: [pulumi.interpolate`${gdBucket.arn}/*`],\n principals: [{\n type: \"Service\",\n identifiers: [\"guardduty.amazonaws.com\"],\n }],\n },\n {\n sid: \"Allow GetBucketLocation\",\n actions: [\"s3:GetBucketLocation\"],\n resources: [gdBucket.arn],\n principals: [{\n type: \"Service\",\n identifiers: [\"guardduty.amazonaws.com\"],\n }],\n },\n ],\n});\nconst kmsPol = Promise.all([currentGetRegion, current, currentGetRegion, current, current]).then(([currentGetRegion, current, currentGetRegion1, current1, current2]) =\u003e aws.iam.getPolicyDocument({\n statements: [\n {\n sid: \"Allow GuardDuty to encrypt findings\",\n actions: [\"kms:GenerateDataKey\"],\n resources: [`arn:aws:kms:${currentGetRegion.name}:${current.accountId}:key/*`],\n principals: [{\n type: \"Service\",\n identifiers: [\"guardduty.amazonaws.com\"],\n }],\n },\n {\n sid: \"Allow all users to modify/delete key (test only)\",\n actions: [\"kms:*\"],\n resources: [`arn:aws:kms:${currentGetRegion1.name}:${current1.accountId}:key/*`],\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current2.accountId}:root`],\n }],\n },\n ],\n}));\nconst testGd = new aws.guardduty.Detector(\"test_gd\", {enable: true});\nconst gdBucketAcl = new aws.s3.BucketAclV2(\"gd_bucket_acl\", {\n bucket: gdBucket.id,\n acl: \"private\",\n});\nconst gdBucketPolicy = new aws.s3.BucketPolicy(\"gd_bucket_policy\", {\n bucket: gdBucket.id,\n policy: bucketPol.apply(bucketPol =\u003e bucketPol.json),\n});\nconst gdKey = new aws.kms.Key(\"gd_key\", {\n description: \"Temporary key for AccTest of TF\",\n deletionWindowInDays: 7,\n policy: kmsPol.then(kmsPol =\u003e kmsPol.json),\n});\nconst test = new aws.guardduty.PublishingDestination(\"test\", {\n detectorId: testGd.id,\n destinationArn: gdBucket.arn,\n kmsKeyArn: gdKey.arn,\n}, {\n dependsOn: [gdBucketPolicy],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_region = aws.get_region()\ngd_bucket = aws.s3.BucketV2(\"gd_bucket\",\n bucket=\"example\",\n force_destroy=True)\nbucket_pol = aws.iam.get_policy_document_output(statements=[\n {\n \"sid\": \"Allow PutObject\",\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [gd_bucket.arn.apply(lambda arn: f\"{arn}/*\")],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"guardduty.amazonaws.com\"],\n }],\n },\n {\n \"sid\": \"Allow GetBucketLocation\",\n \"actions\": [\"s3:GetBucketLocation\"],\n \"resources\": [gd_bucket.arn],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"guardduty.amazonaws.com\"],\n }],\n },\n])\nkms_pol = aws.iam.get_policy_document(statements=[\n {\n \"sid\": \"Allow GuardDuty to encrypt findings\",\n \"actions\": [\"kms:GenerateDataKey\"],\n \"resources\": [f\"arn:aws:kms:{current_get_region.name}:{current.account_id}:key/*\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"guardduty.amazonaws.com\"],\n }],\n },\n {\n \"sid\": \"Allow all users to modify/delete key (test only)\",\n \"actions\": [\"kms:*\"],\n \"resources\": [f\"arn:aws:kms:{current_get_region.name}:{current.account_id}:key/*\"],\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n },\n])\ntest_gd = aws.guardduty.Detector(\"test_gd\", enable=True)\ngd_bucket_acl = aws.s3.BucketAclV2(\"gd_bucket_acl\",\n bucket=gd_bucket.id,\n acl=\"private\")\ngd_bucket_policy = aws.s3.BucketPolicy(\"gd_bucket_policy\",\n bucket=gd_bucket.id,\n policy=bucket_pol.json)\ngd_key = aws.kms.Key(\"gd_key\",\n description=\"Temporary key for AccTest of TF\",\n deletion_window_in_days=7,\n policy=kms_pol.json)\ntest = aws.guardduty.PublishingDestination(\"test\",\n detector_id=test_gd.id,\n destination_arn=gd_bucket.arn,\n kms_key_arn=gd_key.arn,\n opts = pulumi.ResourceOptions(depends_on=[gd_bucket_policy]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var gdBucket = new Aws.S3.BucketV2(\"gd_bucket\", new()\n {\n Bucket = \"example\",\n ForceDestroy = true,\n });\n\n var bucketPol = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Allow PutObject\",\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{gdBucket.Arn}/*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"guardduty.amazonaws.com\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Allow GetBucketLocation\",\n Actions = new[]\n {\n \"s3:GetBucketLocation\",\n },\n Resources = new[]\n {\n gdBucket.Arn,\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"guardduty.amazonaws.com\",\n },\n },\n },\n },\n },\n });\n\n var kmsPol = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Allow GuardDuty to encrypt findings\",\n Actions = new[]\n {\n \"kms:GenerateDataKey\",\n },\n Resources = new[]\n {\n $\"arn:aws:kms:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:key/*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"guardduty.amazonaws.com\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Allow all users to modify/delete key (test only)\",\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n $\"arn:aws:kms:{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}:{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:key/*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n },\n },\n });\n\n var testGd = new Aws.GuardDuty.Detector(\"test_gd\", new()\n {\n Enable = true,\n });\n\n var gdBucketAcl = new Aws.S3.BucketAclV2(\"gd_bucket_acl\", new()\n {\n Bucket = gdBucket.Id,\n Acl = \"private\",\n });\n\n var gdBucketPolicy = new Aws.S3.BucketPolicy(\"gd_bucket_policy\", new()\n {\n Bucket = gdBucket.Id,\n Policy = bucketPol.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var gdKey = new Aws.Kms.Key(\"gd_key\", new()\n {\n Description = \"Temporary key for AccTest of TF\",\n DeletionWindowInDays = 7,\n Policy = kmsPol.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var test = new Aws.GuardDuty.PublishingDestination(\"test\", new()\n {\n DetectorId = testGd.Id,\n DestinationArn = gdBucket.Arn,\n KmsKeyArn = gdKey.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n gdBucketPolicy,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/guardduty\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tgdBucket, err := s3.NewBucketV2(ctx, \"gd_bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example\"),\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbucketPol := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"Allow PutObject\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"s3:PutObject\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tgdBucket.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v/*\", arn), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"guardduty.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"Allow GetBucketLocation\"),\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"s3:GetBucketLocation\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\tgdBucket.Arn,\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Service\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"guardduty.amazonaws.com\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tkmsPol, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Allow GuardDuty to encrypt findings\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:GenerateDataKey\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:kms:%v:%v:key/*\", currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"guardduty.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Allow all users to modify/delete key (test only)\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:kms:%v:%v:key/*\", currentGetRegion.Name, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttestGd, err := guardduty.NewDetector(ctx, \"test_gd\", \u0026guardduty.DetectorArgs{\n\t\t\tEnable: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"gd_bucket_acl\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: gdBucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tgdBucketPolicy, err := s3.NewBucketPolicy(ctx, \"gd_bucket_policy\", \u0026s3.BucketPolicyArgs{\n\t\t\tBucket: gdBucket.ID(),\n\t\t\tPolicy: pulumi.String(bucketPol.ApplyT(func(bucketPol iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026bucketPol.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tgdKey, err := kms.NewKey(ctx, \"gd_key\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Temporary key for AccTest of TF\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tPolicy: pulumi.String(kmsPol.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = guardduty.NewPublishingDestination(ctx, \"test\", \u0026guardduty.PublishingDestinationArgs{\n\t\t\tDetectorId: testGd.ID(),\n\t\t\tDestinationArn: gdBucket.Arn,\n\t\t\tKmsKeyArn: gdKey.Arn,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tgdBucketPolicy,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.guardduty.Detector;\nimport com.pulumi.aws.guardduty.DetectorArgs;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.guardduty.PublishingDestination;\nimport com.pulumi.aws.guardduty.PublishingDestinationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n var gdBucket = new BucketV2(\"gdBucket\", BucketV2Args.builder()\n .bucket(\"example\")\n .forceDestroy(true)\n .build());\n\n final var bucketPol = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Allow PutObject\")\n .actions(\"s3:PutObject\")\n .resources(gdBucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"guardduty.amazonaws.com\")\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Allow GetBucketLocation\")\n .actions(\"s3:GetBucketLocation\")\n .resources(gdBucket.arn())\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"guardduty.amazonaws.com\")\n .build())\n .build())\n .build());\n\n final var kmsPol = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Allow GuardDuty to encrypt findings\")\n .actions(\"kms:GenerateDataKey\")\n .resources(String.format(\"arn:aws:kms:%s:%s:key/*\", currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"guardduty.amazonaws.com\")\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Allow all users to modify/delete key (test only)\")\n .actions(\"kms:*\")\n .resources(String.format(\"arn:aws:kms:%s:%s:key/*\", currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build())\n .build());\n\n var testGd = new Detector(\"testGd\", DetectorArgs.builder()\n .enable(true)\n .build());\n\n var gdBucketAcl = new BucketAclV2(\"gdBucketAcl\", BucketAclV2Args.builder()\n .bucket(gdBucket.id())\n .acl(\"private\")\n .build());\n\n var gdBucketPolicy = new BucketPolicy(\"gdBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(gdBucket.id())\n .policy(bucketPol.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(bucketPol -\u003e bucketPol.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var gdKey = new Key(\"gdKey\", KeyArgs.builder()\n .description(\"Temporary key for AccTest of TF\")\n .deletionWindowInDays(7)\n .policy(kmsPol.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var test = new PublishingDestination(\"test\", PublishingDestinationArgs.builder()\n .detectorId(testGd.id())\n .destinationArn(gdBucket.arn())\n .kmsKeyArn(gdKey.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn(gdBucketPolicy)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testGd:\n type: aws:guardduty:Detector\n name: test_gd\n properties:\n enable: true\n gdBucket:\n type: aws:s3:BucketV2\n name: gd_bucket\n properties:\n bucket: example\n forceDestroy: true\n gdBucketAcl:\n type: aws:s3:BucketAclV2\n name: gd_bucket_acl\n properties:\n bucket: ${gdBucket.id}\n acl: private\n gdBucketPolicy:\n type: aws:s3:BucketPolicy\n name: gd_bucket_policy\n properties:\n bucket: ${gdBucket.id}\n policy: ${bucketPol.json}\n gdKey:\n type: aws:kms:Key\n name: gd_key\n properties:\n description: Temporary key for AccTest of TF\n deletionWindowInDays: 7\n policy: ${kmsPol.json}\n test:\n type: aws:guardduty:PublishingDestination\n properties:\n detectorId: ${testGd.id}\n destinationArn: ${gdBucket.arn}\n kmsKeyArn: ${gdKey.arn}\n options:\n dependson:\n - ${gdBucketPolicy}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n bucketPol:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Allow PutObject\n actions:\n - s3:PutObject\n resources:\n - ${gdBucket.arn}/*\n principals:\n - type: Service\n identifiers:\n - guardduty.amazonaws.com\n - sid: Allow GetBucketLocation\n actions:\n - s3:GetBucketLocation\n resources:\n - ${gdBucket.arn}\n principals:\n - type: Service\n identifiers:\n - guardduty.amazonaws.com\n kmsPol:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Allow GuardDuty to encrypt findings\n actions:\n - kms:GenerateDataKey\n resources:\n - arn:aws:kms:${currentGetRegion.name}:${current.accountId}:key/*\n principals:\n - type: Service\n identifiers:\n - guardduty.amazonaws.com\n - sid: Allow all users to modify/delete key (test only)\n actions:\n - kms:*\n resources:\n - arn:aws:kms:${currentGetRegion.name}:${current.accountId}:key/*\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003e **Note:** Please do not use this simple example for Bucket-Policy and KMS Key Policy in a production environment. It is much too open for such a use-case. Refer to the AWS documentation here: https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_exportfindings.html\n\n## Import\n\nUsing `pulumi import`, import GuardDuty PublishingDestination using the master GuardDuty detector ID and PublishingDestinationID. For example:\n\n```sh\n$ pulumi import aws:guardduty/publishingDestination:PublishingDestination test a4b86f26fa42e7e7cf0d1c333ea77777:a4b86f27a0e464e4a7e0516d242f1234\n```\n", "properties": { "destinationArn": { "type": "string", @@ -275714,7 +275714,7 @@ } }, "aws:iam/role:Role": { - "description": "Provides an IAM role.\n\n\u003e **NOTE:** If policies are attached to the role via the `aws.iam.PolicyAttachment` resource and you are modifying the role `name` or `path`, the `force_detach_policies` argument must be set to `true` and applied before attempting the operation otherwise you will encounter a `DeleteConflict` error. The `aws.iam.RolePolicyAttachment` resource (recommended) does not have this requirement.\n\n\u003e **NOTE:** If you use this resource's `managed_policy_arns` argument or `inline_policy` configuration blocks, this resource will take over exclusive management of the role's respective policy types (e.g., both policy types if both arguments are used). These arguments are incompatible with other ways of managing a role's policies, such as `aws.iam.PolicyAttachment`, `aws.iam.RolePolicyAttachment`, and `aws.iam.RolePolicy`. If you attempt to manage a role's policies by multiple means, you will get resource cycling and/or errors.\n\n\u003e **NOTE:** We suggest using explicit JSON encoding or `aws.iam.getPolicyDocument` when assigning a value to `policy`. They seamlessly translate configuration to JSON, enabling you to maintain consistency within your configuration without the need for context switches. Also, you can sidestep potential complications arising from formatting discrepancies, whitespace inconsistencies, and other nuances inherent to JSON.\n\n## Example Usage\n\n### Basic Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst testRole = new aws.iam.Role(\"test_role\", {\n name: \"test_role\",\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Sid: \"\",\n Principal: {\n Service: \"ec2.amazonaws.com\",\n },\n }],\n }),\n tags: {\n \"tag-key\": \"tag-value\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ntest_role = aws.iam.Role(\"test_role\",\n name=\"test_role\",\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Sid\": \"\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\",\n },\n }],\n }),\n tags={\n \"tag-key\": \"tag-value\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var testRole = new Aws.Iam.Role(\"test_role\", new()\n {\n Name = \"test_role\",\n AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Effect\"] = \"Allow\",\n [\"Sid\"] = \"\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"ec2.amazonaws.com\",\n },\n },\n },\n }),\n Tags = \n {\n { \"tag-key\", \"tag-value\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Sid\": \"\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"ec2.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = iam.NewRole(ctx, \"test_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"test_role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(json0),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"tag-key\": pulumi.String(\"tag-value\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testRole = new Role(\"testRole\", RoleArgs.builder()\n .name(\"test_role\")\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Sid\", \"\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"ec2.amazonaws.com\")\n ))\n )))\n )))\n .tags(Map.of(\"tag-key\", \"tag-value\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testRole:\n type: aws:iam:Role\n name: test_role\n properties:\n name: test_role\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Sid:\n Principal:\n Service: ec2.amazonaws.com\n tags:\n tag-key: tag-value\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Using Data Source for Assume Role Policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst instanceAssumeRolePolicy = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"ec2.amazonaws.com\"],\n }],\n }],\n});\nconst instance = new aws.iam.Role(\"instance\", {\n name: \"instance_role\",\n path: \"/system/\",\n assumeRolePolicy: instanceAssumeRolePolicy.then(instanceAssumeRolePolicy =\u003e instanceAssumeRolePolicy.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ninstance_assume_role_policy = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"ec2.amazonaws.com\"],\n }],\n}])\ninstance = aws.iam.Role(\"instance\",\n name=\"instance_role\",\n path=\"/system/\",\n assume_role_policy=instance_assume_role_policy.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var instanceAssumeRolePolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"ec2.amazonaws.com\",\n },\n },\n },\n },\n },\n });\n\n var instance = new Aws.Iam.Role(\"instance\", new()\n {\n Name = \"instance_role\",\n Path = \"/system/\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinstanceAssumeRolePolicy, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"ec2.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRole(ctx, \"instance\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"instance_role\"),\n\t\t\tPath: pulumi.String(\"/system/\"),\n\t\t\tAssumeRolePolicy: pulumi.String(instanceAssumeRolePolicy.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var instanceAssumeRolePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"sts:AssumeRole\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"ec2.amazonaws.com\")\n .build())\n .build())\n .build());\n\n var instance = new Role(\"instance\", RoleArgs.builder()\n .name(\"instance_role\")\n .path(\"/system/\")\n .assumeRolePolicy(instanceAssumeRolePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n instance:\n type: aws:iam:Role\n properties:\n name: instance_role\n path: /system/\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\nvariables:\n instanceAssumeRolePolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - sts:AssumeRole\n principals:\n - type: Service\n identifiers:\n - ec2.amazonaws.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Exclusive Inline Policies\n\n\u003e The `inline_policy` argument is deprecated. Use the `aws.iam.RolePolicy` resource instead. If Pulumi should exclusively manage all inline policy associations (the current behavior of this argument), use the `aws.iam.RolePoliciesExclusive` resource as well.\n\nThis example creates an IAM role with two inline IAM policies. If someone adds another inline policy out-of-band, on the next apply, this provider will remove that policy. If someone deletes these policies out-of-band, this provider will recreate them.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst inlinePolicy = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"ec2:DescribeAccountAttributes\"],\n resources: [\"*\"],\n }],\n});\nconst example = new aws.iam.Role(\"example\", {\n name: \"yak_role\",\n assumeRolePolicy: instanceAssumeRolePolicy.json,\n inlinePolicies: [\n {\n name: \"my_inline_policy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\"ec2:Describe*\"],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n },\n {\n name: \"policy-8675309\",\n policy: inlinePolicy.then(inlinePolicy =\u003e inlinePolicy.json),\n },\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ninline_policy = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"ec2:DescribeAccountAttributes\"],\n \"resources\": [\"*\"],\n}])\nexample = aws.iam.Role(\"example\",\n name=\"yak_role\",\n assume_role_policy=instance_assume_role_policy[\"json\"],\n inline_policies=[\n {\n \"name\": \"my_inline_policy\",\n \"policy\": json.dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [{\n \"action\": [\"ec2:Describe*\"],\n \"effect\": \"Allow\",\n \"resource\": \"*\",\n }],\n }),\n },\n {\n \"name\": \"policy-8675309\",\n \"policy\": inline_policy.json,\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var inlinePolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"ec2:DescribeAccountAttributes\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"yak_role\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Json,\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"my_inline_policy\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"ec2:Describe*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"policy-8675309\",\n Policy = inlinePolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinlinePolicy, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"ec2:DescribeAccountAttributes\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"yak_role\"),\n\t\t\tAssumeRolePolicy: pulumi.Any(instanceAssumeRolePolicy.Json),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"my_inline_policy\"),\n\t\t\t\t\tPolicy: pulumi.String(json0),\n\t\t\t\t},\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"policy-8675309\"),\n\t\t\t\t\tPolicy: pulumi.String(inlinePolicy.Json),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var inlinePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"ec2:DescribeAccountAttributes\")\n .resources(\"*\")\n .build())\n .build());\n\n var example = new Role(\"example\", RoleArgs.builder()\n .name(\"yak_role\")\n .assumeRolePolicy(instanceAssumeRolePolicy.json())\n .inlinePolicies( \n RoleInlinePolicyArgs.builder()\n .name(\"my_inline_policy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\"ec2:Describe*\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build(),\n RoleInlinePolicyArgs.builder()\n .name(\"policy-8675309\")\n .policy(inlinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: yak_role\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\n inlinePolicies:\n - name: my_inline_policy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - ec2:Describe*\n Effect: Allow\n Resource: '*'\n - name: policy-8675309\n policy: ${inlinePolicy.json}\nvariables:\n inlinePolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - ec2:DescribeAccountAttributes\n resources:\n - '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Removing Inline Policies\n\n\u003e The `inline_policy` argument is deprecated. Use the `aws.iam.RolePolicy` resource instead. If Pulumi should exclusively manage all inline policy associations (the current behavior of this argument), use the `aws.iam.RolePoliciesExclusive` resource as well.\n\nThis example creates an IAM role with what appears to be empty IAM `inline_policy` argument instead of using `inline_policy` as a configuration block. The result is that if someone were to add an inline policy out-of-band, on the next apply, this provider will remove that policy.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.iam.Role(\"example\", {\n inlinePolicies: [{}],\n name: \"yak_role\",\n assumeRolePolicy: instanceAssumeRolePolicy.json,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.iam.Role(\"example\",\n inline_policies=[{}],\n name=\"yak_role\",\n assume_role_policy=instance_assume_role_policy[\"json\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Iam.Role(\"example\", new()\n {\n InlinePolicies = new[]\n {\n null,\n },\n Name = \"yak_role\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Json,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\tnil,\n\t\t\t},\n\t\t\tName: pulumi.String(\"yak_role\"),\n\t\t\tAssumeRolePolicy: pulumi.Any(instanceAssumeRolePolicy.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Role(\"example\", RoleArgs.builder()\n .inlinePolicies()\n .name(\"yak_role\")\n .assumeRolePolicy(instanceAssumeRolePolicy.json())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n inlinePolicies:\n - {}\n name: yak_role\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Exclusive Managed Policies\n\nThis example creates an IAM role and attaches two managed IAM policies. If someone attaches another managed policy out-of-band, on the next apply, this provider will detach that policy. If someone detaches these policies out-of-band, this provider will attach them again.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst policyOne = new aws.iam.Policy(\"policy_one\", {\n name: \"policy-618033\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\"ec2:Describe*\"],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n});\nconst policyTwo = new aws.iam.Policy(\"policy_two\", {\n name: \"policy-381966\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\n \"s3:ListAllMyBuckets\",\n \"s3:ListBucket\",\n \"s3:HeadBucket\",\n ],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n});\nconst example = new aws.iam.Role(\"example\", {\n name: \"yak_role\",\n assumeRolePolicy: instanceAssumeRolePolicy.json,\n managedPolicyArns: [\n policyOne.arn,\n policyTwo.arn,\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\npolicy_one = aws.iam.Policy(\"policy_one\",\n name=\"policy-618033\",\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": [\"ec2:Describe*\"],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\",\n }],\n }))\npolicy_two = aws.iam.Policy(\"policy_two\",\n name=\"policy-381966\",\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": [\n \"s3:ListAllMyBuckets\",\n \"s3:ListBucket\",\n \"s3:HeadBucket\",\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\",\n }],\n }))\nexample = aws.iam.Role(\"example\",\n name=\"yak_role\",\n assume_role_policy=instance_assume_role_policy[\"json\"],\n managed_policy_arns=[\n policy_one.arn,\n policy_two.arn,\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var policyOne = new Aws.Iam.Policy(\"policy_one\", new()\n {\n Name = \"policy-618033\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"ec2:Describe*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n var policyTwo = new Aws.Iam.Policy(\"policy_two\", new()\n {\n Name = \"policy-381966\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"s3:ListAllMyBuckets\",\n \"s3:ListBucket\",\n \"s3:HeadBucket\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"yak_role\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Json,\n ManagedPolicyArns = new[]\n {\n policyOne.Arn,\n policyTwo.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\tpolicyOne, err := iam.NewPolicy(ctx, \"policy_one\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"policy-618033\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"s3:ListAllMyBuckets\",\n\t\t\t\t\t\t\"s3:ListBucket\",\n\t\t\t\t\t\t\"s3:HeadBucket\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson1 := string(tmpJSON1)\n\t\tpolicyTwo, err := iam.NewPolicy(ctx, \"policy_two\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"policy-381966\"),\n\t\t\tPolicy: pulumi.String(json1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"yak_role\"),\n\t\t\tAssumeRolePolicy: pulumi.Any(instanceAssumeRolePolicy.Json),\n\t\t\tManagedPolicyArns: pulumi.StringArray{\n\t\t\t\tpolicyOne.Arn,\n\t\t\t\tpolicyTwo.Arn,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var policyOne = new Policy(\"policyOne\", PolicyArgs.builder()\n .name(\"policy-618033\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\"ec2:Describe*\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n var policyTwo = new Policy(\"policyTwo\", PolicyArgs.builder()\n .name(\"policy-381966\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"s3:ListAllMyBuckets\", \n \"s3:ListBucket\", \n \"s3:HeadBucket\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n var example = new Role(\"example\", RoleArgs.builder()\n .name(\"yak_role\")\n .assumeRolePolicy(instanceAssumeRolePolicy.json())\n .managedPolicyArns( \n policyOne.arn(),\n policyTwo.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: yak_role\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\n managedPolicyArns:\n - ${policyOne.arn}\n - ${policyTwo.arn}\n policyOne:\n type: aws:iam:Policy\n name: policy_one\n properties:\n name: policy-618033\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - ec2:Describe*\n Effect: Allow\n Resource: '*'\n policyTwo:\n type: aws:iam:Policy\n name: policy_two\n properties:\n name: policy-381966\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - s3:ListAllMyBuckets\n - s3:ListBucket\n - s3:HeadBucket\n Effect: Allow\n Resource: '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Removing Managed Policies\n\nThis example creates an IAM role with an empty `managed_policy_arns` argument. If someone attaches a policy out-of-band, on the next apply, this provider will detach that policy.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.iam.Role(\"example\", {\n name: \"yak_role\",\n assumeRolePolicy: instanceAssumeRolePolicy.json,\n managedPolicyArns: [],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.iam.Role(\"example\",\n name=\"yak_role\",\n assume_role_policy=instance_assume_role_policy[\"json\"],\n managed_policy_arns=[])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"yak_role\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Json,\n ManagedPolicyArns = new[] {},\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"yak_role\"),\n\t\t\tAssumeRolePolicy: pulumi.Any(instanceAssumeRolePolicy.Json),\n\t\t\tManagedPolicyArns: pulumi.StringArray{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Role(\"example\", RoleArgs.builder()\n .name(\"yak_role\")\n .assumeRolePolicy(instanceAssumeRolePolicy.json())\n .managedPolicyArns()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: yak_role\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\n managedPolicyArns: []\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IAM Roles using the `name`. For example:\n\n```sh\n$ pulumi import aws:iam/role:Role developer developer_name\n```\n", + "description": "Provides an IAM role.\n\n\u003e **NOTE:** If policies are attached to the role via the `aws.iam.PolicyAttachment` resource and you are modifying the role `name` or `path`, the `force_detach_policies` argument must be set to `true` and applied before attempting the operation otherwise you will encounter a `DeleteConflict` error. The `aws.iam.RolePolicyAttachment` resource (recommended) does not have this requirement.\n\n\u003e **NOTE:** If you use this resource's `managed_policy_arns` argument or `inline_policy` configuration blocks, this resource will take over exclusive management of the role's respective policy types (e.g., both policy types if both arguments are used). These arguments are incompatible with other ways of managing a role's policies, such as `aws.iam.PolicyAttachment`, `aws.iam.RolePolicyAttachment`, and `aws.iam.RolePolicy`. If you attempt to manage a role's policies by multiple means, you will get resource cycling and/or errors.\n\n\u003e **NOTE:** We suggest using explicit JSON encoding or `aws.iam.getPolicyDocument` when assigning a value to `policy`. They seamlessly translate configuration to JSON, enabling you to maintain consistency within your configuration without the need for context switches. Also, you can sidestep potential complications arising from formatting discrepancies, whitespace inconsistencies, and other nuances inherent to JSON.\n\n## Example Usage\n\n### Basic Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst testRole = new aws.iam.Role(\"test_role\", {\n name: \"test_role\",\n assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Sid: \"\",\n Principal: {\n Service: \"ec2.amazonaws.com\",\n },\n }],\n }),\n tags: {\n \"tag-key\": \"tag-value\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ntest_role = aws.iam.Role(\"test_role\",\n name=\"test_role\",\n assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Sid\": \"\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\",\n },\n }],\n }),\n tags={\n \"tag-key\": \"tag-value\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var testRole = new Aws.Iam.Role(\"test_role\", new()\n {\n Name = \"test_role\",\n AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Effect\"] = \"Allow\",\n [\"Sid\"] = \"\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"ec2.amazonaws.com\",\n },\n },\n },\n }),\n Tags = \n {\n { \"tag-key\", \"tag-value\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Sid\": \"\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"ec2.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = iam.NewRole(ctx, \"test_role\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"test_role\"),\n\t\t\tAssumeRolePolicy: pulumi.String(json0),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"tag-key\": pulumi.String(\"tag-value\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testRole = new Role(\"testRole\", RoleArgs.builder()\n .name(\"test_role\")\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Sid\", \"\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"ec2.amazonaws.com\")\n ))\n )))\n )))\n .tags(Map.of(\"tag-key\", \"tag-value\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testRole:\n type: aws:iam:Role\n name: test_role\n properties:\n name: test_role\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Sid:\n Principal:\n Service: ec2.amazonaws.com\n tags:\n tag-key: tag-value\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Using Data Source for Assume Role Policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst instanceAssumeRolePolicy = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"sts:AssumeRole\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"ec2.amazonaws.com\"],\n }],\n }],\n});\nconst instance = new aws.iam.Role(\"instance\", {\n name: \"instance_role\",\n path: \"/system/\",\n assumeRolePolicy: instanceAssumeRolePolicy.then(instanceAssumeRolePolicy =\u003e instanceAssumeRolePolicy.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ninstance_assume_role_policy = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"sts:AssumeRole\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"ec2.amazonaws.com\"],\n }],\n}])\ninstance = aws.iam.Role(\"instance\",\n name=\"instance_role\",\n path=\"/system/\",\n assume_role_policy=instance_assume_role_policy.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var instanceAssumeRolePolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"sts:AssumeRole\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"ec2.amazonaws.com\",\n },\n },\n },\n },\n },\n });\n\n var instance = new Aws.Iam.Role(\"instance\", new()\n {\n Name = \"instance_role\",\n Path = \"/system/\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinstanceAssumeRolePolicy, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"sts:AssumeRole\",\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"ec2.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRole(ctx, \"instance\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"instance_role\"),\n\t\t\tPath: pulumi.String(\"/system/\"),\n\t\t\tAssumeRolePolicy: pulumi.String(instanceAssumeRolePolicy.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var instanceAssumeRolePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"sts:AssumeRole\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"ec2.amazonaws.com\")\n .build())\n .build())\n .build());\n\n var instance = new Role(\"instance\", RoleArgs.builder()\n .name(\"instance_role\")\n .path(\"/system/\")\n .assumeRolePolicy(instanceAssumeRolePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n instance:\n type: aws:iam:Role\n properties:\n name: instance_role\n path: /system/\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\nvariables:\n instanceAssumeRolePolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - sts:AssumeRole\n principals:\n - type: Service\n identifiers:\n - ec2.amazonaws.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Exclusive Inline Policies\n\n\u003e The `inline_policy` argument is deprecated. Use the `aws.iam.RolePolicy` resource instead. If Pulumi should exclusively manage all inline policy associations (the current behavior of this argument), use the `aws.iam.RolePoliciesExclusive` resource as well.\n\nThis example creates an IAM role with two inline IAM policies. If someone adds another inline policy out-of-band, on the next apply, this provider will remove that policy. If someone deletes these policies out-of-band, this provider will recreate them.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst inlinePolicy = aws.iam.getPolicyDocument({\n statements: [{\n actions: [\"ec2:DescribeAccountAttributes\"],\n resources: [\"*\"],\n }],\n});\nconst example = new aws.iam.Role(\"example\", {\n name: \"yak_role\",\n assumeRolePolicy: instanceAssumeRolePolicy.json,\n inlinePolicies: [\n {\n name: \"my_inline_policy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\"ec2:Describe*\"],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n },\n {\n name: \"policy-8675309\",\n policy: inlinePolicy.then(inlinePolicy =\u003e inlinePolicy.json),\n },\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ninline_policy = aws.iam.get_policy_document(statements=[{\n \"actions\": [\"ec2:DescribeAccountAttributes\"],\n \"resources\": [\"*\"],\n}])\nexample = aws.iam.Role(\"example\",\n name=\"yak_role\",\n assume_role_policy=instance_assume_role_policy[\"json\"],\n inline_policies=[\n {\n \"name\": \"my_inline_policy\",\n \"policy\": json.dumps({\n \"version\": \"2012-10-17\",\n \"statement\": [{\n \"action\": [\"ec2:Describe*\"],\n \"effect\": \"Allow\",\n \"resource\": \"*\",\n }],\n }),\n },\n {\n \"name\": \"policy-8675309\",\n \"policy\": inline_policy.json,\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var inlinePolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"ec2:DescribeAccountAttributes\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"yak_role\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Json,\n InlinePolicies = new[]\n {\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"my_inline_policy\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"ec2:Describe*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n },\n new Aws.Iam.Inputs.RoleInlinePolicyArgs\n {\n Name = \"policy-8675309\",\n Policy = inlinePolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinlinePolicy, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"ec2:DescribeAccountAttributes\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"yak_role\"),\n\t\t\tAssumeRolePolicy: pulumi.Any(instanceAssumeRolePolicy.Json),\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"my_inline_policy\"),\n\t\t\t\t\tPolicy: pulumi.String(json0),\n\t\t\t\t},\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{\n\t\t\t\t\tName: pulumi.String(\"policy-8675309\"),\n\t\t\t\t\tPolicy: pulumi.String(inlinePolicy.Json),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var inlinePolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .actions(\"ec2:DescribeAccountAttributes\")\n .resources(\"*\")\n .build())\n .build());\n\n var example = new Role(\"example\", RoleArgs.builder()\n .name(\"yak_role\")\n .assumeRolePolicy(instanceAssumeRolePolicy.json())\n .inlinePolicies( \n RoleInlinePolicyArgs.builder()\n .name(\"my_inline_policy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\"ec2:Describe*\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build(),\n RoleInlinePolicyArgs.builder()\n .name(\"policy-8675309\")\n .policy(inlinePolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: yak_role\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\n inlinePolicies:\n - name: my_inline_policy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - ec2:Describe*\n Effect: Allow\n Resource: '*'\n - name: policy-8675309\n policy: ${inlinePolicy.json}\nvariables:\n inlinePolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - ec2:DescribeAccountAttributes\n resources:\n - '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Removing Inline Policies\n\n\u003e The `inline_policy` argument is deprecated. Use the `aws.iam.RolePolicy` resource instead. If Pulumi should exclusively manage all inline policy associations (the current behavior of this argument), use the `aws.iam.RolePoliciesExclusive` resource as well.\n\nThis example creates an IAM role with what appears to be empty IAM `inline_policy` argument instead of using `inline_policy` as a configuration block. The result is that if someone were to add an inline policy out-of-band, on the next apply, this provider will remove that policy.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.iam.Role(\"example\", {\n inlinePolicies: [{}],\n name: \"yak_role\",\n assumeRolePolicy: instanceAssumeRolePolicy.json,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.iam.Role(\"example\",\n inline_policies=[{}],\n name=\"yak_role\",\n assume_role_policy=instance_assume_role_policy[\"json\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Iam.Role(\"example\", new()\n {\n InlinePolicies = new[]\n {\n null,\n },\n Name = \"yak_role\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Json,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tInlinePolicies: iam.RoleInlinePolicyArray{\n\t\t\t\t\u0026iam.RoleInlinePolicyArgs{},\n\t\t\t},\n\t\t\tName: pulumi.String(\"yak_role\"),\n\t\t\tAssumeRolePolicy: pulumi.Any(instanceAssumeRolePolicy.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Role(\"example\", RoleArgs.builder()\n .inlinePolicies()\n .name(\"yak_role\")\n .assumeRolePolicy(instanceAssumeRolePolicy.json())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n inlinePolicies:\n - {}\n name: yak_role\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Exclusive Managed Policies\n\nThis example creates an IAM role and attaches two managed IAM policies. If someone attaches another managed policy out-of-band, on the next apply, this provider will detach that policy. If someone detaches these policies out-of-band, this provider will attach them again.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst policyOne = new aws.iam.Policy(\"policy_one\", {\n name: \"policy-618033\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\"ec2:Describe*\"],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n});\nconst policyTwo = new aws.iam.Policy(\"policy_two\", {\n name: \"policy-381966\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\n \"s3:ListAllMyBuckets\",\n \"s3:ListBucket\",\n \"s3:HeadBucket\",\n ],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n});\nconst example = new aws.iam.Role(\"example\", {\n name: \"yak_role\",\n assumeRolePolicy: instanceAssumeRolePolicy.json,\n managedPolicyArns: [\n policyOne.arn,\n policyTwo.arn,\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\npolicy_one = aws.iam.Policy(\"policy_one\",\n name=\"policy-618033\",\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": [\"ec2:Describe*\"],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\",\n }],\n }))\npolicy_two = aws.iam.Policy(\"policy_two\",\n name=\"policy-381966\",\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": [\n \"s3:ListAllMyBuckets\",\n \"s3:ListBucket\",\n \"s3:HeadBucket\",\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\",\n }],\n }))\nexample = aws.iam.Role(\"example\",\n name=\"yak_role\",\n assume_role_policy=instance_assume_role_policy[\"json\"],\n managed_policy_arns=[\n policy_one.arn,\n policy_two.arn,\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var policyOne = new Aws.Iam.Policy(\"policy_one\", new()\n {\n Name = \"policy-618033\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"ec2:Describe*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n var policyTwo = new Aws.Iam.Policy(\"policy_two\", new()\n {\n Name = \"policy-381966\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"s3:ListAllMyBuckets\",\n \"s3:ListBucket\",\n \"s3:HeadBucket\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"yak_role\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Json,\n ManagedPolicyArns = new[]\n {\n policyOne.Arn,\n policyTwo.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\tpolicyOne, err := iam.NewPolicy(ctx, \"policy_one\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"policy-618033\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"s3:ListAllMyBuckets\",\n\t\t\t\t\t\t\"s3:ListBucket\",\n\t\t\t\t\t\t\"s3:HeadBucket\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson1 := string(tmpJSON1)\n\t\tpolicyTwo, err := iam.NewPolicy(ctx, \"policy_two\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"policy-381966\"),\n\t\t\tPolicy: pulumi.String(json1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"yak_role\"),\n\t\t\tAssumeRolePolicy: pulumi.Any(instanceAssumeRolePolicy.Json),\n\t\t\tManagedPolicyArns: pulumi.StringArray{\n\t\t\t\tpolicyOne.Arn,\n\t\t\t\tpolicyTwo.Arn,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var policyOne = new Policy(\"policyOne\", PolicyArgs.builder()\n .name(\"policy-618033\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\"ec2:Describe*\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n var policyTwo = new Policy(\"policyTwo\", PolicyArgs.builder()\n .name(\"policy-381966\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"s3:ListAllMyBuckets\", \n \"s3:ListBucket\", \n \"s3:HeadBucket\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n var example = new Role(\"example\", RoleArgs.builder()\n .name(\"yak_role\")\n .assumeRolePolicy(instanceAssumeRolePolicy.json())\n .managedPolicyArns( \n policyOne.arn(),\n policyTwo.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: yak_role\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\n managedPolicyArns:\n - ${policyOne.arn}\n - ${policyTwo.arn}\n policyOne:\n type: aws:iam:Policy\n name: policy_one\n properties:\n name: policy-618033\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - ec2:Describe*\n Effect: Allow\n Resource: '*'\n policyTwo:\n type: aws:iam:Policy\n name: policy_two\n properties:\n name: policy-381966\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - s3:ListAllMyBuckets\n - s3:ListBucket\n - s3:HeadBucket\n Effect: Allow\n Resource: '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Example of Removing Managed Policies\n\nThis example creates an IAM role with an empty `managed_policy_arns` argument. If someone attaches a policy out-of-band, on the next apply, this provider will detach that policy.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.iam.Role(\"example\", {\n name: \"yak_role\",\n assumeRolePolicy: instanceAssumeRolePolicy.json,\n managedPolicyArns: [],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.iam.Role(\"example\",\n name=\"yak_role\",\n assume_role_policy=instance_assume_role_policy[\"json\"],\n managed_policy_arns=[])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Iam.Role(\"example\", new()\n {\n Name = \"yak_role\",\n AssumeRolePolicy = instanceAssumeRolePolicy.Json,\n ManagedPolicyArns = new[] {},\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tName: pulumi.String(\"yak_role\"),\n\t\t\tAssumeRolePolicy: pulumi.Any(instanceAssumeRolePolicy.Json),\n\t\t\tManagedPolicyArns: pulumi.StringArray{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Role(\"example\", RoleArgs.builder()\n .name(\"yak_role\")\n .assumeRolePolicy(instanceAssumeRolePolicy.json())\n .managedPolicyArns()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n name: yak_role\n assumeRolePolicy: ${instanceAssumeRolePolicy.json}\n managedPolicyArns: []\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import IAM Roles using the `name`. For example:\n\n```sh\n$ pulumi import aws:iam/role:Role developer developer_name\n```\n", "properties": { "arn": { "type": "string", @@ -277618,7 +277618,7 @@ } }, "aws:identitystore/groupMembership:GroupMembership": { - "description": "Resource for managing an AWS IdentityStore Group Membership.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleUser = new aws.identitystore.User(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n displayName: \"John Doe\",\n userName: \"john.doe@example.com\",\n name: {\n familyName: \"Doe\",\n givenName: \"John\",\n },\n});\nconst exampleGroup = new aws.identitystore.Group(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n displayName: \"MyGroup\",\n description: \"Some group name\",\n});\nconst exampleGroupMembership = new aws.identitystore.GroupMembership(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n groupId: exampleGroup.groupId,\n memberId: exampleUser.userId,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_user = aws.identitystore.User(\"example\",\n identity_store_id=example.identity_store_ids[0],\n display_name=\"John Doe\",\n user_name=\"john.doe@example.com\",\n name={\n \"family_name\": \"Doe\",\n \"given_name\": \"John\",\n })\nexample_group = aws.identitystore.Group(\"example\",\n identity_store_id=example.identity_store_ids[0],\n display_name=\"MyGroup\",\n description=\"Some group name\")\nexample_group_membership = aws.identitystore.GroupMembership(\"example\",\n identity_store_id=example.identity_store_ids[0],\n group_id=example_group.group_id,\n member_id=example_user.user_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleUser = new Aws.IdentityStore.User(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n DisplayName = \"John Doe\",\n UserName = \"john.doe@example.com\",\n Name = new Aws.IdentityStore.Inputs.UserNameArgs\n {\n FamilyName = \"Doe\",\n GivenName = \"John\",\n },\n });\n\n var exampleGroup = new Aws.IdentityStore.Group(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n DisplayName = \"MyGroup\",\n Description = \"Some group name\",\n });\n\n var exampleGroupMembership = new Aws.IdentityStore.GroupMembership(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n GroupId = exampleGroup.GroupId,\n MemberId = exampleUser.UserId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleUser, err := identitystore.NewUser(ctx, \"example\", \u0026identitystore.UserArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tDisplayName: pulumi.String(\"John Doe\"),\n\t\t\tUserName: pulumi.String(\"john.doe@example.com\"),\n\t\t\tName: \u0026identitystore.UserNameArgs{\n\t\t\t\tFamilyName: pulumi.String(\"Doe\"),\n\t\t\t\tGivenName: pulumi.String(\"John\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGroup, err := identitystore.NewGroup(ctx, \"example\", \u0026identitystore.GroupArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tDisplayName: pulumi.String(\"MyGroup\"),\n\t\t\tDescription: pulumi.String(\"Some group name\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = identitystore.NewGroupMembership(ctx, \"example\", \u0026identitystore.GroupMembershipArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tGroupId: exampleGroup.GroupId,\n\t\t\tMemberId: exampleUser.UserId,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.identitystore.User;\nimport com.pulumi.aws.identitystore.UserArgs;\nimport com.pulumi.aws.identitystore.inputs.UserNameArgs;\nimport com.pulumi.aws.identitystore.Group;\nimport com.pulumi.aws.identitystore.GroupArgs;\nimport com.pulumi.aws.identitystore.GroupMembership;\nimport com.pulumi.aws.identitystore.GroupMembershipArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleUser = new User(\"exampleUser\", UserArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .displayName(\"John Doe\")\n .userName(\"john.doe@example.com\")\n .name(UserNameArgs.builder()\n .familyName(\"Doe\")\n .givenName(\"John\")\n .build())\n .build());\n\n var exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .displayName(\"MyGroup\")\n .description(\"Some group name\")\n .build());\n\n var exampleGroupMembership = new GroupMembership(\"exampleGroupMembership\", GroupMembershipArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .groupId(exampleGroup.groupId())\n .memberId(exampleUser.userId())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleUser:\n type: aws:identitystore:User\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n displayName: John Doe\n userName: john.doe@example.com\n name:\n familyName: Doe\n givenName: John\n exampleGroup:\n type: aws:identitystore:Group\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n displayName: MyGroup\n description: Some group name\n exampleGroupMembership:\n type: aws:identitystore:GroupMembership\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n groupId: ${exampleGroup.groupId}\n memberId: ${exampleUser.userId}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_identitystore_group_membership` using the `identity_store_id/membership_id`. For example:\n\n```sh\n$ pulumi import aws:identitystore/groupMembership:GroupMembership example d-0000000000/00000000-0000-0000-0000-000000000000\n```\n", + "description": "Resource for managing an AWS IdentityStore Group Membership.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleUser = new aws.identitystore.User(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n displayName: \"John Doe\",\n userName: \"john.doe@example.com\",\n name: {\n familyName: \"Doe\",\n givenName: \"John\",\n },\n});\nconst exampleGroup = new aws.identitystore.Group(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n displayName: \"MyGroup\",\n description: \"Some group name\",\n});\nconst exampleGroupMembership = new aws.identitystore.GroupMembership(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n groupId: exampleGroup.groupId,\n memberId: exampleUser.userId,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_user = aws.identitystore.User(\"example\",\n identity_store_id=example.identity_store_ids[0],\n display_name=\"John Doe\",\n user_name=\"john.doe@example.com\",\n name={\n \"family_name\": \"Doe\",\n \"given_name\": \"John\",\n })\nexample_group = aws.identitystore.Group(\"example\",\n identity_store_id=example.identity_store_ids[0],\n display_name=\"MyGroup\",\n description=\"Some group name\")\nexample_group_membership = aws.identitystore.GroupMembership(\"example\",\n identity_store_id=example.identity_store_ids[0],\n group_id=example_group.group_id,\n member_id=example_user.user_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleUser = new Aws.IdentityStore.User(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n DisplayName = \"John Doe\",\n UserName = \"john.doe@example.com\",\n Name = new Aws.IdentityStore.Inputs.UserNameArgs\n {\n FamilyName = \"Doe\",\n GivenName = \"John\",\n },\n });\n\n var exampleGroup = new Aws.IdentityStore.Group(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n DisplayName = \"MyGroup\",\n Description = \"Some group name\",\n });\n\n var exampleGroupMembership = new Aws.IdentityStore.GroupMembership(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n GroupId = exampleGroup.GroupId,\n MemberId = exampleUser.UserId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleUser, err := identitystore.NewUser(ctx, \"example\", \u0026identitystore.UserArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tDisplayName: pulumi.String(\"John Doe\"),\n\t\t\tUserName: pulumi.String(\"john.doe@example.com\"),\n\t\t\tName: \u0026identitystore.UserNameArgs{\n\t\t\t\tFamilyName: pulumi.String(\"Doe\"),\n\t\t\t\tGivenName: pulumi.String(\"John\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGroup, err := identitystore.NewGroup(ctx, \"example\", \u0026identitystore.GroupArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tDisplayName: pulumi.String(\"MyGroup\"),\n\t\t\tDescription: pulumi.String(\"Some group name\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = identitystore.NewGroupMembership(ctx, \"example\", \u0026identitystore.GroupMembershipArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tGroupId: exampleGroup.GroupId,\n\t\t\tMemberId: exampleUser.UserId,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.identitystore.User;\nimport com.pulumi.aws.identitystore.UserArgs;\nimport com.pulumi.aws.identitystore.inputs.UserNameArgs;\nimport com.pulumi.aws.identitystore.Group;\nimport com.pulumi.aws.identitystore.GroupArgs;\nimport com.pulumi.aws.identitystore.GroupMembership;\nimport com.pulumi.aws.identitystore.GroupMembershipArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleUser = new User(\"exampleUser\", UserArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .displayName(\"John Doe\")\n .userName(\"john.doe@example.com\")\n .name(UserNameArgs.builder()\n .familyName(\"Doe\")\n .givenName(\"John\")\n .build())\n .build());\n\n var exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .displayName(\"MyGroup\")\n .description(\"Some group name\")\n .build());\n\n var exampleGroupMembership = new GroupMembership(\"exampleGroupMembership\", GroupMembershipArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .groupId(exampleGroup.groupId())\n .memberId(exampleUser.userId())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleUser:\n type: aws:identitystore:User\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n displayName: John Doe\n userName: john.doe@example.com\n name:\n familyName: Doe\n givenName: John\n exampleGroup:\n type: aws:identitystore:Group\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n displayName: MyGroup\n description: Some group name\n exampleGroupMembership:\n type: aws:identitystore:GroupMembership\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n groupId: ${exampleGroup.groupId}\n memberId: ${exampleUser.userId}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_identitystore_group_membership` using the `identity_store_id/membership_id`. For example:\n\n```sh\n$ pulumi import aws:identitystore/groupMembership:GroupMembership example d-0000000000/00000000-0000-0000-0000-000000000000\n```\n", "properties": { "groupId": { "type": "string", @@ -280106,7 +280106,7 @@ } }, "aws:inspector2/delegatedAdminAccount:DelegatedAdminAccount": { - "description": "Resource for managing an Amazon Inspector Delegated Admin Account.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.inspector2.DelegatedAdminAccount(\"example\", {accountId: current.then(current =\u003e current.accountId)});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.inspector2.DelegatedAdminAccount(\"example\", account_id=current.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Inspector2.DelegatedAdminAccount(\"example\", new()\n {\n AccountId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = inspector2.NewDelegatedAdminAccount(ctx, \"example\", \u0026inspector2.DelegatedAdminAccountArgs{\n\t\t\tAccountId: pulumi.String(current.AccountId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inspector2.DelegatedAdminAccount;\nimport com.pulumi.aws.inspector2.DelegatedAdminAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new DelegatedAdminAccount(\"example\", DelegatedAdminAccountArgs.builder()\n .accountId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:inspector2:DelegatedAdminAccount\n properties:\n accountId: ${current.accountId}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Inspector Delegated Admin Account using the `account_id`. For example:\n\n```sh\n$ pulumi import aws:inspector2/delegatedAdminAccount:DelegatedAdminAccount example 012345678901\n```\n", + "description": "Resource for managing an Amazon Inspector Delegated Admin Account.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.inspector2.DelegatedAdminAccount(\"example\", {accountId: current.then(current =\u003e current.accountId)});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.inspector2.DelegatedAdminAccount(\"example\", account_id=current.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Inspector2.DelegatedAdminAccount(\"example\", new()\n {\n AccountId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = inspector2.NewDelegatedAdminAccount(ctx, \"example\", \u0026inspector2.DelegatedAdminAccountArgs{\n\t\t\tAccountId: pulumi.String(current.AccountId),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inspector2.DelegatedAdminAccount;\nimport com.pulumi.aws.inspector2.DelegatedAdminAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new DelegatedAdminAccount(\"example\", DelegatedAdminAccountArgs.builder()\n .accountId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:inspector2:DelegatedAdminAccount\n properties:\n accountId: ${current.accountId}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Inspector Delegated Admin Account using the `account_id`. For example:\n\n```sh\n$ pulumi import aws:inspector2/delegatedAdminAccount:DelegatedAdminAccount example 012345678901\n```\n", "properties": { "accountId": { "type": "string", @@ -280148,7 +280148,7 @@ } }, "aws:inspector2/enabler:Enabler": { - "description": "Resource for enabling Amazon Inspector resource scans.\n\nThis resource must be created in the Organization's Administrator Account.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.inspector2.Enabler(\"example\", {\n accountIds: [\"123456789012\"],\n resourceTypes: [\"EC2\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.inspector2.Enabler(\"example\",\n account_ids=[\"123456789012\"],\n resource_types=[\"EC2\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Inspector2.Enabler(\"example\", new()\n {\n AccountIds = new[]\n {\n \"123456789012\",\n },\n ResourceTypes = new[]\n {\n \"EC2\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := inspector2.NewEnabler(ctx, \"example\", \u0026inspector2.EnablerArgs{\n\t\t\tAccountIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"123456789012\"),\n\t\t\t},\n\t\t\tResourceTypes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"EC2\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.inspector2.Enabler;\nimport com.pulumi.aws.inspector2.EnablerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Enabler(\"example\", EnablerArgs.builder()\n .accountIds(\"123456789012\")\n .resourceTypes(\"EC2\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:inspector2:Enabler\n properties:\n accountIds:\n - '123456789012'\n resourceTypes:\n - EC2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### For the Calling Account\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst test = new aws.inspector2.Enabler(\"test\", {\n accountIds: [current.then(current =\u003e current.accountId)],\n resourceTypes: [\n \"ECR\",\n \"EC2\",\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ntest = aws.inspector2.Enabler(\"test\",\n account_ids=[current.account_id],\n resource_types=[\n \"ECR\",\n \"EC2\",\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var test = new Aws.Inspector2.Enabler(\"test\", new()\n {\n AccountIds = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n ResourceTypes = new[]\n {\n \"ECR\",\n \"EC2\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = inspector2.NewEnabler(ctx, \"test\", \u0026inspector2.EnablerArgs{\n\t\t\tAccountIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(current.AccountId),\n\t\t\t},\n\t\t\tResourceTypes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"ECR\"),\n\t\t\t\tpulumi.String(\"EC2\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inspector2.Enabler;\nimport com.pulumi.aws.inspector2.EnablerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var test = new Enabler(\"test\", EnablerArgs.builder()\n .accountIds(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .resourceTypes( \n \"ECR\",\n \"EC2\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:inspector2:Enabler\n properties:\n accountIds:\n - ${current.accountId}\n resourceTypes:\n - ECR\n - EC2\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Resource for enabling Amazon Inspector resource scans.\n\nThis resource must be created in the Organization's Administrator Account.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.inspector2.Enabler(\"example\", {\n accountIds: [\"123456789012\"],\n resourceTypes: [\"EC2\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.inspector2.Enabler(\"example\",\n account_ids=[\"123456789012\"],\n resource_types=[\"EC2\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Inspector2.Enabler(\"example\", new()\n {\n AccountIds = new[]\n {\n \"123456789012\",\n },\n ResourceTypes = new[]\n {\n \"EC2\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := inspector2.NewEnabler(ctx, \"example\", \u0026inspector2.EnablerArgs{\n\t\t\tAccountIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"123456789012\"),\n\t\t\t},\n\t\t\tResourceTypes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"EC2\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.inspector2.Enabler;\nimport com.pulumi.aws.inspector2.EnablerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Enabler(\"example\", EnablerArgs.builder()\n .accountIds(\"123456789012\")\n .resourceTypes(\"EC2\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:inspector2:Enabler\n properties:\n accountIds:\n - '123456789012'\n resourceTypes:\n - EC2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### For the Calling Account\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst test = new aws.inspector2.Enabler(\"test\", {\n accountIds: [current.then(current =\u003e current.accountId)],\n resourceTypes: [\n \"ECR\",\n \"EC2\",\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ntest = aws.inspector2.Enabler(\"test\",\n account_ids=[current.account_id],\n resource_types=[\n \"ECR\",\n \"EC2\",\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var test = new Aws.Inspector2.Enabler(\"test\", new()\n {\n AccountIds = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n ResourceTypes = new[]\n {\n \"ECR\",\n \"EC2\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = inspector2.NewEnabler(ctx, \"test\", \u0026inspector2.EnablerArgs{\n\t\t\tAccountIds: pulumi.StringArray{\n\t\t\t\tpulumi.String(current.AccountId),\n\t\t\t},\n\t\t\tResourceTypes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"ECR\"),\n\t\t\t\tpulumi.String(\"EC2\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inspector2.Enabler;\nimport com.pulumi.aws.inspector2.EnablerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var test = new Enabler(\"test\", EnablerArgs.builder()\n .accountIds(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .resourceTypes( \n \"ECR\",\n \"EC2\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:inspector2:Enabler\n properties:\n accountIds:\n - ${current.accountId}\n resourceTypes:\n - ECR\n - EC2\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "accountIds": { "type": "array", @@ -280583,7 +280583,7 @@ } }, "aws:iot/caCertificate:CaCertificate": { - "description": "Creates and manages an AWS IoT CA Certificate.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as tls from \"@pulumi/tls\";\n\nconst caPrivateKey = new tls.PrivateKey(\"ca\", {algorithm: \"RSA\"});\nconst ca = new tls.SelfSignedCert(\"ca\", {\n privateKeyPem: caPrivateKey.privateKeyPem,\n subject: {\n commonName: \"example.com\",\n organization: \"ACME Examples, Inc\",\n },\n validityPeriodHours: 12,\n allowedUses: [\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n ],\n isCaCertificate: true,\n});\nconst verificationPrivateKey = new tls.PrivateKey(\"verification\", {algorithm: \"RSA\"});\nconst example = aws.iot.getRegistrationCode({});\nconst verification = new tls.CertRequest(\"verification\", {\n privateKeyPem: verificationPrivateKey.privateKeyPem,\n subject: {\n commonName: example.then(example =\u003e example.registrationCode),\n },\n});\nconst verificationLocallySignedCert = new tls.LocallySignedCert(\"verification\", {\n certRequestPem: verification.certRequestPem,\n caPrivateKeyPem: caPrivateKey.privateKeyPem,\n caCertPem: ca.certPem,\n validityPeriodHours: 12,\n allowedUses: [\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n ],\n});\nconst exampleCaCertificate = new aws.iot.CaCertificate(\"example\", {\n active: true,\n caCertificatePem: ca.certPem,\n verificationCertificatePem: verificationLocallySignedCert.certPem,\n allowAutoRegistration: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_tls as tls\n\nca_private_key = tls.PrivateKey(\"ca\", algorithm=\"RSA\")\nca = tls.SelfSignedCert(\"ca\",\n private_key_pem=ca_private_key.private_key_pem,\n subject={\n \"common_name\": \"example.com\",\n \"organization\": \"ACME Examples, Inc\",\n },\n validity_period_hours=12,\n allowed_uses=[\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n ],\n is_ca_certificate=True)\nverification_private_key = tls.PrivateKey(\"verification\", algorithm=\"RSA\")\nexample = aws.iot.get_registration_code()\nverification = tls.CertRequest(\"verification\",\n private_key_pem=verification_private_key.private_key_pem,\n subject={\n \"common_name\": example.registration_code,\n })\nverification_locally_signed_cert = tls.LocallySignedCert(\"verification\",\n cert_request_pem=verification.cert_request_pem,\n ca_private_key_pem=ca_private_key.private_key_pem,\n ca_cert_pem=ca.cert_pem,\n validity_period_hours=12,\n allowed_uses=[\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n ])\nexample_ca_certificate = aws.iot.CaCertificate(\"example\",\n active=True,\n ca_certificate_pem=ca.cert_pem,\n verification_certificate_pem=verification_locally_signed_cert.cert_pem,\n allow_auto_registration=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Tls = Pulumi.Tls;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var caPrivateKey = new Tls.PrivateKey(\"ca\", new()\n {\n Algorithm = \"RSA\",\n });\n\n var ca = new Tls.SelfSignedCert(\"ca\", new()\n {\n PrivateKeyPem = caPrivateKey.PrivateKeyPem,\n Subject = new Tls.Inputs.SelfSignedCertSubjectArgs\n {\n CommonName = \"example.com\",\n Organization = \"ACME Examples, Inc\",\n },\n ValidityPeriodHours = 12,\n AllowedUses = new[]\n {\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n },\n IsCaCertificate = true,\n });\n\n var verificationPrivateKey = new Tls.PrivateKey(\"verification\", new()\n {\n Algorithm = \"RSA\",\n });\n\n var example = Aws.Iot.GetRegistrationCode.Invoke();\n\n var verification = new Tls.CertRequest(\"verification\", new()\n {\n PrivateKeyPem = verificationPrivateKey.PrivateKeyPem,\n Subject = new Tls.Inputs.CertRequestSubjectArgs\n {\n CommonName = example.Apply(getRegistrationCodeResult =\u003e getRegistrationCodeResult.RegistrationCode),\n },\n });\n\n var verificationLocallySignedCert = new Tls.LocallySignedCert(\"verification\", new()\n {\n CertRequestPem = verification.CertRequestPem,\n CaPrivateKeyPem = caPrivateKey.PrivateKeyPem,\n CaCertPem = ca.CertPem,\n ValidityPeriodHours = 12,\n AllowedUses = new[]\n {\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n },\n });\n\n var exampleCaCertificate = new Aws.Iot.CaCertificate(\"example\", new()\n {\n Active = true,\n CaCertificatePem = ca.CertPem,\n VerificationCertificatePem = verificationLocallySignedCert.CertPem,\n AllowAutoRegistration = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot\"\n\t\"github.com/pulumi/pulumi-tls/sdk/v4/go/tls\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcaPrivateKey, err := tls.NewPrivateKey(ctx, \"ca\", \u0026tls.PrivateKeyArgs{\n\t\t\tAlgorithm: pulumi.String(\"RSA\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tca, err := tls.NewSelfSignedCert(ctx, \"ca\", \u0026tls.SelfSignedCertArgs{\n\t\t\tPrivateKeyPem: caPrivateKey.PrivateKeyPem,\n\t\t\tSubject: \u0026tls.SelfSignedCertSubjectArgs{\n\t\t\t\tCommonName: pulumi.String(\"example.com\"),\n\t\t\t\tOrganization: pulumi.String(\"ACME Examples, Inc\"),\n\t\t\t},\n\t\t\tValidityPeriodHours: pulumi.Int(12),\n\t\t\tAllowedUses: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"key_encipherment\"),\n\t\t\t\tpulumi.String(\"digital_signature\"),\n\t\t\t\tpulumi.String(\"server_auth\"),\n\t\t\t},\n\t\t\tIsCaCertificate: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tverificationPrivateKey, err := tls.NewPrivateKey(ctx, \"verification\", \u0026tls.PrivateKeyArgs{\n\t\t\tAlgorithm: pulumi.String(\"RSA\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iot.GetRegistrationCode(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tverification, err := tls.NewCertRequest(ctx, \"verification\", \u0026tls.CertRequestArgs{\n\t\t\tPrivateKeyPem: verificationPrivateKey.PrivateKeyPem,\n\t\t\tSubject: \u0026tls.CertRequestSubjectArgs{\n\t\t\t\tCommonName: pulumi.String(example.RegistrationCode),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tverificationLocallySignedCert, err := tls.NewLocallySignedCert(ctx, \"verification\", \u0026tls.LocallySignedCertArgs{\n\t\t\tCertRequestPem: verification.CertRequestPem,\n\t\t\tCaPrivateKeyPem: caPrivateKey.PrivateKeyPem,\n\t\t\tCaCertPem: ca.CertPem,\n\t\t\tValidityPeriodHours: pulumi.Int(12),\n\t\t\tAllowedUses: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"key_encipherment\"),\n\t\t\t\tpulumi.String(\"digital_signature\"),\n\t\t\t\tpulumi.String(\"server_auth\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iot.NewCaCertificate(ctx, \"example\", \u0026iot.CaCertificateArgs{\n\t\t\tActive: pulumi.Bool(true),\n\t\t\tCaCertificatePem: ca.CertPem,\n\t\t\tVerificationCertificatePem: verificationLocallySignedCert.CertPem,\n\t\t\tAllowAutoRegistration: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.tls.PrivateKey;\nimport com.pulumi.tls.PrivateKeyArgs;\nimport com.pulumi.tls.SelfSignedCert;\nimport com.pulumi.tls.SelfSignedCertArgs;\nimport com.pulumi.tls.inputs.SelfSignedCertSubjectArgs;\nimport com.pulumi.aws.iot.IotFunctions;\nimport com.pulumi.tls.CertRequest;\nimport com.pulumi.tls.CertRequestArgs;\nimport com.pulumi.tls.inputs.CertRequestSubjectArgs;\nimport com.pulumi.tls.LocallySignedCert;\nimport com.pulumi.tls.LocallySignedCertArgs;\nimport com.pulumi.aws.iot.CaCertificate;\nimport com.pulumi.aws.iot.CaCertificateArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var caPrivateKey = new PrivateKey(\"caPrivateKey\", PrivateKeyArgs.builder()\n .algorithm(\"RSA\")\n .build());\n\n var ca = new SelfSignedCert(\"ca\", SelfSignedCertArgs.builder()\n .privateKeyPem(caPrivateKey.privateKeyPem())\n .subject(SelfSignedCertSubjectArgs.builder()\n .commonName(\"example.com\")\n .organization(\"ACME Examples, Inc\")\n .build())\n .validityPeriodHours(12)\n .allowedUses( \n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\")\n .isCaCertificate(true)\n .build());\n\n var verificationPrivateKey = new PrivateKey(\"verificationPrivateKey\", PrivateKeyArgs.builder()\n .algorithm(\"RSA\")\n .build());\n\n final var example = IotFunctions.getRegistrationCode();\n\n var verification = new CertRequest(\"verification\", CertRequestArgs.builder()\n .privateKeyPem(verificationPrivateKey.privateKeyPem())\n .subject(CertRequestSubjectArgs.builder()\n .commonName(example.applyValue(getRegistrationCodeResult -\u003e getRegistrationCodeResult.registrationCode()))\n .build())\n .build());\n\n var verificationLocallySignedCert = new LocallySignedCert(\"verificationLocallySignedCert\", LocallySignedCertArgs.builder()\n .certRequestPem(verification.certRequestPem())\n .caPrivateKeyPem(caPrivateKey.privateKeyPem())\n .caCertPem(ca.certPem())\n .validityPeriodHours(12)\n .allowedUses( \n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\")\n .build());\n\n var exampleCaCertificate = new CaCertificate(\"exampleCaCertificate\", CaCertificateArgs.builder()\n .active(true)\n .caCertificatePem(ca.certPem())\n .verificationCertificatePem(verificationLocallySignedCert.certPem())\n .allowAutoRegistration(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ca:\n type: tls:SelfSignedCert\n properties:\n privateKeyPem: ${caPrivateKey.privateKeyPem}\n subject:\n commonName: example.com\n organization: ACME Examples, Inc\n validityPeriodHours: 12\n allowedUses:\n - key_encipherment\n - digital_signature\n - server_auth\n isCaCertificate: true\n caPrivateKey:\n type: tls:PrivateKey\n name: ca\n properties:\n algorithm: RSA\n verification:\n type: tls:CertRequest\n properties:\n privateKeyPem: ${verificationPrivateKey.privateKeyPem}\n subject:\n commonName: ${example.registrationCode}\n verificationPrivateKey:\n type: tls:PrivateKey\n name: verification\n properties:\n algorithm: RSA\n verificationLocallySignedCert:\n type: tls:LocallySignedCert\n name: verification\n properties:\n certRequestPem: ${verification.certRequestPem}\n caPrivateKeyPem: ${caPrivateKey.privateKeyPem}\n caCertPem: ${ca.certPem}\n validityPeriodHours: 12\n allowedUses:\n - key_encipherment\n - digital_signature\n - server_auth\n exampleCaCertificate:\n type: aws:iot:CaCertificate\n name: example\n properties:\n active: true\n caCertificatePem: ${ca.certPem}\n verificationCertificatePem: ${verificationLocallySignedCert.certPem}\n allowAutoRegistration: true\nvariables:\n example:\n fn::invoke:\n Function: aws:iot:getRegistrationCode\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Creates and manages an AWS IoT CA Certificate.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as tls from \"@pulumi/tls\";\n\nconst caPrivateKey = new tls.PrivateKey(\"ca\", {algorithm: \"RSA\"});\nconst ca = new tls.SelfSignedCert(\"ca\", {\n privateKeyPem: caPrivateKey.privateKeyPem,\n subject: {\n commonName: \"example.com\",\n organization: \"ACME Examples, Inc\",\n },\n validityPeriodHours: 12,\n allowedUses: [\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n ],\n isCaCertificate: true,\n});\nconst verificationPrivateKey = new tls.PrivateKey(\"verification\", {algorithm: \"RSA\"});\nconst example = aws.iot.getRegistrationCode({});\nconst verification = new tls.CertRequest(\"verification\", {\n privateKeyPem: verificationPrivateKey.privateKeyPem,\n subject: {\n commonName: example.then(example =\u003e example.registrationCode),\n },\n});\nconst verificationLocallySignedCert = new tls.LocallySignedCert(\"verification\", {\n certRequestPem: verification.certRequestPem,\n caPrivateKeyPem: caPrivateKey.privateKeyPem,\n caCertPem: ca.certPem,\n validityPeriodHours: 12,\n allowedUses: [\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n ],\n});\nconst exampleCaCertificate = new aws.iot.CaCertificate(\"example\", {\n active: true,\n caCertificatePem: ca.certPem,\n verificationCertificatePem: verificationLocallySignedCert.certPem,\n allowAutoRegistration: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_tls as tls\n\nca_private_key = tls.PrivateKey(\"ca\", algorithm=\"RSA\")\nca = tls.SelfSignedCert(\"ca\",\n private_key_pem=ca_private_key.private_key_pem,\n subject={\n \"common_name\": \"example.com\",\n \"organization\": \"ACME Examples, Inc\",\n },\n validity_period_hours=12,\n allowed_uses=[\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n ],\n is_ca_certificate=True)\nverification_private_key = tls.PrivateKey(\"verification\", algorithm=\"RSA\")\nexample = aws.iot.get_registration_code()\nverification = tls.CertRequest(\"verification\",\n private_key_pem=verification_private_key.private_key_pem,\n subject={\n \"common_name\": example.registration_code,\n })\nverification_locally_signed_cert = tls.LocallySignedCert(\"verification\",\n cert_request_pem=verification.cert_request_pem,\n ca_private_key_pem=ca_private_key.private_key_pem,\n ca_cert_pem=ca.cert_pem,\n validity_period_hours=12,\n allowed_uses=[\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n ])\nexample_ca_certificate = aws.iot.CaCertificate(\"example\",\n active=True,\n ca_certificate_pem=ca.cert_pem,\n verification_certificate_pem=verification_locally_signed_cert.cert_pem,\n allow_auto_registration=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Tls = Pulumi.Tls;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var caPrivateKey = new Tls.PrivateKey(\"ca\", new()\n {\n Algorithm = \"RSA\",\n });\n\n var ca = new Tls.SelfSignedCert(\"ca\", new()\n {\n PrivateKeyPem = caPrivateKey.PrivateKeyPem,\n Subject = new Tls.Inputs.SelfSignedCertSubjectArgs\n {\n CommonName = \"example.com\",\n Organization = \"ACME Examples, Inc\",\n },\n ValidityPeriodHours = 12,\n AllowedUses = new[]\n {\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n },\n IsCaCertificate = true,\n });\n\n var verificationPrivateKey = new Tls.PrivateKey(\"verification\", new()\n {\n Algorithm = \"RSA\",\n });\n\n var example = Aws.Iot.GetRegistrationCode.Invoke();\n\n var verification = new Tls.CertRequest(\"verification\", new()\n {\n PrivateKeyPem = verificationPrivateKey.PrivateKeyPem,\n Subject = new Tls.Inputs.CertRequestSubjectArgs\n {\n CommonName = example.Apply(getRegistrationCodeResult =\u003e getRegistrationCodeResult.RegistrationCode),\n },\n });\n\n var verificationLocallySignedCert = new Tls.LocallySignedCert(\"verification\", new()\n {\n CertRequestPem = verification.CertRequestPem,\n CaPrivateKeyPem = caPrivateKey.PrivateKeyPem,\n CaCertPem = ca.CertPem,\n ValidityPeriodHours = 12,\n AllowedUses = new[]\n {\n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\",\n },\n });\n\n var exampleCaCertificate = new Aws.Iot.CaCertificate(\"example\", new()\n {\n Active = true,\n CaCertificatePem = ca.CertPem,\n VerificationCertificatePem = verificationLocallySignedCert.CertPem,\n AllowAutoRegistration = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot\"\n\t\"github.com/pulumi/pulumi-tls/sdk/v4/go/tls\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcaPrivateKey, err := tls.NewPrivateKey(ctx, \"ca\", \u0026tls.PrivateKeyArgs{\n\t\t\tAlgorithm: pulumi.String(\"RSA\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tca, err := tls.NewSelfSignedCert(ctx, \"ca\", \u0026tls.SelfSignedCertArgs{\n\t\t\tPrivateKeyPem: caPrivateKey.PrivateKeyPem,\n\t\t\tSubject: \u0026tls.SelfSignedCertSubjectArgs{\n\t\t\t\tCommonName: pulumi.String(\"example.com\"),\n\t\t\t\tOrganization: pulumi.String(\"ACME Examples, Inc\"),\n\t\t\t},\n\t\t\tValidityPeriodHours: pulumi.Int(12),\n\t\t\tAllowedUses: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"key_encipherment\"),\n\t\t\t\tpulumi.String(\"digital_signature\"),\n\t\t\t\tpulumi.String(\"server_auth\"),\n\t\t\t},\n\t\t\tIsCaCertificate: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tverificationPrivateKey, err := tls.NewPrivateKey(ctx, \"verification\", \u0026tls.PrivateKeyArgs{\n\t\t\tAlgorithm: pulumi.String(\"RSA\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iot.GetRegistrationCode(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tverification, err := tls.NewCertRequest(ctx, \"verification\", \u0026tls.CertRequestArgs{\n\t\t\tPrivateKeyPem: verificationPrivateKey.PrivateKeyPem,\n\t\t\tSubject: \u0026tls.CertRequestSubjectArgs{\n\t\t\t\tCommonName: pulumi.String(example.RegistrationCode),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tverificationLocallySignedCert, err := tls.NewLocallySignedCert(ctx, \"verification\", \u0026tls.LocallySignedCertArgs{\n\t\t\tCertRequestPem: verification.CertRequestPem,\n\t\t\tCaPrivateKeyPem: caPrivateKey.PrivateKeyPem,\n\t\t\tCaCertPem: ca.CertPem,\n\t\t\tValidityPeriodHours: pulumi.Int(12),\n\t\t\tAllowedUses: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"key_encipherment\"),\n\t\t\t\tpulumi.String(\"digital_signature\"),\n\t\t\t\tpulumi.String(\"server_auth\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iot.NewCaCertificate(ctx, \"example\", \u0026iot.CaCertificateArgs{\n\t\t\tActive: pulumi.Bool(true),\n\t\t\tCaCertificatePem: ca.CertPem,\n\t\t\tVerificationCertificatePem: verificationLocallySignedCert.CertPem,\n\t\t\tAllowAutoRegistration: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.tls.PrivateKey;\nimport com.pulumi.tls.PrivateKeyArgs;\nimport com.pulumi.tls.SelfSignedCert;\nimport com.pulumi.tls.SelfSignedCertArgs;\nimport com.pulumi.tls.inputs.SelfSignedCertSubjectArgs;\nimport com.pulumi.aws.iot.IotFunctions;\nimport com.pulumi.tls.CertRequest;\nimport com.pulumi.tls.CertRequestArgs;\nimport com.pulumi.tls.inputs.CertRequestSubjectArgs;\nimport com.pulumi.tls.LocallySignedCert;\nimport com.pulumi.tls.LocallySignedCertArgs;\nimport com.pulumi.aws.iot.CaCertificate;\nimport com.pulumi.aws.iot.CaCertificateArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var caPrivateKey = new PrivateKey(\"caPrivateKey\", PrivateKeyArgs.builder()\n .algorithm(\"RSA\")\n .build());\n\n var ca = new SelfSignedCert(\"ca\", SelfSignedCertArgs.builder()\n .privateKeyPem(caPrivateKey.privateKeyPem())\n .subject(SelfSignedCertSubjectArgs.builder()\n .commonName(\"example.com\")\n .organization(\"ACME Examples, Inc\")\n .build())\n .validityPeriodHours(12)\n .allowedUses( \n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\")\n .isCaCertificate(true)\n .build());\n\n var verificationPrivateKey = new PrivateKey(\"verificationPrivateKey\", PrivateKeyArgs.builder()\n .algorithm(\"RSA\")\n .build());\n\n final var example = IotFunctions.getRegistrationCode();\n\n var verification = new CertRequest(\"verification\", CertRequestArgs.builder()\n .privateKeyPem(verificationPrivateKey.privateKeyPem())\n .subject(CertRequestSubjectArgs.builder()\n .commonName(example.applyValue(getRegistrationCodeResult -\u003e getRegistrationCodeResult.registrationCode()))\n .build())\n .build());\n\n var verificationLocallySignedCert = new LocallySignedCert(\"verificationLocallySignedCert\", LocallySignedCertArgs.builder()\n .certRequestPem(verification.certRequestPem())\n .caPrivateKeyPem(caPrivateKey.privateKeyPem())\n .caCertPem(ca.certPem())\n .validityPeriodHours(12)\n .allowedUses( \n \"key_encipherment\",\n \"digital_signature\",\n \"server_auth\")\n .build());\n\n var exampleCaCertificate = new CaCertificate(\"exampleCaCertificate\", CaCertificateArgs.builder()\n .active(true)\n .caCertificatePem(ca.certPem())\n .verificationCertificatePem(verificationLocallySignedCert.certPem())\n .allowAutoRegistration(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ca:\n type: tls:SelfSignedCert\n properties:\n privateKeyPem: ${caPrivateKey.privateKeyPem}\n subject:\n commonName: example.com\n organization: ACME Examples, Inc\n validityPeriodHours: 12\n allowedUses:\n - key_encipherment\n - digital_signature\n - server_auth\n isCaCertificate: true\n caPrivateKey:\n type: tls:PrivateKey\n name: ca\n properties:\n algorithm: RSA\n verification:\n type: tls:CertRequest\n properties:\n privateKeyPem: ${verificationPrivateKey.privateKeyPem}\n subject:\n commonName: ${example.registrationCode}\n verificationPrivateKey:\n type: tls:PrivateKey\n name: verification\n properties:\n algorithm: RSA\n verificationLocallySignedCert:\n type: tls:LocallySignedCert\n name: verification\n properties:\n certRequestPem: ${verification.certRequestPem}\n caPrivateKeyPem: ${caPrivateKey.privateKeyPem}\n caCertPem: ${ca.certPem}\n validityPeriodHours: 12\n allowedUses:\n - key_encipherment\n - digital_signature\n - server_auth\n exampleCaCertificate:\n type: aws:iot:CaCertificate\n name: example\n properties:\n active: true\n caCertificatePem: ${ca.certPem}\n verificationCertificatePem: ${verificationLocallySignedCert.certPem}\n allowAutoRegistration: true\nvariables:\n example:\n fn::invoke:\n Function: aws:iot:getRegistrationCode\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "active": { "type": "boolean", @@ -283837,7 +283837,7 @@ } }, "aws:kendra/index:Index": { - "description": "Provides an Amazon Kendra Index resource.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n description: \"example\",\n edition: \"DEVELOPER_EDITION\",\n roleArn: _this.arn,\n tags: {\n Key1: \"Value1\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n description=\"example\",\n edition=\"DEVELOPER_EDITION\",\n role_arn=this[\"arn\"],\n tags={\n \"Key1\": \"Value1\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n Description = \"example\",\n Edition = \"DEVELOPER_EDITION\",\n RoleArn = @this.Arn,\n Tags = \n {\n { \"Key1\", \"Value1\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t\tEdition: pulumi.String(\"DEVELOPER_EDITION\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .description(\"example\")\n .edition(\"DEVELOPER_EDITION\")\n .roleArn(this_.arn())\n .tags(Map.of(\"Key1\", \"Value1\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n description: example\n edition: DEVELOPER_EDITION\n roleArn: ${this.arn}\n tags:\n Key1: Value1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With capacity units\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n edition: \"DEVELOPER_EDITION\",\n roleArn: _this.arn,\n capacityUnits: {\n queryCapacityUnits: 2,\n storageCapacityUnits: 2,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n edition=\"DEVELOPER_EDITION\",\n role_arn=this[\"arn\"],\n capacity_units={\n \"query_capacity_units\": 2,\n \"storage_capacity_units\": 2,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n Edition = \"DEVELOPER_EDITION\",\n RoleArn = @this.Arn,\n CapacityUnits = new Aws.Kendra.Inputs.IndexCapacityUnitsArgs\n {\n QueryCapacityUnits = 2,\n StorageCapacityUnits = 2,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tEdition: pulumi.String(\"DEVELOPER_EDITION\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tCapacityUnits: \u0026kendra.IndexCapacityUnitsArgs{\n\t\t\t\tQueryCapacityUnits: pulumi.Int(2),\n\t\t\t\tStorageCapacityUnits: pulumi.Int(2),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexCapacityUnitsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .edition(\"DEVELOPER_EDITION\")\n .roleArn(this_.arn())\n .capacityUnits(IndexCapacityUnitsArgs.builder()\n .queryCapacityUnits(2)\n .storageCapacityUnits(2)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n edition: DEVELOPER_EDITION\n roleArn: ${this.arn}\n capacityUnits:\n queryCapacityUnits: 2\n storageCapacityUnits: 2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With server side encryption configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: thisAwsIamRole.arn,\n serverSideEncryptionConfiguration: {\n kmsKeyId: _this.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this_aws_iam_role[\"arn\"],\n server_side_encryption_configuration={\n \"kms_key_id\": this[\"arn\"],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = thisAwsIamRole.Arn,\n ServerSideEncryptionConfiguration = new Aws.Kendra.Inputs.IndexServerSideEncryptionConfigurationArgs\n {\n KmsKeyId = @this.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(thisAwsIamRole.Arn),\n\t\t\tServerSideEncryptionConfiguration: \u0026kendra.IndexServerSideEncryptionConfigurationArgs{\n\t\t\t\tKmsKeyId: pulumi.Any(this.Arn),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexServerSideEncryptionConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(thisAwsIamRole.arn())\n .serverSideEncryptionConfiguration(IndexServerSideEncryptionConfigurationArgs.builder()\n .kmsKeyId(this_.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${thisAwsIamRole.arn}\n serverSideEncryptionConfiguration:\n kmsKeyId: ${this.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With user group resolution configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: _this.arn,\n userGroupResolutionConfiguration: {\n userGroupResolutionMode: \"AWS_SSO\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this[\"arn\"],\n user_group_resolution_configuration={\n \"user_group_resolution_mode\": \"AWS_SSO\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = @this.Arn,\n UserGroupResolutionConfiguration = new Aws.Kendra.Inputs.IndexUserGroupResolutionConfigurationArgs\n {\n UserGroupResolutionMode = \"AWS_SSO\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tUserGroupResolutionConfiguration: \u0026kendra.IndexUserGroupResolutionConfigurationArgs{\n\t\t\t\tUserGroupResolutionMode: pulumi.String(\"AWS_SSO\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexUserGroupResolutionConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(this_.arn())\n .userGroupResolutionConfiguration(IndexUserGroupResolutionConfigurationArgs.builder()\n .userGroupResolutionMode(\"AWS_SSO\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${this.arn}\n userGroupResolutionConfiguration:\n userGroupResolutionMode: AWS_SSO\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Document Metadata Configuration Updates\n\n### Specifying the predefined elements\n\nRefer to [Amazon Kendra documentation on built-in document fields](https://docs.aws.amazon.com/kendra/latest/dg/hiw-index.html#index-reserved-fields) for more information.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: _this.arn,\n documentMetadataConfigurationUpdates: [\n {\n name: \"_authors\",\n type: \"STRING_LIST_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 1,\n },\n },\n {\n name: \"_category\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_created_at\",\n type: \"DATE_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_data_source_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_document_title\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: false,\n searchable: true,\n sortable: true,\n },\n relevance: {\n importance: 2,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_excerpt_page_number\",\n type: \"LONG_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 2,\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_faq_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_file_type\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_language_code\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_last_updated_at\",\n type: \"DATE_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_source_uri\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_tenant_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_version\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_view_count\",\n type: \"LONG_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n rankOrder: \"ASCENDING\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this[\"arn\"],\n document_metadata_configuration_updates=[\n {\n \"name\": \"_authors\",\n \"type\": \"STRING_LIST_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n },\n },\n {\n \"name\": \"_category\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_created_at\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_data_source_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_document_title\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": False,\n \"searchable\": True,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 2,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_excerpt_page_number\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 2,\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_faq_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_file_type\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_language_code\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_last_updated_at\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_source_uri\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_tenant_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_version\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_view_count\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"rank_order\": \"ASCENDING\",\n },\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = @this.Arn,\n DocumentMetadataConfigurationUpdates = new[]\n {\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_authors\",\n Type = \"STRING_LIST_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_category\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_created_at\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_data_source_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_document_title\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = false,\n Searchable = true,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 2,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_excerpt_page_number\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 2,\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_faq_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_file_type\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_language_code\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_last_updated_at\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_source_uri\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_tenant_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_version\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_view_count\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n RankOrder = \"ASCENDING\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tDocumentMetadataConfigurationUpdates: kendra.IndexDocumentMetadataConfigurationUpdateArray{\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_authors\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_LIST_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_category\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_created_at\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_data_source_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_document_title\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(true),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(2),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_excerpt_page_number\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(2),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_faq_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_file_type\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_language_code\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_last_updated_at\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_source_uri\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_tenant_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_version\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_view_count\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(this_.arn())\n .documentMetadataConfigurationUpdates( \n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_authors\")\n .type(\"STRING_LIST_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_category\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_created_at\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_data_source_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_document_title\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(false)\n .searchable(true)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(2)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_excerpt_page_number\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(2)\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_faq_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_file_type\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_language_code\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_last_updated_at\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_source_uri\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_tenant_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_version\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_view_count\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .rankOrder(\"ASCENDING\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${this.arn}\n documentMetadataConfigurationUpdates:\n - name: _authors\n type: STRING_LIST_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 1\n - name: _category\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _created_at\n type: DATE_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n - name: _data_source_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _document_title\n type: STRING_VALUE\n search:\n displayable: true\n facetable: false\n searchable: true\n sortable: true\n relevance:\n importance: 2\n valuesImportanceMap: {}\n - name: _excerpt_page_number\n type: LONG_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 2\n rankOrder: ASCENDING\n - name: _faq_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _file_type\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _language_code\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _last_updated_at\n type: DATE_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n - name: _source_uri\n type: STRING_VALUE\n search:\n displayable: true\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _tenant_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _version\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _view_count\n type: LONG_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n rankOrder: ASCENDING\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Appending additional elements\n\nThe example below shows additional elements with names, `example-string-value`, `example-long-value`, `example-string-list-value`, `example-date-value` representing the 4 types of `STRING_VALUE`, `LONG_VALUE`, `STRING_LIST_VALUE`, `DATE_VALUE` respectively.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: _this.arn,\n documentMetadataConfigurationUpdates: [\n {\n name: \"_authors\",\n type: \"STRING_LIST_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 1,\n },\n },\n {\n name: \"_category\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_created_at\",\n type: \"DATE_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_data_source_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_document_title\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: false,\n searchable: true,\n sortable: true,\n },\n relevance: {\n importance: 2,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_excerpt_page_number\",\n type: \"LONG_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 2,\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_faq_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_file_type\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_language_code\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_last_updated_at\",\n type: \"DATE_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_source_uri\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_tenant_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_version\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_view_count\",\n type: \"LONG_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"example-string-value\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: true,\n searchable: true,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"example-long-value\",\n type: \"LONG_VALUE\",\n search: {\n displayable: true,\n facetable: true,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"example-string-list-value\",\n type: \"STRING_LIST_VALUE\",\n search: {\n displayable: true,\n facetable: true,\n searchable: true,\n sortable: false,\n },\n relevance: {\n importance: 1,\n },\n },\n {\n name: \"example-date-value\",\n type: \"DATE_VALUE\",\n search: {\n displayable: true,\n facetable: true,\n searchable: false,\n sortable: false,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this[\"arn\"],\n document_metadata_configuration_updates=[\n {\n \"name\": \"_authors\",\n \"type\": \"STRING_LIST_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n },\n },\n {\n \"name\": \"_category\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_created_at\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_data_source_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_document_title\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": False,\n \"searchable\": True,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 2,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_excerpt_page_number\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 2,\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_faq_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_file_type\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_language_code\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_last_updated_at\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_source_uri\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_tenant_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_version\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_view_count\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"example-string-value\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": True,\n \"searchable\": True,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"example-long-value\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": True,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"example-string-list-value\",\n \"type\": \"STRING_LIST_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": True,\n \"searchable\": True,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n },\n },\n {\n \"name\": \"example-date-value\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": True,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = @this.Arn,\n DocumentMetadataConfigurationUpdates = new[]\n {\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_authors\",\n Type = \"STRING_LIST_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_category\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_created_at\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_data_source_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_document_title\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = false,\n Searchable = true,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 2,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_excerpt_page_number\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 2,\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_faq_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_file_type\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_language_code\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_last_updated_at\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_source_uri\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_tenant_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_version\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_view_count\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"example-string-value\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = true,\n Searchable = true,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"example-long-value\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = true,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"example-string-list-value\",\n Type = \"STRING_LIST_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = true,\n Searchable = true,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"example-date-value\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = true,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tDocumentMetadataConfigurationUpdates: kendra.IndexDocumentMetadataConfigurationUpdateArray{\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_authors\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_LIST_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_category\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_created_at\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_data_source_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_document_title\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(true),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(2),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_excerpt_page_number\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(2),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_faq_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_file_type\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_language_code\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_last_updated_at\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_source_uri\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_tenant_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_version\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_view_count\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"example-string-value\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(true),\n\t\t\t\t\t\tSearchable: pulumi.Bool(true),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: nil,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"example-long-value\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(true),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"example-string-list-value\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_LIST_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(true),\n\t\t\t\t\t\tSearchable: pulumi.Bool(true),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"example-date-value\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(true),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(this_.arn())\n .documentMetadataConfigurationUpdates( \n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_authors\")\n .type(\"STRING_LIST_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_category\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_created_at\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_data_source_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_document_title\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(false)\n .searchable(true)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(2)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_excerpt_page_number\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(2)\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_faq_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_file_type\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_language_code\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_last_updated_at\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_source_uri\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_tenant_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_version\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_view_count\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"example-string-value\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(true)\n .searchable(true)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"example-long-value\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(true)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"example-string-list-value\")\n .type(\"STRING_LIST_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(true)\n .searchable(true)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"example-date-value\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(true)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${this.arn}\n documentMetadataConfigurationUpdates:\n - name: _authors\n type: STRING_LIST_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 1\n - name: _category\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _created_at\n type: DATE_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n - name: _data_source_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _document_title\n type: STRING_VALUE\n search:\n displayable: true\n facetable: false\n searchable: true\n sortable: true\n relevance:\n importance: 2\n valuesImportanceMap: {}\n - name: _excerpt_page_number\n type: LONG_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 2\n rankOrder: ASCENDING\n - name: _faq_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _file_type\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _language_code\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _last_updated_at\n type: DATE_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n - name: _source_uri\n type: STRING_VALUE\n search:\n displayable: true\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _tenant_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _version\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _view_count\n type: LONG_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n rankOrder: ASCENDING\n - name: example-string-value\n type: STRING_VALUE\n search:\n displayable: true\n facetable: true\n searchable: true\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: example-long-value\n type: LONG_VALUE\n search:\n displayable: true\n facetable: true\n searchable: false\n sortable: true\n relevance:\n importance: 1\n rankOrder: ASCENDING\n - name: example-string-list-value\n type: STRING_LIST_VALUE\n search:\n displayable: true\n facetable: true\n searchable: true\n sortable: false\n relevance:\n importance: 1\n - name: example-date-value\n type: DATE_VALUE\n search:\n displayable: true\n facetable: true\n searchable: false\n sortable: false\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With JSON token type configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: _this.arn,\n userTokenConfigurations: {\n jsonTokenTypeConfiguration: {\n groupAttributeField: \"groups\",\n userNameAttributeField: \"username\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this[\"arn\"],\n user_token_configurations={\n \"json_token_type_configuration\": {\n \"group_attribute_field\": \"groups\",\n \"user_name_attribute_field\": \"username\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = @this.Arn,\n UserTokenConfigurations = new Aws.Kendra.Inputs.IndexUserTokenConfigurationsArgs\n {\n JsonTokenTypeConfiguration = new Aws.Kendra.Inputs.IndexUserTokenConfigurationsJsonTokenTypeConfigurationArgs\n {\n GroupAttributeField = \"groups\",\n UserNameAttributeField = \"username\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tUserTokenConfigurations: \u0026kendra.IndexUserTokenConfigurationsArgs{\n\t\t\t\tJsonTokenTypeConfiguration: \u0026kendra.IndexUserTokenConfigurationsJsonTokenTypeConfigurationArgs{\n\t\t\t\t\tGroupAttributeField: pulumi.String(\"groups\"),\n\t\t\t\t\tUserNameAttributeField: pulumi.String(\"username\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexUserTokenConfigurationsArgs;\nimport com.pulumi.aws.kendra.inputs.IndexUserTokenConfigurationsJsonTokenTypeConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(this_.arn())\n .userTokenConfigurations(IndexUserTokenConfigurationsArgs.builder()\n .jsonTokenTypeConfiguration(IndexUserTokenConfigurationsJsonTokenTypeConfigurationArgs.builder()\n .groupAttributeField(\"groups\")\n .userNameAttributeField(\"username\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${this.arn}\n userTokenConfigurations:\n jsonTokenTypeConfiguration:\n groupAttributeField: groups\n userNameAttributeField: username\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amazon Kendra Indexes using its `id`. For example:\n\n```sh\n$ pulumi import aws:kendra/index:Index example 12345678-1234-5678-9123-123456789123\n```\n", + "description": "Provides an Amazon Kendra Index resource.\n\n## Example Usage\n\n### Basic\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n description: \"example\",\n edition: \"DEVELOPER_EDITION\",\n roleArn: _this.arn,\n tags: {\n Key1: \"Value1\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n description=\"example\",\n edition=\"DEVELOPER_EDITION\",\n role_arn=this[\"arn\"],\n tags={\n \"Key1\": \"Value1\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n Description = \"example\",\n Edition = \"DEVELOPER_EDITION\",\n RoleArn = @this.Arn,\n Tags = \n {\n { \"Key1\", \"Value1\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDescription: pulumi.String(\"example\"),\n\t\t\tEdition: pulumi.String(\"DEVELOPER_EDITION\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .description(\"example\")\n .edition(\"DEVELOPER_EDITION\")\n .roleArn(this_.arn())\n .tags(Map.of(\"Key1\", \"Value1\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n description: example\n edition: DEVELOPER_EDITION\n roleArn: ${this.arn}\n tags:\n Key1: Value1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With capacity units\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n edition: \"DEVELOPER_EDITION\",\n roleArn: _this.arn,\n capacityUnits: {\n queryCapacityUnits: 2,\n storageCapacityUnits: 2,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n edition=\"DEVELOPER_EDITION\",\n role_arn=this[\"arn\"],\n capacity_units={\n \"query_capacity_units\": 2,\n \"storage_capacity_units\": 2,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n Edition = \"DEVELOPER_EDITION\",\n RoleArn = @this.Arn,\n CapacityUnits = new Aws.Kendra.Inputs.IndexCapacityUnitsArgs\n {\n QueryCapacityUnits = 2,\n StorageCapacityUnits = 2,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tEdition: pulumi.String(\"DEVELOPER_EDITION\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tCapacityUnits: \u0026kendra.IndexCapacityUnitsArgs{\n\t\t\t\tQueryCapacityUnits: pulumi.Int(2),\n\t\t\t\tStorageCapacityUnits: pulumi.Int(2),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexCapacityUnitsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .edition(\"DEVELOPER_EDITION\")\n .roleArn(this_.arn())\n .capacityUnits(IndexCapacityUnitsArgs.builder()\n .queryCapacityUnits(2)\n .storageCapacityUnits(2)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n edition: DEVELOPER_EDITION\n roleArn: ${this.arn}\n capacityUnits:\n queryCapacityUnits: 2\n storageCapacityUnits: 2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With server side encryption configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: thisAwsIamRole.arn,\n serverSideEncryptionConfiguration: {\n kmsKeyId: _this.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this_aws_iam_role[\"arn\"],\n server_side_encryption_configuration={\n \"kms_key_id\": this[\"arn\"],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = thisAwsIamRole.Arn,\n ServerSideEncryptionConfiguration = new Aws.Kendra.Inputs.IndexServerSideEncryptionConfigurationArgs\n {\n KmsKeyId = @this.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(thisAwsIamRole.Arn),\n\t\t\tServerSideEncryptionConfiguration: \u0026kendra.IndexServerSideEncryptionConfigurationArgs{\n\t\t\t\tKmsKeyId: pulumi.Any(this.Arn),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexServerSideEncryptionConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(thisAwsIamRole.arn())\n .serverSideEncryptionConfiguration(IndexServerSideEncryptionConfigurationArgs.builder()\n .kmsKeyId(this_.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${thisAwsIamRole.arn}\n serverSideEncryptionConfiguration:\n kmsKeyId: ${this.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With user group resolution configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: _this.arn,\n userGroupResolutionConfiguration: {\n userGroupResolutionMode: \"AWS_SSO\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this[\"arn\"],\n user_group_resolution_configuration={\n \"user_group_resolution_mode\": \"AWS_SSO\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = @this.Arn,\n UserGroupResolutionConfiguration = new Aws.Kendra.Inputs.IndexUserGroupResolutionConfigurationArgs\n {\n UserGroupResolutionMode = \"AWS_SSO\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tUserGroupResolutionConfiguration: \u0026kendra.IndexUserGroupResolutionConfigurationArgs{\n\t\t\t\tUserGroupResolutionMode: pulumi.String(\"AWS_SSO\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexUserGroupResolutionConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(this_.arn())\n .userGroupResolutionConfiguration(IndexUserGroupResolutionConfigurationArgs.builder()\n .userGroupResolutionMode(\"AWS_SSO\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${this.arn}\n userGroupResolutionConfiguration:\n userGroupResolutionMode: AWS_SSO\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Document Metadata Configuration Updates\n\n### Specifying the predefined elements\n\nRefer to [Amazon Kendra documentation on built-in document fields](https://docs.aws.amazon.com/kendra/latest/dg/hiw-index.html#index-reserved-fields) for more information.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: _this.arn,\n documentMetadataConfigurationUpdates: [\n {\n name: \"_authors\",\n type: \"STRING_LIST_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 1,\n },\n },\n {\n name: \"_category\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_created_at\",\n type: \"DATE_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_data_source_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_document_title\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: false,\n searchable: true,\n sortable: true,\n },\n relevance: {\n importance: 2,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_excerpt_page_number\",\n type: \"LONG_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 2,\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_faq_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_file_type\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_language_code\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_last_updated_at\",\n type: \"DATE_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_source_uri\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_tenant_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_version\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_view_count\",\n type: \"LONG_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n rankOrder: \"ASCENDING\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this[\"arn\"],\n document_metadata_configuration_updates=[\n {\n \"name\": \"_authors\",\n \"type\": \"STRING_LIST_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n },\n },\n {\n \"name\": \"_category\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_created_at\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_data_source_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_document_title\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": False,\n \"searchable\": True,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 2,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_excerpt_page_number\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 2,\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_faq_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_file_type\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_language_code\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_last_updated_at\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_source_uri\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_tenant_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_version\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_view_count\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"rank_order\": \"ASCENDING\",\n },\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = @this.Arn,\n DocumentMetadataConfigurationUpdates = new[]\n {\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_authors\",\n Type = \"STRING_LIST_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_category\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_created_at\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_data_source_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_document_title\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = false,\n Searchable = true,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 2,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_excerpt_page_number\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 2,\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_faq_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_file_type\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_language_code\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_last_updated_at\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_source_uri\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_tenant_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_version\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_view_count\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n RankOrder = \"ASCENDING\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tDocumentMetadataConfigurationUpdates: kendra.IndexDocumentMetadataConfigurationUpdateArray{\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_authors\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_LIST_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_category\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_created_at\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_data_source_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_document_title\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(true),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(2),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_excerpt_page_number\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(2),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_faq_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_file_type\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_language_code\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_last_updated_at\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_source_uri\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_tenant_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_version\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_view_count\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(this_.arn())\n .documentMetadataConfigurationUpdates( \n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_authors\")\n .type(\"STRING_LIST_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_category\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_created_at\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_data_source_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_document_title\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(false)\n .searchable(true)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(2)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_excerpt_page_number\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(2)\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_faq_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_file_type\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_language_code\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_last_updated_at\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_source_uri\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_tenant_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_version\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_view_count\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .rankOrder(\"ASCENDING\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${this.arn}\n documentMetadataConfigurationUpdates:\n - name: _authors\n type: STRING_LIST_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 1\n - name: _category\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _created_at\n type: DATE_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n - name: _data_source_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _document_title\n type: STRING_VALUE\n search:\n displayable: true\n facetable: false\n searchable: true\n sortable: true\n relevance:\n importance: 2\n valuesImportanceMap: {}\n - name: _excerpt_page_number\n type: LONG_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 2\n rankOrder: ASCENDING\n - name: _faq_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _file_type\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _language_code\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _last_updated_at\n type: DATE_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n - name: _source_uri\n type: STRING_VALUE\n search:\n displayable: true\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _tenant_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _version\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _view_count\n type: LONG_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n rankOrder: ASCENDING\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Appending additional elements\n\nThe example below shows additional elements with names, `example-string-value`, `example-long-value`, `example-string-list-value`, `example-date-value` representing the 4 types of `STRING_VALUE`, `LONG_VALUE`, `STRING_LIST_VALUE`, `DATE_VALUE` respectively.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: _this.arn,\n documentMetadataConfigurationUpdates: [\n {\n name: \"_authors\",\n type: \"STRING_LIST_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 1,\n },\n },\n {\n name: \"_category\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_created_at\",\n type: \"DATE_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_data_source_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_document_title\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: false,\n searchable: true,\n sortable: true,\n },\n relevance: {\n importance: 2,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_excerpt_page_number\",\n type: \"LONG_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 2,\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_faq_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_file_type\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_language_code\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_last_updated_at\",\n type: \"DATE_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"_source_uri\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: false,\n searchable: false,\n sortable: false,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_tenant_id\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_version\",\n type: \"STRING_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"_view_count\",\n type: \"LONG_VALUE\",\n search: {\n displayable: false,\n facetable: false,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"example-string-value\",\n type: \"STRING_VALUE\",\n search: {\n displayable: true,\n facetable: true,\n searchable: true,\n sortable: true,\n },\n relevance: {\n importance: 1,\n valuesImportanceMap: {},\n },\n },\n {\n name: \"example-long-value\",\n type: \"LONG_VALUE\",\n search: {\n displayable: true,\n facetable: true,\n searchable: false,\n sortable: true,\n },\n relevance: {\n importance: 1,\n rankOrder: \"ASCENDING\",\n },\n },\n {\n name: \"example-string-list-value\",\n type: \"STRING_LIST_VALUE\",\n search: {\n displayable: true,\n facetable: true,\n searchable: true,\n sortable: false,\n },\n relevance: {\n importance: 1,\n },\n },\n {\n name: \"example-date-value\",\n type: \"DATE_VALUE\",\n search: {\n displayable: true,\n facetable: true,\n searchable: false,\n sortable: false,\n },\n relevance: {\n freshness: false,\n importance: 1,\n duration: \"25920000s\",\n rankOrder: \"ASCENDING\",\n },\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this[\"arn\"],\n document_metadata_configuration_updates=[\n {\n \"name\": \"_authors\",\n \"type\": \"STRING_LIST_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n },\n },\n {\n \"name\": \"_category\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_created_at\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_data_source_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_document_title\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": False,\n \"searchable\": True,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 2,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_excerpt_page_number\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 2,\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_faq_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_file_type\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_language_code\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_last_updated_at\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"_source_uri\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_tenant_id\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_version\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"_view_count\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": False,\n \"facetable\": False,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"example-string-value\",\n \"type\": \"STRING_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": True,\n \"searchable\": True,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"values_importance_map\": {},\n },\n },\n {\n \"name\": \"example-long-value\",\n \"type\": \"LONG_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": True,\n \"searchable\": False,\n \"sortable\": True,\n },\n \"relevance\": {\n \"importance\": 1,\n \"rank_order\": \"ASCENDING\",\n },\n },\n {\n \"name\": \"example-string-list-value\",\n \"type\": \"STRING_LIST_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": True,\n \"searchable\": True,\n \"sortable\": False,\n },\n \"relevance\": {\n \"importance\": 1,\n },\n },\n {\n \"name\": \"example-date-value\",\n \"type\": \"DATE_VALUE\",\n \"search\": {\n \"displayable\": True,\n \"facetable\": True,\n \"searchable\": False,\n \"sortable\": False,\n },\n \"relevance\": {\n \"freshness\": False,\n \"importance\": 1,\n \"duration\": \"25920000s\",\n \"rank_order\": \"ASCENDING\",\n },\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = @this.Arn,\n DocumentMetadataConfigurationUpdates = new[]\n {\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_authors\",\n Type = \"STRING_LIST_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_category\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_created_at\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_data_source_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_document_title\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = false,\n Searchable = true,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 2,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_excerpt_page_number\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 2,\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_faq_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_file_type\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_language_code\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_last_updated_at\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_source_uri\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = false,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_tenant_id\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_version\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"_view_count\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = false,\n Facetable = false,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"example-string-value\",\n Type = \"STRING_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = true,\n Searchable = true,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n ValuesImportanceMap = null,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"example-long-value\",\n Type = \"LONG_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = true,\n Searchable = false,\n Sortable = true,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n RankOrder = \"ASCENDING\",\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"example-string-list-value\",\n Type = \"STRING_LIST_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = true,\n Searchable = true,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Importance = 1,\n },\n },\n new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateArgs\n {\n Name = \"example-date-value\",\n Type = \"DATE_VALUE\",\n Search = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs\n {\n Displayable = true,\n Facetable = true,\n Searchable = false,\n Sortable = false,\n },\n Relevance = new Aws.Kendra.Inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs\n {\n Freshness = false,\n Importance = 1,\n Duration = \"25920000s\",\n RankOrder = \"ASCENDING\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tDocumentMetadataConfigurationUpdates: kendra.IndexDocumentMetadataConfigurationUpdateArray{\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_authors\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_LIST_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_category\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_created_at\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_data_source_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_document_title\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(true),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(2),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_excerpt_page_number\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(2),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_faq_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_file_type\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_language_code\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_last_updated_at\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_source_uri\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_tenant_id\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_version\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"_view_count\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(false),\n\t\t\t\t\t\tFacetable: pulumi.Bool(false),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"example-string-value\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(true),\n\t\t\t\t\t\tSearchable: pulumi.Bool(true),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tValuesImportanceMap: pulumi.IntMap{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"example-long-value\"),\n\t\t\t\t\tType: pulumi.String(\"LONG_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(true),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"example-string-list-value\"),\n\t\t\t\t\tType: pulumi.String(\"STRING_LIST_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(true),\n\t\t\t\t\t\tSearchable: pulumi.Bool(true),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026kendra.IndexDocumentMetadataConfigurationUpdateArgs{\n\t\t\t\t\tName: pulumi.String(\"example-date-value\"),\n\t\t\t\t\tType: pulumi.String(\"DATE_VALUE\"),\n\t\t\t\t\tSearch: \u0026kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{\n\t\t\t\t\t\tDisplayable: pulumi.Bool(true),\n\t\t\t\t\t\tFacetable: pulumi.Bool(true),\n\t\t\t\t\t\tSearchable: pulumi.Bool(false),\n\t\t\t\t\t\tSortable: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\tRelevance: \u0026kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{\n\t\t\t\t\t\tFreshness: pulumi.Bool(false),\n\t\t\t\t\t\tImportance: pulumi.Int(1),\n\t\t\t\t\t\tDuration: pulumi.String(\"25920000s\"),\n\t\t\t\t\t\tRankOrder: pulumi.String(\"ASCENDING\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateSearchArgs;\nimport com.pulumi.aws.kendra.inputs.IndexDocumentMetadataConfigurationUpdateRelevanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(this_.arn())\n .documentMetadataConfigurationUpdates( \n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_authors\")\n .type(\"STRING_LIST_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_category\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_created_at\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_data_source_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_document_title\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(false)\n .searchable(true)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(2)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_excerpt_page_number\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(2)\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_faq_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_file_type\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_language_code\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_last_updated_at\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_source_uri\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(false)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_tenant_id\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_version\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"_view_count\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(false)\n .facetable(false)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"example-string-value\")\n .type(\"STRING_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(true)\n .searchable(true)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .valuesImportanceMap()\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"example-long-value\")\n .type(\"LONG_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(true)\n .searchable(false)\n .sortable(true)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .rankOrder(\"ASCENDING\")\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"example-string-list-value\")\n .type(\"STRING_LIST_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(true)\n .searchable(true)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .importance(1)\n .build())\n .build(),\n IndexDocumentMetadataConfigurationUpdateArgs.builder()\n .name(\"example-date-value\")\n .type(\"DATE_VALUE\")\n .search(IndexDocumentMetadataConfigurationUpdateSearchArgs.builder()\n .displayable(true)\n .facetable(true)\n .searchable(false)\n .sortable(false)\n .build())\n .relevance(IndexDocumentMetadataConfigurationUpdateRelevanceArgs.builder()\n .freshness(false)\n .importance(1)\n .duration(\"25920000s\")\n .rankOrder(\"ASCENDING\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${this.arn}\n documentMetadataConfigurationUpdates:\n - name: _authors\n type: STRING_LIST_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 1\n - name: _category\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _created_at\n type: DATE_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n - name: _data_source_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _document_title\n type: STRING_VALUE\n search:\n displayable: true\n facetable: false\n searchable: true\n sortable: true\n relevance:\n importance: 2\n valuesImportanceMap: {}\n - name: _excerpt_page_number\n type: LONG_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 2\n rankOrder: ASCENDING\n - name: _faq_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _file_type\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _language_code\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _last_updated_at\n type: DATE_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n - name: _source_uri\n type: STRING_VALUE\n search:\n displayable: true\n facetable: false\n searchable: false\n sortable: false\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _tenant_id\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _version\n type: STRING_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: _view_count\n type: LONG_VALUE\n search:\n displayable: false\n facetable: false\n searchable: false\n sortable: true\n relevance:\n importance: 1\n rankOrder: ASCENDING\n - name: example-string-value\n type: STRING_VALUE\n search:\n displayable: true\n facetable: true\n searchable: true\n sortable: true\n relevance:\n importance: 1\n valuesImportanceMap: {}\n - name: example-long-value\n type: LONG_VALUE\n search:\n displayable: true\n facetable: true\n searchable: false\n sortable: true\n relevance:\n importance: 1\n rankOrder: ASCENDING\n - name: example-string-list-value\n type: STRING_LIST_VALUE\n search:\n displayable: true\n facetable: true\n searchable: true\n sortable: false\n relevance:\n importance: 1\n - name: example-date-value\n type: DATE_VALUE\n search:\n displayable: true\n facetable: true\n searchable: false\n sortable: false\n relevance:\n freshness: false\n importance: 1\n duration: 25920000s\n rankOrder: ASCENDING\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With JSON token type configuration\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.kendra.Index(\"example\", {\n name: \"example\",\n roleArn: _this.arn,\n userTokenConfigurations: {\n jsonTokenTypeConfiguration: {\n groupAttributeField: \"groups\",\n userNameAttributeField: \"username\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.kendra.Index(\"example\",\n name=\"example\",\n role_arn=this[\"arn\"],\n user_token_configurations={\n \"json_token_type_configuration\": {\n \"group_attribute_field\": \"groups\",\n \"user_name_attribute_field\": \"username\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Kendra.Index(\"example\", new()\n {\n Name = \"example\",\n RoleArn = @this.Arn,\n UserTokenConfigurations = new Aws.Kendra.Inputs.IndexUserTokenConfigurationsArgs\n {\n JsonTokenTypeConfiguration = new Aws.Kendra.Inputs.IndexUserTokenConfigurationsJsonTokenTypeConfigurationArgs\n {\n GroupAttributeField = \"groups\",\n UserNameAttributeField = \"username\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := kendra.NewIndex(ctx, \"example\", \u0026kendra.IndexArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tRoleArn: pulumi.Any(this.Arn),\n\t\t\tUserTokenConfigurations: \u0026kendra.IndexUserTokenConfigurationsArgs{\n\t\t\t\tJsonTokenTypeConfiguration: \u0026kendra.IndexUserTokenConfigurationsJsonTokenTypeConfigurationArgs{\n\t\t\t\t\tGroupAttributeField: pulumi.String(\"groups\"),\n\t\t\t\t\tUserNameAttributeField: pulumi.String(\"username\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kendra.Index;\nimport com.pulumi.aws.kendra.IndexArgs;\nimport com.pulumi.aws.kendra.inputs.IndexUserTokenConfigurationsArgs;\nimport com.pulumi.aws.kendra.inputs.IndexUserTokenConfigurationsJsonTokenTypeConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Index(\"example\", IndexArgs.builder()\n .name(\"example\")\n .roleArn(this_.arn())\n .userTokenConfigurations(IndexUserTokenConfigurationsArgs.builder()\n .jsonTokenTypeConfiguration(IndexUserTokenConfigurationsJsonTokenTypeConfigurationArgs.builder()\n .groupAttributeField(\"groups\")\n .userNameAttributeField(\"username\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kendra:Index\n properties:\n name: example\n roleArn: ${this.arn}\n userTokenConfigurations:\n jsonTokenTypeConfiguration:\n groupAttributeField: groups\n userNameAttributeField: username\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Amazon Kendra Indexes using its `id`. For example:\n\n```sh\n$ pulumi import aws:kendra/index:Index example 12345678-1234-5678-9123-123456789123\n```\n", "properties": { "arn": { "type": "string", @@ -286460,7 +286460,7 @@ } }, "aws:kms/key:Key": { - "description": "Manages a single-Region or multi-Region primary KMS key.\n\n\u003e **NOTE on KMS Key Policy:** KMS Key Policy can be configured in either the standalone resource `aws.kms.KeyPolicy`\nor with the parameter `policy` in this resource.\nConfiguring with both will cause inconsistencies and may overwrite configuration.\n\n## Example Usage\n\n### Symmetric Encryption KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"An example symmetric encryption KMS key\",\n enableKeyRotation: true,\n deletionWindowInDays: 20,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow administration of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:user/Alice`),\n },\n Action: [\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n Resource: \"*\",\n },\n {\n Sid: \"Allow use of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:user/Bob`),\n },\n Action: [\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n ],\n Resource: \"*\",\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"An example symmetric encryption KMS key\",\n enable_key_rotation=True,\n deletion_window_in_days=20,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow administration of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:user/Alice\",\n },\n \"Action\": [\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:user/Bob\",\n },\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n ],\n \"Resource\": \"*\",\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"An example symmetric encryption KMS key\",\n EnableKeyRotation = true,\n DeletionWindowInDays = 20,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow administration of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:user/Alice\",\n },\n [\"Action\"] = new[]\n {\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow use of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:user/Bob\",\n },\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n },\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow administration of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:user/Alice\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:ReplicateKey\",\n\t\t\t\t\t\t\"kms:Create*\",\n\t\t\t\t\t\t\"kms:Describe*\",\n\t\t\t\t\t\t\"kms:Enable*\",\n\t\t\t\t\t\t\"kms:List*\",\n\t\t\t\t\t\t\"kms:Put*\",\n\t\t\t\t\t\t\"kms:Update*\",\n\t\t\t\t\t\t\"kms:Revoke*\",\n\t\t\t\t\t\t\"kms:Disable*\",\n\t\t\t\t\t\t\"kms:Get*\",\n\t\t\t\t\t\t\"kms:Delete*\",\n\t\t\t\t\t\t\"kms:ScheduleKeyDeletion\",\n\t\t\t\t\t\t\"kms:CancelKeyDeletion\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow use of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:user/Bob\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:Encrypt\",\n\t\t\t\t\t\t\"kms:Decrypt\",\n\t\t\t\t\t\t\"kms:ReEncrypt*\",\n\t\t\t\t\t\t\"kms:GenerateDataKey\",\n\t\t\t\t\t\t\"kms:GenerateDataKeyWithoutPlaintext\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"An example symmetric encryption KMS key\"),\n\t\t\tEnableKeyRotation: pulumi.Bool(true),\n\t\t\tDeletionWindowInDays: pulumi.Int(20),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"An example symmetric encryption KMS key\")\n .enableKeyRotation(true)\n .deletionWindowInDays(20)\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow administration of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:user/Alice\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:ReplicateKey\", \n \"kms:Create*\", \n \"kms:Describe*\", \n \"kms:Enable*\", \n \"kms:List*\", \n \"kms:Put*\", \n \"kms:Update*\", \n \"kms:Revoke*\", \n \"kms:Disable*\", \n \"kms:Get*\", \n \"kms:Delete*\", \n \"kms:ScheduleKeyDeletion\", \n \"kms:CancelKeyDeletion\"\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow use of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:user/Bob\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:Encrypt\", \n \"kms:Decrypt\", \n \"kms:ReEncrypt*\", \n \"kms:GenerateDataKey\", \n \"kms:GenerateDataKeyWithoutPlaintext\"\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: An example symmetric encryption KMS key\n enableKeyRotation: true\n deletionWindowInDays: 20\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\n - Sid: Allow administration of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:user/Alice\n Action:\n - kms:ReplicateKey\n - kms:Create*\n - kms:Describe*\n - kms:Enable*\n - kms:List*\n - kms:Put*\n - kms:Update*\n - kms:Revoke*\n - kms:Disable*\n - kms:Get*\n - kms:Delete*\n - kms:ScheduleKeyDeletion\n - kms:CancelKeyDeletion\n Resource: '*'\n - Sid: Allow use of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:user/Bob\n Action:\n - kms:DescribeKey\n - kms:Encrypt\n - kms:Decrypt\n - kms:ReEncrypt*\n - kms:GenerateDataKey\n - kms:GenerateDataKeyWithoutPlaintext\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Symmetric Encryption KMS Key With Standalone Policy Resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"An example symmetric encryption KMS key\",\n enableKeyRotation: true,\n deletionWindowInDays: 20,\n});\nconst exampleKeyPolicy = new aws.kms.KeyPolicy(\"example\", {\n keyId: example.id,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [{\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"An example symmetric encryption KMS key\",\n enable_key_rotation=True,\n deletion_window_in_days=20)\nexample_key_policy = aws.kms.KeyPolicy(\"example\",\n key_id=example.id,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [{\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"An example symmetric encryption KMS key\",\n EnableKeyRotation = true,\n DeletionWindowInDays = 20,\n });\n\n var exampleKeyPolicy = new Aws.Kms.KeyPolicy(\"example\", new()\n {\n KeyId = example.Id,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"An example symmetric encryption KMS key\"),\n\t\t\tEnableKeyRotation: pulumi.Bool(true),\n\t\t\tDeletionWindowInDays: pulumi.Int(20),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKeyPolicy(ctx, \"example\", \u0026kms.KeyPolicyArgs{\n\t\t\tKeyId: example.ID(),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.kms.KeyPolicy;\nimport com.pulumi.aws.kms.KeyPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"An example symmetric encryption KMS key\")\n .enableKeyRotation(true)\n .deletionWindowInDays(20)\n .build());\n\n var exampleKeyPolicy = new KeyPolicy(\"exampleKeyPolicy\", KeyPolicyArgs.builder()\n .keyId(example.id())\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: An example symmetric encryption KMS key\n enableKeyRotation: true\n deletionWindowInDays: 20\n exampleKeyPolicy:\n type: aws:kms:KeyPolicy\n name: example\n properties:\n keyId: ${example.id}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Asymmetric KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"RSA-3072 asymmetric KMS key for signing and verification\",\n customerMasterKeySpec: \"RSA_3072\",\n keyUsage: \"SIGN_VERIFY\",\n enableKeyRotation: false,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow administration of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:role/Admin`),\n },\n Action: [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n Resource: \"*\",\n },\n {\n Sid: \"Allow use of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:role/Developer`),\n },\n Action: [\n \"kms:Sign\",\n \"kms:Verify\",\n \"kms:DescribeKey\",\n ],\n Resource: \"*\",\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"RSA-3072 asymmetric KMS key for signing and verification\",\n customer_master_key_spec=\"RSA_3072\",\n key_usage=\"SIGN_VERIFY\",\n enable_key_rotation=False,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow administration of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:role/Admin\",\n },\n \"Action\": [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:role/Developer\",\n },\n \"Action\": [\n \"kms:Sign\",\n \"kms:Verify\",\n \"kms:DescribeKey\",\n ],\n \"Resource\": \"*\",\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"RSA-3072 asymmetric KMS key for signing and verification\",\n CustomerMasterKeySpec = \"RSA_3072\",\n KeyUsage = \"SIGN_VERIFY\",\n EnableKeyRotation = false,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow administration of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:role/Admin\",\n },\n [\"Action\"] = new[]\n {\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow use of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:role/Developer\",\n },\n [\"Action\"] = new[]\n {\n \"kms:Sign\",\n \"kms:Verify\",\n \"kms:DescribeKey\",\n },\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow administration of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:role/Admin\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:Create*\",\n\t\t\t\t\t\t\"kms:Describe*\",\n\t\t\t\t\t\t\"kms:Enable*\",\n\t\t\t\t\t\t\"kms:List*\",\n\t\t\t\t\t\t\"kms:Put*\",\n\t\t\t\t\t\t\"kms:Update*\",\n\t\t\t\t\t\t\"kms:Revoke*\",\n\t\t\t\t\t\t\"kms:Disable*\",\n\t\t\t\t\t\t\"kms:Get*\",\n\t\t\t\t\t\t\"kms:Delete*\",\n\t\t\t\t\t\t\"kms:ScheduleKeyDeletion\",\n\t\t\t\t\t\t\"kms:CancelKeyDeletion\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow use of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:role/Developer\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:Sign\",\n\t\t\t\t\t\t\"kms:Verify\",\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"RSA-3072 asymmetric KMS key for signing and verification\"),\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"RSA_3072\"),\n\t\t\tKeyUsage: pulumi.String(\"SIGN_VERIFY\"),\n\t\t\tEnableKeyRotation: pulumi.Bool(false),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"RSA-3072 asymmetric KMS key for signing and verification\")\n .customerMasterKeySpec(\"RSA_3072\")\n .keyUsage(\"SIGN_VERIFY\")\n .enableKeyRotation(false)\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow administration of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:role/Admin\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:Create*\", \n \"kms:Describe*\", \n \"kms:Enable*\", \n \"kms:List*\", \n \"kms:Put*\", \n \"kms:Update*\", \n \"kms:Revoke*\", \n \"kms:Disable*\", \n \"kms:Get*\", \n \"kms:Delete*\", \n \"kms:ScheduleKeyDeletion\", \n \"kms:CancelKeyDeletion\"\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow use of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:role/Developer\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:Sign\", \n \"kms:Verify\", \n \"kms:DescribeKey\"\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: RSA-3072 asymmetric KMS key for signing and verification\n customerMasterKeySpec: RSA_3072\n keyUsage: SIGN_VERIFY\n enableKeyRotation: false\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\n - Sid: Allow administration of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:role/Admin\n Action:\n - kms:Create*\n - kms:Describe*\n - kms:Enable*\n - kms:List*\n - kms:Put*\n - kms:Update*\n - kms:Revoke*\n - kms:Disable*\n - kms:Get*\n - kms:Delete*\n - kms:ScheduleKeyDeletion\n - kms:CancelKeyDeletion\n Resource: '*'\n - Sid: Allow use of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:role/Developer\n Action:\n - kms:Sign\n - kms:Verify\n - kms:DescribeKey\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### HMAC KMS key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"HMAC_384 key for tokens\",\n customerMasterKeySpec: \"HMAC_384\",\n keyUsage: \"GENERATE_VERIFY_MAC\",\n enableKeyRotation: false,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow administration of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:role/Admin`),\n },\n Action: [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n Resource: \"*\",\n },\n {\n Sid: \"Allow use of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:role/Developer`),\n },\n Action: [\n \"kms:GenerateMac\",\n \"kms:VerifyMac\",\n \"kms:DescribeKey\",\n ],\n Resource: \"*\",\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"HMAC_384 key for tokens\",\n customer_master_key_spec=\"HMAC_384\",\n key_usage=\"GENERATE_VERIFY_MAC\",\n enable_key_rotation=False,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow administration of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:role/Admin\",\n },\n \"Action\": [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:role/Developer\",\n },\n \"Action\": [\n \"kms:GenerateMac\",\n \"kms:VerifyMac\",\n \"kms:DescribeKey\",\n ],\n \"Resource\": \"*\",\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"HMAC_384 key for tokens\",\n CustomerMasterKeySpec = \"HMAC_384\",\n KeyUsage = \"GENERATE_VERIFY_MAC\",\n EnableKeyRotation = false,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow administration of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:role/Admin\",\n },\n [\"Action\"] = new[]\n {\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow use of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:role/Developer\",\n },\n [\"Action\"] = new[]\n {\n \"kms:GenerateMac\",\n \"kms:VerifyMac\",\n \"kms:DescribeKey\",\n },\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow administration of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:role/Admin\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:Create*\",\n\t\t\t\t\t\t\"kms:Describe*\",\n\t\t\t\t\t\t\"kms:Enable*\",\n\t\t\t\t\t\t\"kms:List*\",\n\t\t\t\t\t\t\"kms:Put*\",\n\t\t\t\t\t\t\"kms:Update*\",\n\t\t\t\t\t\t\"kms:Revoke*\",\n\t\t\t\t\t\t\"kms:Disable*\",\n\t\t\t\t\t\t\"kms:Get*\",\n\t\t\t\t\t\t\"kms:Delete*\",\n\t\t\t\t\t\t\"kms:ScheduleKeyDeletion\",\n\t\t\t\t\t\t\"kms:CancelKeyDeletion\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow use of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:role/Developer\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:GenerateMac\",\n\t\t\t\t\t\t\"kms:VerifyMac\",\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"HMAC_384 key for tokens\"),\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"HMAC_384\"),\n\t\t\tKeyUsage: pulumi.String(\"GENERATE_VERIFY_MAC\"),\n\t\t\tEnableKeyRotation: pulumi.Bool(false),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"HMAC_384 key for tokens\")\n .customerMasterKeySpec(\"HMAC_384\")\n .keyUsage(\"GENERATE_VERIFY_MAC\")\n .enableKeyRotation(false)\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow administration of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:role/Admin\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:Create*\", \n \"kms:Describe*\", \n \"kms:Enable*\", \n \"kms:List*\", \n \"kms:Put*\", \n \"kms:Update*\", \n \"kms:Revoke*\", \n \"kms:Disable*\", \n \"kms:Get*\", \n \"kms:Delete*\", \n \"kms:ScheduleKeyDeletion\", \n \"kms:CancelKeyDeletion\"\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow use of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:role/Developer\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:GenerateMac\", \n \"kms:VerifyMac\", \n \"kms:DescribeKey\"\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: HMAC_384 key for tokens\n customerMasterKeySpec: HMAC_384\n keyUsage: GENERATE_VERIFY_MAC\n enableKeyRotation: false\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\n - Sid: Allow administration of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:role/Admin\n Action:\n - kms:Create*\n - kms:Describe*\n - kms:Enable*\n - kms:List*\n - kms:Put*\n - kms:Update*\n - kms:Revoke*\n - kms:Disable*\n - kms:Get*\n - kms:Delete*\n - kms:ScheduleKeyDeletion\n - kms:CancelKeyDeletion\n Resource: '*'\n - Sid: Allow use of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:role/Developer\n Action:\n - kms:GenerateMac\n - kms:VerifyMac\n - kms:DescribeKey\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Multi-Region Primary Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"An example multi-Region primary key\",\n multiRegion: true,\n enableKeyRotation: true,\n deletionWindowInDays: 10,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow administration of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:user/Alice`),\n },\n Action: [\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n Resource: \"*\",\n },\n {\n Sid: \"Allow use of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:user/Bob`),\n },\n Action: [\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n ],\n Resource: \"*\",\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"An example multi-Region primary key\",\n multi_region=True,\n enable_key_rotation=True,\n deletion_window_in_days=10,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow administration of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:user/Alice\",\n },\n \"Action\": [\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:user/Bob\",\n },\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n ],\n \"Resource\": \"*\",\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"An example multi-Region primary key\",\n MultiRegion = true,\n EnableKeyRotation = true,\n DeletionWindowInDays = 10,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow administration of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:user/Alice\",\n },\n [\"Action\"] = new[]\n {\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow use of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:user/Bob\",\n },\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n },\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow administration of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:user/Alice\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:ReplicateKey\",\n\t\t\t\t\t\t\"kms:Create*\",\n\t\t\t\t\t\t\"kms:Describe*\",\n\t\t\t\t\t\t\"kms:Enable*\",\n\t\t\t\t\t\t\"kms:List*\",\n\t\t\t\t\t\t\"kms:Put*\",\n\t\t\t\t\t\t\"kms:Update*\",\n\t\t\t\t\t\t\"kms:Revoke*\",\n\t\t\t\t\t\t\"kms:Disable*\",\n\t\t\t\t\t\t\"kms:Get*\",\n\t\t\t\t\t\t\"kms:Delete*\",\n\t\t\t\t\t\t\"kms:ScheduleKeyDeletion\",\n\t\t\t\t\t\t\"kms:CancelKeyDeletion\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow use of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:user/Bob\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:Encrypt\",\n\t\t\t\t\t\t\"kms:Decrypt\",\n\t\t\t\t\t\t\"kms:ReEncrypt*\",\n\t\t\t\t\t\t\"kms:GenerateDataKey\",\n\t\t\t\t\t\t\"kms:GenerateDataKeyWithoutPlaintext\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"An example multi-Region primary key\"),\n\t\t\tMultiRegion: pulumi.Bool(true),\n\t\t\tEnableKeyRotation: pulumi.Bool(true),\n\t\t\tDeletionWindowInDays: pulumi.Int(10),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"An example multi-Region primary key\")\n .multiRegion(true)\n .enableKeyRotation(true)\n .deletionWindowInDays(10)\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow administration of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:user/Alice\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:ReplicateKey\", \n \"kms:Create*\", \n \"kms:Describe*\", \n \"kms:Enable*\", \n \"kms:List*\", \n \"kms:Put*\", \n \"kms:Update*\", \n \"kms:Revoke*\", \n \"kms:Disable*\", \n \"kms:Get*\", \n \"kms:Delete*\", \n \"kms:ScheduleKeyDeletion\", \n \"kms:CancelKeyDeletion\"\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow use of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:user/Bob\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:Encrypt\", \n \"kms:Decrypt\", \n \"kms:ReEncrypt*\", \n \"kms:GenerateDataKey\", \n \"kms:GenerateDataKeyWithoutPlaintext\"\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: An example multi-Region primary key\n multiRegion: true\n enableKeyRotation: true\n deletionWindowInDays: 10\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\n - Sid: Allow administration of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:user/Alice\n Action:\n - kms:ReplicateKey\n - kms:Create*\n - kms:Describe*\n - kms:Enable*\n - kms:List*\n - kms:Put*\n - kms:Update*\n - kms:Revoke*\n - kms:Disable*\n - kms:Get*\n - kms:Delete*\n - kms:ScheduleKeyDeletion\n - kms:CancelKeyDeletion\n Resource: '*'\n - Sid: Allow use of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:user/Bob\n Action:\n - kms:DescribeKey\n - kms:Encrypt\n - kms:Decrypt\n - kms:ReEncrypt*\n - kms:GenerateDataKey\n - kms:GenerateDataKeyWithoutPlaintext\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import KMS Keys using the `id`. For example:\n\n```sh\n$ pulumi import aws:kms/key:Key a 1234abcd-12ab-34cd-56ef-1234567890ab\n```\n", + "description": "Manages a single-Region or multi-Region primary KMS key.\n\n\u003e **NOTE on KMS Key Policy:** KMS Key Policy can be configured in either the standalone resource `aws.kms.KeyPolicy`\nor with the parameter `policy` in this resource.\nConfiguring with both will cause inconsistencies and may overwrite configuration.\n\n## Example Usage\n\n### Symmetric Encryption KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"An example symmetric encryption KMS key\",\n enableKeyRotation: true,\n deletionWindowInDays: 20,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow administration of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:user/Alice`),\n },\n Action: [\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n Resource: \"*\",\n },\n {\n Sid: \"Allow use of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:user/Bob`),\n },\n Action: [\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n ],\n Resource: \"*\",\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"An example symmetric encryption KMS key\",\n enable_key_rotation=True,\n deletion_window_in_days=20,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow administration of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:user/Alice\",\n },\n \"Action\": [\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:user/Bob\",\n },\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n ],\n \"Resource\": \"*\",\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"An example symmetric encryption KMS key\",\n EnableKeyRotation = true,\n DeletionWindowInDays = 20,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow administration of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:user/Alice\",\n },\n [\"Action\"] = new[]\n {\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow use of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:user/Bob\",\n },\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n },\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow administration of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:user/Alice\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:ReplicateKey\",\n\t\t\t\t\t\t\"kms:Create*\",\n\t\t\t\t\t\t\"kms:Describe*\",\n\t\t\t\t\t\t\"kms:Enable*\",\n\t\t\t\t\t\t\"kms:List*\",\n\t\t\t\t\t\t\"kms:Put*\",\n\t\t\t\t\t\t\"kms:Update*\",\n\t\t\t\t\t\t\"kms:Revoke*\",\n\t\t\t\t\t\t\"kms:Disable*\",\n\t\t\t\t\t\t\"kms:Get*\",\n\t\t\t\t\t\t\"kms:Delete*\",\n\t\t\t\t\t\t\"kms:ScheduleKeyDeletion\",\n\t\t\t\t\t\t\"kms:CancelKeyDeletion\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow use of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:user/Bob\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:Encrypt\",\n\t\t\t\t\t\t\"kms:Decrypt\",\n\t\t\t\t\t\t\"kms:ReEncrypt*\",\n\t\t\t\t\t\t\"kms:GenerateDataKey\",\n\t\t\t\t\t\t\"kms:GenerateDataKeyWithoutPlaintext\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"An example symmetric encryption KMS key\"),\n\t\t\tEnableKeyRotation: pulumi.Bool(true),\n\t\t\tDeletionWindowInDays: pulumi.Int(20),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"An example symmetric encryption KMS key\")\n .enableKeyRotation(true)\n .deletionWindowInDays(20)\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow administration of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:user/Alice\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:ReplicateKey\", \n \"kms:Create*\", \n \"kms:Describe*\", \n \"kms:Enable*\", \n \"kms:List*\", \n \"kms:Put*\", \n \"kms:Update*\", \n \"kms:Revoke*\", \n \"kms:Disable*\", \n \"kms:Get*\", \n \"kms:Delete*\", \n \"kms:ScheduleKeyDeletion\", \n \"kms:CancelKeyDeletion\"\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow use of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:user/Bob\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:Encrypt\", \n \"kms:Decrypt\", \n \"kms:ReEncrypt*\", \n \"kms:GenerateDataKey\", \n \"kms:GenerateDataKeyWithoutPlaintext\"\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: An example symmetric encryption KMS key\n enableKeyRotation: true\n deletionWindowInDays: 20\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\n - Sid: Allow administration of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:user/Alice\n Action:\n - kms:ReplicateKey\n - kms:Create*\n - kms:Describe*\n - kms:Enable*\n - kms:List*\n - kms:Put*\n - kms:Update*\n - kms:Revoke*\n - kms:Disable*\n - kms:Get*\n - kms:Delete*\n - kms:ScheduleKeyDeletion\n - kms:CancelKeyDeletion\n Resource: '*'\n - Sid: Allow use of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:user/Bob\n Action:\n - kms:DescribeKey\n - kms:Encrypt\n - kms:Decrypt\n - kms:ReEncrypt*\n - kms:GenerateDataKey\n - kms:GenerateDataKeyWithoutPlaintext\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Symmetric Encryption KMS Key With Standalone Policy Resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"An example symmetric encryption KMS key\",\n enableKeyRotation: true,\n deletionWindowInDays: 20,\n});\nconst exampleKeyPolicy = new aws.kms.KeyPolicy(\"example\", {\n keyId: example.id,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [{\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"An example symmetric encryption KMS key\",\n enable_key_rotation=True,\n deletion_window_in_days=20)\nexample_key_policy = aws.kms.KeyPolicy(\"example\",\n key_id=example.id,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [{\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"An example symmetric encryption KMS key\",\n EnableKeyRotation = true,\n DeletionWindowInDays = 20,\n });\n\n var exampleKeyPolicy = new Aws.Kms.KeyPolicy(\"example\", new()\n {\n KeyId = example.Id,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"An example symmetric encryption KMS key\"),\n\t\t\tEnableKeyRotation: pulumi.Bool(true),\n\t\t\tDeletionWindowInDays: pulumi.Int(20),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKeyPolicy(ctx, \"example\", \u0026kms.KeyPolicyArgs{\n\t\t\tKeyId: example.ID(),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.kms.KeyPolicy;\nimport com.pulumi.aws.kms.KeyPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"An example symmetric encryption KMS key\")\n .enableKeyRotation(true)\n .deletionWindowInDays(20)\n .build());\n\n var exampleKeyPolicy = new KeyPolicy(\"exampleKeyPolicy\", KeyPolicyArgs.builder()\n .keyId(example.id())\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: An example symmetric encryption KMS key\n enableKeyRotation: true\n deletionWindowInDays: 20\n exampleKeyPolicy:\n type: aws:kms:KeyPolicy\n name: example\n properties:\n keyId: ${example.id}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Asymmetric KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"RSA-3072 asymmetric KMS key for signing and verification\",\n customerMasterKeySpec: \"RSA_3072\",\n keyUsage: \"SIGN_VERIFY\",\n enableKeyRotation: false,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow administration of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:role/Admin`),\n },\n Action: [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n Resource: \"*\",\n },\n {\n Sid: \"Allow use of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:role/Developer`),\n },\n Action: [\n \"kms:Sign\",\n \"kms:Verify\",\n \"kms:DescribeKey\",\n ],\n Resource: \"*\",\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"RSA-3072 asymmetric KMS key for signing and verification\",\n customer_master_key_spec=\"RSA_3072\",\n key_usage=\"SIGN_VERIFY\",\n enable_key_rotation=False,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow administration of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:role/Admin\",\n },\n \"Action\": [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:role/Developer\",\n },\n \"Action\": [\n \"kms:Sign\",\n \"kms:Verify\",\n \"kms:DescribeKey\",\n ],\n \"Resource\": \"*\",\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"RSA-3072 asymmetric KMS key for signing and verification\",\n CustomerMasterKeySpec = \"RSA_3072\",\n KeyUsage = \"SIGN_VERIFY\",\n EnableKeyRotation = false,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow administration of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:role/Admin\",\n },\n [\"Action\"] = new[]\n {\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow use of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:role/Developer\",\n },\n [\"Action\"] = new[]\n {\n \"kms:Sign\",\n \"kms:Verify\",\n \"kms:DescribeKey\",\n },\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow administration of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:role/Admin\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:Create*\",\n\t\t\t\t\t\t\"kms:Describe*\",\n\t\t\t\t\t\t\"kms:Enable*\",\n\t\t\t\t\t\t\"kms:List*\",\n\t\t\t\t\t\t\"kms:Put*\",\n\t\t\t\t\t\t\"kms:Update*\",\n\t\t\t\t\t\t\"kms:Revoke*\",\n\t\t\t\t\t\t\"kms:Disable*\",\n\t\t\t\t\t\t\"kms:Get*\",\n\t\t\t\t\t\t\"kms:Delete*\",\n\t\t\t\t\t\t\"kms:ScheduleKeyDeletion\",\n\t\t\t\t\t\t\"kms:CancelKeyDeletion\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow use of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:role/Developer\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:Sign\",\n\t\t\t\t\t\t\"kms:Verify\",\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"RSA-3072 asymmetric KMS key for signing and verification\"),\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"RSA_3072\"),\n\t\t\tKeyUsage: pulumi.String(\"SIGN_VERIFY\"),\n\t\t\tEnableKeyRotation: pulumi.Bool(false),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"RSA-3072 asymmetric KMS key for signing and verification\")\n .customerMasterKeySpec(\"RSA_3072\")\n .keyUsage(\"SIGN_VERIFY\")\n .enableKeyRotation(false)\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow administration of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:role/Admin\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:Create*\", \n \"kms:Describe*\", \n \"kms:Enable*\", \n \"kms:List*\", \n \"kms:Put*\", \n \"kms:Update*\", \n \"kms:Revoke*\", \n \"kms:Disable*\", \n \"kms:Get*\", \n \"kms:Delete*\", \n \"kms:ScheduleKeyDeletion\", \n \"kms:CancelKeyDeletion\"\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow use of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:role/Developer\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:Sign\", \n \"kms:Verify\", \n \"kms:DescribeKey\"\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: RSA-3072 asymmetric KMS key for signing and verification\n customerMasterKeySpec: RSA_3072\n keyUsage: SIGN_VERIFY\n enableKeyRotation: false\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\n - Sid: Allow administration of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:role/Admin\n Action:\n - kms:Create*\n - kms:Describe*\n - kms:Enable*\n - kms:List*\n - kms:Put*\n - kms:Update*\n - kms:Revoke*\n - kms:Disable*\n - kms:Get*\n - kms:Delete*\n - kms:ScheduleKeyDeletion\n - kms:CancelKeyDeletion\n Resource: '*'\n - Sid: Allow use of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:role/Developer\n Action:\n - kms:Sign\n - kms:Verify\n - kms:DescribeKey\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### HMAC KMS key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"HMAC_384 key for tokens\",\n customerMasterKeySpec: \"HMAC_384\",\n keyUsage: \"GENERATE_VERIFY_MAC\",\n enableKeyRotation: false,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow administration of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:role/Admin`),\n },\n Action: [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n Resource: \"*\",\n },\n {\n Sid: \"Allow use of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:role/Developer`),\n },\n Action: [\n \"kms:GenerateMac\",\n \"kms:VerifyMac\",\n \"kms:DescribeKey\",\n ],\n Resource: \"*\",\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"HMAC_384 key for tokens\",\n customer_master_key_spec=\"HMAC_384\",\n key_usage=\"GENERATE_VERIFY_MAC\",\n enable_key_rotation=False,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow administration of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:role/Admin\",\n },\n \"Action\": [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:role/Developer\",\n },\n \"Action\": [\n \"kms:GenerateMac\",\n \"kms:VerifyMac\",\n \"kms:DescribeKey\",\n ],\n \"Resource\": \"*\",\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"HMAC_384 key for tokens\",\n CustomerMasterKeySpec = \"HMAC_384\",\n KeyUsage = \"GENERATE_VERIFY_MAC\",\n EnableKeyRotation = false,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow administration of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:role/Admin\",\n },\n [\"Action\"] = new[]\n {\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow use of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:role/Developer\",\n },\n [\"Action\"] = new[]\n {\n \"kms:GenerateMac\",\n \"kms:VerifyMac\",\n \"kms:DescribeKey\",\n },\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow administration of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:role/Admin\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:Create*\",\n\t\t\t\t\t\t\"kms:Describe*\",\n\t\t\t\t\t\t\"kms:Enable*\",\n\t\t\t\t\t\t\"kms:List*\",\n\t\t\t\t\t\t\"kms:Put*\",\n\t\t\t\t\t\t\"kms:Update*\",\n\t\t\t\t\t\t\"kms:Revoke*\",\n\t\t\t\t\t\t\"kms:Disable*\",\n\t\t\t\t\t\t\"kms:Get*\",\n\t\t\t\t\t\t\"kms:Delete*\",\n\t\t\t\t\t\t\"kms:ScheduleKeyDeletion\",\n\t\t\t\t\t\t\"kms:CancelKeyDeletion\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow use of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:role/Developer\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:GenerateMac\",\n\t\t\t\t\t\t\"kms:VerifyMac\",\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"HMAC_384 key for tokens\"),\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"HMAC_384\"),\n\t\t\tKeyUsage: pulumi.String(\"GENERATE_VERIFY_MAC\"),\n\t\t\tEnableKeyRotation: pulumi.Bool(false),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"HMAC_384 key for tokens\")\n .customerMasterKeySpec(\"HMAC_384\")\n .keyUsage(\"GENERATE_VERIFY_MAC\")\n .enableKeyRotation(false)\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow administration of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:role/Admin\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:Create*\", \n \"kms:Describe*\", \n \"kms:Enable*\", \n \"kms:List*\", \n \"kms:Put*\", \n \"kms:Update*\", \n \"kms:Revoke*\", \n \"kms:Disable*\", \n \"kms:Get*\", \n \"kms:Delete*\", \n \"kms:ScheduleKeyDeletion\", \n \"kms:CancelKeyDeletion\"\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow use of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:role/Developer\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:GenerateMac\", \n \"kms:VerifyMac\", \n \"kms:DescribeKey\"\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: HMAC_384 key for tokens\n customerMasterKeySpec: HMAC_384\n keyUsage: GENERATE_VERIFY_MAC\n enableKeyRotation: false\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\n - Sid: Allow administration of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:role/Admin\n Action:\n - kms:Create*\n - kms:Describe*\n - kms:Enable*\n - kms:List*\n - kms:Put*\n - kms:Update*\n - kms:Revoke*\n - kms:Disable*\n - kms:Get*\n - kms:Delete*\n - kms:ScheduleKeyDeletion\n - kms:CancelKeyDeletion\n Resource: '*'\n - Sid: Allow use of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:role/Developer\n Action:\n - kms:GenerateMac\n - kms:VerifyMac\n - kms:DescribeKey\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Multi-Region Primary Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n description: \"An example multi-Region primary key\",\n multiRegion: true,\n enableKeyRotation: true,\n deletionWindowInDays: 10,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Id: \"key-default-1\",\n Statement: [\n {\n Sid: \"Enable IAM User Permissions\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Action: \"kms:*\",\n Resource: \"*\",\n },\n {\n Sid: \"Allow administration of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:user/Alice`),\n },\n Action: [\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n Resource: \"*\",\n },\n {\n Sid: \"Allow use of the key\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:user/Bob`),\n },\n Action: [\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n ],\n Resource: \"*\",\n },\n ],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n description=\"An example multi-Region primary key\",\n multi_region=True,\n enable_key_rotation=True,\n deletion_window_in_days=10,\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Id\": \"key-default-1\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow administration of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:user/Alice\",\n },\n \"Action\": [\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n ],\n \"Resource\": \"*\",\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:user/Bob\",\n },\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n ],\n \"Resource\": \"*\",\n },\n ],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"An example multi-Region primary key\",\n MultiRegion = true,\n EnableKeyRotation = true,\n DeletionWindowInDays = 10,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Id\"] = \"key-default-1\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Enable IAM User Permissions\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Action\"] = \"kms:*\",\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow administration of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:user/Alice\",\n },\n [\"Action\"] = new[]\n {\n \"kms:ReplicateKey\",\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\",\n },\n [\"Resource\"] = \"*\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"Allow use of the key\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:user/Bob\",\n },\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey\",\n \"kms:GenerateDataKeyWithoutPlaintext\",\n },\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Id\": \"key-default-1\",\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow administration of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:user/Alice\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:ReplicateKey\",\n\t\t\t\t\t\t\"kms:Create*\",\n\t\t\t\t\t\t\"kms:Describe*\",\n\t\t\t\t\t\t\"kms:Enable*\",\n\t\t\t\t\t\t\"kms:List*\",\n\t\t\t\t\t\t\"kms:Put*\",\n\t\t\t\t\t\t\"kms:Update*\",\n\t\t\t\t\t\t\"kms:Revoke*\",\n\t\t\t\t\t\t\"kms:Disable*\",\n\t\t\t\t\t\t\"kms:Get*\",\n\t\t\t\t\t\t\"kms:Delete*\",\n\t\t\t\t\t\t\"kms:ScheduleKeyDeletion\",\n\t\t\t\t\t\t\"kms:CancelKeyDeletion\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"Allow use of the key\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:user/Bob\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:Encrypt\",\n\t\t\t\t\t\t\"kms:Decrypt\",\n\t\t\t\t\t\t\"kms:ReEncrypt*\",\n\t\t\t\t\t\t\"kms:GenerateDataKey\",\n\t\t\t\t\t\t\"kms:GenerateDataKeyWithoutPlaintext\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"An example multi-Region primary key\"),\n\t\t\tMultiRegion: pulumi.Bool(true),\n\t\t\tEnableKeyRotation: pulumi.Bool(true),\n\t\t\tDeletionWindowInDays: pulumi.Int(10),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .description(\"An example multi-Region primary key\")\n .multiRegion(true)\n .enableKeyRotation(true)\n .deletionWindowInDays(10)\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Id\", \"key-default-1\"),\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow administration of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:user/Alice\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:ReplicateKey\", \n \"kms:Create*\", \n \"kms:Describe*\", \n \"kms:Enable*\", \n \"kms:List*\", \n \"kms:Put*\", \n \"kms:Update*\", \n \"kms:Revoke*\", \n \"kms:Disable*\", \n \"kms:Get*\", \n \"kms:Delete*\", \n \"kms:ScheduleKeyDeletion\", \n \"kms:CancelKeyDeletion\"\n )),\n jsonProperty(\"Resource\", \"*\")\n ), \n jsonObject(\n jsonProperty(\"Sid\", \"Allow use of the key\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:user/Bob\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:Encrypt\", \n \"kms:Decrypt\", \n \"kms:ReEncrypt*\", \n \"kms:GenerateDataKey\", \n \"kms:GenerateDataKeyWithoutPlaintext\"\n )),\n jsonProperty(\"Resource\", \"*\")\n )\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n description: An example multi-Region primary key\n multiRegion: true\n enableKeyRotation: true\n deletionWindowInDays: 10\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Id: key-default-1\n Statement:\n - Sid: Enable IAM User Permissions\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Action: kms:*\n Resource: '*'\n - Sid: Allow administration of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:user/Alice\n Action:\n - kms:ReplicateKey\n - kms:Create*\n - kms:Describe*\n - kms:Enable*\n - kms:List*\n - kms:Put*\n - kms:Update*\n - kms:Revoke*\n - kms:Disable*\n - kms:Get*\n - kms:Delete*\n - kms:ScheduleKeyDeletion\n - kms:CancelKeyDeletion\n Resource: '*'\n - Sid: Allow use of the key\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:user/Bob\n Action:\n - kms:DescribeKey\n - kms:Encrypt\n - kms:Decrypt\n - kms:ReEncrypt*\n - kms:GenerateDataKey\n - kms:GenerateDataKeyWithoutPlaintext\n Resource: '*'\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import KMS Keys using the `id`. For example:\n\n```sh\n$ pulumi import aws:kms/key:Key a 1234abcd-12ab-34cd-56ef-1234567890ab\n```\n", "properties": { "arn": { "type": "string", @@ -287442,7 +287442,7 @@ } }, "aws:lakeformation/permissions:Permissions": { - "description": "Grants permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3. Permissions are granted to a principal, in a Data Catalog, relative to a Lake Formation resource, which includes the Data Catalog, databases, tables, LF-tags, and LF-tag policies. For more information, see [Security and Access Control to Metadata and Data in Lake Formation](https://docs.aws.amazon.com/lake-formation/latest/dg/security-data-access.html).\n\n!\u003e **WARNING:** Lake Formation permissions are not in effect by default within AWS. Using this resource will not secure your data and will result in errors if you do not change the security settings for existing resources and the default security settings for new resources. See Default Behavior and `IAMAllowedPrincipals` for additional details.\n\n\u003e **NOTE:** In general, the `principal` should _NOT_ be a Lake Formation administrator or the entity (e.g., IAM role) that is running the deployment. Administrators have implicit permissions. These should be managed by granting or not granting administrator rights using `aws.lakeformation.DataLakeSettings`, _not_ with this resource.\n\n## Default Behavior and `IAMAllowedPrincipals`\n\n**_Lake Formation permissions are not in effect by default within AWS._** `IAMAllowedPrincipals` (i.e., `IAM_ALLOWED_PRINCIPALS`) conflicts with individual Lake Formation permissions (i.e., non-`IAMAllowedPrincipals` permissions), will cause unexpected behavior, and may result in errors.\n\nWhen using Lake Formation, choose ONE of the following options as they are mutually exclusive:\n\n1. Use this resource (`aws.lakeformation.Permissions`), change the default security settings using `aws.lakeformation.DataLakeSettings`, and remove existing `IAMAllowedPrincipals` permissions\n2. Use `IAMAllowedPrincipals` without `aws.lakeformation.Permissions`\n\nThis example shows removing the `IAMAllowedPrincipals` default security settings and making the caller a Lake Formation admin. Since `create_database_default_permissions` and `create_table_default_permissions` are not set in the `aws.lakeformation.DataLakeSettings` resource, they are cleared.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetSessionContext = current.then(current =\u003e aws.iam.getSessionContext({\n arn: current.arn,\n}));\nconst test = new aws.lakeformation.DataLakeSettings(\"test\", {admins: [currentGetSessionContext.then(currentGetSessionContext =\u003e currentGetSessionContext.issuerArn)]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_session_context = aws.iam.get_session_context(arn=current.arn)\ntest = aws.lakeformation.DataLakeSettings(\"test\", admins=[current_get_session_context.issuer_arn])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetSessionContext = Aws.Iam.GetSessionContext.Invoke(new()\n {\n Arn = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n });\n\n var test = new Aws.LakeFormation.DataLakeSettings(\"test\", new()\n {\n Admins = new[]\n {\n currentGetSessionContext.Apply(getSessionContextResult =\u003e getSessionContextResult.IssuerArn),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetSessionContext, err := iam.GetSessionContext(ctx, \u0026iam.GetSessionContextArgs{\n\t\t\tArn: current.Arn,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = lakeformation.NewDataLakeSettings(ctx, \"test\", \u0026lakeformation.DataLakeSettingsArgs{\n\t\t\tAdmins: pulumi.StringArray{\n\t\t\t\tpulumi.String(currentGetSessionContext.IssuerArn),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetSessionContextArgs;\nimport com.pulumi.aws.lakeformation.DataLakeSettings;\nimport com.pulumi.aws.lakeformation.DataLakeSettingsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetSessionContext = IamFunctions.getSessionContext(GetSessionContextArgs.builder()\n .arn(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .build());\n\n var test = new DataLakeSettings(\"test\", DataLakeSettingsArgs.builder()\n .admins(currentGetSessionContext.applyValue(getSessionContextResult -\u003e getSessionContextResult.issuerArn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:lakeformation:DataLakeSettings\n properties:\n admins:\n - ${currentGetSessionContext.issuerArn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetSessionContext:\n fn::invoke:\n Function: aws:iam:getSessionContext\n Arguments:\n arn: ${current.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nTo remove existing `IAMAllowedPrincipals` permissions, use the [AWS Lake Formation Console](https://console.aws.amazon.com/lakeformation/) or [AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/batch-revoke-permissions.html).\n\n`IAMAllowedPrincipals` is a hook to maintain backwards compatibility with AWS Glue. `IAMAllowedPrincipals` is a pseudo-entity group that acts like a Lake Formation principal. The group includes any IAM users and roles that are allowed access to your Data Catalog resources by your IAM policies.\n\nThis is Lake Formation's default behavior:\n\n* Lake Formation grants `Super` permission to `IAMAllowedPrincipals` on all existing AWS Glue Data Catalog resources.\n* Lake Formation enables \"Use only IAM access control\" for new Data Catalog resources.\n\nFor more details, see [Changing the Default Security Settings for Your Data Lake](https://docs.aws.amazon.com/lake-formation/latest/dg/change-settings.html).\n\n### Problem Using `IAMAllowedPrincipals`\n\nAWS does not support combining `IAMAllowedPrincipals` permissions and non-`IAMAllowedPrincipals` permissions. Doing so results in unexpected permissions and behaviors. For example, this configuration grants a user `SELECT` on a column in a table.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.glue.CatalogDatabase(\"example\", {name: \"sadabate\"});\nconst exampleCatalogTable = new aws.glue.CatalogTable(\"example\", {\n name: \"abelt\",\n databaseName: test.name,\n storageDescriptor: {\n columns: [{\n name: \"event\",\n type: \"string\",\n }],\n },\n});\nconst examplePermissions = new aws.lakeformation.Permissions(\"example\", {\n permissions: [\"SELECT\"],\n principal: \"arn:aws:iam:us-east-1:123456789012:user/SanHolo\",\n tableWithColumns: {\n databaseName: exampleCatalogTable.databaseName,\n name: exampleCatalogTable.name,\n columnNames: [\"event\"],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.glue.CatalogDatabase(\"example\", name=\"sadabate\")\nexample_catalog_table = aws.glue.CatalogTable(\"example\",\n name=\"abelt\",\n database_name=test[\"name\"],\n storage_descriptor={\n \"columns\": [{\n \"name\": \"event\",\n \"type\": \"string\",\n }],\n })\nexample_permissions = aws.lakeformation.Permissions(\"example\",\n permissions=[\"SELECT\"],\n principal=\"arn:aws:iam:us-east-1:123456789012:user/SanHolo\",\n table_with_columns={\n \"database_name\": example_catalog_table.database_name,\n \"name\": example_catalog_table.name,\n \"column_names\": [\"event\"],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Glue.CatalogDatabase(\"example\", new()\n {\n Name = \"sadabate\",\n });\n\n var exampleCatalogTable = new Aws.Glue.CatalogTable(\"example\", new()\n {\n Name = \"abelt\",\n DatabaseName = test.Name,\n StorageDescriptor = new Aws.Glue.Inputs.CatalogTableStorageDescriptorArgs\n {\n Columns = new[]\n {\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"event\",\n Type = \"string\",\n },\n },\n },\n });\n\n var examplePermissions = new Aws.LakeFormation.Permissions(\"example\", new()\n {\n PermissionDetails = new[]\n {\n \"SELECT\",\n },\n Principal = \"arn:aws:iam:us-east-1:123456789012:user/SanHolo\",\n TableWithColumns = new Aws.LakeFormation.Inputs.PermissionsTableWithColumnsArgs\n {\n DatabaseName = exampleCatalogTable.DatabaseName,\n Name = exampleCatalogTable.Name,\n ColumnNames = new[]\n {\n \"event\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogDatabase(ctx, \"example\", \u0026glue.CatalogDatabaseArgs{\n\t\t\tName: pulumi.String(\"sadabate\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleCatalogTable, err := glue.NewCatalogTable(ctx, \"example\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"abelt\"),\n\t\t\tDatabaseName: pulumi.Any(test.Name),\n\t\t\tStorageDescriptor: \u0026glue.CatalogTableStorageDescriptorArgs{\n\t\t\t\tColumns: glue.CatalogTableStorageDescriptorColumnArray{\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"event\"),\n\t\t\t\t\t\tType: pulumi.String(\"string\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = lakeformation.NewPermissions(ctx, \"example\", \u0026lakeformation.PermissionsArgs{\n\t\t\tPermissions: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"SELECT\"),\n\t\t\t},\n\t\t\tPrincipal: pulumi.String(\"arn:aws:iam:us-east-1:123456789012:user/SanHolo\"),\n\t\t\tTableWithColumns: \u0026lakeformation.PermissionsTableWithColumnsArgs{\n\t\t\t\tDatabaseName: exampleCatalogTable.DatabaseName,\n\t\t\t\tName: exampleCatalogTable.Name,\n\t\t\t\tColumnNames: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"event\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.glue.CatalogDatabase;\nimport com.pulumi.aws.glue.CatalogDatabaseArgs;\nimport com.pulumi.aws.glue.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorArgs;\nimport com.pulumi.aws.lakeformation.Permissions;\nimport com.pulumi.aws.lakeformation.PermissionsArgs;\nimport com.pulumi.aws.lakeformation.inputs.PermissionsTableWithColumnsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new CatalogDatabase(\"example\", CatalogDatabaseArgs.builder()\n .name(\"sadabate\")\n .build());\n\n var exampleCatalogTable = new CatalogTable(\"exampleCatalogTable\", CatalogTableArgs.builder()\n .name(\"abelt\")\n .databaseName(test.name())\n .storageDescriptor(CatalogTableStorageDescriptorArgs.builder()\n .columns(CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"event\")\n .type(\"string\")\n .build())\n .build())\n .build());\n\n var examplePermissions = new Permissions(\"examplePermissions\", PermissionsArgs.builder()\n .permissions(\"SELECT\")\n .principal(\"arn:aws:iam:us-east-1:123456789012:user/SanHolo\")\n .tableWithColumns(PermissionsTableWithColumnsArgs.builder()\n .databaseName(exampleCatalogTable.databaseName())\n .name(exampleCatalogTable.name())\n .columnNames(\"event\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:glue:CatalogDatabase\n properties:\n name: sadabate\n exampleCatalogTable:\n type: aws:glue:CatalogTable\n name: example\n properties:\n name: abelt\n databaseName: ${test.name}\n storageDescriptor:\n columns:\n - name: event\n type: string\n examplePermissions:\n type: aws:lakeformation:Permissions\n name: example\n properties:\n permissions:\n - SELECT\n principal: arn:aws:iam:us-east-1:123456789012:user/SanHolo\n tableWithColumns:\n databaseName: ${exampleCatalogTable.databaseName}\n name: ${exampleCatalogTable.name}\n columnNames:\n - event\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe resulting permissions depend on whether the table had `IAMAllowedPrincipals` (IAP) permissions or not.\n\n| Result With IAP | Result Without IAP |\n| ---- | ---- |\n| `SELECT` column wildcard (i.e., all columns) | `SELECT` on `\"event\"` (as expected) |\n\n## Using Lake Formation Permissions\n\nLake Formation grants implicit permissions to data lake administrators, database creators, and table creators. These implicit permissions cannot be revoked _per se_. If this resource reads implicit permissions, it will attempt to revoke them, which causes an error when the resource is destroyed.\n\nThere are two ways to avoid these errors. First, and the way we recommend, is to avoid using this resource with principals that have implicit permissions. A second, error-prone option, is to grant explicit permissions (and `permissions_with_grant_option`) to \"overwrite\" a principal's implicit permissions, which you can then revoke with this resource. For more information, see [Implicit Lake Formation Permissions](https://docs.aws.amazon.com/lake-formation/latest/dg/implicit-permissions.html).\n\nIf the `principal` is also a data lake administrator, AWS grants implicit permissions that can cause errors using this resource. For example, AWS implicitly grants a `principal`/administrator `permissions` and `permissions_with_grant_option` of `ALL`, `ALTER`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT` on a table. If you use this resource to explicitly grant the `principal`/administrator `permissions` but _not_ `permissions_with_grant_option` of `ALL`, `ALTER`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT` on the table, this resource will read the implicit `permissions_with_grant_option` and attempt to revoke them when the resource is destroyed. Doing so will cause an `InvalidInputException: No permissions revoked` error because you cannot revoke implicit permissions _per se_. To workaround this problem, explicitly grant the `principal`/administrator `permissions` _and_ `permissions_with_grant_option`, which can then be revoked. Similarly, granting a `principal`/administrator permissions on a table with columns and providing `column_names`, will result in a `InvalidInputException: Permissions modification is invalid` error because you are narrowing the implicit permissions. Instead, set `wildcard` to `true` and remove the `column_names`.\n\n## Example Usage\n\n### Grant Permissions For A Lake Formation S3 Resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.lakeformation.Permissions(\"example\", {\n principal: workflowRole.arn,\n permissions: [\"DATA_LOCATION_ACCESS\"],\n dataLocation: {\n arn: exampleAwsLakeformationResource.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lakeformation.Permissions(\"example\",\n principal=workflow_role[\"arn\"],\n permissions=[\"DATA_LOCATION_ACCESS\"],\n data_location={\n \"arn\": example_aws_lakeformation_resource[\"arn\"],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.LakeFormation.Permissions(\"example\", new()\n {\n Principal = workflowRole.Arn,\n PermissionDetails = new[]\n {\n \"DATA_LOCATION_ACCESS\",\n },\n DataLocation = new Aws.LakeFormation.Inputs.PermissionsDataLocationArgs\n {\n Arn = exampleAwsLakeformationResource.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lakeformation.NewPermissions(ctx, \"example\", \u0026lakeformation.PermissionsArgs{\n\t\t\tPrincipal: pulumi.Any(workflowRole.Arn),\n\t\t\tPermissions: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"DATA_LOCATION_ACCESS\"),\n\t\t\t},\n\t\t\tDataLocation: \u0026lakeformation.PermissionsDataLocationArgs{\n\t\t\t\tArn: pulumi.Any(exampleAwsLakeformationResource.Arn),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lakeformation.Permissions;\nimport com.pulumi.aws.lakeformation.PermissionsArgs;\nimport com.pulumi.aws.lakeformation.inputs.PermissionsDataLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Permissions(\"example\", PermissionsArgs.builder()\n .principal(workflowRole.arn())\n .permissions(\"DATA_LOCATION_ACCESS\")\n .dataLocation(PermissionsDataLocationArgs.builder()\n .arn(exampleAwsLakeformationResource.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lakeformation:Permissions\n properties:\n principal: ${workflowRole.arn}\n permissions:\n - DATA_LOCATION_ACCESS\n dataLocation:\n arn: ${exampleAwsLakeformationResource.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Grant Permissions For A Glue Catalog Database\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.lakeformation.Permissions(\"example\", {\n principal: workflowRole.arn,\n permissions: [\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n ],\n database: {\n name: exampleAwsGlueCatalogDatabase.name,\n catalogId: \"110376042874\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lakeformation.Permissions(\"example\",\n principal=workflow_role[\"arn\"],\n permissions=[\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n ],\n database={\n \"name\": example_aws_glue_catalog_database[\"name\"],\n \"catalog_id\": \"110376042874\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.LakeFormation.Permissions(\"example\", new()\n {\n Principal = workflowRole.Arn,\n PermissionDetails = new[]\n {\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n },\n Database = new Aws.LakeFormation.Inputs.PermissionsDatabaseArgs\n {\n Name = exampleAwsGlueCatalogDatabase.Name,\n CatalogId = \"110376042874\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lakeformation.NewPermissions(ctx, \"example\", \u0026lakeformation.PermissionsArgs{\n\t\t\tPrincipal: pulumi.Any(workflowRole.Arn),\n\t\t\tPermissions: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"CREATE_TABLE\"),\n\t\t\t\tpulumi.String(\"ALTER\"),\n\t\t\t\tpulumi.String(\"DROP\"),\n\t\t\t},\n\t\t\tDatabase: \u0026lakeformation.PermissionsDatabaseArgs{\n\t\t\t\tName: pulumi.Any(exampleAwsGlueCatalogDatabase.Name),\n\t\t\t\tCatalogId: pulumi.String(\"110376042874\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lakeformation.Permissions;\nimport com.pulumi.aws.lakeformation.PermissionsArgs;\nimport com.pulumi.aws.lakeformation.inputs.PermissionsDatabaseArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Permissions(\"example\", PermissionsArgs.builder()\n .principal(workflowRole.arn())\n .permissions( \n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\")\n .database(PermissionsDatabaseArgs.builder()\n .name(exampleAwsGlueCatalogDatabase.name())\n .catalogId(\"110376042874\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lakeformation:Permissions\n properties:\n principal: ${workflowRole.arn}\n permissions:\n - CREATE_TABLE\n - ALTER\n - DROP\n database:\n name: ${exampleAwsGlueCatalogDatabase.name}\n catalogId: '110376042874'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Grant Permissions Using Tag-Based Access Control\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = new aws.lakeformation.Permissions(\"test\", {\n principal: salesRole.arn,\n permissions: [\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n ],\n lfTagPolicy: {\n resourceType: \"DATABASE\",\n expressions: [\n {\n key: \"Team\",\n values: [\"Sales\"],\n },\n {\n key: \"Environment\",\n values: [\n \"Dev\",\n \"Production\",\n ],\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.lakeformation.Permissions(\"test\",\n principal=sales_role[\"arn\"],\n permissions=[\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n ],\n lf_tag_policy={\n \"resource_type\": \"DATABASE\",\n \"expressions\": [\n {\n \"key\": \"Team\",\n \"values\": [\"Sales\"],\n },\n {\n \"key\": \"Environment\",\n \"values\": [\n \"Dev\",\n \"Production\",\n ],\n },\n ],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.LakeFormation.Permissions(\"test\", new()\n {\n Principal = salesRole.Arn,\n PermissionDetails = new[]\n {\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n },\n LfTagPolicy = new Aws.LakeFormation.Inputs.PermissionsLfTagPolicyArgs\n {\n ResourceType = \"DATABASE\",\n Expressions = new[]\n {\n new Aws.LakeFormation.Inputs.PermissionsLfTagPolicyExpressionArgs\n {\n Key = \"Team\",\n Values = new[]\n {\n \"Sales\",\n },\n },\n new Aws.LakeFormation.Inputs.PermissionsLfTagPolicyExpressionArgs\n {\n Key = \"Environment\",\n Values = new[]\n {\n \"Dev\",\n \"Production\",\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lakeformation.NewPermissions(ctx, \"test\", \u0026lakeformation.PermissionsArgs{\n\t\t\tPrincipal: pulumi.Any(salesRole.Arn),\n\t\t\tPermissions: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"CREATE_TABLE\"),\n\t\t\t\tpulumi.String(\"ALTER\"),\n\t\t\t\tpulumi.String(\"DROP\"),\n\t\t\t},\n\t\t\tLfTagPolicy: \u0026lakeformation.PermissionsLfTagPolicyArgs{\n\t\t\t\tResourceType: pulumi.String(\"DATABASE\"),\n\t\t\t\tExpressions: lakeformation.PermissionsLfTagPolicyExpressionArray{\n\t\t\t\t\t\u0026lakeformation.PermissionsLfTagPolicyExpressionArgs{\n\t\t\t\t\t\tKey: pulumi.String(\"Team\"),\n\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\tpulumi.String(\"Sales\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\u0026lakeformation.PermissionsLfTagPolicyExpressionArgs{\n\t\t\t\t\t\tKey: pulumi.String(\"Environment\"),\n\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\tpulumi.String(\"Dev\"),\n\t\t\t\t\t\t\tpulumi.String(\"Production\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lakeformation.Permissions;\nimport com.pulumi.aws.lakeformation.PermissionsArgs;\nimport com.pulumi.aws.lakeformation.inputs.PermissionsLfTagPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Permissions(\"test\", PermissionsArgs.builder()\n .principal(salesRole.arn())\n .permissions( \n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\")\n .lfTagPolicy(PermissionsLfTagPolicyArgs.builder()\n .resourceType(\"DATABASE\")\n .expressions( \n PermissionsLfTagPolicyExpressionArgs.builder()\n .key(\"Team\")\n .values(\"Sales\")\n .build(),\n PermissionsLfTagPolicyExpressionArgs.builder()\n .key(\"Environment\")\n .values( \n \"Dev\",\n \"Production\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:lakeformation:Permissions\n properties:\n principal: ${salesRole.arn}\n permissions:\n - CREATE_TABLE\n - ALTER\n - DROP\n lfTagPolicy:\n resourceType: DATABASE\n expressions:\n - key: Team\n values:\n - Sales\n - key: Environment\n values:\n - Dev\n - Production\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Grants permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3. Permissions are granted to a principal, in a Data Catalog, relative to a Lake Formation resource, which includes the Data Catalog, databases, tables, LF-tags, and LF-tag policies. For more information, see [Security and Access Control to Metadata and Data in Lake Formation](https://docs.aws.amazon.com/lake-formation/latest/dg/security-data-access.html).\n\n!\u003e **WARNING:** Lake Formation permissions are not in effect by default within AWS. Using this resource will not secure your data and will result in errors if you do not change the security settings for existing resources and the default security settings for new resources. See Default Behavior and `IAMAllowedPrincipals` for additional details.\n\n\u003e **NOTE:** In general, the `principal` should _NOT_ be a Lake Formation administrator or the entity (e.g., IAM role) that is running the deployment. Administrators have implicit permissions. These should be managed by granting or not granting administrator rights using `aws.lakeformation.DataLakeSettings`, _not_ with this resource.\n\n## Default Behavior and `IAMAllowedPrincipals`\n\n**_Lake Formation permissions are not in effect by default within AWS._** `IAMAllowedPrincipals` (i.e., `IAM_ALLOWED_PRINCIPALS`) conflicts with individual Lake Formation permissions (i.e., non-`IAMAllowedPrincipals` permissions), will cause unexpected behavior, and may result in errors.\n\nWhen using Lake Formation, choose ONE of the following options as they are mutually exclusive:\n\n1. Use this resource (`aws.lakeformation.Permissions`), change the default security settings using `aws.lakeformation.DataLakeSettings`, and remove existing `IAMAllowedPrincipals` permissions\n2. Use `IAMAllowedPrincipals` without `aws.lakeformation.Permissions`\n\nThis example shows removing the `IAMAllowedPrincipals` default security settings and making the caller a Lake Formation admin. Since `create_database_default_permissions` and `create_table_default_permissions` are not set in the `aws.lakeformation.DataLakeSettings` resource, they are cleared.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetSessionContext = current.then(current =\u003e aws.iam.getSessionContext({\n arn: current.arn,\n}));\nconst test = new aws.lakeformation.DataLakeSettings(\"test\", {admins: [currentGetSessionContext.then(currentGetSessionContext =\u003e currentGetSessionContext.issuerArn)]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_session_context = aws.iam.get_session_context(arn=current.arn)\ntest = aws.lakeformation.DataLakeSettings(\"test\", admins=[current_get_session_context.issuer_arn])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetSessionContext = Aws.Iam.GetSessionContext.Invoke(new()\n {\n Arn = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n });\n\n var test = new Aws.LakeFormation.DataLakeSettings(\"test\", new()\n {\n Admins = new[]\n {\n currentGetSessionContext.Apply(getSessionContextResult =\u003e getSessionContextResult.IssuerArn),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetSessionContext, err := iam.GetSessionContext(ctx, \u0026iam.GetSessionContextArgs{\n\t\t\tArn: current.Arn,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = lakeformation.NewDataLakeSettings(ctx, \"test\", \u0026lakeformation.DataLakeSettingsArgs{\n\t\t\tAdmins: pulumi.StringArray{\n\t\t\t\tpulumi.String(currentGetSessionContext.IssuerArn),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetSessionContextArgs;\nimport com.pulumi.aws.lakeformation.DataLakeSettings;\nimport com.pulumi.aws.lakeformation.DataLakeSettingsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetSessionContext = IamFunctions.getSessionContext(GetSessionContextArgs.builder()\n .arn(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .build());\n\n var test = new DataLakeSettings(\"test\", DataLakeSettingsArgs.builder()\n .admins(currentGetSessionContext.applyValue(getSessionContextResult -\u003e getSessionContextResult.issuerArn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:lakeformation:DataLakeSettings\n properties:\n admins:\n - ${currentGetSessionContext.issuerArn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetSessionContext:\n fn::invoke:\n Function: aws:iam:getSessionContext\n Arguments:\n arn: ${current.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nTo remove existing `IAMAllowedPrincipals` permissions, use the [AWS Lake Formation Console](https://console.aws.amazon.com/lakeformation/) or [AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/batch-revoke-permissions.html).\n\n`IAMAllowedPrincipals` is a hook to maintain backwards compatibility with AWS Glue. `IAMAllowedPrincipals` is a pseudo-entity group that acts like a Lake Formation principal. The group includes any IAM users and roles that are allowed access to your Data Catalog resources by your IAM policies.\n\nThis is Lake Formation's default behavior:\n\n* Lake Formation grants `Super` permission to `IAMAllowedPrincipals` on all existing AWS Glue Data Catalog resources.\n* Lake Formation enables \"Use only IAM access control\" for new Data Catalog resources.\n\nFor more details, see [Changing the Default Security Settings for Your Data Lake](https://docs.aws.amazon.com/lake-formation/latest/dg/change-settings.html).\n\n### Problem Using `IAMAllowedPrincipals`\n\nAWS does not support combining `IAMAllowedPrincipals` permissions and non-`IAMAllowedPrincipals` permissions. Doing so results in unexpected permissions and behaviors. For example, this configuration grants a user `SELECT` on a column in a table.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.glue.CatalogDatabase(\"example\", {name: \"sadabate\"});\nconst exampleCatalogTable = new aws.glue.CatalogTable(\"example\", {\n name: \"abelt\",\n databaseName: test.name,\n storageDescriptor: {\n columns: [{\n name: \"event\",\n type: \"string\",\n }],\n },\n});\nconst examplePermissions = new aws.lakeformation.Permissions(\"example\", {\n permissions: [\"SELECT\"],\n principal: \"arn:aws:iam:us-east-1:123456789012:user/SanHolo\",\n tableWithColumns: {\n databaseName: exampleCatalogTable.databaseName,\n name: exampleCatalogTable.name,\n columnNames: [\"event\"],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.glue.CatalogDatabase(\"example\", name=\"sadabate\")\nexample_catalog_table = aws.glue.CatalogTable(\"example\",\n name=\"abelt\",\n database_name=test[\"name\"],\n storage_descriptor={\n \"columns\": [{\n \"name\": \"event\",\n \"type\": \"string\",\n }],\n })\nexample_permissions = aws.lakeformation.Permissions(\"example\",\n permissions=[\"SELECT\"],\n principal=\"arn:aws:iam:us-east-1:123456789012:user/SanHolo\",\n table_with_columns={\n \"database_name\": example_catalog_table.database_name,\n \"name\": example_catalog_table.name,\n \"column_names\": [\"event\"],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Glue.CatalogDatabase(\"example\", new()\n {\n Name = \"sadabate\",\n });\n\n var exampleCatalogTable = new Aws.Glue.CatalogTable(\"example\", new()\n {\n Name = \"abelt\",\n DatabaseName = test.Name,\n StorageDescriptor = new Aws.Glue.Inputs.CatalogTableStorageDescriptorArgs\n {\n Columns = new[]\n {\n new Aws.Glue.Inputs.CatalogTableStorageDescriptorColumnArgs\n {\n Name = \"event\",\n Type = \"string\",\n },\n },\n },\n });\n\n var examplePermissions = new Aws.LakeFormation.Permissions(\"example\", new()\n {\n PermissionDetails = new[]\n {\n \"SELECT\",\n },\n Principal = \"arn:aws:iam:us-east-1:123456789012:user/SanHolo\",\n TableWithColumns = new Aws.LakeFormation.Inputs.PermissionsTableWithColumnsArgs\n {\n DatabaseName = exampleCatalogTable.DatabaseName,\n Name = exampleCatalogTable.Name,\n ColumnNames = new[]\n {\n \"event\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := glue.NewCatalogDatabase(ctx, \"example\", \u0026glue.CatalogDatabaseArgs{\n\t\t\tName: pulumi.String(\"sadabate\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleCatalogTable, err := glue.NewCatalogTable(ctx, \"example\", \u0026glue.CatalogTableArgs{\n\t\t\tName: pulumi.String(\"abelt\"),\n\t\t\tDatabaseName: pulumi.Any(test.Name),\n\t\t\tStorageDescriptor: \u0026glue.CatalogTableStorageDescriptorArgs{\n\t\t\t\tColumns: glue.CatalogTableStorageDescriptorColumnArray{\n\t\t\t\t\t\u0026glue.CatalogTableStorageDescriptorColumnArgs{\n\t\t\t\t\t\tName: pulumi.String(\"event\"),\n\t\t\t\t\t\tType: pulumi.String(\"string\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = lakeformation.NewPermissions(ctx, \"example\", \u0026lakeformation.PermissionsArgs{\n\t\t\tPermissions: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"SELECT\"),\n\t\t\t},\n\t\t\tPrincipal: pulumi.String(\"arn:aws:iam:us-east-1:123456789012:user/SanHolo\"),\n\t\t\tTableWithColumns: \u0026lakeformation.PermissionsTableWithColumnsArgs{\n\t\t\t\tDatabaseName: exampleCatalogTable.DatabaseName,\n\t\t\t\tName: exampleCatalogTable.Name,\n\t\t\t\tColumnNames: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"event\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.glue.CatalogDatabase;\nimport com.pulumi.aws.glue.CatalogDatabaseArgs;\nimport com.pulumi.aws.glue.CatalogTable;\nimport com.pulumi.aws.glue.CatalogTableArgs;\nimport com.pulumi.aws.glue.inputs.CatalogTableStorageDescriptorArgs;\nimport com.pulumi.aws.lakeformation.Permissions;\nimport com.pulumi.aws.lakeformation.PermissionsArgs;\nimport com.pulumi.aws.lakeformation.inputs.PermissionsTableWithColumnsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new CatalogDatabase(\"example\", CatalogDatabaseArgs.builder()\n .name(\"sadabate\")\n .build());\n\n var exampleCatalogTable = new CatalogTable(\"exampleCatalogTable\", CatalogTableArgs.builder()\n .name(\"abelt\")\n .databaseName(test.name())\n .storageDescriptor(CatalogTableStorageDescriptorArgs.builder()\n .columns(CatalogTableStorageDescriptorColumnArgs.builder()\n .name(\"event\")\n .type(\"string\")\n .build())\n .build())\n .build());\n\n var examplePermissions = new Permissions(\"examplePermissions\", PermissionsArgs.builder()\n .permissions(\"SELECT\")\n .principal(\"arn:aws:iam:us-east-1:123456789012:user/SanHolo\")\n .tableWithColumns(PermissionsTableWithColumnsArgs.builder()\n .databaseName(exampleCatalogTable.databaseName())\n .name(exampleCatalogTable.name())\n .columnNames(\"event\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:glue:CatalogDatabase\n properties:\n name: sadabate\n exampleCatalogTable:\n type: aws:glue:CatalogTable\n name: example\n properties:\n name: abelt\n databaseName: ${test.name}\n storageDescriptor:\n columns:\n - name: event\n type: string\n examplePermissions:\n type: aws:lakeformation:Permissions\n name: example\n properties:\n permissions:\n - SELECT\n principal: arn:aws:iam:us-east-1:123456789012:user/SanHolo\n tableWithColumns:\n databaseName: ${exampleCatalogTable.databaseName}\n name: ${exampleCatalogTable.name}\n columnNames:\n - event\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe resulting permissions depend on whether the table had `IAMAllowedPrincipals` (IAP) permissions or not.\n\n| Result With IAP | Result Without IAP |\n| ---- | ---- |\n| `SELECT` column wildcard (i.e., all columns) | `SELECT` on `\"event\"` (as expected) |\n\n## Using Lake Formation Permissions\n\nLake Formation grants implicit permissions to data lake administrators, database creators, and table creators. These implicit permissions cannot be revoked _per se_. If this resource reads implicit permissions, it will attempt to revoke them, which causes an error when the resource is destroyed.\n\nThere are two ways to avoid these errors. First, and the way we recommend, is to avoid using this resource with principals that have implicit permissions. A second, error-prone option, is to grant explicit permissions (and `permissions_with_grant_option`) to \"overwrite\" a principal's implicit permissions, which you can then revoke with this resource. For more information, see [Implicit Lake Formation Permissions](https://docs.aws.amazon.com/lake-formation/latest/dg/implicit-permissions.html).\n\nIf the `principal` is also a data lake administrator, AWS grants implicit permissions that can cause errors using this resource. For example, AWS implicitly grants a `principal`/administrator `permissions` and `permissions_with_grant_option` of `ALL`, `ALTER`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT` on a table. If you use this resource to explicitly grant the `principal`/administrator `permissions` but _not_ `permissions_with_grant_option` of `ALL`, `ALTER`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT` on the table, this resource will read the implicit `permissions_with_grant_option` and attempt to revoke them when the resource is destroyed. Doing so will cause an `InvalidInputException: No permissions revoked` error because you cannot revoke implicit permissions _per se_. To workaround this problem, explicitly grant the `principal`/administrator `permissions` _and_ `permissions_with_grant_option`, which can then be revoked. Similarly, granting a `principal`/administrator permissions on a table with columns and providing `column_names`, will result in a `InvalidInputException: Permissions modification is invalid` error because you are narrowing the implicit permissions. Instead, set `wildcard` to `true` and remove the `column_names`.\n\n## Example Usage\n\n### Grant Permissions For A Lake Formation S3 Resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.lakeformation.Permissions(\"example\", {\n principal: workflowRole.arn,\n permissions: [\"DATA_LOCATION_ACCESS\"],\n dataLocation: {\n arn: exampleAwsLakeformationResource.arn,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lakeformation.Permissions(\"example\",\n principal=workflow_role[\"arn\"],\n permissions=[\"DATA_LOCATION_ACCESS\"],\n data_location={\n \"arn\": example_aws_lakeformation_resource[\"arn\"],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.LakeFormation.Permissions(\"example\", new()\n {\n Principal = workflowRole.Arn,\n PermissionDetails = new[]\n {\n \"DATA_LOCATION_ACCESS\",\n },\n DataLocation = new Aws.LakeFormation.Inputs.PermissionsDataLocationArgs\n {\n Arn = exampleAwsLakeformationResource.Arn,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lakeformation.NewPermissions(ctx, \"example\", \u0026lakeformation.PermissionsArgs{\n\t\t\tPrincipal: pulumi.Any(workflowRole.Arn),\n\t\t\tPermissions: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"DATA_LOCATION_ACCESS\"),\n\t\t\t},\n\t\t\tDataLocation: \u0026lakeformation.PermissionsDataLocationArgs{\n\t\t\t\tArn: pulumi.Any(exampleAwsLakeformationResource.Arn),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lakeformation.Permissions;\nimport com.pulumi.aws.lakeformation.PermissionsArgs;\nimport com.pulumi.aws.lakeformation.inputs.PermissionsDataLocationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Permissions(\"example\", PermissionsArgs.builder()\n .principal(workflowRole.arn())\n .permissions(\"DATA_LOCATION_ACCESS\")\n .dataLocation(PermissionsDataLocationArgs.builder()\n .arn(exampleAwsLakeformationResource.arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lakeformation:Permissions\n properties:\n principal: ${workflowRole.arn}\n permissions:\n - DATA_LOCATION_ACCESS\n dataLocation:\n arn: ${exampleAwsLakeformationResource.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Grant Permissions For A Glue Catalog Database\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.lakeformation.Permissions(\"example\", {\n principal: workflowRole.arn,\n permissions: [\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n ],\n database: {\n name: exampleAwsGlueCatalogDatabase.name,\n catalogId: \"110376042874\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.lakeformation.Permissions(\"example\",\n principal=workflow_role[\"arn\"],\n permissions=[\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n ],\n database={\n \"name\": example_aws_glue_catalog_database[\"name\"],\n \"catalog_id\": \"110376042874\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.LakeFormation.Permissions(\"example\", new()\n {\n Principal = workflowRole.Arn,\n PermissionDetails = new[]\n {\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n },\n Database = new Aws.LakeFormation.Inputs.PermissionsDatabaseArgs\n {\n Name = exampleAwsGlueCatalogDatabase.Name,\n CatalogId = \"110376042874\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lakeformation.NewPermissions(ctx, \"example\", \u0026lakeformation.PermissionsArgs{\n\t\t\tPrincipal: pulumi.Any(workflowRole.Arn),\n\t\t\tPermissions: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"CREATE_TABLE\"),\n\t\t\t\tpulumi.String(\"ALTER\"),\n\t\t\t\tpulumi.String(\"DROP\"),\n\t\t\t},\n\t\t\tDatabase: \u0026lakeformation.PermissionsDatabaseArgs{\n\t\t\t\tName: pulumi.Any(exampleAwsGlueCatalogDatabase.Name),\n\t\t\t\tCatalogId: pulumi.String(\"110376042874\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lakeformation.Permissions;\nimport com.pulumi.aws.lakeformation.PermissionsArgs;\nimport com.pulumi.aws.lakeformation.inputs.PermissionsDatabaseArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Permissions(\"example\", PermissionsArgs.builder()\n .principal(workflowRole.arn())\n .permissions( \n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\")\n .database(PermissionsDatabaseArgs.builder()\n .name(exampleAwsGlueCatalogDatabase.name())\n .catalogId(\"110376042874\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:lakeformation:Permissions\n properties:\n principal: ${workflowRole.arn}\n permissions:\n - CREATE_TABLE\n - ALTER\n - DROP\n database:\n name: ${exampleAwsGlueCatalogDatabase.name}\n catalogId: '110376042874'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Grant Permissions Using Tag-Based Access Control\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = new aws.lakeformation.Permissions(\"test\", {\n principal: salesRole.arn,\n permissions: [\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n ],\n lfTagPolicy: {\n resourceType: \"DATABASE\",\n expressions: [\n {\n key: \"Team\",\n values: [\"Sales\"],\n },\n {\n key: \"Environment\",\n values: [\n \"Dev\",\n \"Production\",\n ],\n },\n ],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.lakeformation.Permissions(\"test\",\n principal=sales_role[\"arn\"],\n permissions=[\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n ],\n lf_tag_policy={\n \"resource_type\": \"DATABASE\",\n \"expressions\": [\n {\n \"key\": \"Team\",\n \"values\": [\"Sales\"],\n },\n {\n \"key\": \"Environment\",\n \"values\": [\n \"Dev\",\n \"Production\",\n ],\n },\n ],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.LakeFormation.Permissions(\"test\", new()\n {\n Principal = salesRole.Arn,\n PermissionDetails = new[]\n {\n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\",\n },\n LfTagPolicy = new Aws.LakeFormation.Inputs.PermissionsLfTagPolicyArgs\n {\n ResourceType = \"DATABASE\",\n Expressions = new[]\n {\n new Aws.LakeFormation.Inputs.PermissionsLfTagPolicyExpressionArgs\n {\n Key = \"Team\",\n Values = new[]\n {\n \"Sales\",\n },\n },\n new Aws.LakeFormation.Inputs.PermissionsLfTagPolicyExpressionArgs\n {\n Key = \"Environment\",\n Values = new[]\n {\n \"Dev\",\n \"Production\",\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lakeformation.NewPermissions(ctx, \"test\", \u0026lakeformation.PermissionsArgs{\n\t\t\tPrincipal: pulumi.Any(salesRole.Arn),\n\t\t\tPermissions: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"CREATE_TABLE\"),\n\t\t\t\tpulumi.String(\"ALTER\"),\n\t\t\t\tpulumi.String(\"DROP\"),\n\t\t\t},\n\t\t\tLfTagPolicy: \u0026lakeformation.PermissionsLfTagPolicyArgs{\n\t\t\t\tResourceType: pulumi.String(\"DATABASE\"),\n\t\t\t\tExpressions: lakeformation.PermissionsLfTagPolicyExpressionArray{\n\t\t\t\t\t\u0026lakeformation.PermissionsLfTagPolicyExpressionArgs{\n\t\t\t\t\t\tKey: pulumi.String(\"Team\"),\n\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\tpulumi.String(\"Sales\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t\u0026lakeformation.PermissionsLfTagPolicyExpressionArgs{\n\t\t\t\t\t\tKey: pulumi.String(\"Environment\"),\n\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\tpulumi.String(\"Dev\"),\n\t\t\t\t\t\t\tpulumi.String(\"Production\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lakeformation.Permissions;\nimport com.pulumi.aws.lakeformation.PermissionsArgs;\nimport com.pulumi.aws.lakeformation.inputs.PermissionsLfTagPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Permissions(\"test\", PermissionsArgs.builder()\n .principal(salesRole.arn())\n .permissions( \n \"CREATE_TABLE\",\n \"ALTER\",\n \"DROP\")\n .lfTagPolicy(PermissionsLfTagPolicyArgs.builder()\n .resourceType(\"DATABASE\")\n .expressions( \n PermissionsLfTagPolicyExpressionArgs.builder()\n .key(\"Team\")\n .values(\"Sales\")\n .build(),\n PermissionsLfTagPolicyExpressionArgs.builder()\n .key(\"Environment\")\n .values( \n \"Dev\",\n \"Production\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:lakeformation:Permissions\n properties:\n principal: ${salesRole.arn}\n permissions:\n - CREATE_TABLE\n - ALTER\n - DROP\n lfTagPolicy:\n resourceType: DATABASE\n expressions:\n - key: Team\n values:\n - Sales\n - key: Environment\n values:\n - Dev\n - Production\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "catalogId": { "type": "string", @@ -300589,7 +300589,7 @@ } }, "aws:mediastore/containerPolicy:ContainerPolicy": { - "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst exampleContainer = new aws.mediastore.Container(\"example\", {name: \"example\"});\nconst example = aws.iam.getPolicyDocumentOutput({\n statements: [{\n sid: \"MediaStoreFullAccess\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [currentGetCallerIdentity.then(currentGetCallerIdentity =\u003e `arn:aws:iam::${currentGetCallerIdentity.accountId}:root`)],\n }],\n actions: [\"mediastore:*\"],\n resources: [pulumi.all([current, currentGetCallerIdentity, exampleContainer.name]).apply(([current, currentGetCallerIdentity, name]) =\u003e `arn:aws:mediastore:${current.name}:${currentGetCallerIdentity.accountId}:container/${name}/*`)],\n conditions: [{\n test: \"Bool\",\n variable: \"aws:SecureTransport\",\n values: [\"true\"],\n }],\n }],\n});\nconst exampleContainerPolicy = new aws.mediastore.ContainerPolicy(\"example\", {\n containerName: exampleContainer.name,\n policy: example.apply(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample_container = aws.mediastore.Container(\"example\", name=\"example\")\nexample = aws.iam.get_policy_document_output(statements=[{\n \"sid\": \"MediaStoreFullAccess\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current_get_caller_identity.account_id}:root\"],\n }],\n \"actions\": [\"mediastore:*\"],\n \"resources\": [example_container.name.apply(lambda name: f\"arn:aws:mediastore:{current.name}:{current_get_caller_identity.account_id}:container/{name}/*\")],\n \"conditions\": [{\n \"test\": \"Bool\",\n \"variable\": \"aws:SecureTransport\",\n \"values\": [\"true\"],\n }],\n}])\nexample_container_policy = aws.mediastore.ContainerPolicy(\"example\",\n container_name=example_container.name,\n policy=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var exampleContainer = new Aws.MediaStore.Container(\"example\", new()\n {\n Name = \"example\",\n });\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"MediaStoreFullAccess\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n Actions = new[]\n {\n \"mediastore:*\",\n },\n Resources = new[]\n {\n $\"arn:aws:mediastore:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:container/{exampleContainer.Name}/*\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"Bool\",\n Variable = \"aws:SecureTransport\",\n Values = new[]\n {\n \"true\",\n },\n },\n },\n },\n },\n });\n\n var exampleContainerPolicy = new Aws.MediaStore.ContainerPolicy(\"example\", new()\n {\n ContainerName = exampleContainer.Name,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/mediastore\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleContainer, err := mediastore.NewContainer(ctx, \"example\", \u0026mediastore.ContainerArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"MediaStoreFullAccess\"),\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"arn:aws:iam::%v:root\", currentGetCallerIdentity.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"mediastore:*\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texampleContainer.Name.ApplyT(func(name string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"arn:aws:mediastore:%v:%v:container/%v/*\", current.Name, currentGetCallerIdentity.AccountId, name), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"Bool\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"aws:SecureTransport\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"true\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\t_, err = mediastore.NewContainerPolicy(ctx, \"example\", \u0026mediastore.ContainerPolicyArgs{\n\t\t\tContainerName: exampleContainer.Name,\n\t\t\tPolicy: pulumi.String(example.ApplyT(func(example iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026example.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.mediastore.Container;\nimport com.pulumi.aws.mediastore.ContainerArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.mediastore.ContainerPolicy;\nimport com.pulumi.aws.mediastore.ContainerPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var exampleContainer = new Container(\"exampleContainer\", ContainerArgs.builder()\n .name(\"example\")\n .build());\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"MediaStoreFullAccess\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .actions(\"mediastore:*\")\n .resources(exampleContainer.name().applyValue(name -\u003e String.format(\"arn:aws:mediastore:%s:%s:container/%s/*\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),name)))\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"Bool\")\n .variable(\"aws:SecureTransport\")\n .values(\"true\")\n .build())\n .build())\n .build());\n\n var exampleContainerPolicy = new ContainerPolicy(\"exampleContainerPolicy\", ContainerPolicyArgs.builder()\n .containerName(exampleContainer.name())\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(example -\u003e example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleContainer:\n type: aws:mediastore:Container\n name: example\n properties:\n name: example\n exampleContainerPolicy:\n type: aws:mediastore:ContainerPolicy\n name: example\n properties:\n containerName: ${exampleContainer.name}\n policy: ${example.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: MediaStoreFullAccess\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${currentGetCallerIdentity.accountId}:root\n actions:\n - mediastore:*\n resources:\n - arn:aws:mediastore:${current.name}:${currentGetCallerIdentity.accountId}:container/${exampleContainer.name}/*\n conditions:\n - test: Bool\n variable: aws:SecureTransport\n values:\n - 'true'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import MediaStore Container Policy using the MediaStore Container Name. For example:\n\n```sh\n$ pulumi import aws:mediastore/containerPolicy:ContainerPolicy example example\n```\n", + "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst exampleContainer = new aws.mediastore.Container(\"example\", {name: \"example\"});\nconst example = aws.iam.getPolicyDocumentOutput({\n statements: [{\n sid: \"MediaStoreFullAccess\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [currentGetCallerIdentity.then(currentGetCallerIdentity =\u003e `arn:aws:iam::${currentGetCallerIdentity.accountId}:root`)],\n }],\n actions: [\"mediastore:*\"],\n resources: [pulumi.all([current, currentGetCallerIdentity, exampleContainer.name]).apply(([current, currentGetCallerIdentity, name]) =\u003e `arn:aws:mediastore:${current.name}:${currentGetCallerIdentity.accountId}:container/${name}/*`)],\n conditions: [{\n test: \"Bool\",\n variable: \"aws:SecureTransport\",\n values: [\"true\"],\n }],\n }],\n});\nconst exampleContainerPolicy = new aws.mediastore.ContainerPolicy(\"example\", {\n containerName: exampleContainer.name,\n policy: example.apply(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample_container = aws.mediastore.Container(\"example\", name=\"example\")\nexample = aws.iam.get_policy_document_output(statements=[{\n \"sid\": \"MediaStoreFullAccess\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current_get_caller_identity.account_id}:root\"],\n }],\n \"actions\": [\"mediastore:*\"],\n \"resources\": [example_container.name.apply(lambda name: f\"arn:aws:mediastore:{current.name}:{current_get_caller_identity.account_id}:container/{name}/*\")],\n \"conditions\": [{\n \"test\": \"Bool\",\n \"variable\": \"aws:SecureTransport\",\n \"values\": [\"true\"],\n }],\n}])\nexample_container_policy = aws.mediastore.ContainerPolicy(\"example\",\n container_name=example_container.name,\n policy=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var exampleContainer = new Aws.MediaStore.Container(\"example\", new()\n {\n Name = \"example\",\n });\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"MediaStoreFullAccess\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n Actions = new[]\n {\n \"mediastore:*\",\n },\n Resources = new[]\n {\n $\"arn:aws:mediastore:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:container/{exampleContainer.Name}/*\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"Bool\",\n Variable = \"aws:SecureTransport\",\n Values = new[]\n {\n \"true\",\n },\n },\n },\n },\n },\n });\n\n var exampleContainerPolicy = new Aws.MediaStore.ContainerPolicy(\"example\", new()\n {\n ContainerName = exampleContainer.Name,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/mediastore\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleContainer, err := mediastore.NewContainer(ctx, \"example\", \u0026mediastore.ContainerArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample := iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\n\t\t\tStatements: iam.GetPolicyDocumentStatementArray{\n\t\t\t\t\u0026iam.GetPolicyDocumentStatementArgs{\n\t\t\t\t\tSid: pulumi.String(\"MediaStoreFullAccess\"),\n\t\t\t\t\tEffect: pulumi.String(\"Allow\"),\n\t\t\t\t\tPrincipals: iam.GetPolicyDocumentStatementPrincipalArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementPrincipalArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"AWS\"),\n\t\t\t\t\t\t\tIdentifiers: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.Sprintf(\"arn:aws:iam::%v:root\", currentGetCallerIdentity.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"mediastore:*\"),\n\t\t\t\t\t},\n\t\t\t\t\tResources: pulumi.StringArray{\n\t\t\t\t\t\texampleContainer.Name.ApplyT(func(name string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"arn:aws:mediastore:%v:%v:container/%v/*\", current.Name, currentGetCallerIdentity.AccountId, name), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t\tConditions: iam.GetPolicyDocumentStatementConditionArray{\n\t\t\t\t\t\t\u0026iam.GetPolicyDocumentStatementConditionArgs{\n\t\t\t\t\t\t\tTest: pulumi.String(\"Bool\"),\n\t\t\t\t\t\t\tVariable: pulumi.String(\"aws:SecureTransport\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"true\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\t_, err = mediastore.NewContainerPolicy(ctx, \"example\", \u0026mediastore.ContainerPolicyArgs{\n\t\t\tContainerName: exampleContainer.Name,\n\t\t\tPolicy: pulumi.String(example.ApplyT(func(example iam.GetPolicyDocumentResult) (*string, error) {\n\t\t\t\treturn \u0026example.Json, nil\n\t\t\t}).(pulumi.StringPtrOutput)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.mediastore.Container;\nimport com.pulumi.aws.mediastore.ContainerArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.mediastore.ContainerPolicy;\nimport com.pulumi.aws.mediastore.ContainerPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var exampleContainer = new Container(\"exampleContainer\", ContainerArgs.builder()\n .name(\"example\")\n .build());\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"MediaStoreFullAccess\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .actions(\"mediastore:*\")\n .resources(exampleContainer.name().applyValue(name -\u003e String.format(\"arn:aws:mediastore:%s:%s:container/%s/*\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),name)))\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"Bool\")\n .variable(\"aws:SecureTransport\")\n .values(\"true\")\n .build())\n .build())\n .build());\n\n var exampleContainerPolicy = new ContainerPolicy(\"exampleContainerPolicy\", ContainerPolicyArgs.builder()\n .containerName(exampleContainer.name())\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(example -\u003e example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleContainer:\n type: aws:mediastore:Container\n name: example\n properties:\n name: example\n exampleContainerPolicy:\n type: aws:mediastore:ContainerPolicy\n name: example\n properties:\n containerName: ${exampleContainer.name}\n policy: ${example.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: MediaStoreFullAccess\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${currentGetCallerIdentity.accountId}:root\n actions:\n - mediastore:*\n resources:\n - arn:aws:mediastore:${current.name}:${currentGetCallerIdentity.accountId}:container/${exampleContainer.name}/*\n conditions:\n - test: Bool\n variable: aws:SecureTransport\n values:\n - 'true'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import MediaStore Container Policy using the MediaStore Container Name. For example:\n\n```sh\n$ pulumi import aws:mediastore/containerPolicy:ContainerPolicy example example\n```\n", "properties": { "containerName": { "type": "string", @@ -302615,7 +302615,7 @@ } }, "aws:msk/clusterPolicy:ClusterPolicy": { - "description": "Resource for managing an AWS Managed Streaming for Kafka Cluster Policy.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst example = new aws.msk.ClusterPolicy(\"example\", {\n clusterArn: exampleAwsMskCluster.arn,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Sid: \"ExampleMskClusterPolicy\",\n Effect: \"Allow\",\n Principal: {\n AWS: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:root`),\n },\n Action: [\n \"kafka:Describe*\",\n \"kafka:Get*\",\n \"kafka:CreateVpcConnection\",\n \"kafka:GetBootstrapBrokers\",\n ],\n Resource: exampleAwsMskCluster.arn,\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\nexample = aws.msk.ClusterPolicy(\"example\",\n cluster_arn=example_aws_msk_cluster[\"arn\"],\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Sid\": \"ExampleMskClusterPolicy\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:root\",\n },\n \"Action\": [\n \"kafka:Describe*\",\n \"kafka:Get*\",\n \"kafka:CreateVpcConnection\",\n \"kafka:GetBootstrapBrokers\",\n ],\n \"Resource\": example_aws_msk_cluster[\"arn\"],\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var example = new Aws.Msk.ClusterPolicy(\"example\", new()\n {\n ClusterArn = exampleAwsMskCluster.Arn,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"ExampleMskClusterPolicy\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = Output.Tuple(currentGetPartition, current).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var current = values.Item2;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\";\n }),\n },\n [\"Action\"] = new[]\n {\n \"kafka:Describe*\",\n \"kafka:Get*\",\n \"kafka:CreateVpcConnection\",\n \"kafka:GetBootstrapBrokers\",\n },\n [\"Resource\"] = exampleAwsMskCluster.Arn,\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"ExampleMskClusterPolicy\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:%v:iam::%v:root\", currentGetPartition.Partition, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kafka:Describe*\",\n\t\t\t\t\t\t\"kafka:Get*\",\n\t\t\t\t\t\t\"kafka:CreateVpcConnection\",\n\t\t\t\t\t\t\"kafka:GetBootstrapBrokers\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": exampleAwsMskCluster.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = msk.NewClusterPolicy(ctx, \"example\", \u0026msk.ClusterPolicyArgs{\n\t\t\tClusterArn: pulumi.Any(exampleAwsMskCluster.Arn),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.msk.ClusterPolicy;\nimport com.pulumi.aws.msk.ClusterPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n var example = new ClusterPolicy(\"example\", ClusterPolicyArgs.builder()\n .clusterArn(exampleAwsMskCluster.arn())\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"ExampleMskClusterPolicy\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:%s:iam::%s:root\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kafka:Describe*\", \n \"kafka:Get*\", \n \"kafka:CreateVpcConnection\", \n \"kafka:GetBootstrapBrokers\"\n )),\n jsonProperty(\"Resource\", exampleAwsMskCluster.arn())\n )))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:msk:ClusterPolicy\n properties:\n clusterArn: ${exampleAwsMskCluster.arn}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Sid: ExampleMskClusterPolicy\n Effect: Allow\n Principal:\n AWS: arn:${currentGetPartition.partition}:iam::${current.accountId}:root\n Action:\n - kafka:Describe*\n - kafka:Get*\n - kafka:CreateVpcConnection\n - kafka:GetBootstrapBrokers\n Resource: ${exampleAwsMskCluster.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Managed Streaming for Kafka Cluster Policy using the `cluster_arn`. For example:\n\n```sh\n$ pulumi import aws:msk/clusterPolicy:ClusterPolicy example arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3\n```\n", + "description": "Resource for managing an AWS Managed Streaming for Kafka Cluster Policy.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst example = new aws.msk.ClusterPolicy(\"example\", {\n clusterArn: exampleAwsMskCluster.arn,\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Sid: \"ExampleMskClusterPolicy\",\n Effect: \"Allow\",\n Principal: {\n AWS: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:root`),\n },\n Action: [\n \"kafka:Describe*\",\n \"kafka:Get*\",\n \"kafka:CreateVpcConnection\",\n \"kafka:GetBootstrapBrokers\",\n ],\n Resource: exampleAwsMskCluster.arn,\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\nexample = aws.msk.ClusterPolicy(\"example\",\n cluster_arn=example_aws_msk_cluster[\"arn\"],\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Sid\": \"ExampleMskClusterPolicy\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:root\",\n },\n \"Action\": [\n \"kafka:Describe*\",\n \"kafka:Get*\",\n \"kafka:CreateVpcConnection\",\n \"kafka:GetBootstrapBrokers\",\n ],\n \"Resource\": example_aws_msk_cluster[\"arn\"],\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var example = new Aws.Msk.ClusterPolicy(\"example\", new()\n {\n ClusterArn = exampleAwsMskCluster.Arn,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"ExampleMskClusterPolicy\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = Output.Tuple(currentGetPartition, current).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var current = values.Item2;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\";\n }),\n },\n [\"Action\"] = new[]\n {\n \"kafka:Describe*\",\n \"kafka:Get*\",\n \"kafka:CreateVpcConnection\",\n \"kafka:GetBootstrapBrokers\",\n },\n [\"Resource\"] = exampleAwsMskCluster.Arn,\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Sid\": \"ExampleMskClusterPolicy\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:%v:iam::%v:root\", currentGetPartition.Partition, current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kafka:Describe*\",\n\t\t\t\t\t\t\"kafka:Get*\",\n\t\t\t\t\t\t\"kafka:CreateVpcConnection\",\n\t\t\t\t\t\t\"kafka:GetBootstrapBrokers\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": exampleAwsMskCluster.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = msk.NewClusterPolicy(ctx, \"example\", \u0026msk.ClusterPolicyArgs{\n\t\t\tClusterArn: pulumi.Any(exampleAwsMskCluster.Arn),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.msk.ClusterPolicy;\nimport com.pulumi.aws.msk.ClusterPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n var example = new ClusterPolicy(\"example\", ClusterPolicyArgs.builder()\n .clusterArn(exampleAwsMskCluster.arn())\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"ExampleMskClusterPolicy\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:%s:iam::%s:root\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"kafka:Describe*\", \n \"kafka:Get*\", \n \"kafka:CreateVpcConnection\", \n \"kafka:GetBootstrapBrokers\"\n )),\n jsonProperty(\"Resource\", exampleAwsMskCluster.arn())\n )))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:msk:ClusterPolicy\n properties:\n clusterArn: ${exampleAwsMskCluster.arn}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Sid: ExampleMskClusterPolicy\n Effect: Allow\n Principal:\n AWS: arn:${currentGetPartition.partition}:iam::${current.accountId}:root\n Action:\n - kafka:Describe*\n - kafka:Get*\n - kafka:CreateVpcConnection\n - kafka:GetBootstrapBrokers\n Resource: ${exampleAwsMskCluster.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Managed Streaming for Kafka Cluster Policy using the `cluster_arn`. For example:\n\n```sh\n$ pulumi import aws:msk/clusterPolicy:ClusterPolicy example arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3\n```\n", "properties": { "clusterArn": { "type": "string", @@ -310036,7 +310036,7 @@ } }, "aws:opensearch/domain:Domain": { - "description": "Manages an Amazon OpenSearch Domain.\n\n## Elasticsearch vs. OpenSearch\n\nAmazon OpenSearch Service is the successor to Amazon Elasticsearch Service and supports OpenSearch and legacy Elasticsearch OSS (up to 7.10, the final open source version of the software).\n\nOpenSearch Domain configurations are similar in many ways to Elasticsearch Domain configurations. However, there are important differences including these:\n\n* OpenSearch has `engine_version` while Elasticsearch has `elasticsearch_version`\n* Versions are specified differently - _e.g._, `Elasticsearch_7.10` with OpenSearch vs. `7.10` for Elasticsearch.\n* `instance_type` argument values end in `search` for OpenSearch vs. `elasticsearch` for Elasticsearch (_e.g._, `t2.micro.search` vs. `t2.micro.elasticsearch`).\n* The AWS-managed service-linked role for OpenSearch is called `AWSServiceRoleForAmazonOpenSearchService` instead of `AWSServiceRoleForAmazonElasticsearchService` for Elasticsearch.\n\nThere are also some potentially unexpected similarities in configurations:\n\n* ARNs for both are prefaced with `arn:aws:es:`.\n* Both OpenSearch and Elasticsearch use assume role policies that refer to the `Principal` `Service` as `es.amazonaws.com`.\n* IAM policy actions, such as those you will find in `access_policies`, are prefaced with `es:` for both.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.opensearch.Domain(\"example\", {\n domainName: \"example\",\n engineVersion: \"Elasticsearch_7.10\",\n clusterConfig: {\n instanceType: \"r4.large.search\",\n },\n tags: {\n Domain: \"TestDomain\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.opensearch.Domain(\"example\",\n domain_name=\"example\",\n engine_version=\"Elasticsearch_7.10\",\n cluster_config={\n \"instance_type\": \"r4.large.search\",\n },\n tags={\n \"Domain\": \"TestDomain\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = \"example\",\n EngineVersion = \"Elasticsearch_7.10\",\n ClusterConfig = new Aws.OpenSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"r4.large.search\",\n },\n Tags = \n {\n { \"Domain\", \"TestDomain\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"example\"),\n\t\t\tEngineVersion: pulumi.String(\"Elasticsearch_7.10\"),\n\t\t\tClusterConfig: \u0026opensearch.DomainClusterConfigArgs{\n\t\t\t\tInstanceType: pulumi.String(\"r4.large.search\"),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Domain\": pulumi.String(\"TestDomain\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainClusterConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(\"example\")\n .engineVersion(\"Elasticsearch_7.10\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"r4.large.search\")\n .build())\n .tags(Map.of(\"Domain\", \"TestDomain\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:Domain\n properties:\n domainName: example\n engineVersion: Elasticsearch_7.10\n clusterConfig:\n instanceType: r4.large.search\n tags:\n Domain: TestDomain\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Access Policy\n\n\u003e See also: `aws.opensearch.DomainPolicy` resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst config = new pulumi.Config();\nconst domain = config.get(\"domain\") || \"tf-test\";\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst example = Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"*\",\n identifiers: [\"*\"],\n }],\n actions: [\"es:*\"],\n resources: [`arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*`],\n conditions: [{\n test: \"IpAddress\",\n variable: \"aws:SourceIp\",\n values: [\"66.193.100.22/32\"],\n }],\n }],\n}));\nconst exampleDomain = new aws.opensearch.Domain(\"example\", {\n domainName: domain,\n accessPolicies: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\ndomain = config.get(\"domain\")\nif domain is None:\n domain = \"tf-test\"\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"*\",\n \"identifiers\": [\"*\"],\n }],\n \"actions\": [\"es:*\"],\n \"resources\": [f\"arn:aws:es:{current.name}:{current_get_caller_identity.account_id}:domain/{domain}/*\"],\n \"conditions\": [{\n \"test\": \"IpAddress\",\n \"variable\": \"aws:SourceIp\",\n \"values\": [\"66.193.100.22/32\"],\n }],\n}])\nexample_domain = aws.opensearch.Domain(\"example\",\n domain_name=domain,\n access_policies=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var domain = config.Get(\"domain\") ?? \"tf-test\";\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"*\",\n Identifiers = new[]\n {\n \"*\",\n },\n },\n },\n Actions = new[]\n {\n \"es:*\",\n },\n Resources = new[]\n {\n $\"arn:aws:es:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:domain/{domain}/*\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"IpAddress\",\n Variable = \"aws:SourceIp\",\n Values = new[]\n {\n \"66.193.100.22/32\",\n },\n },\n },\n },\n },\n });\n\n var exampleDomain = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = domain,\n AccessPolicies = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdomain := \"tf-test\"\n\t\tif param := cfg.Get(\"domain\"); param != \"\" {\n\t\t\tdomain = param\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"*\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"*\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"es:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:es:%v:%v:domain/%v/*\", current.Name, currentGetCallerIdentity.AccountId, domain),\n\t\t\t\t\t},\n\t\t\t\t\tConditions: []iam.GetPolicyDocumentStatementCondition{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tTest: \"IpAddress\",\n\t\t\t\t\t\t\tVariable: \"aws:SourceIp\",\n\t\t\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\t\t\"66.193.100.22/32\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(domain),\n\t\t\tAccessPolicies: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var domain = config.get(\"domain\").orElse(\"tf-test\");\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"*\")\n .identifiers(\"*\")\n .build())\n .actions(\"es:*\")\n .resources(String.format(\"arn:aws:es:%s:%s:domain/%s/*\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),domain))\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"IpAddress\")\n .variable(\"aws:SourceIp\")\n .values(\"66.193.100.22/32\")\n .build())\n .build())\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .domainName(domain)\n .accessPolicies(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n domain:\n type: string\n default: tf-test\nresources:\n exampleDomain:\n type: aws:opensearch:Domain\n name: example\n properties:\n domainName: ${domain}\n accessPolicies: ${example.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: '*'\n identifiers:\n - '*'\n actions:\n - es:*\n resources:\n - arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\n conditions:\n - test: IpAddress\n variable: aws:SourceIp\n values:\n - 66.193.100.22/32\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Log publishing to CloudWatch Logs\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleLogGroup = new aws.cloudwatch.LogGroup(\"example\", {name: \"example\"});\nconst example = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"es.amazonaws.com\"],\n }],\n actions: [\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n ],\n resources: [\"arn:aws:logs:*\"],\n }],\n});\nconst exampleLogResourcePolicy = new aws.cloudwatch.LogResourcePolicy(\"example\", {\n policyName: \"example\",\n policyDocument: example.then(example =\u003e example.json),\n});\nconst exampleDomain = new aws.opensearch.Domain(\"example\", {logPublishingOptions: [{\n cloudwatchLogGroupArn: exampleLogGroup.arn,\n logType: \"INDEX_SLOW_LOGS\",\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_log_group = aws.cloudwatch.LogGroup(\"example\", name=\"example\")\nexample = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"es.amazonaws.com\"],\n }],\n \"actions\": [\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n ],\n \"resources\": [\"arn:aws:logs:*\"],\n}])\nexample_log_resource_policy = aws.cloudwatch.LogResourcePolicy(\"example\",\n policy_name=\"example\",\n policy_document=example.json)\nexample_domain = aws.opensearch.Domain(\"example\", log_publishing_options=[{\n \"cloudwatch_log_group_arn\": example_log_group.arn,\n \"log_type\": \"INDEX_SLOW_LOGS\",\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleLogGroup = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example\",\n });\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"es.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n },\n Resources = new[]\n {\n \"arn:aws:logs:*\",\n },\n },\n },\n });\n\n var exampleLogResourcePolicy = new Aws.CloudWatch.LogResourcePolicy(\"example\", new()\n {\n PolicyName = \"example\",\n PolicyDocument = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleDomain = new Aws.OpenSearch.Domain(\"example\", new()\n {\n LogPublishingOptions = new[]\n {\n new Aws.OpenSearch.Inputs.DomainLogPublishingOptionArgs\n {\n CloudwatchLogGroupArn = exampleLogGroup.Arn,\n LogType = \"INDEX_SLOW_LOGS\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleLogGroup, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"es.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"logs:PutLogEvents\",\n\t\t\t\t\t\t\"logs:PutLogEventsBatch\",\n\t\t\t\t\t\t\"logs:CreateLogStream\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:logs:*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewLogResourcePolicy(ctx, \"example\", \u0026cloudwatch.LogResourcePolicyArgs{\n\t\t\tPolicyName: pulumi.String(\"example\"),\n\t\t\tPolicyDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tLogPublishingOptions: opensearch.DomainLogPublishingOptionArray{\n\t\t\t\t\u0026opensearch.DomainLogPublishingOptionArgs{\n\t\t\t\t\tCloudwatchLogGroupArn: exampleLogGroup.Arn,\n\t\t\t\t\tLogType: pulumi.String(\"INDEX_SLOW_LOGS\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicy;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicyArgs;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainLogPublishingOptionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleLogGroup = new LogGroup(\"exampleLogGroup\", LogGroupArgs.builder()\n .name(\"example\")\n .build());\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"es.amazonaws.com\")\n .build())\n .actions( \n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\")\n .resources(\"arn:aws:logs:*\")\n .build())\n .build());\n\n var exampleLogResourcePolicy = new LogResourcePolicy(\"exampleLogResourcePolicy\", LogResourcePolicyArgs.builder()\n .policyName(\"example\")\n .policyDocument(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .logPublishingOptions(DomainLogPublishingOptionArgs.builder()\n .cloudwatchLogGroupArn(exampleLogGroup.arn())\n .logType(\"INDEX_SLOW_LOGS\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleLogGroup:\n type: aws:cloudwatch:LogGroup\n name: example\n properties:\n name: example\n exampleLogResourcePolicy:\n type: aws:cloudwatch:LogResourcePolicy\n name: example\n properties:\n policyName: example\n policyDocument: ${example.json}\n exampleDomain:\n type: aws:opensearch:Domain\n name: example\n properties:\n logPublishingOptions:\n - cloudwatchLogGroupArn: ${exampleLogGroup.arn}\n logType: INDEX_SLOW_LOGS\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - es.amazonaws.com\n actions:\n - logs:PutLogEvents\n - logs:PutLogEventsBatch\n - logs:CreateLogStream\n resources:\n - arn:aws:logs:*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### VPC based OpenSearch\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst config = new pulumi.Config();\nconst vpc = config.requireObject(\"vpc\");\nconst domain = config.get(\"domain\") || \"tf-test\";\nconst example = aws.ec2.getVpc({\n tags: {\n Name: vpc,\n },\n});\nconst exampleGetSubnets = example.then(example =\u003e aws.ec2.getSubnets({\n filters: [{\n name: \"vpc-id\",\n values: [example.id],\n }],\n tags: {\n Tier: \"private\",\n },\n}));\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst exampleSecurityGroup = new aws.ec2.SecurityGroup(\"example\", {\n name: `${vpc}-opensearch-${domain}`,\n description: \"Managed by Pulumi\",\n vpcId: example.then(example =\u003e example.id),\n ingress: [{\n fromPort: 443,\n toPort: 443,\n protocol: \"tcp\",\n cidrBlocks: [example.then(example =\u003e example.cidrBlock)],\n }],\n});\nconst exampleServiceLinkedRole = new aws.iam.ServiceLinkedRole(\"example\", {awsServiceName: \"opensearchservice.amazonaws.com\"});\nconst exampleGetPolicyDocument = Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"*\",\n identifiers: [\"*\"],\n }],\n actions: [\"es:*\"],\n resources: [`arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*`],\n }],\n}));\nconst exampleDomain = new aws.opensearch.Domain(\"example\", {\n domainName: domain,\n engineVersion: \"OpenSearch_1.0\",\n clusterConfig: {\n instanceType: \"m4.large.search\",\n zoneAwarenessEnabled: true,\n },\n vpcOptions: {\n subnetIds: [\n exampleGetSubnets.then(exampleGetSubnets =\u003e exampleGetSubnets.ids?.[0]),\n exampleGetSubnets.then(exampleGetSubnets =\u003e exampleGetSubnets.ids?.[1]),\n ],\n securityGroupIds: [exampleSecurityGroup.id],\n },\n advancedOptions: {\n \"rest.action.multi.allow_explicit_index\": \"true\",\n },\n accessPolicies: exampleGetPolicyDocument.then(exampleGetPolicyDocument =\u003e exampleGetPolicyDocument.json),\n tags: {\n Domain: \"TestDomain\",\n },\n}, {\n dependsOn: [exampleServiceLinkedRole],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\nvpc = config.require_object(\"vpc\")\ndomain = config.get(\"domain\")\nif domain is None:\n domain = \"tf-test\"\nexample = aws.ec2.get_vpc(tags={\n \"Name\": vpc,\n})\nexample_get_subnets = aws.ec2.get_subnets(filters=[{\n \"name\": \"vpc-id\",\n \"values\": [example.id],\n }],\n tags={\n \"Tier\": \"private\",\n })\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample_security_group = aws.ec2.SecurityGroup(\"example\",\n name=f\"{vpc}-opensearch-{domain}\",\n description=\"Managed by Pulumi\",\n vpc_id=example.id,\n ingress=[{\n \"from_port\": 443,\n \"to_port\": 443,\n \"protocol\": \"tcp\",\n \"cidr_blocks\": [example.cidr_block],\n }])\nexample_service_linked_role = aws.iam.ServiceLinkedRole(\"example\", aws_service_name=\"opensearchservice.amazonaws.com\")\nexample_get_policy_document = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"*\",\n \"identifiers\": [\"*\"],\n }],\n \"actions\": [\"es:*\"],\n \"resources\": [f\"arn:aws:es:{current.name}:{current_get_caller_identity.account_id}:domain/{domain}/*\"],\n}])\nexample_domain = aws.opensearch.Domain(\"example\",\n domain_name=domain,\n engine_version=\"OpenSearch_1.0\",\n cluster_config={\n \"instance_type\": \"m4.large.search\",\n \"zone_awareness_enabled\": True,\n },\n vpc_options={\n \"subnet_ids\": [\n example_get_subnets.ids[0],\n example_get_subnets.ids[1],\n ],\n \"security_group_ids\": [example_security_group.id],\n },\n advanced_options={\n \"rest.action.multi.allow_explicit_index\": \"true\",\n },\n access_policies=example_get_policy_document.json,\n tags={\n \"Domain\": \"TestDomain\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_service_linked_role]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var vpc = config.RequireObject\u003cdynamic\u003e(\"vpc\");\n var domain = config.Get(\"domain\") ?? \"tf-test\";\n var example = Aws.Ec2.GetVpc.Invoke(new()\n {\n Tags = \n {\n { \"Name\", vpc },\n },\n });\n\n var exampleGetSubnets = Aws.Ec2.GetSubnets.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetSubnetsFilterInputArgs\n {\n Name = \"vpc-id\",\n Values = new[]\n {\n example.Apply(getVpcResult =\u003e getVpcResult.Id),\n },\n },\n },\n Tags = \n {\n { \"Tier\", \"private\" },\n },\n });\n\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var exampleSecurityGroup = new Aws.Ec2.SecurityGroup(\"example\", new()\n {\n Name = $\"{vpc}-opensearch-{domain}\",\n Description = \"Managed by Pulumi\",\n VpcId = example.Apply(getVpcResult =\u003e getVpcResult.Id),\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.SecurityGroupIngressArgs\n {\n FromPort = 443,\n ToPort = 443,\n Protocol = \"tcp\",\n CidrBlocks = new[]\n {\n example.Apply(getVpcResult =\u003e getVpcResult.CidrBlock),\n },\n },\n },\n });\n\n var exampleServiceLinkedRole = new Aws.Iam.ServiceLinkedRole(\"example\", new()\n {\n AwsServiceName = \"opensearchservice.amazonaws.com\",\n });\n\n var exampleGetPolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"*\",\n Identifiers = new[]\n {\n \"*\",\n },\n },\n },\n Actions = new[]\n {\n \"es:*\",\n },\n Resources = new[]\n {\n $\"arn:aws:es:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:domain/{domain}/*\",\n },\n },\n },\n });\n\n var exampleDomain = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = domain,\n EngineVersion = \"OpenSearch_1.0\",\n ClusterConfig = new Aws.OpenSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"m4.large.search\",\n ZoneAwarenessEnabled = true,\n },\n VpcOptions = new Aws.OpenSearch.Inputs.DomainVpcOptionsArgs\n {\n SubnetIds = new[]\n {\n exampleGetSubnets.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[0]),\n exampleGetSubnets.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[1]),\n },\n SecurityGroupIds = new[]\n {\n exampleSecurityGroup.Id,\n },\n },\n AdvancedOptions = \n {\n { \"rest.action.multi.allow_explicit_index\", \"true\" },\n },\n AccessPolicies = exampleGetPolicyDocument.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n Tags = \n {\n { \"Domain\", \"TestDomain\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleServiceLinkedRole,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\ncfg := config.New(ctx, \"\")\nvpc := cfg.RequireObject(\"vpc\")\ndomain := \"tf-test\";\nif param := cfg.Get(\"domain\"); param != \"\"{\ndomain = param\n}\nexample, err := ec2.LookupVpc(ctx, \u0026ec2.LookupVpcArgs{\nTags: pulumi.StringMap{\n\"Name\": vpc,\n},\n}, nil);\nif err != nil {\nreturn err\n}\nexampleGetSubnets, err := ec2.GetSubnets(ctx, \u0026ec2.GetSubnetsArgs{\nFilters: []ec2.GetSubnetsFilter{\n{\nName: \"vpc-id\",\nValues: interface{}{\nexample.Id,\n},\n},\n},\nTags: map[string]interface{}{\n\"Tier\": \"private\",\n},\n}, nil);\nif err != nil {\nreturn err\n}\ncurrent, err := aws.GetRegion(ctx, nil, nil);\nif err != nil {\nreturn err\n}\ncurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nexampleSecurityGroup, err := ec2.NewSecurityGroup(ctx, \"example\", \u0026ec2.SecurityGroupArgs{\nName: pulumi.Sprintf(\"%v-opensearch-%v\", vpc, domain),\nDescription: pulumi.String(\"Managed by Pulumi\"),\nVpcId: pulumi.String(example.Id),\nIngress: ec2.SecurityGroupIngressArray{\n\u0026ec2.SecurityGroupIngressArgs{\nFromPort: pulumi.Int(443),\nToPort: pulumi.Int(443),\nProtocol: pulumi.String(\"tcp\"),\nCidrBlocks: pulumi.StringArray{\npulumi.String(example.CidrBlock),\n},\n},\n},\n})\nif err != nil {\nreturn err\n}\nexampleServiceLinkedRole, err := iam.NewServiceLinkedRole(ctx, \"example\", \u0026iam.ServiceLinkedRoleArgs{\nAwsServiceName: pulumi.String(\"opensearchservice.amazonaws.com\"),\n})\nif err != nil {\nreturn err\n}\nexampleGetPolicyDocument, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: pulumi.StringRef(\"Allow\"),\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"*\",\nIdentifiers: []string{\n\"*\",\n},\n},\n},\nActions: []string{\n\"es:*\",\n},\nResources: []string{\nfmt.Sprintf(\"arn:aws:es:%v:%v:domain/%v/*\", current.Name, currentGetCallerIdentity.AccountId, domain),\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\n_, err = opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\nDomainName: pulumi.String(domain),\nEngineVersion: pulumi.String(\"OpenSearch_1.0\"),\nClusterConfig: \u0026opensearch.DomainClusterConfigArgs{\nInstanceType: pulumi.String(\"m4.large.search\"),\nZoneAwarenessEnabled: pulumi.Bool(true),\n},\nVpcOptions: \u0026opensearch.DomainVpcOptionsArgs{\nSubnetIds: pulumi.StringArray{\npulumi.String(exampleGetSubnets.Ids[0]),\npulumi.String(exampleGetSubnets.Ids[1]),\n},\nSecurityGroupIds: pulumi.StringArray{\nexampleSecurityGroup.ID(),\n},\n},\nAdvancedOptions: pulumi.StringMap{\n\"rest.action.multi.allow_explicit_index\": pulumi.String(\"true\"),\n},\nAccessPolicies: pulumi.String(exampleGetPolicyDocument.Json),\nTags: pulumi.StringMap{\n\"Domain\": pulumi.String(\"TestDomain\"),\n},\n}, pulumi.DependsOn([]pulumi.Resource{\nexampleServiceLinkedRole,\n}))\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetVpcArgs;\nimport com.pulumi.aws.ec2.inputs.GetSubnetsArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.SecurityGroup;\nimport com.pulumi.aws.ec2.SecurityGroupArgs;\nimport com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;\nimport com.pulumi.aws.iam.ServiceLinkedRole;\nimport com.pulumi.aws.iam.ServiceLinkedRoleArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainClusterConfigArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainVpcOptionsArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var vpc = config.get(\"vpc\");\n final var domain = config.get(\"domain\").orElse(\"tf-test\");\n final var example = Ec2Functions.getVpc(GetVpcArgs.builder()\n .tags(Map.of(\"Name\", vpc))\n .build());\n\n final var exampleGetSubnets = Ec2Functions.getSubnets(GetSubnetsArgs.builder()\n .filters(GetSubnetsFilterArgs.builder()\n .name(\"vpc-id\")\n .values(example.applyValue(getVpcResult -\u003e getVpcResult.id()))\n .build())\n .tags(Map.of(\"Tier\", \"private\"))\n .build());\n\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var exampleSecurityGroup = new SecurityGroup(\"exampleSecurityGroup\", SecurityGroupArgs.builder()\n .name(String.format(\"%s-opensearch-%s\", vpc,domain))\n .description(\"Managed by Pulumi\")\n .vpcId(example.applyValue(getVpcResult -\u003e getVpcResult.id()))\n .ingress(SecurityGroupIngressArgs.builder()\n .fromPort(443)\n .toPort(443)\n .protocol(\"tcp\")\n .cidrBlocks(example.applyValue(getVpcResult -\u003e getVpcResult.cidrBlock()))\n .build())\n .build());\n\n var exampleServiceLinkedRole = new ServiceLinkedRole(\"exampleServiceLinkedRole\", ServiceLinkedRoleArgs.builder()\n .awsServiceName(\"opensearchservice.amazonaws.com\")\n .build());\n\n final var exampleGetPolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"*\")\n .identifiers(\"*\")\n .build())\n .actions(\"es:*\")\n .resources(String.format(\"arn:aws:es:%s:%s:domain/%s/*\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),domain))\n .build())\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .domainName(domain)\n .engineVersion(\"OpenSearch_1.0\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"m4.large.search\")\n .zoneAwarenessEnabled(true)\n .build())\n .vpcOptions(DomainVpcOptionsArgs.builder()\n .subnetIds( \n exampleGetSubnets.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[0]),\n exampleGetSubnets.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[1]))\n .securityGroupIds(exampleSecurityGroup.id())\n .build())\n .advancedOptions(Map.of(\"rest.action.multi.allow_explicit_index\", \"true\"))\n .accessPolicies(exampleGetPolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .tags(Map.of(\"Domain\", \"TestDomain\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleServiceLinkedRole)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n vpc:\n type: dynamic\n domain:\n type: string\n default: tf-test\nresources:\n exampleSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: example\n properties:\n name: ${vpc}-opensearch-${domain}\n description: Managed by Pulumi\n vpcId: ${example.id}\n ingress:\n - fromPort: 443\n toPort: 443\n protocol: tcp\n cidrBlocks:\n - ${example.cidrBlock}\n exampleServiceLinkedRole:\n type: aws:iam:ServiceLinkedRole\n name: example\n properties:\n awsServiceName: opensearchservice.amazonaws.com\n exampleDomain:\n type: aws:opensearch:Domain\n name: example\n properties:\n domainName: ${domain}\n engineVersion: OpenSearch_1.0\n clusterConfig:\n instanceType: m4.large.search\n zoneAwarenessEnabled: true\n vpcOptions:\n subnetIds:\n - ${exampleGetSubnets.ids[0]}\n - ${exampleGetSubnets.ids[1]}\n securityGroupIds:\n - ${exampleSecurityGroup.id}\n advancedOptions:\n rest.action.multi.allow_explicit_index: 'true'\n accessPolicies: ${exampleGetPolicyDocument.json}\n tags:\n Domain: TestDomain\n options:\n dependson:\n - ${exampleServiceLinkedRole}\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getVpc\n Arguments:\n tags:\n Name: ${vpc}\n exampleGetSubnets:\n fn::invoke:\n Function: aws:ec2:getSubnets\n Arguments:\n filters:\n - name: vpc-id\n values:\n - ${example.id}\n tags:\n Tier: private\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n exampleGetPolicyDocument:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: '*'\n identifiers:\n - '*'\n actions:\n - es:*\n resources:\n - arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Enabling fine-grained access control on an existing domain\n\nThis example shows two configurations: one to create a domain without fine-grained access control and the second to modify the domain to enable fine-grained access control. For more information, see [Enabling fine-grained access control](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html).\n\n### First apply\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.opensearch.Domain(\"example\", {\n domainName: \"ggkitty\",\n engineVersion: \"Elasticsearch_7.1\",\n clusterConfig: {\n instanceType: \"r5.large.search\",\n },\n advancedSecurityOptions: {\n enabled: false,\n anonymousAuthEnabled: true,\n internalUserDatabaseEnabled: true,\n masterUserOptions: {\n masterUserName: \"example\",\n masterUserPassword: \"Barbarbarbar1!\",\n },\n },\n encryptAtRest: {\n enabled: true,\n },\n domainEndpointOptions: {\n enforceHttps: true,\n tlsSecurityPolicy: \"Policy-Min-TLS-1-2-2019-07\",\n },\n nodeToNodeEncryption: {\n enabled: true,\n },\n ebsOptions: {\n ebsEnabled: true,\n volumeSize: 10,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.opensearch.Domain(\"example\",\n domain_name=\"ggkitty\",\n engine_version=\"Elasticsearch_7.1\",\n cluster_config={\n \"instance_type\": \"r5.large.search\",\n },\n advanced_security_options={\n \"enabled\": False,\n \"anonymous_auth_enabled\": True,\n \"internal_user_database_enabled\": True,\n \"master_user_options\": {\n \"master_user_name\": \"example\",\n \"master_user_password\": \"Barbarbarbar1!\",\n },\n },\n encrypt_at_rest={\n \"enabled\": True,\n },\n domain_endpoint_options={\n \"enforce_https\": True,\n \"tls_security_policy\": \"Policy-Min-TLS-1-2-2019-07\",\n },\n node_to_node_encryption={\n \"enabled\": True,\n },\n ebs_options={\n \"ebs_enabled\": True,\n \"volume_size\": 10,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = \"ggkitty\",\n EngineVersion = \"Elasticsearch_7.1\",\n ClusterConfig = new Aws.OpenSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"r5.large.search\",\n },\n AdvancedSecurityOptions = new Aws.OpenSearch.Inputs.DomainAdvancedSecurityOptionsArgs\n {\n Enabled = false,\n AnonymousAuthEnabled = true,\n InternalUserDatabaseEnabled = true,\n MasterUserOptions = new Aws.OpenSearch.Inputs.DomainAdvancedSecurityOptionsMasterUserOptionsArgs\n {\n MasterUserName = \"example\",\n MasterUserPassword = \"Barbarbarbar1!\",\n },\n },\n EncryptAtRest = new Aws.OpenSearch.Inputs.DomainEncryptAtRestArgs\n {\n Enabled = true,\n },\n DomainEndpointOptions = new Aws.OpenSearch.Inputs.DomainDomainEndpointOptionsArgs\n {\n EnforceHttps = true,\n TlsSecurityPolicy = \"Policy-Min-TLS-1-2-2019-07\",\n },\n NodeToNodeEncryption = new Aws.OpenSearch.Inputs.DomainNodeToNodeEncryptionArgs\n {\n Enabled = true,\n },\n EbsOptions = new Aws.OpenSearch.Inputs.DomainEbsOptionsArgs\n {\n EbsEnabled = true,\n VolumeSize = 10,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"ggkitty\"),\n\t\t\tEngineVersion: pulumi.String(\"Elasticsearch_7.1\"),\n\t\t\tClusterConfig: \u0026opensearch.DomainClusterConfigArgs{\n\t\t\t\tInstanceType: pulumi.String(\"r5.large.search\"),\n\t\t\t},\n\t\t\tAdvancedSecurityOptions: \u0026opensearch.DomainAdvancedSecurityOptionsArgs{\n\t\t\t\tEnabled: pulumi.Bool(false),\n\t\t\t\tAnonymousAuthEnabled: pulumi.Bool(true),\n\t\t\t\tInternalUserDatabaseEnabled: pulumi.Bool(true),\n\t\t\t\tMasterUserOptions: \u0026opensearch.DomainAdvancedSecurityOptionsMasterUserOptionsArgs{\n\t\t\t\t\tMasterUserName: pulumi.String(\"example\"),\n\t\t\t\t\tMasterUserPassword: pulumi.String(\"Barbarbarbar1!\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tEncryptAtRest: \u0026opensearch.DomainEncryptAtRestArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tDomainEndpointOptions: \u0026opensearch.DomainDomainEndpointOptionsArgs{\n\t\t\t\tEnforceHttps: pulumi.Bool(true),\n\t\t\t\tTlsSecurityPolicy: pulumi.String(\"Policy-Min-TLS-1-2-2019-07\"),\n\t\t\t},\n\t\t\tNodeToNodeEncryption: \u0026opensearch.DomainNodeToNodeEncryptionArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tEbsOptions: \u0026opensearch.DomainEbsOptionsArgs{\n\t\t\t\tEbsEnabled: pulumi.Bool(true),\n\t\t\t\tVolumeSize: pulumi.Int(10),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainClusterConfigArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainAdvancedSecurityOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainAdvancedSecurityOptionsMasterUserOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEncryptAtRestArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainDomainEndpointOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainNodeToNodeEncryptionArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEbsOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(\"ggkitty\")\n .engineVersion(\"Elasticsearch_7.1\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"r5.large.search\")\n .build())\n .advancedSecurityOptions(DomainAdvancedSecurityOptionsArgs.builder()\n .enabled(false)\n .anonymousAuthEnabled(true)\n .internalUserDatabaseEnabled(true)\n .masterUserOptions(DomainAdvancedSecurityOptionsMasterUserOptionsArgs.builder()\n .masterUserName(\"example\")\n .masterUserPassword(\"Barbarbarbar1!\")\n .build())\n .build())\n .encryptAtRest(DomainEncryptAtRestArgs.builder()\n .enabled(true)\n .build())\n .domainEndpointOptions(DomainDomainEndpointOptionsArgs.builder()\n .enforceHttps(true)\n .tlsSecurityPolicy(\"Policy-Min-TLS-1-2-2019-07\")\n .build())\n .nodeToNodeEncryption(DomainNodeToNodeEncryptionArgs.builder()\n .enabled(true)\n .build())\n .ebsOptions(DomainEbsOptionsArgs.builder()\n .ebsEnabled(true)\n .volumeSize(10)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:Domain\n properties:\n domainName: ggkitty\n engineVersion: Elasticsearch_7.1\n clusterConfig:\n instanceType: r5.large.search\n advancedSecurityOptions:\n enabled: false\n anonymousAuthEnabled: true\n internalUserDatabaseEnabled: true\n masterUserOptions:\n masterUserName: example\n masterUserPassword: Barbarbarbar1!\n encryptAtRest:\n enabled: true\n domainEndpointOptions:\n enforceHttps: true\n tlsSecurityPolicy: Policy-Min-TLS-1-2-2019-07\n nodeToNodeEncryption:\n enabled: true\n ebsOptions:\n ebsEnabled: true\n volumeSize: 10\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Second apply\n\nNotice that the only change is `advanced_security_options.0.enabled` is now set to `true`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.opensearch.Domain(\"example\", {\n domainName: \"ggkitty\",\n engineVersion: \"Elasticsearch_7.1\",\n clusterConfig: {\n instanceType: \"r5.large.search\",\n },\n advancedSecurityOptions: {\n enabled: true,\n anonymousAuthEnabled: true,\n internalUserDatabaseEnabled: true,\n masterUserOptions: {\n masterUserName: \"example\",\n masterUserPassword: \"Barbarbarbar1!\",\n },\n },\n encryptAtRest: {\n enabled: true,\n },\n domainEndpointOptions: {\n enforceHttps: true,\n tlsSecurityPolicy: \"Policy-Min-TLS-1-2-2019-07\",\n },\n nodeToNodeEncryption: {\n enabled: true,\n },\n ebsOptions: {\n ebsEnabled: true,\n volumeSize: 10,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.opensearch.Domain(\"example\",\n domain_name=\"ggkitty\",\n engine_version=\"Elasticsearch_7.1\",\n cluster_config={\n \"instance_type\": \"r5.large.search\",\n },\n advanced_security_options={\n \"enabled\": True,\n \"anonymous_auth_enabled\": True,\n \"internal_user_database_enabled\": True,\n \"master_user_options\": {\n \"master_user_name\": \"example\",\n \"master_user_password\": \"Barbarbarbar1!\",\n },\n },\n encrypt_at_rest={\n \"enabled\": True,\n },\n domain_endpoint_options={\n \"enforce_https\": True,\n \"tls_security_policy\": \"Policy-Min-TLS-1-2-2019-07\",\n },\n node_to_node_encryption={\n \"enabled\": True,\n },\n ebs_options={\n \"ebs_enabled\": True,\n \"volume_size\": 10,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = \"ggkitty\",\n EngineVersion = \"Elasticsearch_7.1\",\n ClusterConfig = new Aws.OpenSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"r5.large.search\",\n },\n AdvancedSecurityOptions = new Aws.OpenSearch.Inputs.DomainAdvancedSecurityOptionsArgs\n {\n Enabled = true,\n AnonymousAuthEnabled = true,\n InternalUserDatabaseEnabled = true,\n MasterUserOptions = new Aws.OpenSearch.Inputs.DomainAdvancedSecurityOptionsMasterUserOptionsArgs\n {\n MasterUserName = \"example\",\n MasterUserPassword = \"Barbarbarbar1!\",\n },\n },\n EncryptAtRest = new Aws.OpenSearch.Inputs.DomainEncryptAtRestArgs\n {\n Enabled = true,\n },\n DomainEndpointOptions = new Aws.OpenSearch.Inputs.DomainDomainEndpointOptionsArgs\n {\n EnforceHttps = true,\n TlsSecurityPolicy = \"Policy-Min-TLS-1-2-2019-07\",\n },\n NodeToNodeEncryption = new Aws.OpenSearch.Inputs.DomainNodeToNodeEncryptionArgs\n {\n Enabled = true,\n },\n EbsOptions = new Aws.OpenSearch.Inputs.DomainEbsOptionsArgs\n {\n EbsEnabled = true,\n VolumeSize = 10,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"ggkitty\"),\n\t\t\tEngineVersion: pulumi.String(\"Elasticsearch_7.1\"),\n\t\t\tClusterConfig: \u0026opensearch.DomainClusterConfigArgs{\n\t\t\t\tInstanceType: pulumi.String(\"r5.large.search\"),\n\t\t\t},\n\t\t\tAdvancedSecurityOptions: \u0026opensearch.DomainAdvancedSecurityOptionsArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\tAnonymousAuthEnabled: pulumi.Bool(true),\n\t\t\t\tInternalUserDatabaseEnabled: pulumi.Bool(true),\n\t\t\t\tMasterUserOptions: \u0026opensearch.DomainAdvancedSecurityOptionsMasterUserOptionsArgs{\n\t\t\t\t\tMasterUserName: pulumi.String(\"example\"),\n\t\t\t\t\tMasterUserPassword: pulumi.String(\"Barbarbarbar1!\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tEncryptAtRest: \u0026opensearch.DomainEncryptAtRestArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tDomainEndpointOptions: \u0026opensearch.DomainDomainEndpointOptionsArgs{\n\t\t\t\tEnforceHttps: pulumi.Bool(true),\n\t\t\t\tTlsSecurityPolicy: pulumi.String(\"Policy-Min-TLS-1-2-2019-07\"),\n\t\t\t},\n\t\t\tNodeToNodeEncryption: \u0026opensearch.DomainNodeToNodeEncryptionArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tEbsOptions: \u0026opensearch.DomainEbsOptionsArgs{\n\t\t\t\tEbsEnabled: pulumi.Bool(true),\n\t\t\t\tVolumeSize: pulumi.Int(10),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainClusterConfigArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainAdvancedSecurityOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainAdvancedSecurityOptionsMasterUserOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEncryptAtRestArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainDomainEndpointOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainNodeToNodeEncryptionArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEbsOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(\"ggkitty\")\n .engineVersion(\"Elasticsearch_7.1\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"r5.large.search\")\n .build())\n .advancedSecurityOptions(DomainAdvancedSecurityOptionsArgs.builder()\n .enabled(true)\n .anonymousAuthEnabled(true)\n .internalUserDatabaseEnabled(true)\n .masterUserOptions(DomainAdvancedSecurityOptionsMasterUserOptionsArgs.builder()\n .masterUserName(\"example\")\n .masterUserPassword(\"Barbarbarbar1!\")\n .build())\n .build())\n .encryptAtRest(DomainEncryptAtRestArgs.builder()\n .enabled(true)\n .build())\n .domainEndpointOptions(DomainDomainEndpointOptionsArgs.builder()\n .enforceHttps(true)\n .tlsSecurityPolicy(\"Policy-Min-TLS-1-2-2019-07\")\n .build())\n .nodeToNodeEncryption(DomainNodeToNodeEncryptionArgs.builder()\n .enabled(true)\n .build())\n .ebsOptions(DomainEbsOptionsArgs.builder()\n .ebsEnabled(true)\n .volumeSize(10)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:Domain\n properties:\n domainName: ggkitty\n engineVersion: Elasticsearch_7.1\n clusterConfig:\n instanceType: r5.large.search\n advancedSecurityOptions:\n enabled: true\n anonymousAuthEnabled: true\n internalUserDatabaseEnabled: true\n masterUserOptions:\n masterUserName: example\n masterUserPassword: Barbarbarbar1!\n encryptAtRest:\n enabled: true\n domainEndpointOptions:\n enforceHttps: true\n tlsSecurityPolicy: Policy-Min-TLS-1-2-2019-07\n nodeToNodeEncryption:\n enabled: true\n ebsOptions:\n ebsEnabled: true\n volumeSize: 10\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import OpenSearch domains using the `domain_name`. For example:\n\n```sh\n$ pulumi import aws:opensearch/domain:Domain example domain_name\n```\n", + "description": "Manages an Amazon OpenSearch Domain.\n\n## Elasticsearch vs. OpenSearch\n\nAmazon OpenSearch Service is the successor to Amazon Elasticsearch Service and supports OpenSearch and legacy Elasticsearch OSS (up to 7.10, the final open source version of the software).\n\nOpenSearch Domain configurations are similar in many ways to Elasticsearch Domain configurations. However, there are important differences including these:\n\n* OpenSearch has `engine_version` while Elasticsearch has `elasticsearch_version`\n* Versions are specified differently - _e.g._, `Elasticsearch_7.10` with OpenSearch vs. `7.10` for Elasticsearch.\n* `instance_type` argument values end in `search` for OpenSearch vs. `elasticsearch` for Elasticsearch (_e.g._, `t2.micro.search` vs. `t2.micro.elasticsearch`).\n* The AWS-managed service-linked role for OpenSearch is called `AWSServiceRoleForAmazonOpenSearchService` instead of `AWSServiceRoleForAmazonElasticsearchService` for Elasticsearch.\n\nThere are also some potentially unexpected similarities in configurations:\n\n* ARNs for both are prefaced with `arn:aws:es:`.\n* Both OpenSearch and Elasticsearch use assume role policies that refer to the `Principal` `Service` as `es.amazonaws.com`.\n* IAM policy actions, such as those you will find in `access_policies`, are prefaced with `es:` for both.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.opensearch.Domain(\"example\", {\n domainName: \"example\",\n engineVersion: \"Elasticsearch_7.10\",\n clusterConfig: {\n instanceType: \"r4.large.search\",\n },\n tags: {\n Domain: \"TestDomain\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.opensearch.Domain(\"example\",\n domain_name=\"example\",\n engine_version=\"Elasticsearch_7.10\",\n cluster_config={\n \"instance_type\": \"r4.large.search\",\n },\n tags={\n \"Domain\": \"TestDomain\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = \"example\",\n EngineVersion = \"Elasticsearch_7.10\",\n ClusterConfig = new Aws.OpenSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"r4.large.search\",\n },\n Tags = \n {\n { \"Domain\", \"TestDomain\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"example\"),\n\t\t\tEngineVersion: pulumi.String(\"Elasticsearch_7.10\"),\n\t\t\tClusterConfig: \u0026opensearch.DomainClusterConfigArgs{\n\t\t\t\tInstanceType: pulumi.String(\"r4.large.search\"),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Domain\": pulumi.String(\"TestDomain\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainClusterConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(\"example\")\n .engineVersion(\"Elasticsearch_7.10\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"r4.large.search\")\n .build())\n .tags(Map.of(\"Domain\", \"TestDomain\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:Domain\n properties:\n domainName: example\n engineVersion: Elasticsearch_7.10\n clusterConfig:\n instanceType: r4.large.search\n tags:\n Domain: TestDomain\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Access Policy\n\n\u003e See also: `aws.opensearch.DomainPolicy` resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst config = new pulumi.Config();\nconst domain = config.get(\"domain\") || \"tf-test\";\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst example = Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"*\",\n identifiers: [\"*\"],\n }],\n actions: [\"es:*\"],\n resources: [`arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*`],\n conditions: [{\n test: \"IpAddress\",\n variable: \"aws:SourceIp\",\n values: [\"66.193.100.22/32\"],\n }],\n }],\n}));\nconst exampleDomain = new aws.opensearch.Domain(\"example\", {\n domainName: domain,\n accessPolicies: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\ndomain = config.get(\"domain\")\nif domain is None:\n domain = \"tf-test\"\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"*\",\n \"identifiers\": [\"*\"],\n }],\n \"actions\": [\"es:*\"],\n \"resources\": [f\"arn:aws:es:{current.name}:{current_get_caller_identity.account_id}:domain/{domain}/*\"],\n \"conditions\": [{\n \"test\": \"IpAddress\",\n \"variable\": \"aws:SourceIp\",\n \"values\": [\"66.193.100.22/32\"],\n }],\n}])\nexample_domain = aws.opensearch.Domain(\"example\",\n domain_name=domain,\n access_policies=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var domain = config.Get(\"domain\") ?? \"tf-test\";\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"*\",\n Identifiers = new[]\n {\n \"*\",\n },\n },\n },\n Actions = new[]\n {\n \"es:*\",\n },\n Resources = new[]\n {\n $\"arn:aws:es:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:domain/{domain}/*\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"IpAddress\",\n Variable = \"aws:SourceIp\",\n Values = new[]\n {\n \"66.193.100.22/32\",\n },\n },\n },\n },\n },\n });\n\n var exampleDomain = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = domain,\n AccessPolicies = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tdomain := \"tf-test\"\n\t\tif param := cfg.Get(\"domain\"); param != \"\" {\n\t\t\tdomain = param\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"*\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"*\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"es:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:es:%v:%v:domain/%v/*\", current.Name, currentGetCallerIdentity.AccountId, domain),\n\t\t\t\t\t},\n\t\t\t\t\tConditions: []iam.GetPolicyDocumentStatementCondition{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tTest: \"IpAddress\",\n\t\t\t\t\t\t\tVariable: \"aws:SourceIp\",\n\t\t\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\t\t\"66.193.100.22/32\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(domain),\n\t\t\tAccessPolicies: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var domain = config.get(\"domain\").orElse(\"tf-test\");\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"*\")\n .identifiers(\"*\")\n .build())\n .actions(\"es:*\")\n .resources(String.format(\"arn:aws:es:%s:%s:domain/%s/*\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),domain))\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"IpAddress\")\n .variable(\"aws:SourceIp\")\n .values(\"66.193.100.22/32\")\n .build())\n .build())\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .domainName(domain)\n .accessPolicies(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n domain:\n type: string\n default: tf-test\nresources:\n exampleDomain:\n type: aws:opensearch:Domain\n name: example\n properties:\n domainName: ${domain}\n accessPolicies: ${example.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: '*'\n identifiers:\n - '*'\n actions:\n - es:*\n resources:\n - arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\n conditions:\n - test: IpAddress\n variable: aws:SourceIp\n values:\n - 66.193.100.22/32\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Log publishing to CloudWatch Logs\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst exampleLogGroup = new aws.cloudwatch.LogGroup(\"example\", {name: \"example\"});\nconst example = aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"Service\",\n identifiers: [\"es.amazonaws.com\"],\n }],\n actions: [\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n ],\n resources: [\"arn:aws:logs:*\"],\n }],\n});\nconst exampleLogResourcePolicy = new aws.cloudwatch.LogResourcePolicy(\"example\", {\n policyName: \"example\",\n policyDocument: example.then(example =\u003e example.json),\n});\nconst exampleDomain = new aws.opensearch.Domain(\"example\", {logPublishingOptions: [{\n cloudwatchLogGroupArn: exampleLogGroup.arn,\n logType: \"INDEX_SLOW_LOGS\",\n}]});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample_log_group = aws.cloudwatch.LogGroup(\"example\", name=\"example\")\nexample = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"es.amazonaws.com\"],\n }],\n \"actions\": [\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n ],\n \"resources\": [\"arn:aws:logs:*\"],\n}])\nexample_log_resource_policy = aws.cloudwatch.LogResourcePolicy(\"example\",\n policy_name=\"example\",\n policy_document=example.json)\nexample_domain = aws.opensearch.Domain(\"example\", log_publishing_options=[{\n \"cloudwatch_log_group_arn\": example_log_group.arn,\n \"log_type\": \"INDEX_SLOW_LOGS\",\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleLogGroup = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example\",\n });\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"es.amazonaws.com\",\n },\n },\n },\n Actions = new[]\n {\n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\",\n },\n Resources = new[]\n {\n \"arn:aws:logs:*\",\n },\n },\n },\n });\n\n var exampleLogResourcePolicy = new Aws.CloudWatch.LogResourcePolicy(\"example\", new()\n {\n PolicyName = \"example\",\n PolicyDocument = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleDomain = new Aws.OpenSearch.Domain(\"example\", new()\n {\n LogPublishingOptions = new[]\n {\n new Aws.OpenSearch.Inputs.DomainLogPublishingOptionArgs\n {\n CloudwatchLogGroupArn = exampleLogGroup.Arn,\n LogType = \"INDEX_SLOW_LOGS\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texampleLogGroup, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"es.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"logs:PutLogEvents\",\n\t\t\t\t\t\t\"logs:PutLogEventsBatch\",\n\t\t\t\t\t\t\"logs:CreateLogStream\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:logs:*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewLogResourcePolicy(ctx, \"example\", \u0026cloudwatch.LogResourcePolicyArgs{\n\t\t\tPolicyName: pulumi.String(\"example\"),\n\t\t\tPolicyDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tLogPublishingOptions: opensearch.DomainLogPublishingOptionArray{\n\t\t\t\t\u0026opensearch.DomainLogPublishingOptionArgs{\n\t\t\t\t\tCloudwatchLogGroupArn: exampleLogGroup.Arn,\n\t\t\t\t\tLogType: pulumi.String(\"INDEX_SLOW_LOGS\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicy;\nimport com.pulumi.aws.cloudwatch.LogResourcePolicyArgs;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainLogPublishingOptionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleLogGroup = new LogGroup(\"exampleLogGroup\", LogGroupArgs.builder()\n .name(\"example\")\n .build());\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"es.amazonaws.com\")\n .build())\n .actions( \n \"logs:PutLogEvents\",\n \"logs:PutLogEventsBatch\",\n \"logs:CreateLogStream\")\n .resources(\"arn:aws:logs:*\")\n .build())\n .build());\n\n var exampleLogResourcePolicy = new LogResourcePolicy(\"exampleLogResourcePolicy\", LogResourcePolicyArgs.builder()\n .policyName(\"example\")\n .policyDocument(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .logPublishingOptions(DomainLogPublishingOptionArgs.builder()\n .cloudwatchLogGroupArn(exampleLogGroup.arn())\n .logType(\"INDEX_SLOW_LOGS\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleLogGroup:\n type: aws:cloudwatch:LogGroup\n name: example\n properties:\n name: example\n exampleLogResourcePolicy:\n type: aws:cloudwatch:LogResourcePolicy\n name: example\n properties:\n policyName: example\n policyDocument: ${example.json}\n exampleDomain:\n type: aws:opensearch:Domain\n name: example\n properties:\n logPublishingOptions:\n - cloudwatchLogGroupArn: ${exampleLogGroup.arn}\n logType: INDEX_SLOW_LOGS\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: Service\n identifiers:\n - es.amazonaws.com\n actions:\n - logs:PutLogEvents\n - logs:PutLogEventsBatch\n - logs:CreateLogStream\n resources:\n - arn:aws:logs:*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### VPC based OpenSearch\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst config = new pulumi.Config();\nconst vpc = config.requireObject(\"vpc\");\nconst domain = config.get(\"domain\") || \"tf-test\";\nconst example = aws.ec2.getVpc({\n tags: {\n Name: vpc,\n },\n});\nconst exampleGetSubnets = example.then(example =\u003e aws.ec2.getSubnets({\n filters: [{\n name: \"vpc-id\",\n values: [example.id],\n }],\n tags: {\n Tier: \"private\",\n },\n}));\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst exampleSecurityGroup = new aws.ec2.SecurityGroup(\"example\", {\n name: `${vpc}-opensearch-${domain}`,\n description: \"Managed by Pulumi\",\n vpcId: example.then(example =\u003e example.id),\n ingress: [{\n fromPort: 443,\n toPort: 443,\n protocol: \"tcp\",\n cidrBlocks: [example.then(example =\u003e example.cidrBlock)],\n }],\n});\nconst exampleServiceLinkedRole = new aws.iam.ServiceLinkedRole(\"example\", {awsServiceName: \"opensearchservice.amazonaws.com\"});\nconst exampleGetPolicyDocument = Promise.all([current, currentGetCallerIdentity]).then(([current, currentGetCallerIdentity]) =\u003e aws.iam.getPolicyDocument({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"*\",\n identifiers: [\"*\"],\n }],\n actions: [\"es:*\"],\n resources: [`arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*`],\n }],\n}));\nconst exampleDomain = new aws.opensearch.Domain(\"example\", {\n domainName: domain,\n engineVersion: \"OpenSearch_1.0\",\n clusterConfig: {\n instanceType: \"m4.large.search\",\n zoneAwarenessEnabled: true,\n },\n vpcOptions: {\n subnetIds: [\n exampleGetSubnets.then(exampleGetSubnets =\u003e exampleGetSubnets.ids?.[0]),\n exampleGetSubnets.then(exampleGetSubnets =\u003e exampleGetSubnets.ids?.[1]),\n ],\n securityGroupIds: [exampleSecurityGroup.id],\n },\n advancedOptions: {\n \"rest.action.multi.allow_explicit_index\": \"true\",\n },\n accessPolicies: exampleGetPolicyDocument.then(exampleGetPolicyDocument =\u003e exampleGetPolicyDocument.json),\n tags: {\n Domain: \"TestDomain\",\n },\n}, {\n dependsOn: [exampleServiceLinkedRole],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nconfig = pulumi.Config()\nvpc = config.require_object(\"vpc\")\ndomain = config.get(\"domain\")\nif domain is None:\n domain = \"tf-test\"\nexample = aws.ec2.get_vpc(tags={\n \"Name\": vpc,\n})\nexample_get_subnets = aws.ec2.get_subnets(filters=[{\n \"name\": \"vpc-id\",\n \"values\": [example.id],\n }],\n tags={\n \"Tier\": \"private\",\n })\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample_security_group = aws.ec2.SecurityGroup(\"example\",\n name=f\"{vpc}-opensearch-{domain}\",\n description=\"Managed by Pulumi\",\n vpc_id=example.id,\n ingress=[{\n \"from_port\": 443,\n \"to_port\": 443,\n \"protocol\": \"tcp\",\n \"cidr_blocks\": [example.cidr_block],\n }])\nexample_service_linked_role = aws.iam.ServiceLinkedRole(\"example\", aws_service_name=\"opensearchservice.amazonaws.com\")\nexample_get_policy_document = aws.iam.get_policy_document(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"*\",\n \"identifiers\": [\"*\"],\n }],\n \"actions\": [\"es:*\"],\n \"resources\": [f\"arn:aws:es:{current.name}:{current_get_caller_identity.account_id}:domain/{domain}/*\"],\n}])\nexample_domain = aws.opensearch.Domain(\"example\",\n domain_name=domain,\n engine_version=\"OpenSearch_1.0\",\n cluster_config={\n \"instance_type\": \"m4.large.search\",\n \"zone_awareness_enabled\": True,\n },\n vpc_options={\n \"subnet_ids\": [\n example_get_subnets.ids[0],\n example_get_subnets.ids[1],\n ],\n \"security_group_ids\": [example_security_group.id],\n },\n advanced_options={\n \"rest.action.multi.allow_explicit_index\": \"true\",\n },\n access_policies=example_get_policy_document.json,\n tags={\n \"Domain\": \"TestDomain\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_service_linked_role]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var vpc = config.RequireObject\u003cdynamic\u003e(\"vpc\");\n var domain = config.Get(\"domain\") ?? \"tf-test\";\n var example = Aws.Ec2.GetVpc.Invoke(new()\n {\n Tags = \n {\n { \"Name\", vpc },\n },\n });\n\n var exampleGetSubnets = Aws.Ec2.GetSubnets.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetSubnetsFilterInputArgs\n {\n Name = \"vpc-id\",\n Values = new[]\n {\n example.Apply(getVpcResult =\u003e getVpcResult.Id),\n },\n },\n },\n Tags = \n {\n { \"Tier\", \"private\" },\n },\n });\n\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var exampleSecurityGroup = new Aws.Ec2.SecurityGroup(\"example\", new()\n {\n Name = $\"{vpc}-opensearch-{domain}\",\n Description = \"Managed by Pulumi\",\n VpcId = example.Apply(getVpcResult =\u003e getVpcResult.Id),\n Ingress = new[]\n {\n new Aws.Ec2.Inputs.SecurityGroupIngressArgs\n {\n FromPort = 443,\n ToPort = 443,\n Protocol = \"tcp\",\n CidrBlocks = new[]\n {\n example.Apply(getVpcResult =\u003e getVpcResult.CidrBlock),\n },\n },\n },\n });\n\n var exampleServiceLinkedRole = new Aws.Iam.ServiceLinkedRole(\"example\", new()\n {\n AwsServiceName = \"opensearchservice.amazonaws.com\",\n });\n\n var exampleGetPolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"*\",\n Identifiers = new[]\n {\n \"*\",\n },\n },\n },\n Actions = new[]\n {\n \"es:*\",\n },\n Resources = new[]\n {\n $\"arn:aws:es:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:domain/{domain}/*\",\n },\n },\n },\n });\n\n var exampleDomain = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = domain,\n EngineVersion = \"OpenSearch_1.0\",\n ClusterConfig = new Aws.OpenSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"m4.large.search\",\n ZoneAwarenessEnabled = true,\n },\n VpcOptions = new Aws.OpenSearch.Inputs.DomainVpcOptionsArgs\n {\n SubnetIds = new[]\n {\n exampleGetSubnets.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[0]),\n exampleGetSubnets.Apply(getSubnetsResult =\u003e getSubnetsResult.Ids[1]),\n },\n SecurityGroupIds = new[]\n {\n exampleSecurityGroup.Id,\n },\n },\n AdvancedOptions = \n {\n { \"rest.action.multi.allow_explicit_index\", \"true\" },\n },\n AccessPolicies = exampleGetPolicyDocument.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n Tags = \n {\n { \"Domain\", \"TestDomain\" },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleServiceLinkedRole,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\ncfg := config.New(ctx, \"\")\nvpc := cfg.RequireObject(\"vpc\")\ndomain := \"tf-test\";\nif param := cfg.Get(\"domain\"); param != \"\"{\ndomain = param\n}\nexample, err := ec2.LookupVpc(ctx, \u0026ec2.LookupVpcArgs{\nTags: pulumi.StringMap{\n\"Name\": vpc,\n},\n}, nil);\nif err != nil {\nreturn err\n}\nexampleGetSubnets, err := ec2.GetSubnets(ctx, \u0026ec2.GetSubnetsArgs{\nFilters: []ec2.GetSubnetsFilter{\n{\nName: \"vpc-id\",\nValues: interface{}{\nexample.Id,\n},\n},\n},\nTags: map[string]interface{}{\n\"Tier\": \"private\",\n},\n}, nil);\nif err != nil {\nreturn err\n}\ncurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{\n}, nil);\nif err != nil {\nreturn err\n}\ncurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{\n}, nil);\nif err != nil {\nreturn err\n}\nexampleSecurityGroup, err := ec2.NewSecurityGroup(ctx, \"example\", \u0026ec2.SecurityGroupArgs{\nName: pulumi.Sprintf(\"%v-opensearch-%v\", vpc, domain),\nDescription: pulumi.String(\"Managed by Pulumi\"),\nVpcId: pulumi.String(example.Id),\nIngress: ec2.SecurityGroupIngressArray{\n\u0026ec2.SecurityGroupIngressArgs{\nFromPort: pulumi.Int(443),\nToPort: pulumi.Int(443),\nProtocol: pulumi.String(\"tcp\"),\nCidrBlocks: pulumi.StringArray{\npulumi.String(example.CidrBlock),\n},\n},\n},\n})\nif err != nil {\nreturn err\n}\nexampleServiceLinkedRole, err := iam.NewServiceLinkedRole(ctx, \"example\", \u0026iam.ServiceLinkedRoleArgs{\nAwsServiceName: pulumi.String(\"opensearchservice.amazonaws.com\"),\n})\nif err != nil {\nreturn err\n}\nexampleGetPolicyDocument, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: pulumi.StringRef(\"Allow\"),\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"*\",\nIdentifiers: []string{\n\"*\",\n},\n},\n},\nActions: []string{\n\"es:*\",\n},\nResources: []string{\nfmt.Sprintf(\"arn:aws:es:%v:%v:domain/%v/*\", current.Name, currentGetCallerIdentity.AccountId, domain),\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\n_, err = opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\nDomainName: pulumi.String(domain),\nEngineVersion: pulumi.String(\"OpenSearch_1.0\"),\nClusterConfig: \u0026opensearch.DomainClusterConfigArgs{\nInstanceType: pulumi.String(\"m4.large.search\"),\nZoneAwarenessEnabled: pulumi.Bool(true),\n},\nVpcOptions: \u0026opensearch.DomainVpcOptionsArgs{\nSubnetIds: pulumi.StringArray{\npulumi.String(exampleGetSubnets.Ids[0]),\npulumi.String(exampleGetSubnets.Ids[1]),\n},\nSecurityGroupIds: pulumi.StringArray{\nexampleSecurityGroup.ID(),\n},\n},\nAdvancedOptions: pulumi.StringMap{\n\"rest.action.multi.allow_explicit_index\": pulumi.String(\"true\"),\n},\nAccessPolicies: pulumi.String(exampleGetPolicyDocument.Json),\nTags: pulumi.StringMap{\n\"Domain\": pulumi.String(\"TestDomain\"),\n},\n}, pulumi.DependsOn([]pulumi.Resource{\nexampleServiceLinkedRole,\n}))\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetVpcArgs;\nimport com.pulumi.aws.ec2.inputs.GetSubnetsArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.SecurityGroup;\nimport com.pulumi.aws.ec2.SecurityGroupArgs;\nimport com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;\nimport com.pulumi.aws.iam.ServiceLinkedRole;\nimport com.pulumi.aws.iam.ServiceLinkedRoleArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainClusterConfigArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainVpcOptionsArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var vpc = config.get(\"vpc\");\n final var domain = config.get(\"domain\").orElse(\"tf-test\");\n final var example = Ec2Functions.getVpc(GetVpcArgs.builder()\n .tags(Map.of(\"Name\", vpc))\n .build());\n\n final var exampleGetSubnets = Ec2Functions.getSubnets(GetSubnetsArgs.builder()\n .filters(GetSubnetsFilterArgs.builder()\n .name(\"vpc-id\")\n .values(example.applyValue(getVpcResult -\u003e getVpcResult.id()))\n .build())\n .tags(Map.of(\"Tier\", \"private\"))\n .build());\n\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var exampleSecurityGroup = new SecurityGroup(\"exampleSecurityGroup\", SecurityGroupArgs.builder()\n .name(String.format(\"%s-opensearch-%s\", vpc,domain))\n .description(\"Managed by Pulumi\")\n .vpcId(example.applyValue(getVpcResult -\u003e getVpcResult.id()))\n .ingress(SecurityGroupIngressArgs.builder()\n .fromPort(443)\n .toPort(443)\n .protocol(\"tcp\")\n .cidrBlocks(example.applyValue(getVpcResult -\u003e getVpcResult.cidrBlock()))\n .build())\n .build());\n\n var exampleServiceLinkedRole = new ServiceLinkedRole(\"exampleServiceLinkedRole\", ServiceLinkedRoleArgs.builder()\n .awsServiceName(\"opensearchservice.amazonaws.com\")\n .build());\n\n final var exampleGetPolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"*\")\n .identifiers(\"*\")\n .build())\n .actions(\"es:*\")\n .resources(String.format(\"arn:aws:es:%s:%s:domain/%s/*\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),domain))\n .build())\n .build());\n\n var exampleDomain = new Domain(\"exampleDomain\", DomainArgs.builder()\n .domainName(domain)\n .engineVersion(\"OpenSearch_1.0\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"m4.large.search\")\n .zoneAwarenessEnabled(true)\n .build())\n .vpcOptions(DomainVpcOptionsArgs.builder()\n .subnetIds( \n exampleGetSubnets.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[0]),\n exampleGetSubnets.applyValue(getSubnetsResult -\u003e getSubnetsResult.ids()[1]))\n .securityGroupIds(exampleSecurityGroup.id())\n .build())\n .advancedOptions(Map.of(\"rest.action.multi.allow_explicit_index\", \"true\"))\n .accessPolicies(exampleGetPolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .tags(Map.of(\"Domain\", \"TestDomain\"))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleServiceLinkedRole)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n vpc:\n type: dynamic\n domain:\n type: string\n default: tf-test\nresources:\n exampleSecurityGroup:\n type: aws:ec2:SecurityGroup\n name: example\n properties:\n name: ${vpc}-opensearch-${domain}\n description: Managed by Pulumi\n vpcId: ${example.id}\n ingress:\n - fromPort: 443\n toPort: 443\n protocol: tcp\n cidrBlocks:\n - ${example.cidrBlock}\n exampleServiceLinkedRole:\n type: aws:iam:ServiceLinkedRole\n name: example\n properties:\n awsServiceName: opensearchservice.amazonaws.com\n exampleDomain:\n type: aws:opensearch:Domain\n name: example\n properties:\n domainName: ${domain}\n engineVersion: OpenSearch_1.0\n clusterConfig:\n instanceType: m4.large.search\n zoneAwarenessEnabled: true\n vpcOptions:\n subnetIds:\n - ${exampleGetSubnets.ids[0]}\n - ${exampleGetSubnets.ids[1]}\n securityGroupIds:\n - ${exampleSecurityGroup.id}\n advancedOptions:\n rest.action.multi.allow_explicit_index: 'true'\n accessPolicies: ${exampleGetPolicyDocument.json}\n tags:\n Domain: TestDomain\n options:\n dependson:\n - ${exampleServiceLinkedRole}\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getVpc\n Arguments:\n tags:\n Name: ${vpc}\n exampleGetSubnets:\n fn::invoke:\n Function: aws:ec2:getSubnets\n Arguments:\n filters:\n - name: vpc-id\n values:\n - ${example.id}\n tags:\n Tier: private\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n exampleGetPolicyDocument:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: '*'\n identifiers:\n - '*'\n actions:\n - es:*\n resources:\n - arn:aws:es:${current.name}:${currentGetCallerIdentity.accountId}:domain/${domain}/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Enabling fine-grained access control on an existing domain\n\nThis example shows two configurations: one to create a domain without fine-grained access control and the second to modify the domain to enable fine-grained access control. For more information, see [Enabling fine-grained access control](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html).\n\n### First apply\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.opensearch.Domain(\"example\", {\n domainName: \"ggkitty\",\n engineVersion: \"Elasticsearch_7.1\",\n clusterConfig: {\n instanceType: \"r5.large.search\",\n },\n advancedSecurityOptions: {\n enabled: false,\n anonymousAuthEnabled: true,\n internalUserDatabaseEnabled: true,\n masterUserOptions: {\n masterUserName: \"example\",\n masterUserPassword: \"Barbarbarbar1!\",\n },\n },\n encryptAtRest: {\n enabled: true,\n },\n domainEndpointOptions: {\n enforceHttps: true,\n tlsSecurityPolicy: \"Policy-Min-TLS-1-2-2019-07\",\n },\n nodeToNodeEncryption: {\n enabled: true,\n },\n ebsOptions: {\n ebsEnabled: true,\n volumeSize: 10,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.opensearch.Domain(\"example\",\n domain_name=\"ggkitty\",\n engine_version=\"Elasticsearch_7.1\",\n cluster_config={\n \"instance_type\": \"r5.large.search\",\n },\n advanced_security_options={\n \"enabled\": False,\n \"anonymous_auth_enabled\": True,\n \"internal_user_database_enabled\": True,\n \"master_user_options\": {\n \"master_user_name\": \"example\",\n \"master_user_password\": \"Barbarbarbar1!\",\n },\n },\n encrypt_at_rest={\n \"enabled\": True,\n },\n domain_endpoint_options={\n \"enforce_https\": True,\n \"tls_security_policy\": \"Policy-Min-TLS-1-2-2019-07\",\n },\n node_to_node_encryption={\n \"enabled\": True,\n },\n ebs_options={\n \"ebs_enabled\": True,\n \"volume_size\": 10,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = \"ggkitty\",\n EngineVersion = \"Elasticsearch_7.1\",\n ClusterConfig = new Aws.OpenSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"r5.large.search\",\n },\n AdvancedSecurityOptions = new Aws.OpenSearch.Inputs.DomainAdvancedSecurityOptionsArgs\n {\n Enabled = false,\n AnonymousAuthEnabled = true,\n InternalUserDatabaseEnabled = true,\n MasterUserOptions = new Aws.OpenSearch.Inputs.DomainAdvancedSecurityOptionsMasterUserOptionsArgs\n {\n MasterUserName = \"example\",\n MasterUserPassword = \"Barbarbarbar1!\",\n },\n },\n EncryptAtRest = new Aws.OpenSearch.Inputs.DomainEncryptAtRestArgs\n {\n Enabled = true,\n },\n DomainEndpointOptions = new Aws.OpenSearch.Inputs.DomainDomainEndpointOptionsArgs\n {\n EnforceHttps = true,\n TlsSecurityPolicy = \"Policy-Min-TLS-1-2-2019-07\",\n },\n NodeToNodeEncryption = new Aws.OpenSearch.Inputs.DomainNodeToNodeEncryptionArgs\n {\n Enabled = true,\n },\n EbsOptions = new Aws.OpenSearch.Inputs.DomainEbsOptionsArgs\n {\n EbsEnabled = true,\n VolumeSize = 10,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"ggkitty\"),\n\t\t\tEngineVersion: pulumi.String(\"Elasticsearch_7.1\"),\n\t\t\tClusterConfig: \u0026opensearch.DomainClusterConfigArgs{\n\t\t\t\tInstanceType: pulumi.String(\"r5.large.search\"),\n\t\t\t},\n\t\t\tAdvancedSecurityOptions: \u0026opensearch.DomainAdvancedSecurityOptionsArgs{\n\t\t\t\tEnabled: pulumi.Bool(false),\n\t\t\t\tAnonymousAuthEnabled: pulumi.Bool(true),\n\t\t\t\tInternalUserDatabaseEnabled: pulumi.Bool(true),\n\t\t\t\tMasterUserOptions: \u0026opensearch.DomainAdvancedSecurityOptionsMasterUserOptionsArgs{\n\t\t\t\t\tMasterUserName: pulumi.String(\"example\"),\n\t\t\t\t\tMasterUserPassword: pulumi.String(\"Barbarbarbar1!\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tEncryptAtRest: \u0026opensearch.DomainEncryptAtRestArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tDomainEndpointOptions: \u0026opensearch.DomainDomainEndpointOptionsArgs{\n\t\t\t\tEnforceHttps: pulumi.Bool(true),\n\t\t\t\tTlsSecurityPolicy: pulumi.String(\"Policy-Min-TLS-1-2-2019-07\"),\n\t\t\t},\n\t\t\tNodeToNodeEncryption: \u0026opensearch.DomainNodeToNodeEncryptionArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tEbsOptions: \u0026opensearch.DomainEbsOptionsArgs{\n\t\t\t\tEbsEnabled: pulumi.Bool(true),\n\t\t\t\tVolumeSize: pulumi.Int(10),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainClusterConfigArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainAdvancedSecurityOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainAdvancedSecurityOptionsMasterUserOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEncryptAtRestArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainDomainEndpointOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainNodeToNodeEncryptionArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEbsOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(\"ggkitty\")\n .engineVersion(\"Elasticsearch_7.1\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"r5.large.search\")\n .build())\n .advancedSecurityOptions(DomainAdvancedSecurityOptionsArgs.builder()\n .enabled(false)\n .anonymousAuthEnabled(true)\n .internalUserDatabaseEnabled(true)\n .masterUserOptions(DomainAdvancedSecurityOptionsMasterUserOptionsArgs.builder()\n .masterUserName(\"example\")\n .masterUserPassword(\"Barbarbarbar1!\")\n .build())\n .build())\n .encryptAtRest(DomainEncryptAtRestArgs.builder()\n .enabled(true)\n .build())\n .domainEndpointOptions(DomainDomainEndpointOptionsArgs.builder()\n .enforceHttps(true)\n .tlsSecurityPolicy(\"Policy-Min-TLS-1-2-2019-07\")\n .build())\n .nodeToNodeEncryption(DomainNodeToNodeEncryptionArgs.builder()\n .enabled(true)\n .build())\n .ebsOptions(DomainEbsOptionsArgs.builder()\n .ebsEnabled(true)\n .volumeSize(10)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:Domain\n properties:\n domainName: ggkitty\n engineVersion: Elasticsearch_7.1\n clusterConfig:\n instanceType: r5.large.search\n advancedSecurityOptions:\n enabled: false\n anonymousAuthEnabled: true\n internalUserDatabaseEnabled: true\n masterUserOptions:\n masterUserName: example\n masterUserPassword: Barbarbarbar1!\n encryptAtRest:\n enabled: true\n domainEndpointOptions:\n enforceHttps: true\n tlsSecurityPolicy: Policy-Min-TLS-1-2-2019-07\n nodeToNodeEncryption:\n enabled: true\n ebsOptions:\n ebsEnabled: true\n volumeSize: 10\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Second apply\n\nNotice that the only change is `advanced_security_options.0.enabled` is now set to `true`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.opensearch.Domain(\"example\", {\n domainName: \"ggkitty\",\n engineVersion: \"Elasticsearch_7.1\",\n clusterConfig: {\n instanceType: \"r5.large.search\",\n },\n advancedSecurityOptions: {\n enabled: true,\n anonymousAuthEnabled: true,\n internalUserDatabaseEnabled: true,\n masterUserOptions: {\n masterUserName: \"example\",\n masterUserPassword: \"Barbarbarbar1!\",\n },\n },\n encryptAtRest: {\n enabled: true,\n },\n domainEndpointOptions: {\n enforceHttps: true,\n tlsSecurityPolicy: \"Policy-Min-TLS-1-2-2019-07\",\n },\n nodeToNodeEncryption: {\n enabled: true,\n },\n ebsOptions: {\n ebsEnabled: true,\n volumeSize: 10,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.opensearch.Domain(\"example\",\n domain_name=\"ggkitty\",\n engine_version=\"Elasticsearch_7.1\",\n cluster_config={\n \"instance_type\": \"r5.large.search\",\n },\n advanced_security_options={\n \"enabled\": True,\n \"anonymous_auth_enabled\": True,\n \"internal_user_database_enabled\": True,\n \"master_user_options\": {\n \"master_user_name\": \"example\",\n \"master_user_password\": \"Barbarbarbar1!\",\n },\n },\n encrypt_at_rest={\n \"enabled\": True,\n },\n domain_endpoint_options={\n \"enforce_https\": True,\n \"tls_security_policy\": \"Policy-Min-TLS-1-2-2019-07\",\n },\n node_to_node_encryption={\n \"enabled\": True,\n },\n ebs_options={\n \"ebs_enabled\": True,\n \"volume_size\": 10,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearch.Domain(\"example\", new()\n {\n DomainName = \"ggkitty\",\n EngineVersion = \"Elasticsearch_7.1\",\n ClusterConfig = new Aws.OpenSearch.Inputs.DomainClusterConfigArgs\n {\n InstanceType = \"r5.large.search\",\n },\n AdvancedSecurityOptions = new Aws.OpenSearch.Inputs.DomainAdvancedSecurityOptionsArgs\n {\n Enabled = true,\n AnonymousAuthEnabled = true,\n InternalUserDatabaseEnabled = true,\n MasterUserOptions = new Aws.OpenSearch.Inputs.DomainAdvancedSecurityOptionsMasterUserOptionsArgs\n {\n MasterUserName = \"example\",\n MasterUserPassword = \"Barbarbarbar1!\",\n },\n },\n EncryptAtRest = new Aws.OpenSearch.Inputs.DomainEncryptAtRestArgs\n {\n Enabled = true,\n },\n DomainEndpointOptions = new Aws.OpenSearch.Inputs.DomainDomainEndpointOptionsArgs\n {\n EnforceHttps = true,\n TlsSecurityPolicy = \"Policy-Min-TLS-1-2-2019-07\",\n },\n NodeToNodeEncryption = new Aws.OpenSearch.Inputs.DomainNodeToNodeEncryptionArgs\n {\n Enabled = true,\n },\n EbsOptions = new Aws.OpenSearch.Inputs.DomainEbsOptionsArgs\n {\n EbsEnabled = true,\n VolumeSize = 10,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := opensearch.NewDomain(ctx, \"example\", \u0026opensearch.DomainArgs{\n\t\t\tDomainName: pulumi.String(\"ggkitty\"),\n\t\t\tEngineVersion: pulumi.String(\"Elasticsearch_7.1\"),\n\t\t\tClusterConfig: \u0026opensearch.DomainClusterConfigArgs{\n\t\t\t\tInstanceType: pulumi.String(\"r5.large.search\"),\n\t\t\t},\n\t\t\tAdvancedSecurityOptions: \u0026opensearch.DomainAdvancedSecurityOptionsArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\tAnonymousAuthEnabled: pulumi.Bool(true),\n\t\t\t\tInternalUserDatabaseEnabled: pulumi.Bool(true),\n\t\t\t\tMasterUserOptions: \u0026opensearch.DomainAdvancedSecurityOptionsMasterUserOptionsArgs{\n\t\t\t\t\tMasterUserName: pulumi.String(\"example\"),\n\t\t\t\t\tMasterUserPassword: pulumi.String(\"Barbarbarbar1!\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tEncryptAtRest: \u0026opensearch.DomainEncryptAtRestArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tDomainEndpointOptions: \u0026opensearch.DomainDomainEndpointOptionsArgs{\n\t\t\t\tEnforceHttps: pulumi.Bool(true),\n\t\t\t\tTlsSecurityPolicy: pulumi.String(\"Policy-Min-TLS-1-2-2019-07\"),\n\t\t\t},\n\t\t\tNodeToNodeEncryption: \u0026opensearch.DomainNodeToNodeEncryptionArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tEbsOptions: \u0026opensearch.DomainEbsOptionsArgs{\n\t\t\t\tEbsEnabled: pulumi.Bool(true),\n\t\t\t\tVolumeSize: pulumi.Int(10),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearch.Domain;\nimport com.pulumi.aws.opensearch.DomainArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainClusterConfigArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainAdvancedSecurityOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainAdvancedSecurityOptionsMasterUserOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEncryptAtRestArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainDomainEndpointOptionsArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainNodeToNodeEncryptionArgs;\nimport com.pulumi.aws.opensearch.inputs.DomainEbsOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Domain(\"example\", DomainArgs.builder()\n .domainName(\"ggkitty\")\n .engineVersion(\"Elasticsearch_7.1\")\n .clusterConfig(DomainClusterConfigArgs.builder()\n .instanceType(\"r5.large.search\")\n .build())\n .advancedSecurityOptions(DomainAdvancedSecurityOptionsArgs.builder()\n .enabled(true)\n .anonymousAuthEnabled(true)\n .internalUserDatabaseEnabled(true)\n .masterUserOptions(DomainAdvancedSecurityOptionsMasterUserOptionsArgs.builder()\n .masterUserName(\"example\")\n .masterUserPassword(\"Barbarbarbar1!\")\n .build())\n .build())\n .encryptAtRest(DomainEncryptAtRestArgs.builder()\n .enabled(true)\n .build())\n .domainEndpointOptions(DomainDomainEndpointOptionsArgs.builder()\n .enforceHttps(true)\n .tlsSecurityPolicy(\"Policy-Min-TLS-1-2-2019-07\")\n .build())\n .nodeToNodeEncryption(DomainNodeToNodeEncryptionArgs.builder()\n .enabled(true)\n .build())\n .ebsOptions(DomainEbsOptionsArgs.builder()\n .ebsEnabled(true)\n .volumeSize(10)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:Domain\n properties:\n domainName: ggkitty\n engineVersion: Elasticsearch_7.1\n clusterConfig:\n instanceType: r5.large.search\n advancedSecurityOptions:\n enabled: true\n anonymousAuthEnabled: true\n internalUserDatabaseEnabled: true\n masterUserOptions:\n masterUserName: example\n masterUserPassword: Barbarbarbar1!\n encryptAtRest:\n enabled: true\n domainEndpointOptions:\n enforceHttps: true\n tlsSecurityPolicy: Policy-Min-TLS-1-2-2019-07\n nodeToNodeEncryption:\n enabled: true\n ebsOptions:\n ebsEnabled: true\n volumeSize: 10\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import OpenSearch domains using the `domain_name`. For example:\n\n```sh\n$ pulumi import aws:opensearch/domain:Domain example domain_name\n```\n", "properties": { "accessPolicies": { "type": "string", @@ -310505,7 +310505,7 @@ } }, "aws:opensearch/inboundConnectionAccepter:InboundConnectionAccepter": { - "description": "Manages an [AWS Opensearch Inbound Connection Accepter](https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_AcceptInboundConnection.html). If connecting domains from different AWS accounts, ensure that the accepter is configured to use the AWS account where the _remote_ opensearch domain exists.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetRegion = aws.getRegion({});\nconst foo = new aws.opensearch.OutboundConnection(\"foo\", {\n connectionAlias: \"outbound_connection\",\n localDomainInfo: {\n ownerId: current.then(current =\u003e current.accountId),\n region: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n domainName: localDomain.domainName,\n },\n remoteDomainInfo: {\n ownerId: current.then(current =\u003e current.accountId),\n region: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n domainName: remoteDomain.domainName,\n },\n});\nconst fooInboundConnectionAccepter = new aws.opensearch.InboundConnectionAccepter(\"foo\", {connectionId: foo.id});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_region = aws.get_region()\nfoo = aws.opensearch.OutboundConnection(\"foo\",\n connection_alias=\"outbound_connection\",\n local_domain_info={\n \"owner_id\": current.account_id,\n \"region\": current_get_region.name,\n \"domain_name\": local_domain[\"domainName\"],\n },\n remote_domain_info={\n \"owner_id\": current.account_id,\n \"region\": current_get_region.name,\n \"domain_name\": remote_domain[\"domainName\"],\n })\nfoo_inbound_connection_accepter = aws.opensearch.InboundConnectionAccepter(\"foo\", connection_id=foo.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var foo = new Aws.OpenSearch.OutboundConnection(\"foo\", new()\n {\n ConnectionAlias = \"outbound_connection\",\n LocalDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionLocalDomainInfoArgs\n {\n OwnerId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Region = currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n DomainName = localDomain.DomainName,\n },\n RemoteDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionRemoteDomainInfoArgs\n {\n OwnerId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Region = currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n DomainName = remoteDomain.DomainName,\n },\n });\n\n var fooInboundConnectionAccepter = new Aws.OpenSearch.InboundConnectionAccepter(\"foo\", new()\n {\n ConnectionId = foo.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfoo, err := opensearch.NewOutboundConnection(ctx, \"foo\", \u0026opensearch.OutboundConnectionArgs{\n\t\t\tConnectionAlias: pulumi.String(\"outbound_connection\"),\n\t\t\tLocalDomainInfo: \u0026opensearch.OutboundConnectionLocalDomainInfoArgs{\n\t\t\t\tOwnerId: pulumi.String(current.AccountId),\n\t\t\t\tRegion: pulumi.String(currentGetRegion.Name),\n\t\t\t\tDomainName: pulumi.Any(localDomain.DomainName),\n\t\t\t},\n\t\t\tRemoteDomainInfo: \u0026opensearch.OutboundConnectionRemoteDomainInfoArgs{\n\t\t\t\tOwnerId: pulumi.String(current.AccountId),\n\t\t\t\tRegion: pulumi.String(currentGetRegion.Name),\n\t\t\t\tDomainName: pulumi.Any(remoteDomain.DomainName),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearch.NewInboundConnectionAccepter(ctx, \"foo\", \u0026opensearch.InboundConnectionAccepterArgs{\n\t\t\tConnectionId: foo.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.opensearch.OutboundConnection;\nimport com.pulumi.aws.opensearch.OutboundConnectionArgs;\nimport com.pulumi.aws.opensearch.inputs.OutboundConnectionLocalDomainInfoArgs;\nimport com.pulumi.aws.opensearch.inputs.OutboundConnectionRemoteDomainInfoArgs;\nimport com.pulumi.aws.opensearch.InboundConnectionAccepter;\nimport com.pulumi.aws.opensearch.InboundConnectionAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n var foo = new OutboundConnection(\"foo\", OutboundConnectionArgs.builder()\n .connectionAlias(\"outbound_connection\")\n .localDomainInfo(OutboundConnectionLocalDomainInfoArgs.builder()\n .ownerId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .region(currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .domainName(localDomain.domainName())\n .build())\n .remoteDomainInfo(OutboundConnectionRemoteDomainInfoArgs.builder()\n .ownerId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .region(currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .domainName(remoteDomain.domainName())\n .build())\n .build());\n\n var fooInboundConnectionAccepter = new InboundConnectionAccepter(\"fooInboundConnectionAccepter\", InboundConnectionAccepterArgs.builder()\n .connectionId(foo.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:opensearch:OutboundConnection\n properties:\n connectionAlias: outbound_connection\n localDomainInfo:\n ownerId: ${current.accountId}\n region: ${currentGetRegion.name}\n domainName: ${localDomain.domainName}\n remoteDomainInfo:\n ownerId: ${current.accountId}\n region: ${currentGetRegion.name}\n domainName: ${remoteDomain.domainName}\n fooInboundConnectionAccepter:\n type: aws:opensearch:InboundConnectionAccepter\n name: foo\n properties:\n connectionId: ${foo.id}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import AWS Opensearch Inbound Connection Accepters using the Inbound Connection ID. For example:\n\n```sh\n$ pulumi import aws:opensearch/inboundConnectionAccepter:InboundConnectionAccepter foo connection-id\n```\n", + "description": "Manages an [AWS Opensearch Inbound Connection Accepter](https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_AcceptInboundConnection.html). If connecting domains from different AWS accounts, ensure that the accepter is configured to use the AWS account where the _remote_ opensearch domain exists.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetRegion = aws.getRegion({});\nconst foo = new aws.opensearch.OutboundConnection(\"foo\", {\n connectionAlias: \"outbound_connection\",\n localDomainInfo: {\n ownerId: current.then(current =\u003e current.accountId),\n region: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n domainName: localDomain.domainName,\n },\n remoteDomainInfo: {\n ownerId: current.then(current =\u003e current.accountId),\n region: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n domainName: remoteDomain.domainName,\n },\n});\nconst fooInboundConnectionAccepter = new aws.opensearch.InboundConnectionAccepter(\"foo\", {connectionId: foo.id});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_region = aws.get_region()\nfoo = aws.opensearch.OutboundConnection(\"foo\",\n connection_alias=\"outbound_connection\",\n local_domain_info={\n \"owner_id\": current.account_id,\n \"region\": current_get_region.name,\n \"domain_name\": local_domain[\"domainName\"],\n },\n remote_domain_info={\n \"owner_id\": current.account_id,\n \"region\": current_get_region.name,\n \"domain_name\": remote_domain[\"domainName\"],\n })\nfoo_inbound_connection_accepter = aws.opensearch.InboundConnectionAccepter(\"foo\", connection_id=foo.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var foo = new Aws.OpenSearch.OutboundConnection(\"foo\", new()\n {\n ConnectionAlias = \"outbound_connection\",\n LocalDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionLocalDomainInfoArgs\n {\n OwnerId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Region = currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n DomainName = localDomain.DomainName,\n },\n RemoteDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionRemoteDomainInfoArgs\n {\n OwnerId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Region = currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n DomainName = remoteDomain.DomainName,\n },\n });\n\n var fooInboundConnectionAccepter = new Aws.OpenSearch.InboundConnectionAccepter(\"foo\", new()\n {\n ConnectionId = foo.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfoo, err := opensearch.NewOutboundConnection(ctx, \"foo\", \u0026opensearch.OutboundConnectionArgs{\n\t\t\tConnectionAlias: pulumi.String(\"outbound_connection\"),\n\t\t\tLocalDomainInfo: \u0026opensearch.OutboundConnectionLocalDomainInfoArgs{\n\t\t\t\tOwnerId: pulumi.String(current.AccountId),\n\t\t\t\tRegion: pulumi.String(currentGetRegion.Name),\n\t\t\t\tDomainName: pulumi.Any(localDomain.DomainName),\n\t\t\t},\n\t\t\tRemoteDomainInfo: \u0026opensearch.OutboundConnectionRemoteDomainInfoArgs{\n\t\t\t\tOwnerId: pulumi.String(current.AccountId),\n\t\t\t\tRegion: pulumi.String(currentGetRegion.Name),\n\t\t\t\tDomainName: pulumi.Any(remoteDomain.DomainName),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearch.NewInboundConnectionAccepter(ctx, \"foo\", \u0026opensearch.InboundConnectionAccepterArgs{\n\t\t\tConnectionId: foo.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.opensearch.OutboundConnection;\nimport com.pulumi.aws.opensearch.OutboundConnectionArgs;\nimport com.pulumi.aws.opensearch.inputs.OutboundConnectionLocalDomainInfoArgs;\nimport com.pulumi.aws.opensearch.inputs.OutboundConnectionRemoteDomainInfoArgs;\nimport com.pulumi.aws.opensearch.InboundConnectionAccepter;\nimport com.pulumi.aws.opensearch.InboundConnectionAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n var foo = new OutboundConnection(\"foo\", OutboundConnectionArgs.builder()\n .connectionAlias(\"outbound_connection\")\n .localDomainInfo(OutboundConnectionLocalDomainInfoArgs.builder()\n .ownerId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .region(currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .domainName(localDomain.domainName())\n .build())\n .remoteDomainInfo(OutboundConnectionRemoteDomainInfoArgs.builder()\n .ownerId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .region(currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .domainName(remoteDomain.domainName())\n .build())\n .build());\n\n var fooInboundConnectionAccepter = new InboundConnectionAccepter(\"fooInboundConnectionAccepter\", InboundConnectionAccepterArgs.builder()\n .connectionId(foo.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:opensearch:OutboundConnection\n properties:\n connectionAlias: outbound_connection\n localDomainInfo:\n ownerId: ${current.accountId}\n region: ${currentGetRegion.name}\n domainName: ${localDomain.domainName}\n remoteDomainInfo:\n ownerId: ${current.accountId}\n region: ${currentGetRegion.name}\n domainName: ${remoteDomain.domainName}\n fooInboundConnectionAccepter:\n type: aws:opensearch:InboundConnectionAccepter\n name: foo\n properties:\n connectionId: ${foo.id}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import AWS Opensearch Inbound Connection Accepters using the Inbound Connection ID. For example:\n\n```sh\n$ pulumi import aws:opensearch/inboundConnectionAccepter:InboundConnectionAccepter foo connection-id\n```\n", "properties": { "connectionId": { "type": "string", @@ -310547,7 +310547,7 @@ } }, "aws:opensearch/outboundConnection:OutboundConnection": { - "description": "Manages an AWS Opensearch Outbound Connection.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetRegion = aws.getRegion({});\nconst foo = new aws.opensearch.OutboundConnection(\"foo\", {\n connectionAlias: \"outbound_connection\",\n connectionMode: \"DIRECT\",\n localDomainInfo: {\n ownerId: current.then(current =\u003e current.accountId),\n region: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n domainName: localDomain.domainName,\n },\n remoteDomainInfo: {\n ownerId: current.then(current =\u003e current.accountId),\n region: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n domainName: remoteDomain.domainName,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_region = aws.get_region()\nfoo = aws.opensearch.OutboundConnection(\"foo\",\n connection_alias=\"outbound_connection\",\n connection_mode=\"DIRECT\",\n local_domain_info={\n \"owner_id\": current.account_id,\n \"region\": current_get_region.name,\n \"domain_name\": local_domain[\"domainName\"],\n },\n remote_domain_info={\n \"owner_id\": current.account_id,\n \"region\": current_get_region.name,\n \"domain_name\": remote_domain[\"domainName\"],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var foo = new Aws.OpenSearch.OutboundConnection(\"foo\", new()\n {\n ConnectionAlias = \"outbound_connection\",\n ConnectionMode = \"DIRECT\",\n LocalDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionLocalDomainInfoArgs\n {\n OwnerId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Region = currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n DomainName = localDomain.DomainName,\n },\n RemoteDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionRemoteDomainInfoArgs\n {\n OwnerId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Region = currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n DomainName = remoteDomain.DomainName,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearch.NewOutboundConnection(ctx, \"foo\", \u0026opensearch.OutboundConnectionArgs{\n\t\t\tConnectionAlias: pulumi.String(\"outbound_connection\"),\n\t\t\tConnectionMode: pulumi.String(\"DIRECT\"),\n\t\t\tLocalDomainInfo: \u0026opensearch.OutboundConnectionLocalDomainInfoArgs{\n\t\t\t\tOwnerId: pulumi.String(current.AccountId),\n\t\t\t\tRegion: pulumi.String(currentGetRegion.Name),\n\t\t\t\tDomainName: pulumi.Any(localDomain.DomainName),\n\t\t\t},\n\t\t\tRemoteDomainInfo: \u0026opensearch.OutboundConnectionRemoteDomainInfoArgs{\n\t\t\t\tOwnerId: pulumi.String(current.AccountId),\n\t\t\t\tRegion: pulumi.String(currentGetRegion.Name),\n\t\t\t\tDomainName: pulumi.Any(remoteDomain.DomainName),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.opensearch.OutboundConnection;\nimport com.pulumi.aws.opensearch.OutboundConnectionArgs;\nimport com.pulumi.aws.opensearch.inputs.OutboundConnectionLocalDomainInfoArgs;\nimport com.pulumi.aws.opensearch.inputs.OutboundConnectionRemoteDomainInfoArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n var foo = new OutboundConnection(\"foo\", OutboundConnectionArgs.builder()\n .connectionAlias(\"outbound_connection\")\n .connectionMode(\"DIRECT\")\n .localDomainInfo(OutboundConnectionLocalDomainInfoArgs.builder()\n .ownerId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .region(currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .domainName(localDomain.domainName())\n .build())\n .remoteDomainInfo(OutboundConnectionRemoteDomainInfoArgs.builder()\n .ownerId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .region(currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .domainName(remoteDomain.domainName())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:opensearch:OutboundConnection\n properties:\n connectionAlias: outbound_connection\n connectionMode: DIRECT\n localDomainInfo:\n ownerId: ${current.accountId}\n region: ${currentGetRegion.name}\n domainName: ${localDomain.domainName}\n remoteDomainInfo:\n ownerId: ${current.accountId}\n region: ${currentGetRegion.name}\n domainName: ${remoteDomain.domainName}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import AWS Opensearch Outbound Connections using the Outbound Connection ID. For example:\n\n```sh\n$ pulumi import aws:opensearch/outboundConnection:OutboundConnection foo connection-id\n```\n", + "description": "Manages an AWS Opensearch Outbound Connection.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetRegion = aws.getRegion({});\nconst foo = new aws.opensearch.OutboundConnection(\"foo\", {\n connectionAlias: \"outbound_connection\",\n connectionMode: \"DIRECT\",\n localDomainInfo: {\n ownerId: current.then(current =\u003e current.accountId),\n region: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n domainName: localDomain.domainName,\n },\n remoteDomainInfo: {\n ownerId: current.then(current =\u003e current.accountId),\n region: currentGetRegion.then(currentGetRegion =\u003e currentGetRegion.name),\n domainName: remoteDomain.domainName,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_region = aws.get_region()\nfoo = aws.opensearch.OutboundConnection(\"foo\",\n connection_alias=\"outbound_connection\",\n connection_mode=\"DIRECT\",\n local_domain_info={\n \"owner_id\": current.account_id,\n \"region\": current_get_region.name,\n \"domain_name\": local_domain[\"domainName\"],\n },\n remote_domain_info={\n \"owner_id\": current.account_id,\n \"region\": current_get_region.name,\n \"domain_name\": remote_domain[\"domainName\"],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var foo = new Aws.OpenSearch.OutboundConnection(\"foo\", new()\n {\n ConnectionAlias = \"outbound_connection\",\n ConnectionMode = \"DIRECT\",\n LocalDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionLocalDomainInfoArgs\n {\n OwnerId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Region = currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n DomainName = localDomain.DomainName,\n },\n RemoteDomainInfo = new Aws.OpenSearch.Inputs.OutboundConnectionRemoteDomainInfoArgs\n {\n OwnerId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Region = currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name),\n DomainName = remoteDomain.DomainName,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearch.NewOutboundConnection(ctx, \"foo\", \u0026opensearch.OutboundConnectionArgs{\n\t\t\tConnectionAlias: pulumi.String(\"outbound_connection\"),\n\t\t\tConnectionMode: pulumi.String(\"DIRECT\"),\n\t\t\tLocalDomainInfo: \u0026opensearch.OutboundConnectionLocalDomainInfoArgs{\n\t\t\t\tOwnerId: pulumi.String(current.AccountId),\n\t\t\t\tRegion: pulumi.String(currentGetRegion.Name),\n\t\t\t\tDomainName: pulumi.Any(localDomain.DomainName),\n\t\t\t},\n\t\t\tRemoteDomainInfo: \u0026opensearch.OutboundConnectionRemoteDomainInfoArgs{\n\t\t\t\tOwnerId: pulumi.String(current.AccountId),\n\t\t\t\tRegion: pulumi.String(currentGetRegion.Name),\n\t\t\t\tDomainName: pulumi.Any(remoteDomain.DomainName),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.opensearch.OutboundConnection;\nimport com.pulumi.aws.opensearch.OutboundConnectionArgs;\nimport com.pulumi.aws.opensearch.inputs.OutboundConnectionLocalDomainInfoArgs;\nimport com.pulumi.aws.opensearch.inputs.OutboundConnectionRemoteDomainInfoArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n var foo = new OutboundConnection(\"foo\", OutboundConnectionArgs.builder()\n .connectionAlias(\"outbound_connection\")\n .connectionMode(\"DIRECT\")\n .localDomainInfo(OutboundConnectionLocalDomainInfoArgs.builder()\n .ownerId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .region(currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .domainName(localDomain.domainName())\n .build())\n .remoteDomainInfo(OutboundConnectionRemoteDomainInfoArgs.builder()\n .ownerId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .region(currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .domainName(remoteDomain.domainName())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n foo:\n type: aws:opensearch:OutboundConnection\n properties:\n connectionAlias: outbound_connection\n connectionMode: DIRECT\n localDomainInfo:\n ownerId: ${current.accountId}\n region: ${currentGetRegion.name}\n domainName: ${localDomain.domainName}\n remoteDomainInfo:\n ownerId: ${current.accountId}\n region: ${currentGetRegion.name}\n domainName: ${remoteDomain.domainName}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import AWS Opensearch Outbound Connections using the Outbound Connection ID. For example:\n\n```sh\n$ pulumi import aws:opensearch/outboundConnection:OutboundConnection foo connection-id\n```\n", "properties": { "acceptConnection": { "type": "boolean", @@ -310812,7 +310812,7 @@ } }, "aws:opensearch/serverlessAccessPolicy:ServerlessAccessPolicy": { - "description": "Resource for managing an AWS OpenSearch Serverless Access Policy. See AWS documentation for [data access policies](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-data-access.html) and [supported data access policy permissions](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-data-access.html#serverless-data-supported-permissions).\n\n## Example Usage\n\n### Grant all collection and index permissions\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.opensearch.ServerlessAccessPolicy(\"example\", {\n name: \"example\",\n type: \"data\",\n description: \"read and write permissions\",\n policy: JSON.stringify([{\n Rules: [\n {\n ResourceType: \"index\",\n Resource: [\"index/example-collection/*\"],\n Permission: [\"aoss:*\"],\n },\n {\n ResourceType: \"collection\",\n Resource: [\"collection/example-collection\"],\n Permission: [\"aoss:*\"],\n },\n ],\n Principal: [current.then(current =\u003e current.arn)],\n }]),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.opensearch.ServerlessAccessPolicy(\"example\",\n name=\"example\",\n type=\"data\",\n description=\"read and write permissions\",\n policy=json.dumps([{\n \"Rules\": [\n {\n \"ResourceType\": \"index\",\n \"Resource\": [\"index/example-collection/*\"],\n \"Permission\": [\"aoss:*\"],\n },\n {\n \"ResourceType\": \"collection\",\n \"Resource\": [\"collection/example-collection\"],\n \"Permission\": [\"aoss:*\"],\n },\n ],\n \"Principal\": [current.arn],\n }]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.OpenSearch.ServerlessAccessPolicy(\"example\", new()\n {\n Name = \"example\",\n Type = \"data\",\n Description = \"read and write permissions\",\n Policy = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Rules\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"index\",\n [\"Resource\"] = new[]\n {\n \"index/example-collection/*\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:*\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"collection\",\n [\"Resource\"] = new[]\n {\n \"collection/example-collection\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:*\",\n },\n },\n },\n [\"Principal\"] = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal([]map[string]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"Rules\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"index\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"index/example-collection/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"collection\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"collection/example-collection\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Principal\": []*string{\n\t\t\t\t\tcurrent.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = opensearch.NewServerlessAccessPolicy(ctx, \"example\", \u0026opensearch.ServerlessAccessPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tType: pulumi.String(\"data\"),\n\t\t\tDescription: pulumi.String(\"read and write permissions\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicy;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new ServerlessAccessPolicy(\"example\", ServerlessAccessPolicyArgs.builder()\n .name(\"example\")\n .type(\"data\")\n .description(\"read and write permissions\")\n .policy(serializeJson(\n jsonArray(jsonObject(\n jsonProperty(\"Rules\", jsonArray(\n jsonObject(\n jsonProperty(\"ResourceType\", \"index\"),\n jsonProperty(\"Resource\", jsonArray(\"index/example-collection/*\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:*\"))\n ), \n jsonObject(\n jsonProperty(\"ResourceType\", \"collection\"),\n jsonProperty(\"Resource\", jsonArray(\"collection/example-collection\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:*\"))\n )\n )),\n jsonProperty(\"Principal\", jsonArray(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn())))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:ServerlessAccessPolicy\n properties:\n name: example\n type: data\n description: read and write permissions\n policy:\n fn::toJSON:\n - Rules:\n - ResourceType: index\n Resource:\n - index/example-collection/*\n Permission:\n - aoss:*\n - ResourceType: collection\n Resource:\n - collection/example-collection\n Permission:\n - aoss:*\n Principal:\n - ${current.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Grant read-only collection and index permissions\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.opensearch.ServerlessAccessPolicy(\"example\", {\n name: \"example\",\n type: \"data\",\n description: \"read-only permissions\",\n policy: JSON.stringify([{\n Rules: [\n {\n ResourceType: \"index\",\n Resource: [\"index/example-collection/*\"],\n Permission: [\n \"aoss:DescribeIndex\",\n \"aoss:ReadDocument\",\n ],\n },\n {\n ResourceType: \"collection\",\n Resource: [\"collection/example-collection\"],\n Permission: [\"aoss:DescribeCollectionItems\"],\n },\n ],\n Principal: [current.then(current =\u003e current.arn)],\n }]),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.opensearch.ServerlessAccessPolicy(\"example\",\n name=\"example\",\n type=\"data\",\n description=\"read-only permissions\",\n policy=json.dumps([{\n \"Rules\": [\n {\n \"ResourceType\": \"index\",\n \"Resource\": [\"index/example-collection/*\"],\n \"Permission\": [\n \"aoss:DescribeIndex\",\n \"aoss:ReadDocument\",\n ],\n },\n {\n \"ResourceType\": \"collection\",\n \"Resource\": [\"collection/example-collection\"],\n \"Permission\": [\"aoss:DescribeCollectionItems\"],\n },\n ],\n \"Principal\": [current.arn],\n }]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.OpenSearch.ServerlessAccessPolicy(\"example\", new()\n {\n Name = \"example\",\n Type = \"data\",\n Description = \"read-only permissions\",\n Policy = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Rules\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"index\",\n [\"Resource\"] = new[]\n {\n \"index/example-collection/*\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:DescribeIndex\",\n \"aoss:ReadDocument\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"collection\",\n [\"Resource\"] = new[]\n {\n \"collection/example-collection\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:DescribeCollectionItems\",\n },\n },\n },\n [\"Principal\"] = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal([]map[string]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"Rules\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"index\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"index/example-collection/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:DescribeIndex\",\n\t\t\t\t\t\t\t\"aoss:ReadDocument\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"collection\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"collection/example-collection\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:DescribeCollectionItems\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Principal\": []*string{\n\t\t\t\t\tcurrent.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = opensearch.NewServerlessAccessPolicy(ctx, \"example\", \u0026opensearch.ServerlessAccessPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tType: pulumi.String(\"data\"),\n\t\t\tDescription: pulumi.String(\"read-only permissions\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicy;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new ServerlessAccessPolicy(\"example\", ServerlessAccessPolicyArgs.builder()\n .name(\"example\")\n .type(\"data\")\n .description(\"read-only permissions\")\n .policy(serializeJson(\n jsonArray(jsonObject(\n jsonProperty(\"Rules\", jsonArray(\n jsonObject(\n jsonProperty(\"ResourceType\", \"index\"),\n jsonProperty(\"Resource\", jsonArray(\"index/example-collection/*\")),\n jsonProperty(\"Permission\", jsonArray(\n \"aoss:DescribeIndex\", \n \"aoss:ReadDocument\"\n ))\n ), \n jsonObject(\n jsonProperty(\"ResourceType\", \"collection\"),\n jsonProperty(\"Resource\", jsonArray(\"collection/example-collection\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:DescribeCollectionItems\"))\n )\n )),\n jsonProperty(\"Principal\", jsonArray(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn())))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:ServerlessAccessPolicy\n properties:\n name: example\n type: data\n description: read-only permissions\n policy:\n fn::toJSON:\n - Rules:\n - ResourceType: index\n Resource:\n - index/example-collection/*\n Permission:\n - aoss:DescribeIndex\n - aoss:ReadDocument\n - ResourceType: collection\n Resource:\n - collection/example-collection\n Permission:\n - aoss:DescribeCollectionItems\n Principal:\n - ${current.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Grant SAML identity permissions\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.opensearch.ServerlessAccessPolicy(\"example\", {\n name: \"example\",\n type: \"data\",\n description: \"saml permissions\",\n policy: JSON.stringify([{\n Rules: [\n {\n ResourceType: \"index\",\n Resource: [\"index/example-collection/*\"],\n Permission: [\"aoss:*\"],\n },\n {\n ResourceType: \"collection\",\n Resource: [\"collection/example-collection\"],\n Permission: [\"aoss:*\"],\n },\n ],\n Principal: [\n \"saml/123456789012/myprovider/user/Annie\",\n \"saml/123456789012/anotherprovider/group/Accounting\",\n ],\n }]),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.opensearch.ServerlessAccessPolicy(\"example\",\n name=\"example\",\n type=\"data\",\n description=\"saml permissions\",\n policy=json.dumps([{\n \"Rules\": [\n {\n \"ResourceType\": \"index\",\n \"Resource\": [\"index/example-collection/*\"],\n \"Permission\": [\"aoss:*\"],\n },\n {\n \"ResourceType\": \"collection\",\n \"Resource\": [\"collection/example-collection\"],\n \"Permission\": [\"aoss:*\"],\n },\n ],\n \"Principal\": [\n \"saml/123456789012/myprovider/user/Annie\",\n \"saml/123456789012/anotherprovider/group/Accounting\",\n ],\n }]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearch.ServerlessAccessPolicy(\"example\", new()\n {\n Name = \"example\",\n Type = \"data\",\n Description = \"saml permissions\",\n Policy = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Rules\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"index\",\n [\"Resource\"] = new[]\n {\n \"index/example-collection/*\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:*\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"collection\",\n [\"Resource\"] = new[]\n {\n \"collection/example-collection\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:*\",\n },\n },\n },\n [\"Principal\"] = new[]\n {\n \"saml/123456789012/myprovider/user/Annie\",\n \"saml/123456789012/anotherprovider/group/Accounting\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal([]map[string]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"Rules\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"index\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"index/example-collection/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"collection\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"collection/example-collection\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Principal\": []string{\n\t\t\t\t\t\"saml/123456789012/myprovider/user/Annie\",\n\t\t\t\t\t\"saml/123456789012/anotherprovider/group/Accounting\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = opensearch.NewServerlessAccessPolicy(ctx, \"example\", \u0026opensearch.ServerlessAccessPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tType: pulumi.String(\"data\"),\n\t\t\tDescription: pulumi.String(\"saml permissions\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicy;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ServerlessAccessPolicy(\"example\", ServerlessAccessPolicyArgs.builder()\n .name(\"example\")\n .type(\"data\")\n .description(\"saml permissions\")\n .policy(serializeJson(\n jsonArray(jsonObject(\n jsonProperty(\"Rules\", jsonArray(\n jsonObject(\n jsonProperty(\"ResourceType\", \"index\"),\n jsonProperty(\"Resource\", jsonArray(\"index/example-collection/*\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:*\"))\n ), \n jsonObject(\n jsonProperty(\"ResourceType\", \"collection\"),\n jsonProperty(\"Resource\", jsonArray(\"collection/example-collection\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:*\"))\n )\n )),\n jsonProperty(\"Principal\", jsonArray(\n \"saml/123456789012/myprovider/user/Annie\", \n \"saml/123456789012/anotherprovider/group/Accounting\"\n ))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:ServerlessAccessPolicy\n properties:\n name: example\n type: data\n description: saml permissions\n policy:\n fn::toJSON:\n - Rules:\n - ResourceType: index\n Resource:\n - index/example-collection/*\n Permission:\n - aoss:*\n - ResourceType: collection\n Resource:\n - collection/example-collection\n Permission:\n - aoss:*\n Principal:\n - saml/123456789012/myprovider/user/Annie\n - saml/123456789012/anotherprovider/group/Accounting\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import OpenSearchServerless Access Policy using the `name` and `type` arguments separated by a slash (`/`). For example:\n\n```sh\n$ pulumi import aws:opensearch/serverlessAccessPolicy:ServerlessAccessPolicy example example/data\n```\n", + "description": "Resource for managing an AWS OpenSearch Serverless Access Policy. See AWS documentation for [data access policies](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-data-access.html) and [supported data access policy permissions](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-data-access.html#serverless-data-supported-permissions).\n\n## Example Usage\n\n### Grant all collection and index permissions\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.opensearch.ServerlessAccessPolicy(\"example\", {\n name: \"example\",\n type: \"data\",\n description: \"read and write permissions\",\n policy: JSON.stringify([{\n Rules: [\n {\n ResourceType: \"index\",\n Resource: [\"index/example-collection/*\"],\n Permission: [\"aoss:*\"],\n },\n {\n ResourceType: \"collection\",\n Resource: [\"collection/example-collection\"],\n Permission: [\"aoss:*\"],\n },\n ],\n Principal: [current.then(current =\u003e current.arn)],\n }]),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.opensearch.ServerlessAccessPolicy(\"example\",\n name=\"example\",\n type=\"data\",\n description=\"read and write permissions\",\n policy=json.dumps([{\n \"Rules\": [\n {\n \"ResourceType\": \"index\",\n \"Resource\": [\"index/example-collection/*\"],\n \"Permission\": [\"aoss:*\"],\n },\n {\n \"ResourceType\": \"collection\",\n \"Resource\": [\"collection/example-collection\"],\n \"Permission\": [\"aoss:*\"],\n },\n ],\n \"Principal\": [current.arn],\n }]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.OpenSearch.ServerlessAccessPolicy(\"example\", new()\n {\n Name = \"example\",\n Type = \"data\",\n Description = \"read and write permissions\",\n Policy = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Rules\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"index\",\n [\"Resource\"] = new[]\n {\n \"index/example-collection/*\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:*\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"collection\",\n [\"Resource\"] = new[]\n {\n \"collection/example-collection\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:*\",\n },\n },\n },\n [\"Principal\"] = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal([]map[string]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"Rules\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"index\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"index/example-collection/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"collection\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"collection/example-collection\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Principal\": []*string{\n\t\t\t\t\tcurrent.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = opensearch.NewServerlessAccessPolicy(ctx, \"example\", \u0026opensearch.ServerlessAccessPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tType: pulumi.String(\"data\"),\n\t\t\tDescription: pulumi.String(\"read and write permissions\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicy;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new ServerlessAccessPolicy(\"example\", ServerlessAccessPolicyArgs.builder()\n .name(\"example\")\n .type(\"data\")\n .description(\"read and write permissions\")\n .policy(serializeJson(\n jsonArray(jsonObject(\n jsonProperty(\"Rules\", jsonArray(\n jsonObject(\n jsonProperty(\"ResourceType\", \"index\"),\n jsonProperty(\"Resource\", jsonArray(\"index/example-collection/*\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:*\"))\n ), \n jsonObject(\n jsonProperty(\"ResourceType\", \"collection\"),\n jsonProperty(\"Resource\", jsonArray(\"collection/example-collection\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:*\"))\n )\n )),\n jsonProperty(\"Principal\", jsonArray(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn())))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:ServerlessAccessPolicy\n properties:\n name: example\n type: data\n description: read and write permissions\n policy:\n fn::toJSON:\n - Rules:\n - ResourceType: index\n Resource:\n - index/example-collection/*\n Permission:\n - aoss:*\n - ResourceType: collection\n Resource:\n - collection/example-collection\n Permission:\n - aoss:*\n Principal:\n - ${current.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Grant read-only collection and index permissions\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.opensearch.ServerlessAccessPolicy(\"example\", {\n name: \"example\",\n type: \"data\",\n description: \"read-only permissions\",\n policy: JSON.stringify([{\n Rules: [\n {\n ResourceType: \"index\",\n Resource: [\"index/example-collection/*\"],\n Permission: [\n \"aoss:DescribeIndex\",\n \"aoss:ReadDocument\",\n ],\n },\n {\n ResourceType: \"collection\",\n Resource: [\"collection/example-collection\"],\n Permission: [\"aoss:DescribeCollectionItems\"],\n },\n ],\n Principal: [current.then(current =\u003e current.arn)],\n }]),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.opensearch.ServerlessAccessPolicy(\"example\",\n name=\"example\",\n type=\"data\",\n description=\"read-only permissions\",\n policy=json.dumps([{\n \"Rules\": [\n {\n \"ResourceType\": \"index\",\n \"Resource\": [\"index/example-collection/*\"],\n \"Permission\": [\n \"aoss:DescribeIndex\",\n \"aoss:ReadDocument\",\n ],\n },\n {\n \"ResourceType\": \"collection\",\n \"Resource\": [\"collection/example-collection\"],\n \"Permission\": [\"aoss:DescribeCollectionItems\"],\n },\n ],\n \"Principal\": [current.arn],\n }]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.OpenSearch.ServerlessAccessPolicy(\"example\", new()\n {\n Name = \"example\",\n Type = \"data\",\n Description = \"read-only permissions\",\n Policy = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Rules\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"index\",\n [\"Resource\"] = new[]\n {\n \"index/example-collection/*\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:DescribeIndex\",\n \"aoss:ReadDocument\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"collection\",\n [\"Resource\"] = new[]\n {\n \"collection/example-collection\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:DescribeCollectionItems\",\n },\n },\n },\n [\"Principal\"] = new[]\n {\n current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal([]map[string]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"Rules\": []interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"index\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"index/example-collection/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:DescribeIndex\",\n\t\t\t\t\t\t\t\"aoss:ReadDocument\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"collection\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"collection/example-collection\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:DescribeCollectionItems\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Principal\": []*string{\n\t\t\t\t\tcurrent.Arn,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = opensearch.NewServerlessAccessPolicy(ctx, \"example\", \u0026opensearch.ServerlessAccessPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tType: pulumi.String(\"data\"),\n\t\t\tDescription: pulumi.String(\"read-only permissions\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicy;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new ServerlessAccessPolicy(\"example\", ServerlessAccessPolicyArgs.builder()\n .name(\"example\")\n .type(\"data\")\n .description(\"read-only permissions\")\n .policy(serializeJson(\n jsonArray(jsonObject(\n jsonProperty(\"Rules\", jsonArray(\n jsonObject(\n jsonProperty(\"ResourceType\", \"index\"),\n jsonProperty(\"Resource\", jsonArray(\"index/example-collection/*\")),\n jsonProperty(\"Permission\", jsonArray(\n \"aoss:DescribeIndex\", \n \"aoss:ReadDocument\"\n ))\n ), \n jsonObject(\n jsonProperty(\"ResourceType\", \"collection\"),\n jsonProperty(\"Resource\", jsonArray(\"collection/example-collection\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:DescribeCollectionItems\"))\n )\n )),\n jsonProperty(\"Principal\", jsonArray(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn())))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:ServerlessAccessPolicy\n properties:\n name: example\n type: data\n description: read-only permissions\n policy:\n fn::toJSON:\n - Rules:\n - ResourceType: index\n Resource:\n - index/example-collection/*\n Permission:\n - aoss:DescribeIndex\n - aoss:ReadDocument\n - ResourceType: collection\n Resource:\n - collection/example-collection\n Permission:\n - aoss:DescribeCollectionItems\n Principal:\n - ${current.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Grant SAML identity permissions\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.opensearch.ServerlessAccessPolicy(\"example\", {\n name: \"example\",\n type: \"data\",\n description: \"saml permissions\",\n policy: JSON.stringify([{\n Rules: [\n {\n ResourceType: \"index\",\n Resource: [\"index/example-collection/*\"],\n Permission: [\"aoss:*\"],\n },\n {\n ResourceType: \"collection\",\n Resource: [\"collection/example-collection\"],\n Permission: [\"aoss:*\"],\n },\n ],\n Principal: [\n \"saml/123456789012/myprovider/user/Annie\",\n \"saml/123456789012/anotherprovider/group/Accounting\",\n ],\n }]),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.opensearch.ServerlessAccessPolicy(\"example\",\n name=\"example\",\n type=\"data\",\n description=\"saml permissions\",\n policy=json.dumps([{\n \"Rules\": [\n {\n \"ResourceType\": \"index\",\n \"Resource\": [\"index/example-collection/*\"],\n \"Permission\": [\"aoss:*\"],\n },\n {\n \"ResourceType\": \"collection\",\n \"Resource\": [\"collection/example-collection\"],\n \"Permission\": [\"aoss:*\"],\n },\n ],\n \"Principal\": [\n \"saml/123456789012/myprovider/user/Annie\",\n \"saml/123456789012/anotherprovider/group/Accounting\",\n ],\n }]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearch.ServerlessAccessPolicy(\"example\", new()\n {\n Name = \"example\",\n Type = \"data\",\n Description = \"saml permissions\",\n Policy = JsonSerializer.Serialize(new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Rules\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"index\",\n [\"Resource\"] = new[]\n {\n \"index/example-collection/*\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:*\",\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"ResourceType\"] = \"collection\",\n [\"Resource\"] = new[]\n {\n \"collection/example-collection\",\n },\n [\"Permission\"] = new[]\n {\n \"aoss:*\",\n },\n },\n },\n [\"Principal\"] = new[]\n {\n \"saml/123456789012/myprovider/user/Annie\",\n \"saml/123456789012/anotherprovider/group/Accounting\",\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal([]map[string]interface{}{\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"Rules\": []map[string]interface{}{\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"index\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"index/example-collection/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\"ResourceType\": \"collection\",\n\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\"collection/example-collection\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"Permission\": []string{\n\t\t\t\t\t\t\t\"aoss:*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"Principal\": []string{\n\t\t\t\t\t\"saml/123456789012/myprovider/user/Annie\",\n\t\t\t\t\t\"saml/123456789012/anotherprovider/group/Accounting\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = opensearch.NewServerlessAccessPolicy(ctx, \"example\", \u0026opensearch.ServerlessAccessPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tType: pulumi.String(\"data\"),\n\t\t\tDescription: pulumi.String(\"saml permissions\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicy;\nimport com.pulumi.aws.opensearch.ServerlessAccessPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ServerlessAccessPolicy(\"example\", ServerlessAccessPolicyArgs.builder()\n .name(\"example\")\n .type(\"data\")\n .description(\"saml permissions\")\n .policy(serializeJson(\n jsonArray(jsonObject(\n jsonProperty(\"Rules\", jsonArray(\n jsonObject(\n jsonProperty(\"ResourceType\", \"index\"),\n jsonProperty(\"Resource\", jsonArray(\"index/example-collection/*\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:*\"))\n ), \n jsonObject(\n jsonProperty(\"ResourceType\", \"collection\"),\n jsonProperty(\"Resource\", jsonArray(\"collection/example-collection\")),\n jsonProperty(\"Permission\", jsonArray(\"aoss:*\"))\n )\n )),\n jsonProperty(\"Principal\", jsonArray(\n \"saml/123456789012/myprovider/user/Annie\", \n \"saml/123456789012/anotherprovider/group/Accounting\"\n ))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearch:ServerlessAccessPolicy\n properties:\n name: example\n type: data\n description: saml permissions\n policy:\n fn::toJSON:\n - Rules:\n - ResourceType: index\n Resource:\n - index/example-collection/*\n Permission:\n - aoss:*\n - ResourceType: collection\n Resource:\n - collection/example-collection\n Permission:\n - aoss:*\n Principal:\n - saml/123456789012/myprovider/user/Annie\n - saml/123456789012/anotherprovider/group/Accounting\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import OpenSearchServerless Access Policy using the `name` and `type` arguments separated by a slash (`/`). For example:\n\n```sh\n$ pulumi import aws:opensearch/serverlessAccessPolicy:ServerlessAccessPolicy example example/data\n```\n", "properties": { "description": { "type": "string", @@ -311427,7 +311427,7 @@ } }, "aws:opensearchingest/pipeline:Pipeline": { - "description": "Resource for managing an AWS OpenSearch Ingestion Pipeline.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.iam.Role(\"example\", {assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Sid: \"\",\n Principal: {\n Service: \"osis-pipelines.amazonaws.com\",\n },\n }],\n})});\nconst examplePipeline = new aws.opensearchingest.Pipeline(\"example\", {\n pipelineName: \"example\",\n pipelineConfigurationBody: pulumi.all([example.arn, current]).apply(([arn, current]) =\u003e `version: \"2\"\nexample-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"${arn}\"\n region: \"${current.name}\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n`),\n maxUnits: 1,\n minUnits: 1,\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.iam.Role(\"example\", assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Sid\": \"\",\n \"Principal\": {\n \"Service\": \"osis-pipelines.amazonaws.com\",\n },\n }],\n}))\nexample_pipeline = aws.opensearchingest.Pipeline(\"example\",\n pipeline_name=\"example\",\n pipeline_configuration_body=example.arn.apply(lambda arn: f\"\"\"version: \"2\"\nexample-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"{arn}\"\n region: \"{current.name}\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n\"\"\"),\n max_units=1,\n min_units=1)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Effect\"] = \"Allow\",\n [\"Sid\"] = \"\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"osis-pipelines.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var examplePipeline = new Aws.OpenSearchIngest.Pipeline(\"example\", new()\n {\n PipelineName = \"example\",\n PipelineConfigurationBody = Output.Tuple(example.Arn, current).Apply(values =\u003e\n {\n var arn = values.Item1;\n var current = values.Item2;\n return @$\"version: \"\"2\"\"\nexample-pipeline:\n source:\n http:\n path: \"\"/example\"\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"\"{arn}\"\"\n region: \"\"{current.Apply(getRegionResult =\u003e getRegionResult.Name)}\"\"\n bucket: \"\"example\"\"\n threshold:\n event_collect_timeout: \"\"60s\"\"\n codec:\n ndjson:\n\";\n }),\n MaxUnits = 1,\n MinUnits = 1,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearchingest\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Sid\": \"\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"osis-pipelines.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tAssumeRolePolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearchingest.NewPipeline(ctx, \"example\", \u0026opensearchingest.PipelineArgs{\n\t\t\tPipelineName: pulumi.String(\"example\"),\n\t\t\tPipelineConfigurationBody: example.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(`version: \"2\"\nexample-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"%v\"\n region: \"%v\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n`, arn, current.Name), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t\tMaxUnits: pulumi.Int(1),\n\t\t\tMinUnits: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.opensearchingest.Pipeline;\nimport com.pulumi.aws.opensearchingest.PipelineArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new Role(\"example\", RoleArgs.builder()\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Sid\", \"\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"osis-pipelines.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var examplePipeline = new Pipeline(\"examplePipeline\", PipelineArgs.builder()\n .pipelineName(\"example\")\n .pipelineConfigurationBody(example.arn().applyValue(arn -\u003e \"\"\"\nversion: \"2\"\nexample-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"%s\"\n region: \"%s\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n\", arn,current.applyValue(getRegionResult -\u003e getRegionResult.name()))))\n .maxUnits(1)\n .minUnits(1)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Sid:\n Principal:\n Service: osis-pipelines.amazonaws.com\n examplePipeline:\n type: aws:opensearchingest:Pipeline\n name: example\n properties:\n pipelineName: example\n pipelineConfigurationBody: |\n version: \"2\"\n example-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"${example.arn}\"\n region: \"${current.name}\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n maxUnits: 1\n minUnits: 1\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using file function\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst example = new aws.opensearchingest.Pipeline(\"example\", {\n pipelineName: \"example\",\n pipelineConfigurationBody: std.file({\n input: \"example.yaml\",\n }).then(invoke =\u003e invoke.result),\n maxUnits: 1,\n minUnits: 1,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.opensearchingest.Pipeline(\"example\",\n pipeline_name=\"example\",\n pipeline_configuration_body=std.file(input=\"example.yaml\").result,\n max_units=1,\n min_units=1)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearchIngest.Pipeline(\"example\", new()\n {\n PipelineName = \"example\",\n PipelineConfigurationBody = Std.File.Invoke(new()\n {\n Input = \"example.yaml\",\n }).Apply(invoke =\u003e invoke.Result),\n MaxUnits = 1,\n MinUnits = 1,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearchingest\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: \"example.yaml\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearchingest.NewPipeline(ctx, \"example\", \u0026opensearchingest.PipelineArgs{\n\t\t\tPipelineName: pulumi.String(\"example\"),\n\t\t\tPipelineConfigurationBody: pulumi.String(invokeFile.Result),\n\t\t\tMaxUnits: pulumi.Int(1),\n\t\t\tMinUnits: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearchingest.Pipeline;\nimport com.pulumi.aws.opensearchingest.PipelineArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Pipeline(\"example\", PipelineArgs.builder()\n .pipelineName(\"example\")\n .pipelineConfigurationBody(StdFunctions.file(FileArgs.builder()\n .input(\"example.yaml\")\n .build()).result())\n .maxUnits(1)\n .minUnits(1)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearchingest:Pipeline\n properties:\n pipelineName: example\n pipelineConfigurationBody:\n fn::invoke:\n Function: std:file\n Arguments:\n input: example.yaml\n Return: result\n maxUnits: 1\n minUnits: 1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import OpenSearch Ingestion Pipeline using the `id`. For example:\n\n```sh\n$ pulumi import aws:opensearchingest/pipeline:Pipeline example example\n```\n", + "description": "Resource for managing an AWS OpenSearch Ingestion Pipeline.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = new aws.iam.Role(\"example\", {assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"sts:AssumeRole\",\n Effect: \"Allow\",\n Sid: \"\",\n Principal: {\n Service: \"osis-pipelines.amazonaws.com\",\n },\n }],\n})});\nconst examplePipeline = new aws.opensearchingest.Pipeline(\"example\", {\n pipelineName: \"example\",\n pipelineConfigurationBody: pulumi.all([example.arn, current]).apply(([arn, current]) =\u003e `version: \"2\"\nexample-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"${arn}\"\n region: \"${current.name}\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n`),\n maxUnits: 1,\n minUnits: 1,\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.iam.Role(\"example\", assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"sts:AssumeRole\",\n \"Effect\": \"Allow\",\n \"Sid\": \"\",\n \"Principal\": {\n \"Service\": \"osis-pipelines.amazonaws.com\",\n },\n }],\n}))\nexample_pipeline = aws.opensearchingest.Pipeline(\"example\",\n pipeline_name=\"example\",\n pipeline_configuration_body=example.arn.apply(lambda arn: f\"\"\"version: \"2\"\nexample-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"{arn}\"\n region: \"{current.name}\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n\"\"\"),\n max_units=1,\n min_units=1)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Effect\"] = \"Allow\",\n [\"Sid\"] = \"\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"osis-pipelines.amazonaws.com\",\n },\n },\n },\n }),\n });\n\n var examplePipeline = new Aws.OpenSearchIngest.Pipeline(\"example\", new()\n {\n PipelineName = \"example\",\n PipelineConfigurationBody = Output.Tuple(example.Arn, current).Apply(values =\u003e\n {\n var arn = values.Item1;\n var current = values.Item2;\n return @$\"version: \"\"2\"\"\nexample-pipeline:\n source:\n http:\n path: \"\"/example\"\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"\"{arn}\"\"\n region: \"\"{current.Apply(getRegionResult =\u003e getRegionResult.Name)}\"\"\n bucket: \"\"example\"\"\n threshold:\n event_collect_timeout: \"\"60s\"\"\n codec:\n ndjson:\n\";\n }),\n MaxUnits = 1,\n MinUnits = 1,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearchingest\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Sid\": \"\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"osis-pipelines.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tAssumeRolePolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearchingest.NewPipeline(ctx, \"example\", \u0026opensearchingest.PipelineArgs{\n\t\t\tPipelineName: pulumi.String(\"example\"),\n\t\t\tPipelineConfigurationBody: example.Arn.ApplyT(func(arn string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(`version: \"2\"\nexample-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"%v\"\n region: \"%v\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n`, arn, current.Name), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t\tMaxUnits: pulumi.Int(1),\n\t\t\tMinUnits: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.opensearchingest.Pipeline;\nimport com.pulumi.aws.opensearchingest.PipelineArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n var example = new Role(\"example\", RoleArgs.builder()\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Sid\", \"\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"osis-pipelines.amazonaws.com\")\n ))\n )))\n )))\n .build());\n\n var examplePipeline = new Pipeline(\"examplePipeline\", PipelineArgs.builder()\n .pipelineName(\"example\")\n .pipelineConfigurationBody(example.arn().applyValue(arn -\u003e \"\"\"\nversion: \"2\"\nexample-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"%s\"\n region: \"%s\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n\", arn,current.applyValue(getRegionResult -\u003e getRegionResult.name()))))\n .maxUnits(1)\n .minUnits(1)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: sts:AssumeRole\n Effect: Allow\n Sid:\n Principal:\n Service: osis-pipelines.amazonaws.com\n examplePipeline:\n type: aws:opensearchingest:Pipeline\n name: example\n properties:\n pipelineName: example\n pipelineConfigurationBody: |\n version: \"2\"\n example-pipeline:\n source:\n http:\n path: \"/example\"\n sink:\n - s3:\n aws:\n sts_role_arn: \"${example.arn}\"\n region: \"${current.name}\"\n bucket: \"example\"\n threshold:\n event_collect_timeout: \"60s\"\n codec:\n ndjson:\n maxUnits: 1\n minUnits: 1\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Using file function\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst example = new aws.opensearchingest.Pipeline(\"example\", {\n pipelineName: \"example\",\n pipelineConfigurationBody: std.file({\n input: \"example.yaml\",\n }).then(invoke =\u003e invoke.result),\n maxUnits: 1,\n minUnits: 1,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nexample = aws.opensearchingest.Pipeline(\"example\",\n pipeline_name=\"example\",\n pipeline_configuration_body=std.file(input=\"example.yaml\").result,\n max_units=1,\n min_units=1)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.OpenSearchIngest.Pipeline(\"example\", new()\n {\n PipelineName = \"example\",\n PipelineConfigurationBody = Std.File.Invoke(new()\n {\n Input = \"example.yaml\",\n }).Apply(invoke =\u003e invoke.Result),\n MaxUnits = 1,\n MinUnits = 1,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearchingest\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeFile, err := std.File(ctx, \u0026std.FileArgs{\n\t\t\tInput: \"example.yaml\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = opensearchingest.NewPipeline(ctx, \"example\", \u0026opensearchingest.PipelineArgs{\n\t\t\tPipelineName: pulumi.String(\"example\"),\n\t\t\tPipelineConfigurationBody: pulumi.String(invokeFile.Result),\n\t\t\tMaxUnits: pulumi.Int(1),\n\t\t\tMinUnits: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.opensearchingest.Pipeline;\nimport com.pulumi.aws.opensearchingest.PipelineArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Pipeline(\"example\", PipelineArgs.builder()\n .pipelineName(\"example\")\n .pipelineConfigurationBody(StdFunctions.file(FileArgs.builder()\n .input(\"example.yaml\")\n .build()).result())\n .maxUnits(1)\n .minUnits(1)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:opensearchingest:Pipeline\n properties:\n pipelineName: example\n pipelineConfigurationBody:\n fn::invoke:\n Function: std:file\n Arguments:\n input: example.yaml\n Return: result\n maxUnits: 1\n minUnits: 1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import OpenSearch Ingestion Pipeline using the `id`. For example:\n\n```sh\n$ pulumi import aws:opensearchingest/pipeline:Pipeline example example\n```\n", "properties": { "bufferOptions": { "$ref": "#/types/aws:opensearchingest/PipelineBufferOptions:PipelineBufferOptions", @@ -320315,7 +320315,7 @@ } }, "aws:pipes/pipe:Pipe": { - "description": "Resource for managing an AWS EventBridge Pipes Pipe.\n\nYou can find out more about EventBridge Pipes in the [User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html).\n\nEventBridge Pipes are very configurable, and may require IAM permissions to work correctly. More information on the configuration options and IAM permissions can be found in the [User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html).\n\n\u003e **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.getCallerIdentity({});\nconst example = new aws.iam.Role(\"example\", {assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: {\n Effect: \"Allow\",\n Action: \"sts:AssumeRole\",\n Principal: {\n Service: \"pipes.amazonaws.com\",\n },\n Condition: {\n StringEquals: {\n \"aws:SourceAccount\": main.then(main =\u003e main.accountId),\n },\n },\n },\n})});\nconst sourceQueue = new aws.sqs.Queue(\"source\", {});\nconst source = new aws.iam.RolePolicy(\"source\", {\n role: example.id,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: [\n \"sqs:DeleteMessage\",\n \"sqs:GetQueueAttributes\",\n \"sqs:ReceiveMessage\",\n ],\n Resource: [sourceQueue.arn],\n }],\n }),\n});\nconst targetQueue = new aws.sqs.Queue(\"target\", {});\nconst target = new aws.iam.RolePolicy(\"target\", {\n role: example.id,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: [\"sqs:SendMessage\"],\n Resource: [targetQueue.arn],\n }],\n }),\n});\nconst examplePipe = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: example.arn,\n source: sourceQueue.arn,\n target: targetQueue.arn,\n}, {\n dependsOn: [\n source,\n target,\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nmain = aws.get_caller_identity()\nexample = aws.iam.Role(\"example\", assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": {\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"pipes.amazonaws.com\",\n },\n \"Condition\": {\n \"StringEquals\": {\n \"aws:SourceAccount\": main.account_id,\n },\n },\n },\n}))\nsource_queue = aws.sqs.Queue(\"source\")\nsource = aws.iam.RolePolicy(\"source\",\n role=example.id,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": [\n \"sqs:DeleteMessage\",\n \"sqs:GetQueueAttributes\",\n \"sqs:ReceiveMessage\",\n ],\n \"Resource\": [source_queue.arn],\n }],\n }))\ntarget_queue = aws.sqs.Queue(\"target\")\ntarget = aws.iam.RolePolicy(\"target\",\n role=example.id,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": [\"sqs:SendMessage\"],\n \"Resource\": [target_queue.arn],\n }],\n }))\nexample_pipe = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example.arn,\n source=source_queue.arn,\n target=target_queue.arn,\n opts = pulumi.ResourceOptions(depends_on=[\n source,\n target,\n ]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Effect\"] = \"Allow\",\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"pipes.amazonaws.com\",\n },\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceAccount\"] = main.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n }),\n });\n\n var sourceQueue = new Aws.Sqs.Queue(\"source\");\n\n var source = new Aws.Iam.RolePolicy(\"source\", new()\n {\n Role = example.Id,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Effect\"] = \"Allow\",\n [\"Action\"] = new[]\n {\n \"sqs:DeleteMessage\",\n \"sqs:GetQueueAttributes\",\n \"sqs:ReceiveMessage\",\n },\n [\"Resource\"] = new[]\n {\n sourceQueue.Arn,\n },\n },\n },\n })),\n });\n\n var targetQueue = new Aws.Sqs.Queue(\"target\");\n\n var target = new Aws.Iam.RolePolicy(\"target\", new()\n {\n Role = example.Id,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Effect\"] = \"Allow\",\n [\"Action\"] = new[]\n {\n \"sqs:SendMessage\",\n },\n [\"Resource\"] = new[]\n {\n targetQueue.Arn,\n },\n },\n },\n })),\n });\n\n var examplePipe = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = example.Arn,\n Source = sourceQueue.Arn,\n Target = targetQueue.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n source,\n target,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sqs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": map[string]interface{}{\n\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\"Service\": \"pipes.amazonaws.com\",\n\t\t\t\t},\n\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\"aws:SourceAccount\": main.AccountId,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tAssumeRolePolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsourceQueue, err := sqs.NewQueue(ctx, \"source\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsource, err := iam.NewRolePolicy(ctx, \"source\", \u0026iam.RolePolicyArgs{\n\t\t\tRole: example.ID(),\n\t\t\tPolicy: sourceQueue.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\"sqs:DeleteMessage\",\n\t\t\t\t\t\t\t\t\"sqs:GetQueueAttributes\",\n\t\t\t\t\t\t\t\t\"sqs:ReceiveMessage\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\tarn,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\treturn pulumi.String(json1), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttargetQueue, err := sqs.NewQueue(ctx, \"target\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttarget, err := iam.NewRolePolicy(ctx, \"target\", \u0026iam.RolePolicyArgs{\n\t\t\tRole: example.ID(),\n\t\t\tPolicy: targetQueue.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON2, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\"sqs:SendMessage\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\tarn,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson2 := string(tmpJSON2)\n\t\t\t\treturn pulumi.String(json2), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: example.Arn,\n\t\t\tSource: sourceQueue.Arn,\n\t\t\tTarget: targetQueue.Arn,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tsource,\n\t\t\ttarget,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.sqs.Queue;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = AwsFunctions.getCallerIdentity();\n\n var example = new Role(\"example\", RoleArgs.builder()\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"pipes.amazonaws.com\")\n )),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"aws:SourceAccount\", main.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n ))\n ))\n ))\n )))\n .build());\n\n var sourceQueue = new Queue(\"sourceQueue\");\n\n var source = new RolePolicy(\"source\", RolePolicyArgs.builder()\n .role(example.id())\n .policy(sourceQueue.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", jsonArray(\n \"sqs:DeleteMessage\", \n \"sqs:GetQueueAttributes\", \n \"sqs:ReceiveMessage\"\n )),\n jsonProperty(\"Resource\", jsonArray(arn))\n )))\n ))))\n .build());\n\n var targetQueue = new Queue(\"targetQueue\");\n\n var target = new RolePolicy(\"target\", RolePolicyArgs.builder()\n .role(example.id())\n .policy(targetQueue.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", jsonArray(\"sqs:SendMessage\")),\n jsonProperty(\"Resource\", jsonArray(arn))\n )))\n ))))\n .build());\n\n var examplePipe = new Pipe(\"examplePipe\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(example.arn())\n .source(sourceQueue.arn())\n .target(targetQueue.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn( \n source,\n target)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n Effect: Allow\n Action: sts:AssumeRole\n Principal:\n Service: pipes.amazonaws.com\n Condition:\n StringEquals:\n aws:SourceAccount: ${main.accountId}\n source:\n type: aws:iam:RolePolicy\n properties:\n role: ${example.id}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Effect: Allow\n Action:\n - sqs:DeleteMessage\n - sqs:GetQueueAttributes\n - sqs:ReceiveMessage\n Resource:\n - ${sourceQueue.arn}\n sourceQueue:\n type: aws:sqs:Queue\n name: source\n target:\n type: aws:iam:RolePolicy\n properties:\n role: ${example.id}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Effect: Allow\n Action:\n - sqs:SendMessage\n Resource:\n - ${targetQueue.arn}\n targetQueue:\n type: aws:sqs:Queue\n name: target\n examplePipe:\n type: aws:pipes:Pipe\n name: example\n properties:\n name: example-pipe\n roleArn: ${example.arn}\n source: ${sourceQueue.arn}\n target: ${targetQueue.arn}\n options:\n dependson:\n - ${source}\n - ${target}\nvariables:\n main:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Enrichment Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: exampleAwsIamRole.arn,\n source: source.arn,\n target: target.arn,\n enrichment: exampleAwsCloudwatchEventApiDestination.arn,\n enrichmentParameters: {\n httpParameters: {\n pathParameterValues: \"example-path-param\",\n headerParameters: {\n \"example-header\": \"example-value\",\n \"second-example-header\": \"second-example-value\",\n },\n queryStringParameters: {\n \"example-query-string\": \"example-value\",\n \"second-example-query-string\": \"second-example-value\",\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example_aws_iam_role[\"arn\"],\n source=source[\"arn\"],\n target=target[\"arn\"],\n enrichment=example_aws_cloudwatch_event_api_destination[\"arn\"],\n enrichment_parameters={\n \"http_parameters\": {\n \"path_parameter_values\": \"example-path-param\",\n \"header_parameters\": {\n \"example_header\": \"example-value\",\n \"second_example_header\": \"second-example-value\",\n },\n \"query_string_parameters\": {\n \"example_query_string\": \"example-value\",\n \"second_example_query_string\": \"second-example-value\",\n },\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = exampleAwsIamRole.Arn,\n Source = source.Arn,\n Target = target.Arn,\n Enrichment = exampleAwsCloudwatchEventApiDestination.Arn,\n EnrichmentParameters = new Aws.Pipes.Inputs.PipeEnrichmentParametersArgs\n {\n HttpParameters = new Aws.Pipes.Inputs.PipeEnrichmentParametersHttpParametersArgs\n {\n PathParameterValues = \"example-path-param\",\n HeaderParameters = \n {\n { \"example-header\", \"example-value\" },\n { \"second-example-header\", \"second-example-value\" },\n },\n QueryStringParameters = \n {\n { \"example-query-string\", \"example-value\" },\n { \"second-example-query-string\", \"second-example-value\" },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tSource: pulumi.Any(source.Arn),\n\t\t\tTarget: pulumi.Any(target.Arn),\n\t\t\tEnrichment: pulumi.Any(exampleAwsCloudwatchEventApiDestination.Arn),\n\t\t\tEnrichmentParameters: \u0026pipes.PipeEnrichmentParametersArgs{\n\t\t\t\tHttpParameters: \u0026pipes.PipeEnrichmentParametersHttpParametersArgs{\n\t\t\t\t\tPathParameterValues: pulumi.String(\"example-path-param\"),\n\t\t\t\t\tHeaderParameters: pulumi.StringMap{\n\t\t\t\t\t\t\"example-header\": pulumi.String(\"example-value\"),\n\t\t\t\t\t\t\"second-example-header\": pulumi.String(\"second-example-value\"),\n\t\t\t\t\t},\n\t\t\t\t\tQueryStringParameters: pulumi.StringMap{\n\t\t\t\t\t\t\"example-query-string\": pulumi.String(\"example-value\"),\n\t\t\t\t\t\t\"second-example-query-string\": pulumi.String(\"second-example-value\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport com.pulumi.aws.pipes.inputs.PipeEnrichmentParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeEnrichmentParametersHttpParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Pipe(\"example\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(exampleAwsIamRole.arn())\n .source(source.arn())\n .target(target.arn())\n .enrichment(exampleAwsCloudwatchEventApiDestination.arn())\n .enrichmentParameters(PipeEnrichmentParametersArgs.builder()\n .httpParameters(PipeEnrichmentParametersHttpParametersArgs.builder()\n .pathParameterValues(\"example-path-param\")\n .headerParameters(Map.ofEntries(\n Map.entry(\"example-header\", \"example-value\"),\n Map.entry(\"second-example-header\", \"second-example-value\")\n ))\n .queryStringParameters(Map.ofEntries(\n Map.entry(\"example-query-string\", \"example-value\"),\n Map.entry(\"second-example-query-string\", \"second-example-value\")\n ))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:pipes:Pipe\n properties:\n name: example-pipe\n roleArn: ${exampleAwsIamRole.arn}\n source: ${source.arn}\n target: ${target.arn}\n enrichment: ${exampleAwsCloudwatchEventApiDestination.arn}\n enrichmentParameters:\n httpParameters:\n pathParameterValues: example-path-param\n headerParameters:\n example-header: example-value\n second-example-header: second-example-value\n queryStringParameters:\n example-query-string: example-value\n second-example-query-string: second-example-value\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Filter Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: exampleAwsIamRole.arn,\n source: source.arn,\n target: target.arn,\n sourceParameters: {\n filterCriteria: {\n filters: [{\n pattern: JSON.stringify({\n source: [\"event-source\"],\n }),\n }],\n },\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example_aws_iam_role[\"arn\"],\n source=source[\"arn\"],\n target=target[\"arn\"],\n source_parameters={\n \"filter_criteria\": {\n \"filters\": [{\n \"pattern\": json.dumps({\n \"source\": [\"event-source\"],\n }),\n }],\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = exampleAwsIamRole.Arn,\n Source = source.Arn,\n Target = target.Arn,\n SourceParameters = new Aws.Pipes.Inputs.PipeSourceParametersArgs\n {\n FilterCriteria = new Aws.Pipes.Inputs.PipeSourceParametersFilterCriteriaArgs\n {\n Filters = new[]\n {\n new Aws.Pipes.Inputs.PipeSourceParametersFilterCriteriaFilterArgs\n {\n Pattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"source\"] = new[]\n {\n \"event-source\",\n },\n }),\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"source\": []string{\n\t\t\t\t\"event-source\",\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tSource: pulumi.Any(source.Arn),\n\t\t\tTarget: pulumi.Any(target.Arn),\n\t\t\tSourceParameters: \u0026pipes.PipeSourceParametersArgs{\n\t\t\t\tFilterCriteria: \u0026pipes.PipeSourceParametersFilterCriteriaArgs{\n\t\t\t\t\tFilters: pipes.PipeSourceParametersFilterCriteriaFilterArray{\n\t\t\t\t\t\t\u0026pipes.PipeSourceParametersFilterCriteriaFilterArgs{\n\t\t\t\t\t\t\tPattern: pulumi.String(json0),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport com.pulumi.aws.pipes.inputs.PipeSourceParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeSourceParametersFilterCriteriaArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Pipe(\"example\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(exampleAwsIamRole.arn())\n .source(source.arn())\n .target(target.arn())\n .sourceParameters(PipeSourceParametersArgs.builder()\n .filterCriteria(PipeSourceParametersFilterCriteriaArgs.builder()\n .filters(PipeSourceParametersFilterCriteriaFilterArgs.builder()\n .pattern(serializeJson(\n jsonObject(\n jsonProperty(\"source\", jsonArray(\"event-source\"))\n )))\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:pipes:Pipe\n properties:\n name: example-pipe\n roleArn: ${exampleAwsIamRole.arn}\n source: ${source.arn}\n target: ${target.arn}\n sourceParameters:\n filterCriteria:\n filters:\n - pattern:\n fn::toJSON:\n source:\n - event-source\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### CloudWatch Logs Logging Configuration Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudwatch.LogGroup(\"example\", {name: \"example-pipe-target\"});\nconst examplePipe = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: exampleAwsIamRole.arn,\n source: sourceAwsSqsQueue.arn,\n target: targetAwsSqsQueue.arn,\n logConfiguration: {\n includeExecutionDatas: [\"ALL\"],\n level: \"INFO\",\n cloudwatchLogsLogDestination: {\n logGroupArn: targetAwsCloudwatchLogGroup.arn,\n },\n },\n}, {\n dependsOn: [\n source,\n target,\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"example-pipe-target\")\nexample_pipe = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example_aws_iam_role[\"arn\"],\n source=source_aws_sqs_queue[\"arn\"],\n target=target_aws_sqs_queue[\"arn\"],\n log_configuration={\n \"include_execution_datas\": [\"ALL\"],\n \"level\": \"INFO\",\n \"cloudwatch_logs_log_destination\": {\n \"log_group_arn\": target_aws_cloudwatch_log_group[\"arn\"],\n },\n },\n opts = pulumi.ResourceOptions(depends_on=[\n source,\n target,\n ]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example-pipe-target\",\n });\n\n var examplePipe = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = exampleAwsIamRole.Arn,\n Source = sourceAwsSqsQueue.Arn,\n Target = targetAwsSqsQueue.Arn,\n LogConfiguration = new Aws.Pipes.Inputs.PipeLogConfigurationArgs\n {\n IncludeExecutionDatas = new[]\n {\n \"ALL\",\n },\n Level = \"INFO\",\n CloudwatchLogsLogDestination = new Aws.Pipes.Inputs.PipeLogConfigurationCloudwatchLogsLogDestinationArgs\n {\n LogGroupArn = targetAwsCloudwatchLogGroup.Arn,\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n source,\n target,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example-pipe-target\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tSource: pulumi.Any(sourceAwsSqsQueue.Arn),\n\t\t\tTarget: pulumi.Any(targetAwsSqsQueue.Arn),\n\t\t\tLogConfiguration: \u0026pipes.PipeLogConfigurationArgs{\n\t\t\t\tIncludeExecutionDatas: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"ALL\"),\n\t\t\t\t},\n\t\t\t\tLevel: pulumi.String(\"INFO\"),\n\t\t\t\tCloudwatchLogsLogDestination: \u0026pipes.PipeLogConfigurationCloudwatchLogsLogDestinationArgs{\n\t\t\t\t\tLogGroupArn: pulumi.Any(targetAwsCloudwatchLogGroup.Arn),\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tsource,\n\t\t\ttarget,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport com.pulumi.aws.pipes.inputs.PipeLogConfigurationArgs;\nimport com.pulumi.aws.pipes.inputs.PipeLogConfigurationCloudwatchLogsLogDestinationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new LogGroup(\"example\", LogGroupArgs.builder()\n .name(\"example-pipe-target\")\n .build());\n\n var examplePipe = new Pipe(\"examplePipe\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(exampleAwsIamRole.arn())\n .source(sourceAwsSqsQueue.arn())\n .target(targetAwsSqsQueue.arn())\n .logConfiguration(PipeLogConfigurationArgs.builder()\n .includeExecutionDatas(\"ALL\")\n .level(\"INFO\")\n .cloudwatchLogsLogDestination(PipeLogConfigurationCloudwatchLogsLogDestinationArgs.builder()\n .logGroupArn(targetAwsCloudwatchLogGroup.arn())\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn( \n source,\n target)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: example-pipe-target\n examplePipe:\n type: aws:pipes:Pipe\n name: example\n properties:\n name: example-pipe\n roleArn: ${exampleAwsIamRole.arn}\n source: ${sourceAwsSqsQueue.arn}\n target: ${targetAwsSqsQueue.arn}\n logConfiguration:\n includeExecutionDatas:\n - ALL\n level: INFO\n cloudwatchLogsLogDestination:\n logGroupArn: ${targetAwsCloudwatchLogGroup.arn}\n options:\n dependson:\n - ${source}\n - ${target}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS Source and Target Configuration Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: exampleAwsIamRole.arn,\n source: source.arn,\n target: target.arn,\n sourceParameters: {\n sqsQueueParameters: {\n batchSize: 1,\n maximumBatchingWindowInSeconds: 2,\n },\n },\n targetParameters: {\n sqsQueueParameters: {\n messageDeduplicationId: \"example-dedupe\",\n messageGroupId: \"example-group\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example_aws_iam_role[\"arn\"],\n source=source[\"arn\"],\n target=target[\"arn\"],\n source_parameters={\n \"sqs_queue_parameters\": {\n \"batch_size\": 1,\n \"maximum_batching_window_in_seconds\": 2,\n },\n },\n target_parameters={\n \"sqs_queue_parameters\": {\n \"message_deduplication_id\": \"example-dedupe\",\n \"message_group_id\": \"example-group\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = exampleAwsIamRole.Arn,\n Source = source.Arn,\n Target = target.Arn,\n SourceParameters = new Aws.Pipes.Inputs.PipeSourceParametersArgs\n {\n SqsQueueParameters = new Aws.Pipes.Inputs.PipeSourceParametersSqsQueueParametersArgs\n {\n BatchSize = 1,\n MaximumBatchingWindowInSeconds = 2,\n },\n },\n TargetParameters = new Aws.Pipes.Inputs.PipeTargetParametersArgs\n {\n SqsQueueParameters = new Aws.Pipes.Inputs.PipeTargetParametersSqsQueueParametersArgs\n {\n MessageDeduplicationId = \"example-dedupe\",\n MessageGroupId = \"example-group\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tSource: pulumi.Any(source.Arn),\n\t\t\tTarget: pulumi.Any(target.Arn),\n\t\t\tSourceParameters: \u0026pipes.PipeSourceParametersArgs{\n\t\t\t\tSqsQueueParameters: \u0026pipes.PipeSourceParametersSqsQueueParametersArgs{\n\t\t\t\t\tBatchSize: pulumi.Int(1),\n\t\t\t\t\tMaximumBatchingWindowInSeconds: pulumi.Int(2),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTargetParameters: \u0026pipes.PipeTargetParametersArgs{\n\t\t\t\tSqsQueueParameters: \u0026pipes.PipeTargetParametersSqsQueueParametersArgs{\n\t\t\t\t\tMessageDeduplicationId: pulumi.String(\"example-dedupe\"),\n\t\t\t\t\tMessageGroupId: pulumi.String(\"example-group\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport com.pulumi.aws.pipes.inputs.PipeSourceParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeSourceParametersSqsQueueParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeTargetParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeTargetParametersSqsQueueParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Pipe(\"example\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(exampleAwsIamRole.arn())\n .source(source.arn())\n .target(target.arn())\n .sourceParameters(PipeSourceParametersArgs.builder()\n .sqsQueueParameters(PipeSourceParametersSqsQueueParametersArgs.builder()\n .batchSize(1)\n .maximumBatchingWindowInSeconds(2)\n .build())\n .build())\n .targetParameters(PipeTargetParametersArgs.builder()\n .sqsQueueParameters(PipeTargetParametersSqsQueueParametersArgs.builder()\n .messageDeduplicationId(\"example-dedupe\")\n .messageGroupId(\"example-group\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:pipes:Pipe\n properties:\n name: example-pipe\n roleArn: ${exampleAwsIamRole.arn}\n source: ${source.arn}\n target: ${target.arn}\n sourceParameters:\n sqsQueueParameters:\n batchSize: 1\n maximumBatchingWindowInSeconds: 2\n targetParameters:\n sqsQueueParameters:\n messageDeduplicationId: example-dedupe\n messageGroupId: example-group\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import pipes using the `name`. For example:\n\n```sh\n$ pulumi import aws:pipes/pipe:Pipe example my-pipe\n```\n", + "description": "Resource for managing an AWS EventBridge Pipes Pipe.\n\nYou can find out more about EventBridge Pipes in the [User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html).\n\nEventBridge Pipes are very configurable, and may require IAM permissions to work correctly. More information on the configuration options and IAM permissions can be found in the [User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html).\n\n\u003e **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.getCallerIdentity({});\nconst example = new aws.iam.Role(\"example\", {assumeRolePolicy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: {\n Effect: \"Allow\",\n Action: \"sts:AssumeRole\",\n Principal: {\n Service: \"pipes.amazonaws.com\",\n },\n Condition: {\n StringEquals: {\n \"aws:SourceAccount\": main.then(main =\u003e main.accountId),\n },\n },\n },\n})});\nconst sourceQueue = new aws.sqs.Queue(\"source\", {});\nconst source = new aws.iam.RolePolicy(\"source\", {\n role: example.id,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: [\n \"sqs:DeleteMessage\",\n \"sqs:GetQueueAttributes\",\n \"sqs:ReceiveMessage\",\n ],\n Resource: [sourceQueue.arn],\n }],\n }),\n});\nconst targetQueue = new aws.sqs.Queue(\"target\", {});\nconst target = new aws.iam.RolePolicy(\"target\", {\n role: example.id,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Effect: \"Allow\",\n Action: [\"sqs:SendMessage\"],\n Resource: [targetQueue.arn],\n }],\n }),\n});\nconst examplePipe = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: example.arn,\n source: sourceQueue.arn,\n target: targetQueue.arn,\n}, {\n dependsOn: [\n source,\n target,\n ],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nmain = aws.get_caller_identity()\nexample = aws.iam.Role(\"example\", assume_role_policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": {\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"pipes.amazonaws.com\",\n },\n \"Condition\": {\n \"StringEquals\": {\n \"aws:SourceAccount\": main.account_id,\n },\n },\n },\n}))\nsource_queue = aws.sqs.Queue(\"source\")\nsource = aws.iam.RolePolicy(\"source\",\n role=example.id,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": [\n \"sqs:DeleteMessage\",\n \"sqs:GetQueueAttributes\",\n \"sqs:ReceiveMessage\",\n ],\n \"Resource\": [source_queue.arn],\n }],\n }))\ntarget_queue = aws.sqs.Queue(\"target\")\ntarget = aws.iam.RolePolicy(\"target\",\n role=example.id,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Effect\": \"Allow\",\n \"Action\": [\"sqs:SendMessage\"],\n \"Resource\": [target_queue.arn],\n }],\n }))\nexample_pipe = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example.arn,\n source=source_queue.arn,\n target=target_queue.arn,\n opts = pulumi.ResourceOptions(depends_on=[\n source,\n target,\n ]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Iam.Role(\"example\", new()\n {\n AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Effect\"] = \"Allow\",\n [\"Action\"] = \"sts:AssumeRole\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"pipes.amazonaws.com\",\n },\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceAccount\"] = main.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n },\n },\n }),\n });\n\n var sourceQueue = new Aws.Sqs.Queue(\"source\");\n\n var source = new Aws.Iam.RolePolicy(\"source\", new()\n {\n Role = example.Id,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Effect\"] = \"Allow\",\n [\"Action\"] = new[]\n {\n \"sqs:DeleteMessage\",\n \"sqs:GetQueueAttributes\",\n \"sqs:ReceiveMessage\",\n },\n [\"Resource\"] = new[]\n {\n sourceQueue.Arn,\n },\n },\n },\n })),\n });\n\n var targetQueue = new Aws.Sqs.Queue(\"target\");\n\n var target = new Aws.Iam.RolePolicy(\"target\", new()\n {\n Role = example.Id,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Effect\"] = \"Allow\",\n [\"Action\"] = new[]\n {\n \"sqs:SendMessage\",\n },\n [\"Resource\"] = new[]\n {\n targetQueue.Arn,\n },\n },\n },\n })),\n });\n\n var examplePipe = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = example.Arn,\n Source = sourceQueue.Arn,\n Target = targetQueue.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n source,\n target,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sqs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": map[string]interface{}{\n\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\"Action\": \"sts:AssumeRole\",\n\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\"Service\": \"pipes.amazonaws.com\",\n\t\t\t\t},\n\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\"aws:SourceAccount\": main.AccountId,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texample, err := iam.NewRole(ctx, \"example\", \u0026iam.RoleArgs{\n\t\t\tAssumeRolePolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsourceQueue, err := sqs.NewQueue(ctx, \"source\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsource, err := iam.NewRolePolicy(ctx, \"source\", \u0026iam.RolePolicyArgs{\n\t\t\tRole: example.ID(),\n\t\t\tPolicy: sourceQueue.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\"sqs:DeleteMessage\",\n\t\t\t\t\t\t\t\t\"sqs:GetQueueAttributes\",\n\t\t\t\t\t\t\t\t\"sqs:ReceiveMessage\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\tarn,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\treturn pulumi.String(json1), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttargetQueue, err := sqs.NewQueue(ctx, \"target\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttarget, err := iam.NewRolePolicy(ctx, \"target\", \u0026iam.RolePolicyArgs{\n\t\t\tRole: example.ID(),\n\t\t\tPolicy: targetQueue.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON2, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\"sqs:SendMessage\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\tarn,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson2 := string(tmpJSON2)\n\t\t\t\treturn pulumi.String(json2), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: example.Arn,\n\t\t\tSource: sourceQueue.Arn,\n\t\t\tTarget: targetQueue.Arn,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tsource,\n\t\t\ttarget,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.Role;\nimport com.pulumi.aws.iam.RoleArgs;\nimport com.pulumi.aws.sqs.Queue;\nimport com.pulumi.aws.iam.RolePolicy;\nimport com.pulumi.aws.iam.RolePolicyArgs;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = AwsFunctions.getCallerIdentity();\n\n var example = new Role(\"example\", RoleArgs.builder()\n .assumeRolePolicy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", \"sts:AssumeRole\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"pipes.amazonaws.com\")\n )),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"aws:SourceAccount\", main.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n ))\n ))\n ))\n )))\n .build());\n\n var sourceQueue = new Queue(\"sourceQueue\");\n\n var source = new RolePolicy(\"source\", RolePolicyArgs.builder()\n .role(example.id())\n .policy(sourceQueue.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", jsonArray(\n \"sqs:DeleteMessage\", \n \"sqs:GetQueueAttributes\", \n \"sqs:ReceiveMessage\"\n )),\n jsonProperty(\"Resource\", jsonArray(arn))\n )))\n ))))\n .build());\n\n var targetQueue = new Queue(\"targetQueue\");\n\n var target = new RolePolicy(\"target\", RolePolicyArgs.builder()\n .role(example.id())\n .policy(targetQueue.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Action\", jsonArray(\"sqs:SendMessage\")),\n jsonProperty(\"Resource\", jsonArray(arn))\n )))\n ))))\n .build());\n\n var examplePipe = new Pipe(\"examplePipe\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(example.arn())\n .source(sourceQueue.arn())\n .target(targetQueue.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn( \n source,\n target)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:Role\n properties:\n assumeRolePolicy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n Effect: Allow\n Action: sts:AssumeRole\n Principal:\n Service: pipes.amazonaws.com\n Condition:\n StringEquals:\n aws:SourceAccount: ${main.accountId}\n source:\n type: aws:iam:RolePolicy\n properties:\n role: ${example.id}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Effect: Allow\n Action:\n - sqs:DeleteMessage\n - sqs:GetQueueAttributes\n - sqs:ReceiveMessage\n Resource:\n - ${sourceQueue.arn}\n sourceQueue:\n type: aws:sqs:Queue\n name: source\n target:\n type: aws:iam:RolePolicy\n properties:\n role: ${example.id}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Effect: Allow\n Action:\n - sqs:SendMessage\n Resource:\n - ${targetQueue.arn}\n targetQueue:\n type: aws:sqs:Queue\n name: target\n examplePipe:\n type: aws:pipes:Pipe\n name: example\n properties:\n name: example-pipe\n roleArn: ${example.arn}\n source: ${sourceQueue.arn}\n target: ${targetQueue.arn}\n options:\n dependson:\n - ${source}\n - ${target}\nvariables:\n main:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Enrichment Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: exampleAwsIamRole.arn,\n source: source.arn,\n target: target.arn,\n enrichment: exampleAwsCloudwatchEventApiDestination.arn,\n enrichmentParameters: {\n httpParameters: {\n pathParameterValues: \"example-path-param\",\n headerParameters: {\n \"example-header\": \"example-value\",\n \"second-example-header\": \"second-example-value\",\n },\n queryStringParameters: {\n \"example-query-string\": \"example-value\",\n \"second-example-query-string\": \"second-example-value\",\n },\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example_aws_iam_role[\"arn\"],\n source=source[\"arn\"],\n target=target[\"arn\"],\n enrichment=example_aws_cloudwatch_event_api_destination[\"arn\"],\n enrichment_parameters={\n \"http_parameters\": {\n \"path_parameter_values\": \"example-path-param\",\n \"header_parameters\": {\n \"example_header\": \"example-value\",\n \"second_example_header\": \"second-example-value\",\n },\n \"query_string_parameters\": {\n \"example_query_string\": \"example-value\",\n \"second_example_query_string\": \"second-example-value\",\n },\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = exampleAwsIamRole.Arn,\n Source = source.Arn,\n Target = target.Arn,\n Enrichment = exampleAwsCloudwatchEventApiDestination.Arn,\n EnrichmentParameters = new Aws.Pipes.Inputs.PipeEnrichmentParametersArgs\n {\n HttpParameters = new Aws.Pipes.Inputs.PipeEnrichmentParametersHttpParametersArgs\n {\n PathParameterValues = \"example-path-param\",\n HeaderParameters = \n {\n { \"example-header\", \"example-value\" },\n { \"second-example-header\", \"second-example-value\" },\n },\n QueryStringParameters = \n {\n { \"example-query-string\", \"example-value\" },\n { \"second-example-query-string\", \"second-example-value\" },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tSource: pulumi.Any(source.Arn),\n\t\t\tTarget: pulumi.Any(target.Arn),\n\t\t\tEnrichment: pulumi.Any(exampleAwsCloudwatchEventApiDestination.Arn),\n\t\t\tEnrichmentParameters: \u0026pipes.PipeEnrichmentParametersArgs{\n\t\t\t\tHttpParameters: \u0026pipes.PipeEnrichmentParametersHttpParametersArgs{\n\t\t\t\t\tPathParameterValues: pulumi.String(\"example-path-param\"),\n\t\t\t\t\tHeaderParameters: pulumi.StringMap{\n\t\t\t\t\t\t\"example-header\": pulumi.String(\"example-value\"),\n\t\t\t\t\t\t\"second-example-header\": pulumi.String(\"second-example-value\"),\n\t\t\t\t\t},\n\t\t\t\t\tQueryStringParameters: pulumi.StringMap{\n\t\t\t\t\t\t\"example-query-string\": pulumi.String(\"example-value\"),\n\t\t\t\t\t\t\"second-example-query-string\": pulumi.String(\"second-example-value\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport com.pulumi.aws.pipes.inputs.PipeEnrichmentParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeEnrichmentParametersHttpParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Pipe(\"example\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(exampleAwsIamRole.arn())\n .source(source.arn())\n .target(target.arn())\n .enrichment(exampleAwsCloudwatchEventApiDestination.arn())\n .enrichmentParameters(PipeEnrichmentParametersArgs.builder()\n .httpParameters(PipeEnrichmentParametersHttpParametersArgs.builder()\n .pathParameterValues(\"example-path-param\")\n .headerParameters(Map.ofEntries(\n Map.entry(\"example-header\", \"example-value\"),\n Map.entry(\"second-example-header\", \"second-example-value\")\n ))\n .queryStringParameters(Map.ofEntries(\n Map.entry(\"example-query-string\", \"example-value\"),\n Map.entry(\"second-example-query-string\", \"second-example-value\")\n ))\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:pipes:Pipe\n properties:\n name: example-pipe\n roleArn: ${exampleAwsIamRole.arn}\n source: ${source.arn}\n target: ${target.arn}\n enrichment: ${exampleAwsCloudwatchEventApiDestination.arn}\n enrichmentParameters:\n httpParameters:\n pathParameterValues: example-path-param\n headerParameters:\n example-header: example-value\n second-example-header: second-example-value\n queryStringParameters:\n example-query-string: example-value\n second-example-query-string: second-example-value\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Filter Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: exampleAwsIamRole.arn,\n source: source.arn,\n target: target.arn,\n sourceParameters: {\n filterCriteria: {\n filters: [{\n pattern: JSON.stringify({\n source: [\"event-source\"],\n }),\n }],\n },\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example_aws_iam_role[\"arn\"],\n source=source[\"arn\"],\n target=target[\"arn\"],\n source_parameters={\n \"filter_criteria\": {\n \"filters\": [{\n \"pattern\": json.dumps({\n \"source\": [\"event-source\"],\n }),\n }],\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = exampleAwsIamRole.Arn,\n Source = source.Arn,\n Target = target.Arn,\n SourceParameters = new Aws.Pipes.Inputs.PipeSourceParametersArgs\n {\n FilterCriteria = new Aws.Pipes.Inputs.PipeSourceParametersFilterCriteriaArgs\n {\n Filters = new[]\n {\n new Aws.Pipes.Inputs.PipeSourceParametersFilterCriteriaFilterArgs\n {\n Pattern = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"source\"] = new[]\n {\n \"event-source\",\n },\n }),\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"source\": []string{\n\t\t\t\t\"event-source\",\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tSource: pulumi.Any(source.Arn),\n\t\t\tTarget: pulumi.Any(target.Arn),\n\t\t\tSourceParameters: \u0026pipes.PipeSourceParametersArgs{\n\t\t\t\tFilterCriteria: \u0026pipes.PipeSourceParametersFilterCriteriaArgs{\n\t\t\t\t\tFilters: pipes.PipeSourceParametersFilterCriteriaFilterArray{\n\t\t\t\t\t\t\u0026pipes.PipeSourceParametersFilterCriteriaFilterArgs{\n\t\t\t\t\t\t\tPattern: pulumi.String(json0),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport com.pulumi.aws.pipes.inputs.PipeSourceParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeSourceParametersFilterCriteriaArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Pipe(\"example\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(exampleAwsIamRole.arn())\n .source(source.arn())\n .target(target.arn())\n .sourceParameters(PipeSourceParametersArgs.builder()\n .filterCriteria(PipeSourceParametersFilterCriteriaArgs.builder()\n .filters(PipeSourceParametersFilterCriteriaFilterArgs.builder()\n .pattern(serializeJson(\n jsonObject(\n jsonProperty(\"source\", jsonArray(\"event-source\"))\n )))\n .build())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:pipes:Pipe\n properties:\n name: example-pipe\n roleArn: ${exampleAwsIamRole.arn}\n source: ${source.arn}\n target: ${target.arn}\n sourceParameters:\n filterCriteria:\n filters:\n - pattern:\n fn::toJSON:\n source:\n - event-source\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### CloudWatch Logs Logging Configuration Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.cloudwatch.LogGroup(\"example\", {name: \"example-pipe-target\"});\nconst examplePipe = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: exampleAwsIamRole.arn,\n source: sourceAwsSqsQueue.arn,\n target: targetAwsSqsQueue.arn,\n logConfiguration: {\n includeExecutionDatas: [\"ALL\"],\n level: \"INFO\",\n cloudwatchLogsLogDestination: {\n logGroupArn: targetAwsCloudwatchLogGroup.arn,\n },\n },\n}, {\n dependsOn: [\n source,\n target,\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.LogGroup(\"example\", name=\"example-pipe-target\")\nexample_pipe = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example_aws_iam_role[\"arn\"],\n source=source_aws_sqs_queue[\"arn\"],\n target=target_aws_sqs_queue[\"arn\"],\n log_configuration={\n \"include_execution_datas\": [\"ALL\"],\n \"level\": \"INFO\",\n \"cloudwatch_logs_log_destination\": {\n \"log_group_arn\": target_aws_cloudwatch_log_group[\"arn\"],\n },\n },\n opts = pulumi.ResourceOptions(depends_on=[\n source,\n target,\n ]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.CloudWatch.LogGroup(\"example\", new()\n {\n Name = \"example-pipe-target\",\n });\n\n var examplePipe = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = exampleAwsIamRole.Arn,\n Source = sourceAwsSqsQueue.Arn,\n Target = targetAwsSqsQueue.Arn,\n LogConfiguration = new Aws.Pipes.Inputs.PipeLogConfigurationArgs\n {\n IncludeExecutionDatas = new[]\n {\n \"ALL\",\n },\n Level = \"INFO\",\n CloudwatchLogsLogDestination = new Aws.Pipes.Inputs.PipeLogConfigurationCloudwatchLogsLogDestinationArgs\n {\n LogGroupArn = targetAwsCloudwatchLogGroup.Arn,\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n source,\n target,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudwatch.NewLogGroup(ctx, \"example\", \u0026cloudwatch.LogGroupArgs{\n\t\t\tName: pulumi.String(\"example-pipe-target\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tSource: pulumi.Any(sourceAwsSqsQueue.Arn),\n\t\t\tTarget: pulumi.Any(targetAwsSqsQueue.Arn),\n\t\t\tLogConfiguration: \u0026pipes.PipeLogConfigurationArgs{\n\t\t\t\tIncludeExecutionDatas: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"ALL\"),\n\t\t\t\t},\n\t\t\t\tLevel: pulumi.String(\"INFO\"),\n\t\t\t\tCloudwatchLogsLogDestination: \u0026pipes.PipeLogConfigurationCloudwatchLogsLogDestinationArgs{\n\t\t\t\t\tLogGroupArn: pulumi.Any(targetAwsCloudwatchLogGroup.Arn),\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tsource,\n\t\t\ttarget,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.LogGroup;\nimport com.pulumi.aws.cloudwatch.LogGroupArgs;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport com.pulumi.aws.pipes.inputs.PipeLogConfigurationArgs;\nimport com.pulumi.aws.pipes.inputs.PipeLogConfigurationCloudwatchLogsLogDestinationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new LogGroup(\"example\", LogGroupArgs.builder()\n .name(\"example-pipe-target\")\n .build());\n\n var examplePipe = new Pipe(\"examplePipe\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(exampleAwsIamRole.arn())\n .source(sourceAwsSqsQueue.arn())\n .target(targetAwsSqsQueue.arn())\n .logConfiguration(PipeLogConfigurationArgs.builder()\n .includeExecutionDatas(\"ALL\")\n .level(\"INFO\")\n .cloudwatchLogsLogDestination(PipeLogConfigurationCloudwatchLogsLogDestinationArgs.builder()\n .logGroupArn(targetAwsCloudwatchLogGroup.arn())\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn( \n source,\n target)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:cloudwatch:LogGroup\n properties:\n name: example-pipe-target\n examplePipe:\n type: aws:pipes:Pipe\n name: example\n properties:\n name: example-pipe\n roleArn: ${exampleAwsIamRole.arn}\n source: ${sourceAwsSqsQueue.arn}\n target: ${targetAwsSqsQueue.arn}\n logConfiguration:\n includeExecutionDatas:\n - ALL\n level: INFO\n cloudwatchLogsLogDestination:\n logGroupArn: ${targetAwsCloudwatchLogGroup.arn}\n options:\n dependson:\n - ${source}\n - ${target}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SQS Source and Target Configuration Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.pipes.Pipe(\"example\", {\n name: \"example-pipe\",\n roleArn: exampleAwsIamRole.arn,\n source: source.arn,\n target: target.arn,\n sourceParameters: {\n sqsQueueParameters: {\n batchSize: 1,\n maximumBatchingWindowInSeconds: 2,\n },\n },\n targetParameters: {\n sqsQueueParameters: {\n messageDeduplicationId: \"example-dedupe\",\n messageGroupId: \"example-group\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.pipes.Pipe(\"example\",\n name=\"example-pipe\",\n role_arn=example_aws_iam_role[\"arn\"],\n source=source[\"arn\"],\n target=target[\"arn\"],\n source_parameters={\n \"sqs_queue_parameters\": {\n \"batch_size\": 1,\n \"maximum_batching_window_in_seconds\": 2,\n },\n },\n target_parameters={\n \"sqs_queue_parameters\": {\n \"message_deduplication_id\": \"example-dedupe\",\n \"message_group_id\": \"example-group\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Pipes.Pipe(\"example\", new()\n {\n Name = \"example-pipe\",\n RoleArn = exampleAwsIamRole.Arn,\n Source = source.Arn,\n Target = target.Arn,\n SourceParameters = new Aws.Pipes.Inputs.PipeSourceParametersArgs\n {\n SqsQueueParameters = new Aws.Pipes.Inputs.PipeSourceParametersSqsQueueParametersArgs\n {\n BatchSize = 1,\n MaximumBatchingWindowInSeconds = 2,\n },\n },\n TargetParameters = new Aws.Pipes.Inputs.PipeTargetParametersArgs\n {\n SqsQueueParameters = new Aws.Pipes.Inputs.PipeTargetParametersSqsQueueParametersArgs\n {\n MessageDeduplicationId = \"example-dedupe\",\n MessageGroupId = \"example-group\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pipes\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := pipes.NewPipe(ctx, \"example\", \u0026pipes.PipeArgs{\n\t\t\tName: pulumi.String(\"example-pipe\"),\n\t\t\tRoleArn: pulumi.Any(exampleAwsIamRole.Arn),\n\t\t\tSource: pulumi.Any(source.Arn),\n\t\t\tTarget: pulumi.Any(target.Arn),\n\t\t\tSourceParameters: \u0026pipes.PipeSourceParametersArgs{\n\t\t\t\tSqsQueueParameters: \u0026pipes.PipeSourceParametersSqsQueueParametersArgs{\n\t\t\t\t\tBatchSize: pulumi.Int(1),\n\t\t\t\t\tMaximumBatchingWindowInSeconds: pulumi.Int(2),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTargetParameters: \u0026pipes.PipeTargetParametersArgs{\n\t\t\t\tSqsQueueParameters: \u0026pipes.PipeTargetParametersSqsQueueParametersArgs{\n\t\t\t\t\tMessageDeduplicationId: pulumi.String(\"example-dedupe\"),\n\t\t\t\t\tMessageGroupId: pulumi.String(\"example-group\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.pipes.Pipe;\nimport com.pulumi.aws.pipes.PipeArgs;\nimport com.pulumi.aws.pipes.inputs.PipeSourceParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeSourceParametersSqsQueueParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeTargetParametersArgs;\nimport com.pulumi.aws.pipes.inputs.PipeTargetParametersSqsQueueParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Pipe(\"example\", PipeArgs.builder()\n .name(\"example-pipe\")\n .roleArn(exampleAwsIamRole.arn())\n .source(source.arn())\n .target(target.arn())\n .sourceParameters(PipeSourceParametersArgs.builder()\n .sqsQueueParameters(PipeSourceParametersSqsQueueParametersArgs.builder()\n .batchSize(1)\n .maximumBatchingWindowInSeconds(2)\n .build())\n .build())\n .targetParameters(PipeTargetParametersArgs.builder()\n .sqsQueueParameters(PipeTargetParametersSqsQueueParametersArgs.builder()\n .messageDeduplicationId(\"example-dedupe\")\n .messageGroupId(\"example-group\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:pipes:Pipe\n properties:\n name: example-pipe\n roleArn: ${exampleAwsIamRole.arn}\n source: ${source.arn}\n target: ${target.arn}\n sourceParameters:\n sqsQueueParameters:\n batchSize: 1\n maximumBatchingWindowInSeconds: 2\n targetParameters:\n sqsQueueParameters:\n messageDeduplicationId: example-dedupe\n messageGroupId: example-group\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import pipes using the `name`. For example:\n\n```sh\n$ pulumi import aws:pipes/pipe:Pipe example my-pipe\n```\n", "properties": { "arn": { "type": "string", @@ -323950,7 +323950,7 @@ } }, "aws:ram/resourceShareAccepter:ResourceShareAccepter": { - "description": "Manage accepting a Resource Access Manager (RAM) Resource Share invitation. From a _receiver_ AWS account, accept an invitation to share resources that were shared by a _sender_ AWS account. To create a resource share in the _sender_, see the `aws.ram.ResourceShare` resource.\n\n\u003e **Note:** If both AWS accounts are in the same Organization and [RAM Sharing with AWS Organizations is enabled](https://docs.aws.amazon.com/ram/latest/userguide/getting-started-sharing.html#getting-started-sharing-orgs), this resource is not necessary as RAM Resource Share invitations are not used.\n\n## Example Usage\n\nThis configuration provides an example of using multiple AWS providers to configure two different AWS accounts. In the _sender_ account, the configuration creates a `aws.ram.ResourceShare` and uses a data source in the _receiver_ account to create a `aws.ram.PrincipalAssociation` resource with the _receiver's_ account ID. In the _receiver_ account, the configuration accepts the invitation to share resources with the `aws.ram.ResourceShareAccepter`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst senderShare = new aws.ram.ResourceShare(\"sender_share\", {\n name: \"tf-test-resource-share\",\n allowExternalPrincipals: true,\n tags: {\n Name: \"tf-test-resource-share\",\n },\n});\nconst receiver = aws.getCallerIdentity({});\nconst senderInvite = new aws.ram.PrincipalAssociation(\"sender_invite\", {\n principal: receiver.then(receiver =\u003e receiver.accountId),\n resourceShareArn: senderShare.arn,\n});\nconst receiverAccept = new aws.ram.ResourceShareAccepter(\"receiver_accept\", {shareArn: senderInvite.resourceShareArn});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nsender_share = aws.ram.ResourceShare(\"sender_share\",\n name=\"tf-test-resource-share\",\n allow_external_principals=True,\n tags={\n \"Name\": \"tf-test-resource-share\",\n })\nreceiver = aws.get_caller_identity()\nsender_invite = aws.ram.PrincipalAssociation(\"sender_invite\",\n principal=receiver.account_id,\n resource_share_arn=sender_share.arn)\nreceiver_accept = aws.ram.ResourceShareAccepter(\"receiver_accept\", share_arn=sender_invite.resource_share_arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var senderShare = new Aws.Ram.ResourceShare(\"sender_share\", new()\n {\n Name = \"tf-test-resource-share\",\n AllowExternalPrincipals = true,\n Tags = \n {\n { \"Name\", \"tf-test-resource-share\" },\n },\n });\n\n var receiver = Aws.GetCallerIdentity.Invoke();\n\n var senderInvite = new Aws.Ram.PrincipalAssociation(\"sender_invite\", new()\n {\n Principal = receiver.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n ResourceShareArn = senderShare.Arn,\n });\n\n var receiverAccept = new Aws.Ram.ResourceShareAccepter(\"receiver_accept\", new()\n {\n ShareArn = senderInvite.ResourceShareArn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ram\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsenderShare, err := ram.NewResourceShare(ctx, \"sender_share\", \u0026ram.ResourceShareArgs{\n\t\t\tName: pulumi.String(\"tf-test-resource-share\"),\n\t\t\tAllowExternalPrincipals: pulumi.Bool(true),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"tf-test-resource-share\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treceiver, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsenderInvite, err := ram.NewPrincipalAssociation(ctx, \"sender_invite\", \u0026ram.PrincipalAssociationArgs{\n\t\t\tPrincipal: pulumi.String(receiver.AccountId),\n\t\t\tResourceShareArn: senderShare.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ram.NewResourceShareAccepter(ctx, \"receiver_accept\", \u0026ram.ResourceShareAccepterArgs{\n\t\t\tShareArn: senderInvite.ResourceShareArn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ram.ResourceShare;\nimport com.pulumi.aws.ram.ResourceShareArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ram.PrincipalAssociation;\nimport com.pulumi.aws.ram.PrincipalAssociationArgs;\nimport com.pulumi.aws.ram.ResourceShareAccepter;\nimport com.pulumi.aws.ram.ResourceShareAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var senderShare = new ResourceShare(\"senderShare\", ResourceShareArgs.builder()\n .name(\"tf-test-resource-share\")\n .allowExternalPrincipals(true)\n .tags(Map.of(\"Name\", \"tf-test-resource-share\"))\n .build());\n\n final var receiver = AwsFunctions.getCallerIdentity();\n\n var senderInvite = new PrincipalAssociation(\"senderInvite\", PrincipalAssociationArgs.builder()\n .principal(receiver.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .resourceShareArn(senderShare.arn())\n .build());\n\n var receiverAccept = new ResourceShareAccepter(\"receiverAccept\", ResourceShareAccepterArgs.builder()\n .shareArn(senderInvite.resourceShareArn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n senderShare:\n type: aws:ram:ResourceShare\n name: sender_share\n properties:\n name: tf-test-resource-share\n allowExternalPrincipals: true\n tags:\n Name: tf-test-resource-share\n senderInvite:\n type: aws:ram:PrincipalAssociation\n name: sender_invite\n properties:\n principal: ${receiver.accountId}\n resourceShareArn: ${senderShare.arn}\n receiverAccept:\n type: aws:ram:ResourceShareAccepter\n name: receiver_accept\n properties:\n shareArn: ${senderInvite.resourceShareArn}\nvariables:\n receiver:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import resource share accepters using the resource share ARN. For example:\n\n```sh\n$ pulumi import aws:ram/resourceShareAccepter:ResourceShareAccepter example arn:aws:ram:us-east-1:123456789012:resource-share/c4b56393-e8d9-89d9-6dc9-883752de4767\n```\n", + "description": "Manage accepting a Resource Access Manager (RAM) Resource Share invitation. From a _receiver_ AWS account, accept an invitation to share resources that were shared by a _sender_ AWS account. To create a resource share in the _sender_, see the `aws.ram.ResourceShare` resource.\n\n\u003e **Note:** If both AWS accounts are in the same Organization and [RAM Sharing with AWS Organizations is enabled](https://docs.aws.amazon.com/ram/latest/userguide/getting-started-sharing.html#getting-started-sharing-orgs), this resource is not necessary as RAM Resource Share invitations are not used.\n\n## Example Usage\n\nThis configuration provides an example of using multiple AWS providers to configure two different AWS accounts. In the _sender_ account, the configuration creates a `aws.ram.ResourceShare` and uses a data source in the _receiver_ account to create a `aws.ram.PrincipalAssociation` resource with the _receiver's_ account ID. In the _receiver_ account, the configuration accepts the invitation to share resources with the `aws.ram.ResourceShareAccepter`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst senderShare = new aws.ram.ResourceShare(\"sender_share\", {\n name: \"tf-test-resource-share\",\n allowExternalPrincipals: true,\n tags: {\n Name: \"tf-test-resource-share\",\n },\n});\nconst receiver = aws.getCallerIdentity({});\nconst senderInvite = new aws.ram.PrincipalAssociation(\"sender_invite\", {\n principal: receiver.then(receiver =\u003e receiver.accountId),\n resourceShareArn: senderShare.arn,\n});\nconst receiverAccept = new aws.ram.ResourceShareAccepter(\"receiver_accept\", {shareArn: senderInvite.resourceShareArn});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nsender_share = aws.ram.ResourceShare(\"sender_share\",\n name=\"tf-test-resource-share\",\n allow_external_principals=True,\n tags={\n \"Name\": \"tf-test-resource-share\",\n })\nreceiver = aws.get_caller_identity()\nsender_invite = aws.ram.PrincipalAssociation(\"sender_invite\",\n principal=receiver.account_id,\n resource_share_arn=sender_share.arn)\nreceiver_accept = aws.ram.ResourceShareAccepter(\"receiver_accept\", share_arn=sender_invite.resource_share_arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var senderShare = new Aws.Ram.ResourceShare(\"sender_share\", new()\n {\n Name = \"tf-test-resource-share\",\n AllowExternalPrincipals = true,\n Tags = \n {\n { \"Name\", \"tf-test-resource-share\" },\n },\n });\n\n var receiver = Aws.GetCallerIdentity.Invoke();\n\n var senderInvite = new Aws.Ram.PrincipalAssociation(\"sender_invite\", new()\n {\n Principal = receiver.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n ResourceShareArn = senderShare.Arn,\n });\n\n var receiverAccept = new Aws.Ram.ResourceShareAccepter(\"receiver_accept\", new()\n {\n ShareArn = senderInvite.ResourceShareArn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ram\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tsenderShare, err := ram.NewResourceShare(ctx, \"sender_share\", \u0026ram.ResourceShareArgs{\n\t\t\tName: pulumi.String(\"tf-test-resource-share\"),\n\t\t\tAllowExternalPrincipals: pulumi.Bool(true),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"tf-test-resource-share\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treceiver, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsenderInvite, err := ram.NewPrincipalAssociation(ctx, \"sender_invite\", \u0026ram.PrincipalAssociationArgs{\n\t\t\tPrincipal: pulumi.String(receiver.AccountId),\n\t\t\tResourceShareArn: senderShare.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ram.NewResourceShareAccepter(ctx, \"receiver_accept\", \u0026ram.ResourceShareAccepterArgs{\n\t\t\tShareArn: senderInvite.ResourceShareArn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ram.ResourceShare;\nimport com.pulumi.aws.ram.ResourceShareArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ram.PrincipalAssociation;\nimport com.pulumi.aws.ram.PrincipalAssociationArgs;\nimport com.pulumi.aws.ram.ResourceShareAccepter;\nimport com.pulumi.aws.ram.ResourceShareAccepterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var senderShare = new ResourceShare(\"senderShare\", ResourceShareArgs.builder()\n .name(\"tf-test-resource-share\")\n .allowExternalPrincipals(true)\n .tags(Map.of(\"Name\", \"tf-test-resource-share\"))\n .build());\n\n final var receiver = AwsFunctions.getCallerIdentity();\n\n var senderInvite = new PrincipalAssociation(\"senderInvite\", PrincipalAssociationArgs.builder()\n .principal(receiver.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .resourceShareArn(senderShare.arn())\n .build());\n\n var receiverAccept = new ResourceShareAccepter(\"receiverAccept\", ResourceShareAccepterArgs.builder()\n .shareArn(senderInvite.resourceShareArn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n senderShare:\n type: aws:ram:ResourceShare\n name: sender_share\n properties:\n name: tf-test-resource-share\n allowExternalPrincipals: true\n tags:\n Name: tf-test-resource-share\n senderInvite:\n type: aws:ram:PrincipalAssociation\n name: sender_invite\n properties:\n principal: ${receiver.accountId}\n resourceShareArn: ${senderShare.arn}\n receiverAccept:\n type: aws:ram:ResourceShareAccepter\n name: receiver_accept\n properties:\n shareArn: ${senderInvite.resourceShareArn}\nvariables:\n receiver:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import resource share accepters using the resource share ARN. For example:\n\n```sh\n$ pulumi import aws:ram/resourceShareAccepter:ResourceShareAccepter example arn:aws:ram:us-east-1:123456789012:resource-share/c4b56393-e8d9-89d9-6dc9-883752de4767\n```\n", "properties": { "invitationArn": { "type": "string", @@ -328388,7 +328388,7 @@ } }, "aws:rds/integration:Integration": { - "description": "Resource for managing an AWS RDS (Relational Database) zero-ETL integration. You can refer to the [User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.setting-up.html).\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.redshiftserverless.Namespace(\"example\", {namespaceName: \"redshift-example\"});\nconst exampleWorkgroup = new aws.redshiftserverless.Workgroup(\"example\", {\n namespaceName: example.namespaceName,\n workgroupName: \"example-workspace\",\n baseCapacity: 8,\n publiclyAccessible: false,\n subnetIds: [\n example1.id,\n example2.id,\n example3.id,\n ],\n configParameters: [{\n parameterKey: \"enable_case_sensitive_identifier\",\n parameterValue: \"true\",\n }],\n});\nconst exampleIntegration = new aws.rds.Integration(\"example\", {\n integrationName: \"example\",\n sourceArn: exampleAwsRdsCluster.arn,\n targetArn: example.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.redshiftserverless.Namespace(\"example\", namespace_name=\"redshift-example\")\nexample_workgroup = aws.redshiftserverless.Workgroup(\"example\",\n namespace_name=example.namespace_name,\n workgroup_name=\"example-workspace\",\n base_capacity=8,\n publicly_accessible=False,\n subnet_ids=[\n example1[\"id\"],\n example2[\"id\"],\n example3[\"id\"],\n ],\n config_parameters=[{\n \"parameter_key\": \"enable_case_sensitive_identifier\",\n \"parameter_value\": \"true\",\n }])\nexample_integration = aws.rds.Integration(\"example\",\n integration_name=\"example\",\n source_arn=example_aws_rds_cluster[\"arn\"],\n target_arn=example.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.RedshiftServerless.Namespace(\"example\", new()\n {\n NamespaceName = \"redshift-example\",\n });\n\n var exampleWorkgroup = new Aws.RedshiftServerless.Workgroup(\"example\", new()\n {\n NamespaceName = example.NamespaceName,\n WorkgroupName = \"example-workspace\",\n BaseCapacity = 8,\n PubliclyAccessible = false,\n SubnetIds = new[]\n {\n example1.Id,\n example2.Id,\n example3.Id,\n },\n ConfigParameters = new[]\n {\n new Aws.RedshiftServerless.Inputs.WorkgroupConfigParameterArgs\n {\n ParameterKey = \"enable_case_sensitive_identifier\",\n ParameterValue = \"true\",\n },\n },\n });\n\n var exampleIntegration = new Aws.Rds.Integration(\"example\", new()\n {\n IntegrationName = \"example\",\n SourceArn = exampleAwsRdsCluster.Arn,\n TargetArn = example.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshiftserverless\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := redshiftserverless.NewNamespace(ctx, \"example\", \u0026redshiftserverless.NamespaceArgs{\n\t\t\tNamespaceName: pulumi.String(\"redshift-example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = redshiftserverless.NewWorkgroup(ctx, \"example\", \u0026redshiftserverless.WorkgroupArgs{\n\t\t\tNamespaceName: example.NamespaceName,\n\t\t\tWorkgroupName: pulumi.String(\"example-workspace\"),\n\t\t\tBaseCapacity: pulumi.Int(8),\n\t\t\tPubliclyAccessible: pulumi.Bool(false),\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texample1.Id,\n\t\t\t\texample2.Id,\n\t\t\t\texample3.Id,\n\t\t\t},\n\t\t\tConfigParameters: redshiftserverless.WorkgroupConfigParameterArray{\n\t\t\t\t\u0026redshiftserverless.WorkgroupConfigParameterArgs{\n\t\t\t\t\tParameterKey: pulumi.String(\"enable_case_sensitive_identifier\"),\n\t\t\t\t\tParameterValue: pulumi.String(\"true\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rds.NewIntegration(ctx, \"example\", \u0026rds.IntegrationArgs{\n\t\t\tIntegrationName: pulumi.String(\"example\"),\n\t\t\tSourceArn: pulumi.Any(exampleAwsRdsCluster.Arn),\n\t\t\tTargetArn: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.redshiftserverless.Namespace;\nimport com.pulumi.aws.redshiftserverless.NamespaceArgs;\nimport com.pulumi.aws.redshiftserverless.Workgroup;\nimport com.pulumi.aws.redshiftserverless.WorkgroupArgs;\nimport com.pulumi.aws.redshiftserverless.inputs.WorkgroupConfigParameterArgs;\nimport com.pulumi.aws.rds.Integration;\nimport com.pulumi.aws.rds.IntegrationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Namespace(\"example\", NamespaceArgs.builder()\n .namespaceName(\"redshift-example\")\n .build());\n\n var exampleWorkgroup = new Workgroup(\"exampleWorkgroup\", WorkgroupArgs.builder()\n .namespaceName(example.namespaceName())\n .workgroupName(\"example-workspace\")\n .baseCapacity(8)\n .publiclyAccessible(false)\n .subnetIds( \n example1.id(),\n example2.id(),\n example3.id())\n .configParameters(WorkgroupConfigParameterArgs.builder()\n .parameterKey(\"enable_case_sensitive_identifier\")\n .parameterValue(\"true\")\n .build())\n .build());\n\n var exampleIntegration = new Integration(\"exampleIntegration\", IntegrationArgs.builder()\n .integrationName(\"example\")\n .sourceArn(exampleAwsRdsCluster.arn())\n .targetArn(example.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:redshiftserverless:Namespace\n properties:\n namespaceName: redshift-example\n exampleWorkgroup:\n type: aws:redshiftserverless:Workgroup\n name: example\n properties:\n namespaceName: ${example.namespaceName}\n workgroupName: example-workspace\n baseCapacity: 8\n publiclyAccessible: false\n subnetIds:\n - ${example1.id}\n - ${example2.id}\n - ${example3.id}\n configParameters:\n - parameterKey: enable_case_sensitive_identifier\n parameterValue: 'true'\n exampleIntegration:\n type: aws:rds:Integration\n name: example\n properties:\n integrationName: example\n sourceArn: ${exampleAwsRdsCluster.arn}\n targetArn: ${example.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Use own KMS key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst keyPolicy = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [\n {\n actions: [\"kms:*\"],\n resources: [\"*\"],\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current.accountId}:root`],\n }],\n },\n {\n actions: [\"kms:CreateGrant\"],\n resources: [\"*\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"redshift.amazonaws.com\"],\n }],\n },\n ],\n}));\nconst example = new aws.kms.Key(\"example\", {\n deletionWindowInDays: 10,\n policy: keyPolicy.then(keyPolicy =\u003e keyPolicy.json),\n});\nconst exampleIntegration = new aws.rds.Integration(\"example\", {\n integrationName: \"example\",\n sourceArn: exampleAwsRdsCluster.arn,\n targetArn: exampleAwsRedshiftserverlessNamespace.arn,\n kmsKeyId: example.arn,\n additionalEncryptionContext: {\n example: \"test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nkey_policy = aws.iam.get_policy_document(statements=[\n {\n \"actions\": [\"kms:*\"],\n \"resources\": [\"*\"],\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n },\n {\n \"actions\": [\"kms:CreateGrant\"],\n \"resources\": [\"*\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"redshift.amazonaws.com\"],\n }],\n },\n])\nexample = aws.kms.Key(\"example\",\n deletion_window_in_days=10,\n policy=key_policy.json)\nexample_integration = aws.rds.Integration(\"example\",\n integration_name=\"example\",\n source_arn=example_aws_rds_cluster[\"arn\"],\n target_arn=example_aws_redshiftserverless_namespace[\"arn\"],\n kms_key_id=example.arn,\n additional_encryption_context={\n \"example\": \"test\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var keyPolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"kms:CreateGrant\",\n },\n Resources = new[]\n {\n \"*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"redshift.amazonaws.com\",\n },\n },\n },\n },\n },\n });\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n DeletionWindowInDays = 10,\n Policy = keyPolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleIntegration = new Aws.Rds.Integration(\"example\", new()\n {\n IntegrationName = \"example\",\n SourceArn = exampleAwsRdsCluster.Arn,\n TargetArn = exampleAwsRedshiftserverlessNamespace.Arn,\n KmsKeyId = example.Arn,\n AdditionalEncryptionContext = \n {\n { \"example\", \"test\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tkeyPolicy, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:CreateGrant\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"redshift.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDeletionWindowInDays: pulumi.Int(10),\n\t\t\tPolicy: pulumi.String(keyPolicy.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rds.NewIntegration(ctx, \"example\", \u0026rds.IntegrationArgs{\n\t\t\tIntegrationName: pulumi.String(\"example\"),\n\t\t\tSourceArn: pulumi.Any(exampleAwsRdsCluster.Arn),\n\t\t\tTargetArn: pulumi.Any(exampleAwsRedshiftserverlessNamespace.Arn),\n\t\t\tKmsKeyId: example.Arn,\n\t\t\tAdditionalEncryptionContext: pulumi.StringMap{\n\t\t\t\t\"example\": pulumi.String(\"test\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.rds.Integration;\nimport com.pulumi.aws.rds.IntegrationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var keyPolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .actions(\"kms:*\")\n .resources(\"*\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .actions(\"kms:CreateGrant\")\n .resources(\"*\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"redshift.amazonaws.com\")\n .build())\n .build())\n .build());\n\n var example = new Key(\"example\", KeyArgs.builder()\n .deletionWindowInDays(10)\n .policy(keyPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleIntegration = new Integration(\"exampleIntegration\", IntegrationArgs.builder()\n .integrationName(\"example\")\n .sourceArn(exampleAwsRdsCluster.arn())\n .targetArn(exampleAwsRedshiftserverlessNamespace.arn())\n .kmsKeyId(example.arn())\n .additionalEncryptionContext(Map.of(\"example\", \"test\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n deletionWindowInDays: 10\n policy: ${keyPolicy.json}\n exampleIntegration:\n type: aws:rds:Integration\n name: example\n properties:\n integrationName: example\n sourceArn: ${exampleAwsRdsCluster.arn}\n targetArn: ${exampleAwsRedshiftserverlessNamespace.arn}\n kmsKeyId: ${example.arn}\n additionalEncryptionContext:\n example: test\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n keyPolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - kms:*\n resources:\n - '*'\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n - actions:\n - kms:CreateGrant\n resources:\n - '*'\n principals:\n - type: Service\n identifiers:\n - redshift.amazonaws.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import RDS (Relational Database) Integration using the `arn`. For example:\n\n```sh\n$ pulumi import aws:rds/integration:Integration example arn:aws:rds:us-west-2:123456789012:integration:abcdefgh-0000-1111-2222-123456789012\n```\n", + "description": "Resource for managing an AWS RDS (Relational Database) zero-ETL integration. You can refer to the [User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.setting-up.html).\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.redshiftserverless.Namespace(\"example\", {namespaceName: \"redshift-example\"});\nconst exampleWorkgroup = new aws.redshiftserverless.Workgroup(\"example\", {\n namespaceName: example.namespaceName,\n workgroupName: \"example-workspace\",\n baseCapacity: 8,\n publiclyAccessible: false,\n subnetIds: [\n example1.id,\n example2.id,\n example3.id,\n ],\n configParameters: [{\n parameterKey: \"enable_case_sensitive_identifier\",\n parameterValue: \"true\",\n }],\n});\nconst exampleIntegration = new aws.rds.Integration(\"example\", {\n integrationName: \"example\",\n sourceArn: exampleAwsRdsCluster.arn,\n targetArn: example.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.redshiftserverless.Namespace(\"example\", namespace_name=\"redshift-example\")\nexample_workgroup = aws.redshiftserverless.Workgroup(\"example\",\n namespace_name=example.namespace_name,\n workgroup_name=\"example-workspace\",\n base_capacity=8,\n publicly_accessible=False,\n subnet_ids=[\n example1[\"id\"],\n example2[\"id\"],\n example3[\"id\"],\n ],\n config_parameters=[{\n \"parameter_key\": \"enable_case_sensitive_identifier\",\n \"parameter_value\": \"true\",\n }])\nexample_integration = aws.rds.Integration(\"example\",\n integration_name=\"example\",\n source_arn=example_aws_rds_cluster[\"arn\"],\n target_arn=example.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.RedshiftServerless.Namespace(\"example\", new()\n {\n NamespaceName = \"redshift-example\",\n });\n\n var exampleWorkgroup = new Aws.RedshiftServerless.Workgroup(\"example\", new()\n {\n NamespaceName = example.NamespaceName,\n WorkgroupName = \"example-workspace\",\n BaseCapacity = 8,\n PubliclyAccessible = false,\n SubnetIds = new[]\n {\n example1.Id,\n example2.Id,\n example3.Id,\n },\n ConfigParameters = new[]\n {\n new Aws.RedshiftServerless.Inputs.WorkgroupConfigParameterArgs\n {\n ParameterKey = \"enable_case_sensitive_identifier\",\n ParameterValue = \"true\",\n },\n },\n });\n\n var exampleIntegration = new Aws.Rds.Integration(\"example\", new()\n {\n IntegrationName = \"example\",\n SourceArn = exampleAwsRdsCluster.Arn,\n TargetArn = example.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshiftserverless\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := redshiftserverless.NewNamespace(ctx, \"example\", \u0026redshiftserverless.NamespaceArgs{\n\t\t\tNamespaceName: pulumi.String(\"redshift-example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = redshiftserverless.NewWorkgroup(ctx, \"example\", \u0026redshiftserverless.WorkgroupArgs{\n\t\t\tNamespaceName: example.NamespaceName,\n\t\t\tWorkgroupName: pulumi.String(\"example-workspace\"),\n\t\t\tBaseCapacity: pulumi.Int(8),\n\t\t\tPubliclyAccessible: pulumi.Bool(false),\n\t\t\tSubnetIds: pulumi.StringArray{\n\t\t\t\texample1.Id,\n\t\t\t\texample2.Id,\n\t\t\t\texample3.Id,\n\t\t\t},\n\t\t\tConfigParameters: redshiftserverless.WorkgroupConfigParameterArray{\n\t\t\t\t\u0026redshiftserverless.WorkgroupConfigParameterArgs{\n\t\t\t\t\tParameterKey: pulumi.String(\"enable_case_sensitive_identifier\"),\n\t\t\t\t\tParameterValue: pulumi.String(\"true\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rds.NewIntegration(ctx, \"example\", \u0026rds.IntegrationArgs{\n\t\t\tIntegrationName: pulumi.String(\"example\"),\n\t\t\tSourceArn: pulumi.Any(exampleAwsRdsCluster.Arn),\n\t\t\tTargetArn: example.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.redshiftserverless.Namespace;\nimport com.pulumi.aws.redshiftserverless.NamespaceArgs;\nimport com.pulumi.aws.redshiftserverless.Workgroup;\nimport com.pulumi.aws.redshiftserverless.WorkgroupArgs;\nimport com.pulumi.aws.redshiftserverless.inputs.WorkgroupConfigParameterArgs;\nimport com.pulumi.aws.rds.Integration;\nimport com.pulumi.aws.rds.IntegrationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Namespace(\"example\", NamespaceArgs.builder()\n .namespaceName(\"redshift-example\")\n .build());\n\n var exampleWorkgroup = new Workgroup(\"exampleWorkgroup\", WorkgroupArgs.builder()\n .namespaceName(example.namespaceName())\n .workgroupName(\"example-workspace\")\n .baseCapacity(8)\n .publiclyAccessible(false)\n .subnetIds( \n example1.id(),\n example2.id(),\n example3.id())\n .configParameters(WorkgroupConfigParameterArgs.builder()\n .parameterKey(\"enable_case_sensitive_identifier\")\n .parameterValue(\"true\")\n .build())\n .build());\n\n var exampleIntegration = new Integration(\"exampleIntegration\", IntegrationArgs.builder()\n .integrationName(\"example\")\n .sourceArn(exampleAwsRdsCluster.arn())\n .targetArn(example.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:redshiftserverless:Namespace\n properties:\n namespaceName: redshift-example\n exampleWorkgroup:\n type: aws:redshiftserverless:Workgroup\n name: example\n properties:\n namespaceName: ${example.namespaceName}\n workgroupName: example-workspace\n baseCapacity: 8\n publiclyAccessible: false\n subnetIds:\n - ${example1.id}\n - ${example2.id}\n - ${example3.id}\n configParameters:\n - parameterKey: enable_case_sensitive_identifier\n parameterValue: 'true'\n exampleIntegration:\n type: aws:rds:Integration\n name: example\n properties:\n integrationName: example\n sourceArn: ${exampleAwsRdsCluster.arn}\n targetArn: ${example.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Use own KMS key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst keyPolicy = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [\n {\n actions: [\"kms:*\"],\n resources: [\"*\"],\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current.accountId}:root`],\n }],\n },\n {\n actions: [\"kms:CreateGrant\"],\n resources: [\"*\"],\n principals: [{\n type: \"Service\",\n identifiers: [\"redshift.amazonaws.com\"],\n }],\n },\n ],\n}));\nconst example = new aws.kms.Key(\"example\", {\n deletionWindowInDays: 10,\n policy: keyPolicy.then(keyPolicy =\u003e keyPolicy.json),\n});\nconst exampleIntegration = new aws.rds.Integration(\"example\", {\n integrationName: \"example\",\n sourceArn: exampleAwsRdsCluster.arn,\n targetArn: exampleAwsRedshiftserverlessNamespace.arn,\n kmsKeyId: example.arn,\n additionalEncryptionContext: {\n example: \"test\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nkey_policy = aws.iam.get_policy_document(statements=[\n {\n \"actions\": [\"kms:*\"],\n \"resources\": [\"*\"],\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n },\n {\n \"actions\": [\"kms:CreateGrant\"],\n \"resources\": [\"*\"],\n \"principals\": [{\n \"type\": \"Service\",\n \"identifiers\": [\"redshift.amazonaws.com\"],\n }],\n },\n])\nexample = aws.kms.Key(\"example\",\n deletion_window_in_days=10,\n policy=key_policy.json)\nexample_integration = aws.rds.Integration(\"example\",\n integration_name=\"example\",\n source_arn=example_aws_rds_cluster[\"arn\"],\n target_arn=example_aws_redshiftserverless_namespace[\"arn\"],\n kms_key_id=example.arn,\n additional_encryption_context={\n \"example\": \"test\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var keyPolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Actions = new[]\n {\n \"kms:CreateGrant\",\n },\n Resources = new[]\n {\n \"*\",\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"Service\",\n Identifiers = new[]\n {\n \"redshift.amazonaws.com\",\n },\n },\n },\n },\n },\n });\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n DeletionWindowInDays = 10,\n Policy = keyPolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleIntegration = new Aws.Rds.Integration(\"example\", new()\n {\n IntegrationName = \"example\",\n SourceArn = exampleAwsRdsCluster.Arn,\n TargetArn = exampleAwsRedshiftserverlessNamespace.Arn,\n KmsKeyId = example.Arn,\n AdditionalEncryptionContext = \n {\n { \"example\", \"test\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tkeyPolicy, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:CreateGrant\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"Service\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\t\"redshift.amazonaws.com\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDeletionWindowInDays: pulumi.Int(10),\n\t\t\tPolicy: pulumi.String(keyPolicy.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rds.NewIntegration(ctx, \"example\", \u0026rds.IntegrationArgs{\n\t\t\tIntegrationName: pulumi.String(\"example\"),\n\t\t\tSourceArn: pulumi.Any(exampleAwsRdsCluster.Arn),\n\t\t\tTargetArn: pulumi.Any(exampleAwsRedshiftserverlessNamespace.Arn),\n\t\t\tKmsKeyId: example.Arn,\n\t\t\tAdditionalEncryptionContext: pulumi.StringMap{\n\t\t\t\t\"example\": pulumi.String(\"test\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.rds.Integration;\nimport com.pulumi.aws.rds.IntegrationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var keyPolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .actions(\"kms:*\")\n .resources(\"*\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .actions(\"kms:CreateGrant\")\n .resources(\"*\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"Service\")\n .identifiers(\"redshift.amazonaws.com\")\n .build())\n .build())\n .build());\n\n var example = new Key(\"example\", KeyArgs.builder()\n .deletionWindowInDays(10)\n .policy(keyPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleIntegration = new Integration(\"exampleIntegration\", IntegrationArgs.builder()\n .integrationName(\"example\")\n .sourceArn(exampleAwsRdsCluster.arn())\n .targetArn(exampleAwsRedshiftserverlessNamespace.arn())\n .kmsKeyId(example.arn())\n .additionalEncryptionContext(Map.of(\"example\", \"test\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n deletionWindowInDays: 10\n policy: ${keyPolicy.json}\n exampleIntegration:\n type: aws:rds:Integration\n name: example\n properties:\n integrationName: example\n sourceArn: ${exampleAwsRdsCluster.arn}\n targetArn: ${exampleAwsRedshiftserverlessNamespace.arn}\n kmsKeyId: ${example.arn}\n additionalEncryptionContext:\n example: test\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n keyPolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - actions:\n - kms:*\n resources:\n - '*'\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n - actions:\n - kms:CreateGrant\n resources:\n - '*'\n principals:\n - type: Service\n identifiers:\n - redshift.amazonaws.com\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import RDS (Relational Database) Integration using the `arn`. For example:\n\n```sh\n$ pulumi import aws:rds/integration:Integration example arn:aws:rds:us-west-2:123456789012:integration:abcdefgh-0000-1111-2222-123456789012\n```\n", "properties": { "additionalEncryptionContext": { "type": "object", @@ -335437,7 +335437,7 @@ } }, "aws:rolesanywhere/trustAnchor:TrustAnchor": { - "description": "Resource for managing a Roles Anywhere Trust Anchor.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.acmpca.CertificateAuthority(\"example\", {\n permanentDeletionTimeInDays: 7,\n type: \"ROOT\",\n certificateAuthorityConfiguration: {\n keyAlgorithm: \"RSA_4096\",\n signingAlgorithm: \"SHA512WITHRSA\",\n subject: {\n commonName: \"example.com\",\n },\n },\n});\nconst current = aws.getPartition({});\nconst test = new aws.acmpca.Certificate(\"test\", {\n certificateAuthorityArn: example.arn,\n certificateSigningRequest: example.certificateSigningRequest,\n signingAlgorithm: \"SHA512WITHRSA\",\n templateArn: current.then(current =\u003e `arn:${current.partition}:acm-pca:::template/RootCACertificate/V1`),\n validity: {\n type: \"YEARS\",\n value: \"1\",\n },\n});\nconst exampleCertificateAuthorityCertificate = new aws.acmpca.CertificateAuthorityCertificate(\"example\", {\n certificateAuthorityArn: example.arn,\n certificate: exampleAwsAcmpcaCertificate.certificate,\n certificateChain: exampleAwsAcmpcaCertificate.certificateChain,\n});\nconst testTrustAnchor = new aws.rolesanywhere.TrustAnchor(\"test\", {\n name: \"example\",\n source: {\n sourceData: {\n acmPcaArn: example.arn,\n },\n sourceType: \"AWS_ACM_PCA\",\n },\n}, {\n dependsOn: [exampleCertificateAuthorityCertificate],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.acmpca.CertificateAuthority(\"example\",\n permanent_deletion_time_in_days=7,\n type=\"ROOT\",\n certificate_authority_configuration={\n \"key_algorithm\": \"RSA_4096\",\n \"signing_algorithm\": \"SHA512WITHRSA\",\n \"subject\": {\n \"common_name\": \"example.com\",\n },\n })\ncurrent = aws.get_partition()\ntest = aws.acmpca.Certificate(\"test\",\n certificate_authority_arn=example.arn,\n certificate_signing_request=example.certificate_signing_request,\n signing_algorithm=\"SHA512WITHRSA\",\n template_arn=f\"arn:{current.partition}:acm-pca:::template/RootCACertificate/V1\",\n validity={\n \"type\": \"YEARS\",\n \"value\": \"1\",\n })\nexample_certificate_authority_certificate = aws.acmpca.CertificateAuthorityCertificate(\"example\",\n certificate_authority_arn=example.arn,\n certificate=example_aws_acmpca_certificate[\"certificate\"],\n certificate_chain=example_aws_acmpca_certificate[\"certificateChain\"])\ntest_trust_anchor = aws.rolesanywhere.TrustAnchor(\"test\",\n name=\"example\",\n source={\n \"source_data\": {\n \"acm_pca_arn\": example.arn,\n },\n \"source_type\": \"AWS_ACM_PCA\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_certificate_authority_certificate]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Acmpca.CertificateAuthority(\"example\", new()\n {\n PermanentDeletionTimeInDays = 7,\n Type = \"ROOT\",\n CertificateAuthorityConfiguration = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs\n {\n KeyAlgorithm = \"RSA_4096\",\n SigningAlgorithm = \"SHA512WITHRSA\",\n Subject = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs\n {\n CommonName = \"example.com\",\n },\n },\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var test = new Aws.Acmpca.Certificate(\"test\", new()\n {\n CertificateAuthorityArn = example.Arn,\n CertificateSigningRequest = example.CertificateSigningRequest,\n SigningAlgorithm = \"SHA512WITHRSA\",\n TemplateArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:acm-pca:::template/RootCACertificate/V1\",\n Validity = new Aws.Acmpca.Inputs.CertificateValidityArgs\n {\n Type = \"YEARS\",\n Value = \"1\",\n },\n });\n\n var exampleCertificateAuthorityCertificate = new Aws.Acmpca.CertificateAuthorityCertificate(\"example\", new()\n {\n CertificateAuthorityArn = example.Arn,\n Certificate = exampleAwsAcmpcaCertificate.Certificate,\n CertificateChain = exampleAwsAcmpcaCertificate.CertificateChain,\n });\n\n var testTrustAnchor = new Aws.RolesAnywhere.TrustAnchor(\"test\", new()\n {\n Name = \"example\",\n Source = new Aws.RolesAnywhere.Inputs.TrustAnchorSourceArgs\n {\n SourceData = new Aws.RolesAnywhere.Inputs.TrustAnchorSourceSourceDataArgs\n {\n AcmPcaArn = example.Arn,\n },\n SourceType = \"AWS_ACM_PCA\",\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleCertificateAuthorityCertificate,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/acmpca\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rolesanywhere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := acmpca.NewCertificateAuthority(ctx, \"example\", \u0026acmpca.CertificateAuthorityArgs{\n\t\t\tPermanentDeletionTimeInDays: pulumi.Int(7),\n\t\t\tType: pulumi.String(\"ROOT\"),\n\t\t\tCertificateAuthorityConfiguration: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationArgs{\n\t\t\t\tKeyAlgorithm: pulumi.String(\"RSA_4096\"),\n\t\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\t\tSubject: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs{\n\t\t\t\t\tCommonName: pulumi.String(\"example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificate(ctx, \"test\", \u0026acmpca.CertificateArgs{\n\t\t\tCertificateAuthorityArn: example.Arn,\n\t\t\tCertificateSigningRequest: example.CertificateSigningRequest,\n\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\tTemplateArn: pulumi.Sprintf(\"arn:%v:acm-pca:::template/RootCACertificate/V1\", current.Partition),\n\t\t\tValidity: \u0026acmpca.CertificateValidityArgs{\n\t\t\t\tType: pulumi.String(\"YEARS\"),\n\t\t\t\tValue: pulumi.String(\"1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleCertificateAuthorityCertificate, err := acmpca.NewCertificateAuthorityCertificate(ctx, \"example\", \u0026acmpca.CertificateAuthorityCertificateArgs{\n\t\t\tCertificateAuthorityArn: example.Arn,\n\t\t\tCertificate: pulumi.Any(exampleAwsAcmpcaCertificate.Certificate),\n\t\t\tCertificateChain: pulumi.Any(exampleAwsAcmpcaCertificate.CertificateChain),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rolesanywhere.NewTrustAnchor(ctx, \"test\", \u0026rolesanywhere.TrustAnchorArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tSource: \u0026rolesanywhere.TrustAnchorSourceArgs{\n\t\t\t\tSourceData: \u0026rolesanywhere.TrustAnchorSourceSourceDataArgs{\n\t\t\t\t\tAcmPcaArn: example.Arn,\n\t\t\t\t},\n\t\t\t\tSourceType: pulumi.String(\"AWS_ACM_PCA\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleCertificateAuthorityCertificate,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.acmpca.CertificateAuthority;\nimport com.pulumi.aws.acmpca.CertificateAuthorityArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.acmpca.Certificate;\nimport com.pulumi.aws.acmpca.CertificateArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateValidityArgs;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificate;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificateArgs;\nimport com.pulumi.aws.rolesanywhere.TrustAnchor;\nimport com.pulumi.aws.rolesanywhere.TrustAnchorArgs;\nimport com.pulumi.aws.rolesanywhere.inputs.TrustAnchorSourceArgs;\nimport com.pulumi.aws.rolesanywhere.inputs.TrustAnchorSourceSourceDataArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new CertificateAuthority(\"example\", CertificateAuthorityArgs.builder()\n .permanentDeletionTimeInDays(7)\n .type(\"ROOT\")\n .certificateAuthorityConfiguration(CertificateAuthorityCertificateAuthorityConfigurationArgs.builder()\n .keyAlgorithm(\"RSA_4096\")\n .signingAlgorithm(\"SHA512WITHRSA\")\n .subject(CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs.builder()\n .commonName(\"example.com\")\n .build())\n .build())\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n var test = new Certificate(\"test\", CertificateArgs.builder()\n .certificateAuthorityArn(example.arn())\n .certificateSigningRequest(example.certificateSigningRequest())\n .signingAlgorithm(\"SHA512WITHRSA\")\n .templateArn(String.format(\"arn:%s:acm-pca:::template/RootCACertificate/V1\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .validity(CertificateValidityArgs.builder()\n .type(\"YEARS\")\n .value(1)\n .build())\n .build());\n\n var exampleCertificateAuthorityCertificate = new CertificateAuthorityCertificate(\"exampleCertificateAuthorityCertificate\", CertificateAuthorityCertificateArgs.builder()\n .certificateAuthorityArn(example.arn())\n .certificate(exampleAwsAcmpcaCertificate.certificate())\n .certificateChain(exampleAwsAcmpcaCertificate.certificateChain())\n .build());\n\n var testTrustAnchor = new TrustAnchor(\"testTrustAnchor\", TrustAnchorArgs.builder()\n .name(\"example\")\n .source(TrustAnchorSourceArgs.builder()\n .sourceData(TrustAnchorSourceSourceDataArgs.builder()\n .acmPcaArn(example.arn())\n .build())\n .sourceType(\"AWS_ACM_PCA\")\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleCertificateAuthorityCertificate)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:acmpca:CertificateAuthority\n properties:\n permanentDeletionTimeInDays: 7\n type: ROOT\n certificateAuthorityConfiguration:\n keyAlgorithm: RSA_4096\n signingAlgorithm: SHA512WITHRSA\n subject:\n commonName: example.com\n test:\n type: aws:acmpca:Certificate\n properties:\n certificateAuthorityArn: ${example.arn}\n certificateSigningRequest: ${example.certificateSigningRequest}\n signingAlgorithm: SHA512WITHRSA\n templateArn: arn:${current.partition}:acm-pca:::template/RootCACertificate/V1\n validity:\n type: YEARS\n value: 1\n exampleCertificateAuthorityCertificate:\n type: aws:acmpca:CertificateAuthorityCertificate\n name: example\n properties:\n certificateAuthorityArn: ${example.arn}\n certificate: ${exampleAwsAcmpcaCertificate.certificate}\n certificateChain: ${exampleAwsAcmpcaCertificate.certificateChain}\n testTrustAnchor:\n type: aws:rolesanywhere:TrustAnchor\n name: test\n properties:\n name: example\n source:\n sourceData:\n acmPcaArn: ${example.arn}\n sourceType: AWS_ACM_PCA\n options:\n dependson:\n - ${exampleCertificateAuthorityCertificate}\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_rolesanywhere_trust_anchor` using its `id`. For example:\n\n```sh\n$ pulumi import aws:rolesanywhere/trustAnchor:TrustAnchor example 92b2fbbb-984d-41a3-a765-e3cbdb69ebb1\n```\n", + "description": "Resource for managing a Roles Anywhere Trust Anchor.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.acmpca.CertificateAuthority(\"example\", {\n permanentDeletionTimeInDays: 7,\n type: \"ROOT\",\n certificateAuthorityConfiguration: {\n keyAlgorithm: \"RSA_4096\",\n signingAlgorithm: \"SHA512WITHRSA\",\n subject: {\n commonName: \"example.com\",\n },\n },\n});\nconst current = aws.getPartition({});\nconst test = new aws.acmpca.Certificate(\"test\", {\n certificateAuthorityArn: example.arn,\n certificateSigningRequest: example.certificateSigningRequest,\n signingAlgorithm: \"SHA512WITHRSA\",\n templateArn: current.then(current =\u003e `arn:${current.partition}:acm-pca:::template/RootCACertificate/V1`),\n validity: {\n type: \"YEARS\",\n value: \"1\",\n },\n});\nconst exampleCertificateAuthorityCertificate = new aws.acmpca.CertificateAuthorityCertificate(\"example\", {\n certificateAuthorityArn: example.arn,\n certificate: exampleAwsAcmpcaCertificate.certificate,\n certificateChain: exampleAwsAcmpcaCertificate.certificateChain,\n});\nconst testTrustAnchor = new aws.rolesanywhere.TrustAnchor(\"test\", {\n name: \"example\",\n source: {\n sourceData: {\n acmPcaArn: example.arn,\n },\n sourceType: \"AWS_ACM_PCA\",\n },\n}, {\n dependsOn: [exampleCertificateAuthorityCertificate],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.acmpca.CertificateAuthority(\"example\",\n permanent_deletion_time_in_days=7,\n type=\"ROOT\",\n certificate_authority_configuration={\n \"key_algorithm\": \"RSA_4096\",\n \"signing_algorithm\": \"SHA512WITHRSA\",\n \"subject\": {\n \"common_name\": \"example.com\",\n },\n })\ncurrent = aws.get_partition()\ntest = aws.acmpca.Certificate(\"test\",\n certificate_authority_arn=example.arn,\n certificate_signing_request=example.certificate_signing_request,\n signing_algorithm=\"SHA512WITHRSA\",\n template_arn=f\"arn:{current.partition}:acm-pca:::template/RootCACertificate/V1\",\n validity={\n \"type\": \"YEARS\",\n \"value\": \"1\",\n })\nexample_certificate_authority_certificate = aws.acmpca.CertificateAuthorityCertificate(\"example\",\n certificate_authority_arn=example.arn,\n certificate=example_aws_acmpca_certificate[\"certificate\"],\n certificate_chain=example_aws_acmpca_certificate[\"certificateChain\"])\ntest_trust_anchor = aws.rolesanywhere.TrustAnchor(\"test\",\n name=\"example\",\n source={\n \"source_data\": {\n \"acm_pca_arn\": example.arn,\n },\n \"source_type\": \"AWS_ACM_PCA\",\n },\n opts = pulumi.ResourceOptions(depends_on=[example_certificate_authority_certificate]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Acmpca.CertificateAuthority(\"example\", new()\n {\n PermanentDeletionTimeInDays = 7,\n Type = \"ROOT\",\n CertificateAuthorityConfiguration = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs\n {\n KeyAlgorithm = \"RSA_4096\",\n SigningAlgorithm = \"SHA512WITHRSA\",\n Subject = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs\n {\n CommonName = \"example.com\",\n },\n },\n });\n\n var current = Aws.GetPartition.Invoke();\n\n var test = new Aws.Acmpca.Certificate(\"test\", new()\n {\n CertificateAuthorityArn = example.Arn,\n CertificateSigningRequest = example.CertificateSigningRequest,\n SigningAlgorithm = \"SHA512WITHRSA\",\n TemplateArn = $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:acm-pca:::template/RootCACertificate/V1\",\n Validity = new Aws.Acmpca.Inputs.CertificateValidityArgs\n {\n Type = \"YEARS\",\n Value = \"1\",\n },\n });\n\n var exampleCertificateAuthorityCertificate = new Aws.Acmpca.CertificateAuthorityCertificate(\"example\", new()\n {\n CertificateAuthorityArn = example.Arn,\n Certificate = exampleAwsAcmpcaCertificate.Certificate,\n CertificateChain = exampleAwsAcmpcaCertificate.CertificateChain,\n });\n\n var testTrustAnchor = new Aws.RolesAnywhere.TrustAnchor(\"test\", new()\n {\n Name = \"example\",\n Source = new Aws.RolesAnywhere.Inputs.TrustAnchorSourceArgs\n {\n SourceData = new Aws.RolesAnywhere.Inputs.TrustAnchorSourceSourceDataArgs\n {\n AcmPcaArn = example.Arn,\n },\n SourceType = \"AWS_ACM_PCA\",\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleCertificateAuthorityCertificate,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/acmpca\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rolesanywhere\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := acmpca.NewCertificateAuthority(ctx, \"example\", \u0026acmpca.CertificateAuthorityArgs{\n\t\t\tPermanentDeletionTimeInDays: pulumi.Int(7),\n\t\t\tType: pulumi.String(\"ROOT\"),\n\t\t\tCertificateAuthorityConfiguration: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationArgs{\n\t\t\t\tKeyAlgorithm: pulumi.String(\"RSA_4096\"),\n\t\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\t\tSubject: \u0026acmpca.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs{\n\t\t\t\t\tCommonName: pulumi.String(\"example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = acmpca.NewCertificate(ctx, \"test\", \u0026acmpca.CertificateArgs{\n\t\t\tCertificateAuthorityArn: example.Arn,\n\t\t\tCertificateSigningRequest: example.CertificateSigningRequest,\n\t\t\tSigningAlgorithm: pulumi.String(\"SHA512WITHRSA\"),\n\t\t\tTemplateArn: pulumi.Sprintf(\"arn:%v:acm-pca:::template/RootCACertificate/V1\", current.Partition),\n\t\t\tValidity: \u0026acmpca.CertificateValidityArgs{\n\t\t\t\tType: pulumi.String(\"YEARS\"),\n\t\t\t\tValue: pulumi.String(\"1\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleCertificateAuthorityCertificate, err := acmpca.NewCertificateAuthorityCertificate(ctx, \"example\", \u0026acmpca.CertificateAuthorityCertificateArgs{\n\t\t\tCertificateAuthorityArn: example.Arn,\n\t\t\tCertificate: pulumi.Any(exampleAwsAcmpcaCertificate.Certificate),\n\t\t\tCertificateChain: pulumi.Any(exampleAwsAcmpcaCertificate.CertificateChain),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rolesanywhere.NewTrustAnchor(ctx, \"test\", \u0026rolesanywhere.TrustAnchorArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tSource: \u0026rolesanywhere.TrustAnchorSourceArgs{\n\t\t\t\tSourceData: \u0026rolesanywhere.TrustAnchorSourceSourceDataArgs{\n\t\t\t\t\tAcmPcaArn: example.Arn,\n\t\t\t\t},\n\t\t\t\tSourceType: pulumi.String(\"AWS_ACM_PCA\"),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleCertificateAuthorityCertificate,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.acmpca.CertificateAuthority;\nimport com.pulumi.aws.acmpca.CertificateAuthorityArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.acmpca.Certificate;\nimport com.pulumi.aws.acmpca.CertificateArgs;\nimport com.pulumi.aws.acmpca.inputs.CertificateValidityArgs;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificate;\nimport com.pulumi.aws.acmpca.CertificateAuthorityCertificateArgs;\nimport com.pulumi.aws.rolesanywhere.TrustAnchor;\nimport com.pulumi.aws.rolesanywhere.TrustAnchorArgs;\nimport com.pulumi.aws.rolesanywhere.inputs.TrustAnchorSourceArgs;\nimport com.pulumi.aws.rolesanywhere.inputs.TrustAnchorSourceSourceDataArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new CertificateAuthority(\"example\", CertificateAuthorityArgs.builder()\n .permanentDeletionTimeInDays(7)\n .type(\"ROOT\")\n .certificateAuthorityConfiguration(CertificateAuthorityCertificateAuthorityConfigurationArgs.builder()\n .keyAlgorithm(\"RSA_4096\")\n .signingAlgorithm(\"SHA512WITHRSA\")\n .subject(CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs.builder()\n .commonName(\"example.com\")\n .build())\n .build())\n .build());\n\n final var current = AwsFunctions.getPartition();\n\n var test = new Certificate(\"test\", CertificateArgs.builder()\n .certificateAuthorityArn(example.arn())\n .certificateSigningRequest(example.certificateSigningRequest())\n .signingAlgorithm(\"SHA512WITHRSA\")\n .templateArn(String.format(\"arn:%s:acm-pca:::template/RootCACertificate/V1\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .validity(CertificateValidityArgs.builder()\n .type(\"YEARS\")\n .value(1)\n .build())\n .build());\n\n var exampleCertificateAuthorityCertificate = new CertificateAuthorityCertificate(\"exampleCertificateAuthorityCertificate\", CertificateAuthorityCertificateArgs.builder()\n .certificateAuthorityArn(example.arn())\n .certificate(exampleAwsAcmpcaCertificate.certificate())\n .certificateChain(exampleAwsAcmpcaCertificate.certificateChain())\n .build());\n\n var testTrustAnchor = new TrustAnchor(\"testTrustAnchor\", TrustAnchorArgs.builder()\n .name(\"example\")\n .source(TrustAnchorSourceArgs.builder()\n .sourceData(TrustAnchorSourceSourceDataArgs.builder()\n .acmPcaArn(example.arn())\n .build())\n .sourceType(\"AWS_ACM_PCA\")\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleCertificateAuthorityCertificate)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:acmpca:CertificateAuthority\n properties:\n permanentDeletionTimeInDays: 7\n type: ROOT\n certificateAuthorityConfiguration:\n keyAlgorithm: RSA_4096\n signingAlgorithm: SHA512WITHRSA\n subject:\n commonName: example.com\n test:\n type: aws:acmpca:Certificate\n properties:\n certificateAuthorityArn: ${example.arn}\n certificateSigningRequest: ${example.certificateSigningRequest}\n signingAlgorithm: SHA512WITHRSA\n templateArn: arn:${current.partition}:acm-pca:::template/RootCACertificate/V1\n validity:\n type: YEARS\n value: 1\n exampleCertificateAuthorityCertificate:\n type: aws:acmpca:CertificateAuthorityCertificate\n name: example\n properties:\n certificateAuthorityArn: ${example.arn}\n certificate: ${exampleAwsAcmpcaCertificate.certificate}\n certificateChain: ${exampleAwsAcmpcaCertificate.certificateChain}\n testTrustAnchor:\n type: aws:rolesanywhere:TrustAnchor\n name: test\n properties:\n name: example\n source:\n sourceData:\n acmPcaArn: ${example.arn}\n sourceType: AWS_ACM_PCA\n options:\n dependson:\n - ${exampleCertificateAuthorityCertificate}\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_rolesanywhere_trust_anchor` using its `id`. For example:\n\n```sh\n$ pulumi import aws:rolesanywhere/trustAnchor:TrustAnchor example 92b2fbbb-984d-41a3-a765-e3cbdb69ebb1\n```\n", "properties": { "arn": { "type": "string", @@ -336064,7 +336064,7 @@ } }, "aws:route53/hostedZoneDnsSec:HostedZoneDnsSec": { - "description": "Manages Route 53 Hosted Zone Domain Name System Security Extensions (DNSSEC). For more information about managing DNSSEC in Route 53, see the [Route 53 Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec.html).\n\n!\u003e **WARNING:** If you disable DNSSEC signing for your hosted zone before the DNS changes have propagated, your domain could become unavailable on the internet. When you remove the DS records, you must wait until the longest TTL for the DS records that you remove has expired before you complete the step to disable DNSSEC signing. Please refer to the [Route 53 Developer Guide - Disable DNSSEC](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec-disable.html) for a detailed breakdown on the steps required to disable DNSSEC safely for a hosted zone.\n\n\u003e **Note:** Route53 hosted zones are global resources, and as such any `aws.kms.Key` that you use as part of a signing key needs to be located in the `us-east-1` region. In the example below, the main AWS provider declaration is for `us-east-1`, however if you are provisioning your AWS resources in a different region, you will need to specify a provider alias and use that attached to the `aws.kms.Key` resource as described in the provider alias documentation.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n customerMasterKeySpec: \"ECC_NIST_P256\",\n deletionWindowInDays: 7,\n keyUsage: \"SIGN_VERIFY\",\n policy: JSON.stringify({\n Statement: [\n {\n Action: [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n \"kms:Verify\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Resource: \"*\",\n Sid: \"Allow Route 53 DNSSEC Service\",\n },\n {\n Action: \"kms:*\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Resource: \"*\",\n Sid: \"Enable IAM User Permissions\",\n },\n ],\n Version: \"2012-10-17\",\n }),\n});\nconst exampleZone = new aws.route53.Zone(\"example\", {name: \"example.com\"});\nconst exampleKeySigningKey = new aws.route53.KeySigningKey(\"example\", {\n hostedZoneId: exampleZone.id,\n keyManagementServiceArn: example.arn,\n name: \"example\",\n});\nconst exampleHostedZoneDnsSec = new aws.route53.HostedZoneDnsSec(\"example\", {hostedZoneId: exampleKeySigningKey.hostedZoneId}, {\n dependsOn: [exampleKeySigningKey],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n customer_master_key_spec=\"ECC_NIST_P256\",\n deletion_window_in_days=7,\n key_usage=\"SIGN_VERIFY\",\n policy=json.dumps({\n \"Statement\": [\n {\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n \"kms:Verify\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Resource\": \"*\",\n \"Sid\": \"Allow Route 53 DNSSEC Service\",\n },\n {\n \"Action\": \"kms:*\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Resource\": \"*\",\n \"Sid\": \"Enable IAM User Permissions\",\n },\n ],\n \"Version\": \"2012-10-17\",\n }))\nexample_zone = aws.route53.Zone(\"example\", name=\"example.com\")\nexample_key_signing_key = aws.route53.KeySigningKey(\"example\",\n hosted_zone_id=example_zone.id,\n key_management_service_arn=example.arn,\n name=\"example\")\nexample_hosted_zone_dns_sec = aws.route53.HostedZoneDnsSec(\"example\", hosted_zone_id=example_key_signing_key.hosted_zone_id,\nopts = pulumi.ResourceOptions(depends_on=[example_key_signing_key]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n CustomerMasterKeySpec = \"ECC_NIST_P256\",\n DeletionWindowInDays = 7,\n KeyUsage = \"SIGN_VERIFY\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n \"kms:Verify\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Resource\"] = \"*\",\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:*\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Resource\"] = \"*\",\n [\"Sid\"] = \"Enable IAM User Permissions\",\n },\n },\n [\"Version\"] = \"2012-10-17\",\n }),\n });\n\n var exampleZone = new Aws.Route53.Zone(\"example\", new()\n {\n Name = \"example.com\",\n });\n\n var exampleKeySigningKey = new Aws.Route53.KeySigningKey(\"example\", new()\n {\n HostedZoneId = exampleZone.Id,\n KeyManagementServiceArn = example.Arn,\n Name = \"example\",\n });\n\n var exampleHostedZoneDnsSec = new Aws.Route53.HostedZoneDnsSec(\"example\", new()\n {\n HostedZoneId = exampleKeySigningKey.HostedZoneId,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleKeySigningKey,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:GetPublicKey\",\n\t\t\t\t\t\t\"kms:Sign\",\n\t\t\t\t\t\t\"kms:Verify\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"ECC_NIST_P256\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tKeyUsage: pulumi.String(\"SIGN_VERIFY\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleZone, err := route53.NewZone(ctx, \"example\", \u0026route53.ZoneArgs{\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKeySigningKey, err := route53.NewKeySigningKey(ctx, \"example\", \u0026route53.KeySigningKeyArgs{\n\t\t\tHostedZoneId: exampleZone.ID(),\n\t\t\tKeyManagementServiceArn: example.Arn,\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewHostedZoneDnsSec(ctx, \"example\", \u0026route53.HostedZoneDnsSecArgs{\n\t\t\tHostedZoneId: exampleKeySigningKey.HostedZoneId,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleKeySigningKey,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.route53.Zone;\nimport com.pulumi.aws.route53.ZoneArgs;\nimport com.pulumi.aws.route53.KeySigningKey;\nimport com.pulumi.aws.route53.KeySigningKeyArgs;\nimport com.pulumi.aws.route53.HostedZoneDnsSec;\nimport com.pulumi.aws.route53.HostedZoneDnsSecArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .customerMasterKeySpec(\"ECC_NIST_P256\")\n .deletionWindowInDays(7)\n .keyUsage(\"SIGN_VERIFY\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:GetPublicKey\", \n \"kms:Sign\", \n \"kms:Verify\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service\")\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\")\n )\n )),\n jsonProperty(\"Version\", \"2012-10-17\")\n )))\n .build());\n\n var exampleZone = new Zone(\"exampleZone\", ZoneArgs.builder()\n .name(\"example.com\")\n .build());\n\n var exampleKeySigningKey = new KeySigningKey(\"exampleKeySigningKey\", KeySigningKeyArgs.builder()\n .hostedZoneId(exampleZone.id())\n .keyManagementServiceArn(example.arn())\n .name(\"example\")\n .build());\n\n var exampleHostedZoneDnsSec = new HostedZoneDnsSec(\"exampleHostedZoneDnsSec\", HostedZoneDnsSecArgs.builder()\n .hostedZoneId(exampleKeySigningKey.hostedZoneId())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleKeySigningKey)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n customerMasterKeySpec: ECC_NIST_P256\n deletionWindowInDays: 7\n keyUsage: SIGN_VERIFY\n policy:\n fn::toJSON:\n Statement:\n - Action:\n - kms:DescribeKey\n - kms:GetPublicKey\n - kms:Sign\n - kms:Verify\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Resource: '*'\n Sid: Allow Route 53 DNSSEC Service\n - Action: kms:*\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Resource: '*'\n Sid: Enable IAM User Permissions\n Version: 2012-10-17\n exampleZone:\n type: aws:route53:Zone\n name: example\n properties:\n name: example.com\n exampleKeySigningKey:\n type: aws:route53:KeySigningKey\n name: example\n properties:\n hostedZoneId: ${exampleZone.id}\n keyManagementServiceArn: ${example.arn}\n name: example\n exampleHostedZoneDnsSec:\n type: aws:route53:HostedZoneDnsSec\n name: example\n properties:\n hostedZoneId: ${exampleKeySigningKey.hostedZoneId}\n options:\n dependson:\n - ${exampleKeySigningKey}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_route53_hosted_zone_dnssec` resources using the Route 53 Hosted Zone identifier. For example:\n\n```sh\n$ pulumi import aws:route53/hostedZoneDnsSec:HostedZoneDnsSec example Z1D633PJN98FT9\n```\n", + "description": "Manages Route 53 Hosted Zone Domain Name System Security Extensions (DNSSEC). For more information about managing DNSSEC in Route 53, see the [Route 53 Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec.html).\n\n!\u003e **WARNING:** If you disable DNSSEC signing for your hosted zone before the DNS changes have propagated, your domain could become unavailable on the internet. When you remove the DS records, you must wait until the longest TTL for the DS records that you remove has expired before you complete the step to disable DNSSEC signing. Please refer to the [Route 53 Developer Guide - Disable DNSSEC](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec-disable.html) for a detailed breakdown on the steps required to disable DNSSEC safely for a hosted zone.\n\n\u003e **Note:** Route53 hosted zones are global resources, and as such any `aws.kms.Key` that you use as part of a signing key needs to be located in the `us-east-1` region. In the example below, the main AWS provider declaration is for `us-east-1`, however if you are provisioning your AWS resources in a different region, you will need to specify a provider alias and use that attached to the `aws.kms.Key` resource as described in the provider alias documentation.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n customerMasterKeySpec: \"ECC_NIST_P256\",\n deletionWindowInDays: 7,\n keyUsage: \"SIGN_VERIFY\",\n policy: JSON.stringify({\n Statement: [\n {\n Action: [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n \"kms:Verify\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Resource: \"*\",\n Sid: \"Allow Route 53 DNSSEC Service\",\n },\n {\n Action: \"kms:*\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Resource: \"*\",\n Sid: \"Enable IAM User Permissions\",\n },\n ],\n Version: \"2012-10-17\",\n }),\n});\nconst exampleZone = new aws.route53.Zone(\"example\", {name: \"example.com\"});\nconst exampleKeySigningKey = new aws.route53.KeySigningKey(\"example\", {\n hostedZoneId: exampleZone.id,\n keyManagementServiceArn: example.arn,\n name: \"example\",\n});\nconst exampleHostedZoneDnsSec = new aws.route53.HostedZoneDnsSec(\"example\", {hostedZoneId: exampleKeySigningKey.hostedZoneId}, {\n dependsOn: [exampleKeySigningKey],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n customer_master_key_spec=\"ECC_NIST_P256\",\n deletion_window_in_days=7,\n key_usage=\"SIGN_VERIFY\",\n policy=json.dumps({\n \"Statement\": [\n {\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n \"kms:Verify\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Resource\": \"*\",\n \"Sid\": \"Allow Route 53 DNSSEC Service\",\n },\n {\n \"Action\": \"kms:*\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Resource\": \"*\",\n \"Sid\": \"Enable IAM User Permissions\",\n },\n ],\n \"Version\": \"2012-10-17\",\n }))\nexample_zone = aws.route53.Zone(\"example\", name=\"example.com\")\nexample_key_signing_key = aws.route53.KeySigningKey(\"example\",\n hosted_zone_id=example_zone.id,\n key_management_service_arn=example.arn,\n name=\"example\")\nexample_hosted_zone_dns_sec = aws.route53.HostedZoneDnsSec(\"example\", hosted_zone_id=example_key_signing_key.hosted_zone_id,\nopts = pulumi.ResourceOptions(depends_on=[example_key_signing_key]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n CustomerMasterKeySpec = \"ECC_NIST_P256\",\n DeletionWindowInDays = 7,\n KeyUsage = \"SIGN_VERIFY\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n \"kms:Verify\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Resource\"] = \"*\",\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service\",\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:*\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Resource\"] = \"*\",\n [\"Sid\"] = \"Enable IAM User Permissions\",\n },\n },\n [\"Version\"] = \"2012-10-17\",\n }),\n });\n\n var exampleZone = new Aws.Route53.Zone(\"example\", new()\n {\n Name = \"example.com\",\n });\n\n var exampleKeySigningKey = new Aws.Route53.KeySigningKey(\"example\", new()\n {\n HostedZoneId = exampleZone.Id,\n KeyManagementServiceArn = example.Arn,\n Name = \"example\",\n });\n\n var exampleHostedZoneDnsSec = new Aws.Route53.HostedZoneDnsSec(\"example\", new()\n {\n HostedZoneId = exampleKeySigningKey.HostedZoneId,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleKeySigningKey,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:GetPublicKey\",\n\t\t\t\t\t\t\"kms:Sign\",\n\t\t\t\t\t\t\"kms:Verify\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service\",\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texample, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"ECC_NIST_P256\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tKeyUsage: pulumi.String(\"SIGN_VERIFY\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleZone, err := route53.NewZone(ctx, \"example\", \u0026route53.ZoneArgs{\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKeySigningKey, err := route53.NewKeySigningKey(ctx, \"example\", \u0026route53.KeySigningKeyArgs{\n\t\t\tHostedZoneId: exampleZone.ID(),\n\t\t\tKeyManagementServiceArn: example.Arn,\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewHostedZoneDnsSec(ctx, \"example\", \u0026route53.HostedZoneDnsSecArgs{\n\t\t\tHostedZoneId: exampleKeySigningKey.HostedZoneId,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleKeySigningKey,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.route53.Zone;\nimport com.pulumi.aws.route53.ZoneArgs;\nimport com.pulumi.aws.route53.KeySigningKey;\nimport com.pulumi.aws.route53.KeySigningKeyArgs;\nimport com.pulumi.aws.route53.HostedZoneDnsSec;\nimport com.pulumi.aws.route53.HostedZoneDnsSecArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .customerMasterKeySpec(\"ECC_NIST_P256\")\n .deletionWindowInDays(7)\n .keyUsage(\"SIGN_VERIFY\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:GetPublicKey\", \n \"kms:Sign\", \n \"kms:Verify\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service\")\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\")\n )\n )),\n jsonProperty(\"Version\", \"2012-10-17\")\n )))\n .build());\n\n var exampleZone = new Zone(\"exampleZone\", ZoneArgs.builder()\n .name(\"example.com\")\n .build());\n\n var exampleKeySigningKey = new KeySigningKey(\"exampleKeySigningKey\", KeySigningKeyArgs.builder()\n .hostedZoneId(exampleZone.id())\n .keyManagementServiceArn(example.arn())\n .name(\"example\")\n .build());\n\n var exampleHostedZoneDnsSec = new HostedZoneDnsSec(\"exampleHostedZoneDnsSec\", HostedZoneDnsSecArgs.builder()\n .hostedZoneId(exampleKeySigningKey.hostedZoneId())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleKeySigningKey)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n customerMasterKeySpec: ECC_NIST_P256\n deletionWindowInDays: 7\n keyUsage: SIGN_VERIFY\n policy:\n fn::toJSON:\n Statement:\n - Action:\n - kms:DescribeKey\n - kms:GetPublicKey\n - kms:Sign\n - kms:Verify\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Resource: '*'\n Sid: Allow Route 53 DNSSEC Service\n - Action: kms:*\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Resource: '*'\n Sid: Enable IAM User Permissions\n Version: 2012-10-17\n exampleZone:\n type: aws:route53:Zone\n name: example\n properties:\n name: example.com\n exampleKeySigningKey:\n type: aws:route53:KeySigningKey\n name: example\n properties:\n hostedZoneId: ${exampleZone.id}\n keyManagementServiceArn: ${example.arn}\n name: example\n exampleHostedZoneDnsSec:\n type: aws:route53:HostedZoneDnsSec\n name: example\n properties:\n hostedZoneId: ${exampleKeySigningKey.hostedZoneId}\n options:\n dependson:\n - ${exampleKeySigningKey}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_route53_hosted_zone_dnssec` resources using the Route 53 Hosted Zone identifier. For example:\n\n```sh\n$ pulumi import aws:route53/hostedZoneDnsSec:HostedZoneDnsSec example Z1D633PJN98FT9\n```\n", "properties": { "hostedZoneId": { "type": "string", @@ -336109,7 +336109,7 @@ } }, "aws:route53/keySigningKey:KeySigningKey": { - "description": "Manages a Route 53 Key Signing Key. To manage Domain Name System Security Extensions (DNSSEC) for a Hosted Zone, see the `aws.route53.HostedZoneDnsSec` resource. For more information about managing DNSSEC in Route 53, see the [Route 53 Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n customerMasterKeySpec: \"ECC_NIST_P256\",\n deletionWindowInDays: 7,\n keyUsage: \"SIGN_VERIFY\",\n policy: JSON.stringify({\n Statement: [\n {\n Action: [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Sid: \"Allow Route 53 DNSSEC Service\",\n Resource: \"*\",\n Condition: {\n StringEquals: {\n \"aws:SourceAccount\": current.then(current =\u003e current.accountId),\n },\n ArnLike: {\n \"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n {\n Action: \"kms:CreateGrant\",\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Sid: \"Allow Route 53 DNSSEC Service to CreateGrant\",\n Resource: \"*\",\n Condition: {\n Bool: {\n \"kms:GrantIsForAWSResource\": \"true\",\n },\n },\n },\n {\n Action: \"kms:*\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Resource: \"*\",\n Sid: \"Enable IAM User Permissions\",\n },\n ],\n Version: \"2012-10-17\",\n }),\n});\nconst exampleZone = new aws.route53.Zone(\"example\", {name: \"example.com\"});\nconst exampleKeySigningKey = new aws.route53.KeySigningKey(\"example\", {\n hostedZoneId: test.id,\n keyManagementServiceArn: testAwsKmsKey.arn,\n name: \"example\",\n});\nconst exampleHostedZoneDnsSec = new aws.route53.HostedZoneDnsSec(\"example\", {hostedZoneId: exampleKeySigningKey.hostedZoneId}, {\n dependsOn: [exampleKeySigningKey],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n customer_master_key_spec=\"ECC_NIST_P256\",\n deletion_window_in_days=7,\n key_usage=\"SIGN_VERIFY\",\n policy=json.dumps({\n \"Statement\": [\n {\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Sid\": \"Allow Route 53 DNSSEC Service\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"StringEquals\": {\n \"aws:SourceAccount\": current.account_id,\n },\n \"ArnLike\": {\n \"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n {\n \"Action\": \"kms:CreateGrant\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Sid\": \"Allow Route 53 DNSSEC Service to CreateGrant\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"kms:GrantIsForAWSResource\": \"true\",\n },\n },\n },\n {\n \"Action\": \"kms:*\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Resource\": \"*\",\n \"Sid\": \"Enable IAM User Permissions\",\n },\n ],\n \"Version\": \"2012-10-17\",\n }))\nexample_zone = aws.route53.Zone(\"example\", name=\"example.com\")\nexample_key_signing_key = aws.route53.KeySigningKey(\"example\",\n hosted_zone_id=test[\"id\"],\n key_management_service_arn=test_aws_kms_key[\"arn\"],\n name=\"example\")\nexample_hosted_zone_dns_sec = aws.route53.HostedZoneDnsSec(\"example\", hosted_zone_id=example_key_signing_key.hosted_zone_id,\nopts = pulumi.ResourceOptions(depends_on=[example_key_signing_key]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n CustomerMasterKeySpec = \"ECC_NIST_P256\",\n DeletionWindowInDays = 7,\n KeyUsage = \"SIGN_VERIFY\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service\",\n [\"Resource\"] = \"*\",\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceAccount\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"ArnLike\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceArn\"] = \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:CreateGrant\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service to CreateGrant\",\n [\"Resource\"] = \"*\",\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Bool\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:GrantIsForAWSResource\"] = \"true\",\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:*\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Resource\"] = \"*\",\n [\"Sid\"] = \"Enable IAM User Permissions\",\n },\n },\n [\"Version\"] = \"2012-10-17\",\n }),\n });\n\n var exampleZone = new Aws.Route53.Zone(\"example\", new()\n {\n Name = \"example.com\",\n });\n\n var exampleKeySigningKey = new Aws.Route53.KeySigningKey(\"example\", new()\n {\n HostedZoneId = test.Id,\n KeyManagementServiceArn = testAwsKmsKey.Arn,\n Name = \"example\",\n });\n\n var exampleHostedZoneDnsSec = new Aws.Route53.HostedZoneDnsSec(\"example\", new()\n {\n HostedZoneId = exampleKeySigningKey.HostedZoneId,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleKeySigningKey,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:GetPublicKey\",\n\t\t\t\t\t\t\"kms:Sign\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"aws:SourceAccount\": current.AccountId,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"ArnLike\": map[string]interface{}{\n\t\t\t\t\t\t\t\"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:CreateGrant\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service to CreateGrant\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"Bool\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:GrantIsForAWSResource\": \"true\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"ECC_NIST_P256\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tKeyUsage: pulumi.String(\"SIGN_VERIFY\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewZone(ctx, \"example\", \u0026route53.ZoneArgs{\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKeySigningKey, err := route53.NewKeySigningKey(ctx, \"example\", \u0026route53.KeySigningKeyArgs{\n\t\t\tHostedZoneId: pulumi.Any(test.Id),\n\t\t\tKeyManagementServiceArn: pulumi.Any(testAwsKmsKey.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewHostedZoneDnsSec(ctx, \"example\", \u0026route53.HostedZoneDnsSecArgs{\n\t\t\tHostedZoneId: exampleKeySigningKey.HostedZoneId,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleKeySigningKey,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.route53.Zone;\nimport com.pulumi.aws.route53.ZoneArgs;\nimport com.pulumi.aws.route53.KeySigningKey;\nimport com.pulumi.aws.route53.KeySigningKeyArgs;\nimport com.pulumi.aws.route53.HostedZoneDnsSec;\nimport com.pulumi.aws.route53.HostedZoneDnsSecArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .customerMasterKeySpec(\"ECC_NIST_P256\")\n .deletionWindowInDays(7)\n .keyUsage(\"SIGN_VERIFY\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:GetPublicKey\", \n \"kms:Sign\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service\"),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"aws:SourceAccount\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n )),\n jsonProperty(\"ArnLike\", jsonObject(\n jsonProperty(\"aws:SourceArn\", \"arn:aws:route53:::hostedzone/*\")\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:CreateGrant\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service to CreateGrant\"),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"Bool\", jsonObject(\n jsonProperty(\"kms:GrantIsForAWSResource\", \"true\")\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\")\n )\n )),\n jsonProperty(\"Version\", \"2012-10-17\")\n )))\n .build());\n\n var exampleZone = new Zone(\"exampleZone\", ZoneArgs.builder()\n .name(\"example.com\")\n .build());\n\n var exampleKeySigningKey = new KeySigningKey(\"exampleKeySigningKey\", KeySigningKeyArgs.builder()\n .hostedZoneId(test.id())\n .keyManagementServiceArn(testAwsKmsKey.arn())\n .name(\"example\")\n .build());\n\n var exampleHostedZoneDnsSec = new HostedZoneDnsSec(\"exampleHostedZoneDnsSec\", HostedZoneDnsSecArgs.builder()\n .hostedZoneId(exampleKeySigningKey.hostedZoneId())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleKeySigningKey)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n customerMasterKeySpec: ECC_NIST_P256\n deletionWindowInDays: 7\n keyUsage: SIGN_VERIFY\n policy:\n fn::toJSON:\n Statement:\n - Action:\n - kms:DescribeKey\n - kms:GetPublicKey\n - kms:Sign\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Sid: Allow Route 53 DNSSEC Service\n Resource: '*'\n Condition:\n StringEquals:\n aws:SourceAccount: ${current.accountId}\n ArnLike:\n aws:SourceArn: arn:aws:route53:::hostedzone/*\n - Action: kms:CreateGrant\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Sid: Allow Route 53 DNSSEC Service to CreateGrant\n Resource: '*'\n Condition:\n Bool:\n kms:GrantIsForAWSResource: 'true'\n - Action: kms:*\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Resource: '*'\n Sid: Enable IAM User Permissions\n Version: 2012-10-17\n exampleZone:\n type: aws:route53:Zone\n name: example\n properties:\n name: example.com\n exampleKeySigningKey:\n type: aws:route53:KeySigningKey\n name: example\n properties:\n hostedZoneId: ${test.id}\n keyManagementServiceArn: ${testAwsKmsKey.arn}\n name: example\n exampleHostedZoneDnsSec:\n type: aws:route53:HostedZoneDnsSec\n name: example\n properties:\n hostedZoneId: ${exampleKeySigningKey.hostedZoneId}\n options:\n dependson:\n - ${exampleKeySigningKey}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_route53_key_signing_key` resources using the Route 53 Hosted Zone identifier and KMS Key identifier, separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:route53/keySigningKey:KeySigningKey example Z1D633PJN98FT9,example\n```\n", + "description": "Manages a Route 53 Key Signing Key. To manage Domain Name System Security Extensions (DNSSEC) for a Hosted Zone, see the `aws.route53.HostedZoneDnsSec` resource. For more information about managing DNSSEC in Route 53, see the [Route 53 Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n customerMasterKeySpec: \"ECC_NIST_P256\",\n deletionWindowInDays: 7,\n keyUsage: \"SIGN_VERIFY\",\n policy: JSON.stringify({\n Statement: [\n {\n Action: [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Sid: \"Allow Route 53 DNSSEC Service\",\n Resource: \"*\",\n Condition: {\n StringEquals: {\n \"aws:SourceAccount\": current.then(current =\u003e current.accountId),\n },\n ArnLike: {\n \"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n {\n Action: \"kms:CreateGrant\",\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Sid: \"Allow Route 53 DNSSEC Service to CreateGrant\",\n Resource: \"*\",\n Condition: {\n Bool: {\n \"kms:GrantIsForAWSResource\": \"true\",\n },\n },\n },\n {\n Action: \"kms:*\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Resource: \"*\",\n Sid: \"Enable IAM User Permissions\",\n },\n ],\n Version: \"2012-10-17\",\n }),\n});\nconst exampleZone = new aws.route53.Zone(\"example\", {name: \"example.com\"});\nconst exampleKeySigningKey = new aws.route53.KeySigningKey(\"example\", {\n hostedZoneId: test.id,\n keyManagementServiceArn: testAwsKmsKey.arn,\n name: \"example\",\n});\nconst exampleHostedZoneDnsSec = new aws.route53.HostedZoneDnsSec(\"example\", {hostedZoneId: exampleKeySigningKey.hostedZoneId}, {\n dependsOn: [exampleKeySigningKey],\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n customer_master_key_spec=\"ECC_NIST_P256\",\n deletion_window_in_days=7,\n key_usage=\"SIGN_VERIFY\",\n policy=json.dumps({\n \"Statement\": [\n {\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Sid\": \"Allow Route 53 DNSSEC Service\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"StringEquals\": {\n \"aws:SourceAccount\": current.account_id,\n },\n \"ArnLike\": {\n \"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n {\n \"Action\": \"kms:CreateGrant\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Sid\": \"Allow Route 53 DNSSEC Service to CreateGrant\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"kms:GrantIsForAWSResource\": \"true\",\n },\n },\n },\n {\n \"Action\": \"kms:*\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Resource\": \"*\",\n \"Sid\": \"Enable IAM User Permissions\",\n },\n ],\n \"Version\": \"2012-10-17\",\n }))\nexample_zone = aws.route53.Zone(\"example\", name=\"example.com\")\nexample_key_signing_key = aws.route53.KeySigningKey(\"example\",\n hosted_zone_id=test[\"id\"],\n key_management_service_arn=test_aws_kms_key[\"arn\"],\n name=\"example\")\nexample_hosted_zone_dns_sec = aws.route53.HostedZoneDnsSec(\"example\", hosted_zone_id=example_key_signing_key.hosted_zone_id,\nopts = pulumi.ResourceOptions(depends_on=[example_key_signing_key]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n CustomerMasterKeySpec = \"ECC_NIST_P256\",\n DeletionWindowInDays = 7,\n KeyUsage = \"SIGN_VERIFY\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service\",\n [\"Resource\"] = \"*\",\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceAccount\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"ArnLike\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceArn\"] = \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:CreateGrant\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service to CreateGrant\",\n [\"Resource\"] = \"*\",\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Bool\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:GrantIsForAWSResource\"] = \"true\",\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:*\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Resource\"] = \"*\",\n [\"Sid\"] = \"Enable IAM User Permissions\",\n },\n },\n [\"Version\"] = \"2012-10-17\",\n }),\n });\n\n var exampleZone = new Aws.Route53.Zone(\"example\", new()\n {\n Name = \"example.com\",\n });\n\n var exampleKeySigningKey = new Aws.Route53.KeySigningKey(\"example\", new()\n {\n HostedZoneId = test.Id,\n KeyManagementServiceArn = testAwsKmsKey.Arn,\n Name = \"example\",\n });\n\n var exampleHostedZoneDnsSec = new Aws.Route53.HostedZoneDnsSec(\"example\", new()\n {\n HostedZoneId = exampleKeySigningKey.HostedZoneId,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleKeySigningKey,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:GetPublicKey\",\n\t\t\t\t\t\t\"kms:Sign\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"aws:SourceAccount\": current.AccountId,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"ArnLike\": map[string]interface{}{\n\t\t\t\t\t\t\t\"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:CreateGrant\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service to CreateGrant\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"Bool\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:GrantIsForAWSResource\": \"true\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"ECC_NIST_P256\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tKeyUsage: pulumi.String(\"SIGN_VERIFY\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewZone(ctx, \"example\", \u0026route53.ZoneArgs{\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKeySigningKey, err := route53.NewKeySigningKey(ctx, \"example\", \u0026route53.KeySigningKeyArgs{\n\t\t\tHostedZoneId: pulumi.Any(test.Id),\n\t\t\tKeyManagementServiceArn: pulumi.Any(testAwsKmsKey.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewHostedZoneDnsSec(ctx, \"example\", \u0026route53.HostedZoneDnsSecArgs{\n\t\t\tHostedZoneId: exampleKeySigningKey.HostedZoneId,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleKeySigningKey,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.route53.Zone;\nimport com.pulumi.aws.route53.ZoneArgs;\nimport com.pulumi.aws.route53.KeySigningKey;\nimport com.pulumi.aws.route53.KeySigningKeyArgs;\nimport com.pulumi.aws.route53.HostedZoneDnsSec;\nimport com.pulumi.aws.route53.HostedZoneDnsSecArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .customerMasterKeySpec(\"ECC_NIST_P256\")\n .deletionWindowInDays(7)\n .keyUsage(\"SIGN_VERIFY\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:GetPublicKey\", \n \"kms:Sign\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service\"),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"aws:SourceAccount\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n )),\n jsonProperty(\"ArnLike\", jsonObject(\n jsonProperty(\"aws:SourceArn\", \"arn:aws:route53:::hostedzone/*\")\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:CreateGrant\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service to CreateGrant\"),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"Bool\", jsonObject(\n jsonProperty(\"kms:GrantIsForAWSResource\", \"true\")\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\")\n )\n )),\n jsonProperty(\"Version\", \"2012-10-17\")\n )))\n .build());\n\n var exampleZone = new Zone(\"exampleZone\", ZoneArgs.builder()\n .name(\"example.com\")\n .build());\n\n var exampleKeySigningKey = new KeySigningKey(\"exampleKeySigningKey\", KeySigningKeyArgs.builder()\n .hostedZoneId(test.id())\n .keyManagementServiceArn(testAwsKmsKey.arn())\n .name(\"example\")\n .build());\n\n var exampleHostedZoneDnsSec = new HostedZoneDnsSec(\"exampleHostedZoneDnsSec\", HostedZoneDnsSecArgs.builder()\n .hostedZoneId(exampleKeySigningKey.hostedZoneId())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleKeySigningKey)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n customerMasterKeySpec: ECC_NIST_P256\n deletionWindowInDays: 7\n keyUsage: SIGN_VERIFY\n policy:\n fn::toJSON:\n Statement:\n - Action:\n - kms:DescribeKey\n - kms:GetPublicKey\n - kms:Sign\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Sid: Allow Route 53 DNSSEC Service\n Resource: '*'\n Condition:\n StringEquals:\n aws:SourceAccount: ${current.accountId}\n ArnLike:\n aws:SourceArn: arn:aws:route53:::hostedzone/*\n - Action: kms:CreateGrant\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Sid: Allow Route 53 DNSSEC Service to CreateGrant\n Resource: '*'\n Condition:\n Bool:\n kms:GrantIsForAWSResource: 'true'\n - Action: kms:*\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Resource: '*'\n Sid: Enable IAM User Permissions\n Version: 2012-10-17\n exampleZone:\n type: aws:route53:Zone\n name: example\n properties:\n name: example.com\n exampleKeySigningKey:\n type: aws:route53:KeySigningKey\n name: example\n properties:\n hostedZoneId: ${test.id}\n keyManagementServiceArn: ${testAwsKmsKey.arn}\n name: example\n exampleHostedZoneDnsSec:\n type: aws:route53:HostedZoneDnsSec\n name: example\n properties:\n hostedZoneId: ${exampleKeySigningKey.hostedZoneId}\n options:\n dependson:\n - ${exampleKeySigningKey}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import `aws_route53_key_signing_key` resources using the Route 53 Hosted Zone identifier and KMS Key identifier, separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:route53/keySigningKey:KeySigningKey example Z1D633PJN98FT9,example\n```\n", "properties": { "digestAlgorithmMnemonic": { "type": "string", @@ -337086,7 +337086,7 @@ } }, "aws:route53/resolverFirewallRule:ResolverFirewallRule": { - "description": "Provides a Route 53 Resolver DNS Firewall rule resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.route53.ResolverFirewallDomainList(\"example\", {\n name: \"example\",\n domains: [\"example.com\"],\n tags: {},\n});\nconst exampleResolverFirewallRuleGroup = new aws.route53.ResolverFirewallRuleGroup(\"example\", {\n name: \"example\",\n tags: {},\n});\nconst exampleResolverFirewallRule = new aws.route53.ResolverFirewallRule(\"example\", {\n name: \"example\",\n action: \"BLOCK\",\n blockOverrideDnsType: \"CNAME\",\n blockOverrideDomain: \"example.com\",\n blockOverrideTtl: 1,\n blockResponse: \"OVERRIDE\",\n firewallDomainListId: example.id,\n firewallRuleGroupId: exampleResolverFirewallRuleGroup.id,\n priority: 100,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.route53.ResolverFirewallDomainList(\"example\",\n name=\"example\",\n domains=[\"example.com\"],\n tags={})\nexample_resolver_firewall_rule_group = aws.route53.ResolverFirewallRuleGroup(\"example\",\n name=\"example\",\n tags={})\nexample_resolver_firewall_rule = aws.route53.ResolverFirewallRule(\"example\",\n name=\"example\",\n action=\"BLOCK\",\n block_override_dns_type=\"CNAME\",\n block_override_domain=\"example.com\",\n block_override_ttl=1,\n block_response=\"OVERRIDE\",\n firewall_domain_list_id=example.id,\n firewall_rule_group_id=example_resolver_firewall_rule_group.id,\n priority=100)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Route53.ResolverFirewallDomainList(\"example\", new()\n {\n Name = \"example\",\n Domains = new[]\n {\n \"example.com\",\n },\n Tags = null,\n });\n\n var exampleResolverFirewallRuleGroup = new Aws.Route53.ResolverFirewallRuleGroup(\"example\", new()\n {\n Name = \"example\",\n Tags = null,\n });\n\n var exampleResolverFirewallRule = new Aws.Route53.ResolverFirewallRule(\"example\", new()\n {\n Name = \"example\",\n Action = \"BLOCK\",\n BlockOverrideDnsType = \"CNAME\",\n BlockOverrideDomain = \"example.com\",\n BlockOverrideTtl = 1,\n BlockResponse = \"OVERRIDE\",\n FirewallDomainListId = example.Id,\n FirewallRuleGroupId = exampleResolverFirewallRuleGroup.Id,\n Priority = 100,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := route53.NewResolverFirewallDomainList(ctx, \"example\", \u0026route53.ResolverFirewallDomainListArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDomains: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"example.com\"),\n\t\t\t},\n\t\t\tTags: nil,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleResolverFirewallRuleGroup, err := route53.NewResolverFirewallRuleGroup(ctx, \"example\", \u0026route53.ResolverFirewallRuleGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tTags: nil,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewResolverFirewallRule(ctx, \"example\", \u0026route53.ResolverFirewallRuleArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tAction: pulumi.String(\"BLOCK\"),\n\t\t\tBlockOverrideDnsType: pulumi.String(\"CNAME\"),\n\t\t\tBlockOverrideDomain: pulumi.String(\"example.com\"),\n\t\t\tBlockOverrideTtl: pulumi.Int(1),\n\t\t\tBlockResponse: pulumi.String(\"OVERRIDE\"),\n\t\t\tFirewallDomainListId: example.ID(),\n\t\t\tFirewallRuleGroupId: exampleResolverFirewallRuleGroup.ID(),\n\t\t\tPriority: pulumi.Int(100),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.route53.ResolverFirewallDomainList;\nimport com.pulumi.aws.route53.ResolverFirewallDomainListArgs;\nimport com.pulumi.aws.route53.ResolverFirewallRuleGroup;\nimport com.pulumi.aws.route53.ResolverFirewallRuleGroupArgs;\nimport com.pulumi.aws.route53.ResolverFirewallRule;\nimport com.pulumi.aws.route53.ResolverFirewallRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ResolverFirewallDomainList(\"example\", ResolverFirewallDomainListArgs.builder()\n .name(\"example\")\n .domains(\"example.com\")\n .tags()\n .build());\n\n var exampleResolverFirewallRuleGroup = new ResolverFirewallRuleGroup(\"exampleResolverFirewallRuleGroup\", ResolverFirewallRuleGroupArgs.builder()\n .name(\"example\")\n .tags()\n .build());\n\n var exampleResolverFirewallRule = new ResolverFirewallRule(\"exampleResolverFirewallRule\", ResolverFirewallRuleArgs.builder()\n .name(\"example\")\n .action(\"BLOCK\")\n .blockOverrideDnsType(\"CNAME\")\n .blockOverrideDomain(\"example.com\")\n .blockOverrideTtl(1)\n .blockResponse(\"OVERRIDE\")\n .firewallDomainListId(example.id())\n .firewallRuleGroupId(exampleResolverFirewallRuleGroup.id())\n .priority(100)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:route53:ResolverFirewallDomainList\n properties:\n name: example\n domains:\n - example.com\n tags: {}\n exampleResolverFirewallRuleGroup:\n type: aws:route53:ResolverFirewallRuleGroup\n name: example\n properties:\n name: example\n tags: {}\n exampleResolverFirewallRule:\n type: aws:route53:ResolverFirewallRule\n name: example\n properties:\n name: example\n action: BLOCK\n blockOverrideDnsType: CNAME\n blockOverrideDomain: example.com\n blockOverrideTtl: 1\n blockResponse: OVERRIDE\n firewallDomainListId: ${example.id}\n firewallRuleGroupId: ${exampleResolverFirewallRuleGroup.id}\n priority: 100\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Route 53 Resolver DNS Firewall rules using the Route 53 Resolver DNS Firewall rule group ID and domain list ID separated by ':'. For example:\n\n```sh\n$ pulumi import aws:route53/resolverFirewallRule:ResolverFirewallRule example rslvr-frg-0123456789abcdef:rslvr-fdl-0123456789abcdef\n```\n", + "description": "Provides a Route 53 Resolver DNS Firewall rule resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.route53.ResolverFirewallDomainList(\"example\", {\n name: \"example\",\n domains: [\"example.com\"],\n tags: {},\n});\nconst exampleResolverFirewallRuleGroup = new aws.route53.ResolverFirewallRuleGroup(\"example\", {\n name: \"example\",\n tags: {},\n});\nconst exampleResolverFirewallRule = new aws.route53.ResolverFirewallRule(\"example\", {\n name: \"example\",\n action: \"BLOCK\",\n blockOverrideDnsType: \"CNAME\",\n blockOverrideDomain: \"example.com\",\n blockOverrideTtl: 1,\n blockResponse: \"OVERRIDE\",\n firewallDomainListId: example.id,\n firewallRuleGroupId: exampleResolverFirewallRuleGroup.id,\n priority: 100,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.route53.ResolverFirewallDomainList(\"example\",\n name=\"example\",\n domains=[\"example.com\"],\n tags={})\nexample_resolver_firewall_rule_group = aws.route53.ResolverFirewallRuleGroup(\"example\",\n name=\"example\",\n tags={})\nexample_resolver_firewall_rule = aws.route53.ResolverFirewallRule(\"example\",\n name=\"example\",\n action=\"BLOCK\",\n block_override_dns_type=\"CNAME\",\n block_override_domain=\"example.com\",\n block_override_ttl=1,\n block_response=\"OVERRIDE\",\n firewall_domain_list_id=example.id,\n firewall_rule_group_id=example_resolver_firewall_rule_group.id,\n priority=100)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Route53.ResolverFirewallDomainList(\"example\", new()\n {\n Name = \"example\",\n Domains = new[]\n {\n \"example.com\",\n },\n Tags = null,\n });\n\n var exampleResolverFirewallRuleGroup = new Aws.Route53.ResolverFirewallRuleGroup(\"example\", new()\n {\n Name = \"example\",\n Tags = null,\n });\n\n var exampleResolverFirewallRule = new Aws.Route53.ResolverFirewallRule(\"example\", new()\n {\n Name = \"example\",\n Action = \"BLOCK\",\n BlockOverrideDnsType = \"CNAME\",\n BlockOverrideDomain = \"example.com\",\n BlockOverrideTtl = 1,\n BlockResponse = \"OVERRIDE\",\n FirewallDomainListId = example.Id,\n FirewallRuleGroupId = exampleResolverFirewallRuleGroup.Id,\n Priority = 100,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := route53.NewResolverFirewallDomainList(ctx, \"example\", \u0026route53.ResolverFirewallDomainListArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tDomains: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"example.com\"),\n\t\t\t},\n\t\t\tTags: pulumi.StringMap{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleResolverFirewallRuleGroup, err := route53.NewResolverFirewallRuleGroup(ctx, \"example\", \u0026route53.ResolverFirewallRuleGroupArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tTags: pulumi.StringMap{},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewResolverFirewallRule(ctx, \"example\", \u0026route53.ResolverFirewallRuleArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tAction: pulumi.String(\"BLOCK\"),\n\t\t\tBlockOverrideDnsType: pulumi.String(\"CNAME\"),\n\t\t\tBlockOverrideDomain: pulumi.String(\"example.com\"),\n\t\t\tBlockOverrideTtl: pulumi.Int(1),\n\t\t\tBlockResponse: pulumi.String(\"OVERRIDE\"),\n\t\t\tFirewallDomainListId: example.ID(),\n\t\t\tFirewallRuleGroupId: exampleResolverFirewallRuleGroup.ID(),\n\t\t\tPriority: pulumi.Int(100),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.route53.ResolverFirewallDomainList;\nimport com.pulumi.aws.route53.ResolverFirewallDomainListArgs;\nimport com.pulumi.aws.route53.ResolverFirewallRuleGroup;\nimport com.pulumi.aws.route53.ResolverFirewallRuleGroupArgs;\nimport com.pulumi.aws.route53.ResolverFirewallRule;\nimport com.pulumi.aws.route53.ResolverFirewallRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ResolverFirewallDomainList(\"example\", ResolverFirewallDomainListArgs.builder()\n .name(\"example\")\n .domains(\"example.com\")\n .tags()\n .build());\n\n var exampleResolverFirewallRuleGroup = new ResolverFirewallRuleGroup(\"exampleResolverFirewallRuleGroup\", ResolverFirewallRuleGroupArgs.builder()\n .name(\"example\")\n .tags()\n .build());\n\n var exampleResolverFirewallRule = new ResolverFirewallRule(\"exampleResolverFirewallRule\", ResolverFirewallRuleArgs.builder()\n .name(\"example\")\n .action(\"BLOCK\")\n .blockOverrideDnsType(\"CNAME\")\n .blockOverrideDomain(\"example.com\")\n .blockOverrideTtl(1)\n .blockResponse(\"OVERRIDE\")\n .firewallDomainListId(example.id())\n .firewallRuleGroupId(exampleResolverFirewallRuleGroup.id())\n .priority(100)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:route53:ResolverFirewallDomainList\n properties:\n name: example\n domains:\n - example.com\n tags: {}\n exampleResolverFirewallRuleGroup:\n type: aws:route53:ResolverFirewallRuleGroup\n name: example\n properties:\n name: example\n tags: {}\n exampleResolverFirewallRule:\n type: aws:route53:ResolverFirewallRule\n name: example\n properties:\n name: example\n action: BLOCK\n blockOverrideDnsType: CNAME\n blockOverrideDomain: example.com\n blockOverrideTtl: 1\n blockResponse: OVERRIDE\n firewallDomainListId: ${example.id}\n firewallRuleGroupId: ${exampleResolverFirewallRuleGroup.id}\n priority: 100\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Route 53 Resolver DNS Firewall rules using the Route 53 Resolver DNS Firewall rule group ID and domain list ID separated by ':'. For example:\n\n```sh\n$ pulumi import aws:route53/resolverFirewallRule:ResolverFirewallRule example rslvr-frg-0123456789abcdef:rslvr-fdl-0123456789abcdef\n```\n", "properties": { "action": { "type": "string", @@ -338343,7 +338343,7 @@ } }, "aws:route53domains/delegationSignerRecord:DelegationSignerRecord": { - "description": "Provides a resource to manage a [delegation signer record](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec-enable-signing.html#dns-configuring-dnssec-enable-signing-step-1) in the parent DNS zone for domains registered with Route53.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n customerMasterKeySpec: \"ECC_NIST_P256\",\n deletionWindowInDays: 7,\n keyUsage: \"SIGN_VERIFY\",\n policy: JSON.stringify({\n Statement: [\n {\n Action: [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Sid: \"Allow Route 53 DNSSEC Service\",\n Resource: \"*\",\n Condition: {\n StringEquals: {\n \"aws:SourceAccount\": current.then(current =\u003e current.accountId),\n },\n ArnLike: {\n \"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n {\n Action: \"kms:CreateGrant\",\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Sid: \"Allow Route 53 DNSSEC Service to CreateGrant\",\n Resource: \"*\",\n Condition: {\n Bool: {\n \"kms:GrantIsForAWSResource\": \"true\",\n },\n },\n },\n {\n Action: \"kms:*\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Resource: \"*\",\n Sid: \"Enable IAM User Permissions\",\n },\n ],\n Version: \"2012-10-17\",\n }),\n});\nconst exampleZone = new aws.route53.Zone(\"example\", {name: \"example.com\"});\nconst exampleKeySigningKey = new aws.route53.KeySigningKey(\"example\", {\n hostedZoneId: test.id,\n keyManagementServiceArn: testAwsKmsKey.arn,\n name: \"example\",\n});\nconst exampleHostedZoneDnsSec = new aws.route53.HostedZoneDnsSec(\"example\", {hostedZoneId: exampleKeySigningKey.hostedZoneId}, {\n dependsOn: [exampleKeySigningKey],\n});\nconst exampleDelegationSignerRecord = new aws.route53domains.DelegationSignerRecord(\"example\", {\n domainName: \"example.com\",\n signingAttributes: {\n algorithm: exampleKeySigningKey.signingAlgorithmType,\n flags: exampleKeySigningKey.flag,\n publicKey: exampleKeySigningKey.publicKey,\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n customer_master_key_spec=\"ECC_NIST_P256\",\n deletion_window_in_days=7,\n key_usage=\"SIGN_VERIFY\",\n policy=json.dumps({\n \"Statement\": [\n {\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Sid\": \"Allow Route 53 DNSSEC Service\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"StringEquals\": {\n \"aws:SourceAccount\": current.account_id,\n },\n \"ArnLike\": {\n \"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n {\n \"Action\": \"kms:CreateGrant\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Sid\": \"Allow Route 53 DNSSEC Service to CreateGrant\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"kms:GrantIsForAWSResource\": \"true\",\n },\n },\n },\n {\n \"Action\": \"kms:*\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Resource\": \"*\",\n \"Sid\": \"Enable IAM User Permissions\",\n },\n ],\n \"Version\": \"2012-10-17\",\n }))\nexample_zone = aws.route53.Zone(\"example\", name=\"example.com\")\nexample_key_signing_key = aws.route53.KeySigningKey(\"example\",\n hosted_zone_id=test[\"id\"],\n key_management_service_arn=test_aws_kms_key[\"arn\"],\n name=\"example\")\nexample_hosted_zone_dns_sec = aws.route53.HostedZoneDnsSec(\"example\", hosted_zone_id=example_key_signing_key.hosted_zone_id,\nopts = pulumi.ResourceOptions(depends_on=[example_key_signing_key]))\nexample_delegation_signer_record = aws.route53domains.DelegationSignerRecord(\"example\",\n domain_name=\"example.com\",\n signing_attributes={\n \"algorithm\": example_key_signing_key.signing_algorithm_type,\n \"flags\": example_key_signing_key.flag,\n \"public_key\": example_key_signing_key.public_key,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n CustomerMasterKeySpec = \"ECC_NIST_P256\",\n DeletionWindowInDays = 7,\n KeyUsage = \"SIGN_VERIFY\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service\",\n [\"Resource\"] = \"*\",\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceAccount\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"ArnLike\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceArn\"] = \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:CreateGrant\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service to CreateGrant\",\n [\"Resource\"] = \"*\",\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Bool\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:GrantIsForAWSResource\"] = \"true\",\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:*\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Resource\"] = \"*\",\n [\"Sid\"] = \"Enable IAM User Permissions\",\n },\n },\n [\"Version\"] = \"2012-10-17\",\n }),\n });\n\n var exampleZone = new Aws.Route53.Zone(\"example\", new()\n {\n Name = \"example.com\",\n });\n\n var exampleKeySigningKey = new Aws.Route53.KeySigningKey(\"example\", new()\n {\n HostedZoneId = test.Id,\n KeyManagementServiceArn = testAwsKmsKey.Arn,\n Name = \"example\",\n });\n\n var exampleHostedZoneDnsSec = new Aws.Route53.HostedZoneDnsSec(\"example\", new()\n {\n HostedZoneId = exampleKeySigningKey.HostedZoneId,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleKeySigningKey,\n },\n });\n\n var exampleDelegationSignerRecord = new Aws.Route53Domains.DelegationSignerRecord(\"example\", new()\n {\n DomainName = \"example.com\",\n SigningAttributes = new Aws.Route53Domains.Inputs.DelegationSignerRecordSigningAttributesArgs\n {\n Algorithm = exampleKeySigningKey.SigningAlgorithmType,\n Flags = exampleKeySigningKey.Flag,\n PublicKey = exampleKeySigningKey.PublicKey,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53domains\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:GetPublicKey\",\n\t\t\t\t\t\t\"kms:Sign\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"aws:SourceAccount\": current.AccountId,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"ArnLike\": map[string]interface{}{\n\t\t\t\t\t\t\t\"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:CreateGrant\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service to CreateGrant\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"Bool\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:GrantIsForAWSResource\": \"true\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"ECC_NIST_P256\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tKeyUsage: pulumi.String(\"SIGN_VERIFY\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewZone(ctx, \"example\", \u0026route53.ZoneArgs{\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKeySigningKey, err := route53.NewKeySigningKey(ctx, \"example\", \u0026route53.KeySigningKeyArgs{\n\t\t\tHostedZoneId: pulumi.Any(test.Id),\n\t\t\tKeyManagementServiceArn: pulumi.Any(testAwsKmsKey.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewHostedZoneDnsSec(ctx, \"example\", \u0026route53.HostedZoneDnsSecArgs{\n\t\t\tHostedZoneId: exampleKeySigningKey.HostedZoneId,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleKeySigningKey,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53domains.NewDelegationSignerRecord(ctx, \"example\", \u0026route53domains.DelegationSignerRecordArgs{\n\t\t\tDomainName: pulumi.String(\"example.com\"),\n\t\t\tSigningAttributes: \u0026route53domains.DelegationSignerRecordSigningAttributesArgs{\n\t\t\t\tAlgorithm: exampleKeySigningKey.SigningAlgorithmType,\n\t\t\t\tFlags: exampleKeySigningKey.Flag,\n\t\t\t\tPublicKey: exampleKeySigningKey.PublicKey,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.route53.Zone;\nimport com.pulumi.aws.route53.ZoneArgs;\nimport com.pulumi.aws.route53.KeySigningKey;\nimport com.pulumi.aws.route53.KeySigningKeyArgs;\nimport com.pulumi.aws.route53.HostedZoneDnsSec;\nimport com.pulumi.aws.route53.HostedZoneDnsSecArgs;\nimport com.pulumi.aws.route53domains.DelegationSignerRecord;\nimport com.pulumi.aws.route53domains.DelegationSignerRecordArgs;\nimport com.pulumi.aws.route53domains.inputs.DelegationSignerRecordSigningAttributesArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .customerMasterKeySpec(\"ECC_NIST_P256\")\n .deletionWindowInDays(7)\n .keyUsage(\"SIGN_VERIFY\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:GetPublicKey\", \n \"kms:Sign\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service\"),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"aws:SourceAccount\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n )),\n jsonProperty(\"ArnLike\", jsonObject(\n jsonProperty(\"aws:SourceArn\", \"arn:aws:route53:::hostedzone/*\")\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:CreateGrant\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service to CreateGrant\"),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"Bool\", jsonObject(\n jsonProperty(\"kms:GrantIsForAWSResource\", \"true\")\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\")\n )\n )),\n jsonProperty(\"Version\", \"2012-10-17\")\n )))\n .build());\n\n var exampleZone = new Zone(\"exampleZone\", ZoneArgs.builder()\n .name(\"example.com\")\n .build());\n\n var exampleKeySigningKey = new KeySigningKey(\"exampleKeySigningKey\", KeySigningKeyArgs.builder()\n .hostedZoneId(test.id())\n .keyManagementServiceArn(testAwsKmsKey.arn())\n .name(\"example\")\n .build());\n\n var exampleHostedZoneDnsSec = new HostedZoneDnsSec(\"exampleHostedZoneDnsSec\", HostedZoneDnsSecArgs.builder()\n .hostedZoneId(exampleKeySigningKey.hostedZoneId())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleKeySigningKey)\n .build());\n\n var exampleDelegationSignerRecord = new DelegationSignerRecord(\"exampleDelegationSignerRecord\", DelegationSignerRecordArgs.builder()\n .domainName(\"example.com\")\n .signingAttributes(DelegationSignerRecordSigningAttributesArgs.builder()\n .algorithm(exampleKeySigningKey.signingAlgorithmType())\n .flags(exampleKeySigningKey.flag())\n .publicKey(exampleKeySigningKey.publicKey())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n customerMasterKeySpec: ECC_NIST_P256\n deletionWindowInDays: 7\n keyUsage: SIGN_VERIFY\n policy:\n fn::toJSON:\n Statement:\n - Action:\n - kms:DescribeKey\n - kms:GetPublicKey\n - kms:Sign\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Sid: Allow Route 53 DNSSEC Service\n Resource: '*'\n Condition:\n StringEquals:\n aws:SourceAccount: ${current.accountId}\n ArnLike:\n aws:SourceArn: arn:aws:route53:::hostedzone/*\n - Action: kms:CreateGrant\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Sid: Allow Route 53 DNSSEC Service to CreateGrant\n Resource: '*'\n Condition:\n Bool:\n kms:GrantIsForAWSResource: 'true'\n - Action: kms:*\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Resource: '*'\n Sid: Enable IAM User Permissions\n Version: 2012-10-17\n exampleZone:\n type: aws:route53:Zone\n name: example\n properties:\n name: example.com\n exampleKeySigningKey:\n type: aws:route53:KeySigningKey\n name: example\n properties:\n hostedZoneId: ${test.id}\n keyManagementServiceArn: ${testAwsKmsKey.arn}\n name: example\n exampleHostedZoneDnsSec:\n type: aws:route53:HostedZoneDnsSec\n name: example\n properties:\n hostedZoneId: ${exampleKeySigningKey.hostedZoneId}\n options:\n dependson:\n - ${exampleKeySigningKey}\n exampleDelegationSignerRecord:\n type: aws:route53domains:DelegationSignerRecord\n name: example\n properties:\n domainName: example.com\n signingAttributes:\n algorithm: ${exampleKeySigningKey.signingAlgorithmType}\n flags: ${exampleKeySigningKey.flag}\n publicKey: ${exampleKeySigningKey.publicKey}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import delegation signer records using the domain name and DNSSEC key ID, separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:route53domains/delegationSignerRecord:DelegationSignerRecord example example.com,40DE3534F5324DBDAC598ACEDB5B1E26A5368732D9C791D1347E4FBDDF6FC343\n```\n", + "description": "Provides a resource to manage a [delegation signer record](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec-enable-signing.html#dns-configuring-dnssec-enable-signing-step-1) in the parent DNS zone for domains registered with Route53.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.kms.Key(\"example\", {\n customerMasterKeySpec: \"ECC_NIST_P256\",\n deletionWindowInDays: 7,\n keyUsage: \"SIGN_VERIFY\",\n policy: JSON.stringify({\n Statement: [\n {\n Action: [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n ],\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Sid: \"Allow Route 53 DNSSEC Service\",\n Resource: \"*\",\n Condition: {\n StringEquals: {\n \"aws:SourceAccount\": current.then(current =\u003e current.accountId),\n },\n ArnLike: {\n \"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n {\n Action: \"kms:CreateGrant\",\n Effect: \"Allow\",\n Principal: {\n Service: \"dnssec-route53.amazonaws.com\",\n },\n Sid: \"Allow Route 53 DNSSEC Service to CreateGrant\",\n Resource: \"*\",\n Condition: {\n Bool: {\n \"kms:GrantIsForAWSResource\": \"true\",\n },\n },\n },\n {\n Action: \"kms:*\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e `arn:aws:iam::${current.accountId}:root`),\n },\n Resource: \"*\",\n Sid: \"Enable IAM User Permissions\",\n },\n ],\n Version: \"2012-10-17\",\n }),\n});\nconst exampleZone = new aws.route53.Zone(\"example\", {name: \"example.com\"});\nconst exampleKeySigningKey = new aws.route53.KeySigningKey(\"example\", {\n hostedZoneId: test.id,\n keyManagementServiceArn: testAwsKmsKey.arn,\n name: \"example\",\n});\nconst exampleHostedZoneDnsSec = new aws.route53.HostedZoneDnsSec(\"example\", {hostedZoneId: exampleKeySigningKey.hostedZoneId}, {\n dependsOn: [exampleKeySigningKey],\n});\nconst exampleDelegationSignerRecord = new aws.route53domains.DelegationSignerRecord(\"example\", {\n domainName: \"example.com\",\n signingAttributes: {\n algorithm: exampleKeySigningKey.signingAlgorithmType,\n flags: exampleKeySigningKey.flag,\n publicKey: exampleKeySigningKey.publicKey,\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.kms.Key(\"example\",\n customer_master_key_spec=\"ECC_NIST_P256\",\n deletion_window_in_days=7,\n key_usage=\"SIGN_VERIFY\",\n policy=json.dumps({\n \"Statement\": [\n {\n \"Action\": [\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n ],\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Sid\": \"Allow Route 53 DNSSEC Service\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"StringEquals\": {\n \"aws:SourceAccount\": current.account_id,\n },\n \"ArnLike\": {\n \"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n {\n \"Action\": \"kms:CreateGrant\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"dnssec-route53.amazonaws.com\",\n },\n \"Sid\": \"Allow Route 53 DNSSEC Service to CreateGrant\",\n \"Resource\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"kms:GrantIsForAWSResource\": \"true\",\n },\n },\n },\n {\n \"Action\": \"kms:*\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:aws:iam::{current.account_id}:root\",\n },\n \"Resource\": \"*\",\n \"Sid\": \"Enable IAM User Permissions\",\n },\n ],\n \"Version\": \"2012-10-17\",\n }))\nexample_zone = aws.route53.Zone(\"example\", name=\"example.com\")\nexample_key_signing_key = aws.route53.KeySigningKey(\"example\",\n hosted_zone_id=test[\"id\"],\n key_management_service_arn=test_aws_kms_key[\"arn\"],\n name=\"example\")\nexample_hosted_zone_dns_sec = aws.route53.HostedZoneDnsSec(\"example\", hosted_zone_id=example_key_signing_key.hosted_zone_id,\nopts = pulumi.ResourceOptions(depends_on=[example_key_signing_key]))\nexample_delegation_signer_record = aws.route53domains.DelegationSignerRecord(\"example\",\n domain_name=\"example.com\",\n signing_attributes={\n \"algorithm\": example_key_signing_key.signing_algorithm_type,\n \"flags\": example_key_signing_key.flag,\n \"public_key\": example_key_signing_key.public_key,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Kms.Key(\"example\", new()\n {\n CustomerMasterKeySpec = \"ECC_NIST_P256\",\n DeletionWindowInDays = 7,\n KeyUsage = \"SIGN_VERIFY\",\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"kms:DescribeKey\",\n \"kms:GetPublicKey\",\n \"kms:Sign\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service\",\n [\"Resource\"] = \"*\",\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"StringEquals\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceAccount\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"ArnLike\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"aws:SourceArn\"] = \"arn:aws:route53:::hostedzone/*\",\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:CreateGrant\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Service\"] = \"dnssec-route53.amazonaws.com\",\n },\n [\"Sid\"] = \"Allow Route 53 DNSSEC Service to CreateGrant\",\n [\"Resource\"] = \"*\",\n [\"Condition\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Bool\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"kms:GrantIsForAWSResource\"] = \"true\",\n },\n },\n },\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"kms:*\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n [\"Resource\"] = \"*\",\n [\"Sid\"] = \"Enable IAM User Permissions\",\n },\n },\n [\"Version\"] = \"2012-10-17\",\n }),\n });\n\n var exampleZone = new Aws.Route53.Zone(\"example\", new()\n {\n Name = \"example.com\",\n });\n\n var exampleKeySigningKey = new Aws.Route53.KeySigningKey(\"example\", new()\n {\n HostedZoneId = test.Id,\n KeyManagementServiceArn = testAwsKmsKey.Arn,\n Name = \"example\",\n });\n\n var exampleHostedZoneDnsSec = new Aws.Route53.HostedZoneDnsSec(\"example\", new()\n {\n HostedZoneId = exampleKeySigningKey.HostedZoneId,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleKeySigningKey,\n },\n });\n\n var exampleDelegationSignerRecord = new Aws.Route53Domains.DelegationSignerRecord(\"example\", new()\n {\n DomainName = \"example.com\",\n SigningAttributes = new Aws.Route53Domains.Inputs.DelegationSignerRecordSigningAttributesArgs\n {\n Algorithm = exampleKeySigningKey.SigningAlgorithmType,\n Flags = exampleKeySigningKey.Flag,\n PublicKey = exampleKeySigningKey.PublicKey,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53domains\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Statement\": []interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"kms:DescribeKey\",\n\t\t\t\t\t\t\"kms:GetPublicKey\",\n\t\t\t\t\t\t\"kms:Sign\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"StringEquals\": map[string]interface{}{\n\t\t\t\t\t\t\t\"aws:SourceAccount\": current.AccountId,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"ArnLike\": map[string]interface{}{\n\t\t\t\t\t\t\t\"aws:SourceArn\": \"arn:aws:route53:::hostedzone/*\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:CreateGrant\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"Service\": \"dnssec-route53.amazonaws.com\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"Allow Route 53 DNSSEC Service to CreateGrant\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Condition\": map[string]interface{}{\n\t\t\t\t\t\t\"Bool\": map[string]interface{}{\n\t\t\t\t\t\t\t\"kms:GrantIsForAWSResource\": \"true\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": \"kms:*\",\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t\t\"Sid\": \"Enable IAM User Permissions\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tCustomerMasterKeySpec: pulumi.String(\"ECC_NIST_P256\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tKeyUsage: pulumi.String(\"SIGN_VERIFY\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewZone(ctx, \"example\", \u0026route53.ZoneArgs{\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKeySigningKey, err := route53.NewKeySigningKey(ctx, \"example\", \u0026route53.KeySigningKeyArgs{\n\t\t\tHostedZoneId: pulumi.Any(test.Id),\n\t\t\tKeyManagementServiceArn: pulumi.Any(testAwsKmsKey.Arn),\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewHostedZoneDnsSec(ctx, \"example\", \u0026route53.HostedZoneDnsSecArgs{\n\t\t\tHostedZoneId: exampleKeySigningKey.HostedZoneId,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleKeySigningKey,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53domains.NewDelegationSignerRecord(ctx, \"example\", \u0026route53domains.DelegationSignerRecordArgs{\n\t\t\tDomainName: pulumi.String(\"example.com\"),\n\t\t\tSigningAttributes: \u0026route53domains.DelegationSignerRecordSigningAttributesArgs{\n\t\t\t\tAlgorithm: exampleKeySigningKey.SigningAlgorithmType,\n\t\t\t\tFlags: exampleKeySigningKey.Flag,\n\t\t\t\tPublicKey: exampleKeySigningKey.PublicKey,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.route53.Zone;\nimport com.pulumi.aws.route53.ZoneArgs;\nimport com.pulumi.aws.route53.KeySigningKey;\nimport com.pulumi.aws.route53.KeySigningKeyArgs;\nimport com.pulumi.aws.route53.HostedZoneDnsSec;\nimport com.pulumi.aws.route53.HostedZoneDnsSecArgs;\nimport com.pulumi.aws.route53domains.DelegationSignerRecord;\nimport com.pulumi.aws.route53domains.DelegationSignerRecordArgs;\nimport com.pulumi.aws.route53domains.inputs.DelegationSignerRecordSigningAttributesArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new Key(\"example\", KeyArgs.builder()\n .customerMasterKeySpec(\"ECC_NIST_P256\")\n .deletionWindowInDays(7)\n .keyUsage(\"SIGN_VERIFY\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Statement\", jsonArray(\n jsonObject(\n jsonProperty(\"Action\", jsonArray(\n \"kms:DescribeKey\", \n \"kms:GetPublicKey\", \n \"kms:Sign\"\n )),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service\"),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"StringEquals\", jsonObject(\n jsonProperty(\"aws:SourceAccount\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n )),\n jsonProperty(\"ArnLike\", jsonObject(\n jsonProperty(\"aws:SourceArn\", \"arn:aws:route53:::hostedzone/*\")\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:CreateGrant\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"Service\", \"dnssec-route53.amazonaws.com\")\n )),\n jsonProperty(\"Sid\", \"Allow Route 53 DNSSEC Service to CreateGrant\"),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Condition\", jsonObject(\n jsonProperty(\"Bool\", jsonObject(\n jsonProperty(\"kms:GrantIsForAWSResource\", \"true\")\n ))\n ))\n ), \n jsonObject(\n jsonProperty(\"Action\", \"kms:*\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Resource\", \"*\"),\n jsonProperty(\"Sid\", \"Enable IAM User Permissions\")\n )\n )),\n jsonProperty(\"Version\", \"2012-10-17\")\n )))\n .build());\n\n var exampleZone = new Zone(\"exampleZone\", ZoneArgs.builder()\n .name(\"example.com\")\n .build());\n\n var exampleKeySigningKey = new KeySigningKey(\"exampleKeySigningKey\", KeySigningKeyArgs.builder()\n .hostedZoneId(test.id())\n .keyManagementServiceArn(testAwsKmsKey.arn())\n .name(\"example\")\n .build());\n\n var exampleHostedZoneDnsSec = new HostedZoneDnsSec(\"exampleHostedZoneDnsSec\", HostedZoneDnsSecArgs.builder()\n .hostedZoneId(exampleKeySigningKey.hostedZoneId())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleKeySigningKey)\n .build());\n\n var exampleDelegationSignerRecord = new DelegationSignerRecord(\"exampleDelegationSignerRecord\", DelegationSignerRecordArgs.builder()\n .domainName(\"example.com\")\n .signingAttributes(DelegationSignerRecordSigningAttributesArgs.builder()\n .algorithm(exampleKeySigningKey.signingAlgorithmType())\n .flags(exampleKeySigningKey.flag())\n .publicKey(exampleKeySigningKey.publicKey())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:kms:Key\n properties:\n customerMasterKeySpec: ECC_NIST_P256\n deletionWindowInDays: 7\n keyUsage: SIGN_VERIFY\n policy:\n fn::toJSON:\n Statement:\n - Action:\n - kms:DescribeKey\n - kms:GetPublicKey\n - kms:Sign\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Sid: Allow Route 53 DNSSEC Service\n Resource: '*'\n Condition:\n StringEquals:\n aws:SourceAccount: ${current.accountId}\n ArnLike:\n aws:SourceArn: arn:aws:route53:::hostedzone/*\n - Action: kms:CreateGrant\n Effect: Allow\n Principal:\n Service: dnssec-route53.amazonaws.com\n Sid: Allow Route 53 DNSSEC Service to CreateGrant\n Resource: '*'\n Condition:\n Bool:\n kms:GrantIsForAWSResource: 'true'\n - Action: kms:*\n Effect: Allow\n Principal:\n AWS: arn:aws:iam::${current.accountId}:root\n Resource: '*'\n Sid: Enable IAM User Permissions\n Version: 2012-10-17\n exampleZone:\n type: aws:route53:Zone\n name: example\n properties:\n name: example.com\n exampleKeySigningKey:\n type: aws:route53:KeySigningKey\n name: example\n properties:\n hostedZoneId: ${test.id}\n keyManagementServiceArn: ${testAwsKmsKey.arn}\n name: example\n exampleHostedZoneDnsSec:\n type: aws:route53:HostedZoneDnsSec\n name: example\n properties:\n hostedZoneId: ${exampleKeySigningKey.hostedZoneId}\n options:\n dependson:\n - ${exampleKeySigningKey}\n exampleDelegationSignerRecord:\n type: aws:route53domains:DelegationSignerRecord\n name: example\n properties:\n domainName: example.com\n signingAttributes:\n algorithm: ${exampleKeySigningKey.signingAlgorithmType}\n flags: ${exampleKeySigningKey.flag}\n publicKey: ${exampleKeySigningKey.publicKey}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import delegation signer records using the domain name and DNSSEC key ID, separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:route53domains/delegationSignerRecord:DelegationSignerRecord example example.com,40DE3534F5324DBDAC598ACEDB5B1E26A5368732D9C791D1347E4FBDDF6FC343\n```\n", "properties": { "dnssecKeyId": { "type": "string", @@ -340558,7 +340558,7 @@ } }, "aws:s3/bucketAclV2:BucketAclV2": { - "description": "Provides an S3 bucket ACL resource.\n\n\u003e **Note:** destroy does not delete the S3 Bucket ACL but does remove the resource from state.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### With `private` ACL\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketV2(\"example\", {bucket: \"my-tf-example-bucket\"});\nconst exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls(\"example\", {\n bucket: example.id,\n rule: {\n objectOwnership: \"BucketOwnerPreferred\",\n },\n});\nconst exampleBucketAclV2 = new aws.s3.BucketAclV2(\"example\", {\n bucket: example.id,\n acl: \"private\",\n}, {\n dependsOn: [exampleBucketOwnershipControls],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"my-tf-example-bucket\")\nexample_bucket_ownership_controls = aws.s3.BucketOwnershipControls(\"example\",\n bucket=example.id,\n rule={\n \"object_ownership\": \"BucketOwnerPreferred\",\n })\nexample_bucket_acl_v2 = aws.s3.BucketAclV2(\"example\",\n bucket=example.id,\n acl=\"private\",\n opts = pulumi.ResourceOptions(depends_on=[example_bucket_ownership_controls]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-tf-example-bucket\",\n });\n\n var exampleBucketOwnershipControls = new Aws.S3.BucketOwnershipControls(\"example\", new()\n {\n Bucket = example.Id,\n Rule = new Aws.S3.Inputs.BucketOwnershipControlsRuleArgs\n {\n ObjectOwnership = \"BucketOwnerPreferred\",\n },\n });\n\n var exampleBucketAclV2 = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = example.Id,\n Acl = \"private\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketOwnershipControls,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-tf-example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketOwnershipControls, err := s3.NewBucketOwnershipControls(ctx, \"example\", \u0026s3.BucketOwnershipControlsArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tRule: \u0026s3.BucketOwnershipControlsRuleArgs{\n\t\t\t\tObjectOwnership: pulumi.String(\"BucketOwnerPreferred\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketOwnershipControls,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketOwnershipControls;\nimport com.pulumi.aws.s3.BucketOwnershipControlsArgs;\nimport com.pulumi.aws.s3.inputs.BucketOwnershipControlsRuleArgs;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"my-tf-example-bucket\")\n .build());\n\n var exampleBucketOwnershipControls = new BucketOwnershipControls(\"exampleBucketOwnershipControls\", BucketOwnershipControlsArgs.builder()\n .bucket(example.id())\n .rule(BucketOwnershipControlsRuleArgs.builder()\n .objectOwnership(\"BucketOwnerPreferred\")\n .build())\n .build());\n\n var exampleBucketAclV2 = new BucketAclV2(\"exampleBucketAclV2\", BucketAclV2Args.builder()\n .bucket(example.id())\n .acl(\"private\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleBucketOwnershipControls)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: my-tf-example-bucket\n exampleBucketOwnershipControls:\n type: aws:s3:BucketOwnershipControls\n name: example\n properties:\n bucket: ${example.id}\n rule:\n objectOwnership: BucketOwnerPreferred\n exampleBucketAclV2:\n type: aws:s3:BucketAclV2\n name: example\n properties:\n bucket: ${example.id}\n acl: private\n options:\n dependson:\n - ${exampleBucketOwnershipControls}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With `public-read` ACL\n\n\u003e This example explicitly disables the default S3 bucket security settings. This\nshould be done with caution, as all bucket objects become publicly exposed.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketV2(\"example\", {bucket: \"my-tf-example-bucket\"});\nconst exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls(\"example\", {\n bucket: example.id,\n rule: {\n objectOwnership: \"BucketOwnerPreferred\",\n },\n});\nconst exampleBucketPublicAccessBlock = new aws.s3.BucketPublicAccessBlock(\"example\", {\n bucket: example.id,\n blockPublicAcls: false,\n blockPublicPolicy: false,\n ignorePublicAcls: false,\n restrictPublicBuckets: false,\n});\nconst exampleBucketAclV2 = new aws.s3.BucketAclV2(\"example\", {\n bucket: example.id,\n acl: \"public-read\",\n}, {\n dependsOn: [\n exampleBucketOwnershipControls,\n exampleBucketPublicAccessBlock,\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"my-tf-example-bucket\")\nexample_bucket_ownership_controls = aws.s3.BucketOwnershipControls(\"example\",\n bucket=example.id,\n rule={\n \"object_ownership\": \"BucketOwnerPreferred\",\n })\nexample_bucket_public_access_block = aws.s3.BucketPublicAccessBlock(\"example\",\n bucket=example.id,\n block_public_acls=False,\n block_public_policy=False,\n ignore_public_acls=False,\n restrict_public_buckets=False)\nexample_bucket_acl_v2 = aws.s3.BucketAclV2(\"example\",\n bucket=example.id,\n acl=\"public-read\",\n opts = pulumi.ResourceOptions(depends_on=[\n example_bucket_ownership_controls,\n example_bucket_public_access_block,\n ]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-tf-example-bucket\",\n });\n\n var exampleBucketOwnershipControls = new Aws.S3.BucketOwnershipControls(\"example\", new()\n {\n Bucket = example.Id,\n Rule = new Aws.S3.Inputs.BucketOwnershipControlsRuleArgs\n {\n ObjectOwnership = \"BucketOwnerPreferred\",\n },\n });\n\n var exampleBucketPublicAccessBlock = new Aws.S3.BucketPublicAccessBlock(\"example\", new()\n {\n Bucket = example.Id,\n BlockPublicAcls = false,\n BlockPublicPolicy = false,\n IgnorePublicAcls = false,\n RestrictPublicBuckets = false,\n });\n\n var exampleBucketAclV2 = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = example.Id,\n Acl = \"public-read\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketOwnershipControls,\n exampleBucketPublicAccessBlock,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-tf-example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketOwnershipControls, err := s3.NewBucketOwnershipControls(ctx, \"example\", \u0026s3.BucketOwnershipControlsArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tRule: \u0026s3.BucketOwnershipControlsRuleArgs{\n\t\t\t\tObjectOwnership: pulumi.String(\"BucketOwnerPreferred\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketPublicAccessBlock, err := s3.NewBucketPublicAccessBlock(ctx, \"example\", \u0026s3.BucketPublicAccessBlockArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tBlockPublicAcls: pulumi.Bool(false),\n\t\t\tBlockPublicPolicy: pulumi.Bool(false),\n\t\t\tIgnorePublicAcls: pulumi.Bool(false),\n\t\t\tRestrictPublicBuckets: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tAcl: pulumi.String(\"public-read\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketOwnershipControls,\n\t\t\texampleBucketPublicAccessBlock,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketOwnershipControls;\nimport com.pulumi.aws.s3.BucketOwnershipControlsArgs;\nimport com.pulumi.aws.s3.inputs.BucketOwnershipControlsRuleArgs;\nimport com.pulumi.aws.s3.BucketPublicAccessBlock;\nimport com.pulumi.aws.s3.BucketPublicAccessBlockArgs;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"my-tf-example-bucket\")\n .build());\n\n var exampleBucketOwnershipControls = new BucketOwnershipControls(\"exampleBucketOwnershipControls\", BucketOwnershipControlsArgs.builder()\n .bucket(example.id())\n .rule(BucketOwnershipControlsRuleArgs.builder()\n .objectOwnership(\"BucketOwnerPreferred\")\n .build())\n .build());\n\n var exampleBucketPublicAccessBlock = new BucketPublicAccessBlock(\"exampleBucketPublicAccessBlock\", BucketPublicAccessBlockArgs.builder()\n .bucket(example.id())\n .blockPublicAcls(false)\n .blockPublicPolicy(false)\n .ignorePublicAcls(false)\n .restrictPublicBuckets(false)\n .build());\n\n var exampleBucketAclV2 = new BucketAclV2(\"exampleBucketAclV2\", BucketAclV2Args.builder()\n .bucket(example.id())\n .acl(\"public-read\")\n .build(), CustomResourceOptions.builder()\n .dependsOn( \n exampleBucketOwnershipControls,\n exampleBucketPublicAccessBlock)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: my-tf-example-bucket\n exampleBucketOwnershipControls:\n type: aws:s3:BucketOwnershipControls\n name: example\n properties:\n bucket: ${example.id}\n rule:\n objectOwnership: BucketOwnerPreferred\n exampleBucketPublicAccessBlock:\n type: aws:s3:BucketPublicAccessBlock\n name: example\n properties:\n bucket: ${example.id}\n blockPublicAcls: false\n blockPublicPolicy: false\n ignorePublicAcls: false\n restrictPublicBuckets: false\n exampleBucketAclV2:\n type: aws:s3:BucketAclV2\n name: example\n properties:\n bucket: ${example.id}\n acl: public-read\n options:\n dependson:\n - ${exampleBucketOwnershipControls}\n - ${exampleBucketPublicAccessBlock}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Grants\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.s3.getCanonicalUserId({});\nconst example = new aws.s3.BucketV2(\"example\", {bucket: \"my-tf-example-bucket\"});\nconst exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls(\"example\", {\n bucket: example.id,\n rule: {\n objectOwnership: \"BucketOwnerPreferred\",\n },\n});\nconst exampleBucketAclV2 = new aws.s3.BucketAclV2(\"example\", {\n bucket: example.id,\n accessControlPolicy: {\n grants: [\n {\n grantee: {\n id: current.then(current =\u003e current.id),\n type: \"CanonicalUser\",\n },\n permission: \"READ\",\n },\n {\n grantee: {\n type: \"Group\",\n uri: \"http://acs.amazonaws.com/groups/s3/LogDelivery\",\n },\n permission: \"READ_ACP\",\n },\n ],\n owner: {\n id: current.then(current =\u003e current.id),\n },\n },\n}, {\n dependsOn: [exampleBucketOwnershipControls],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.s3.get_canonical_user_id()\nexample = aws.s3.BucketV2(\"example\", bucket=\"my-tf-example-bucket\")\nexample_bucket_ownership_controls = aws.s3.BucketOwnershipControls(\"example\",\n bucket=example.id,\n rule={\n \"object_ownership\": \"BucketOwnerPreferred\",\n })\nexample_bucket_acl_v2 = aws.s3.BucketAclV2(\"example\",\n bucket=example.id,\n access_control_policy={\n \"grants\": [\n {\n \"grantee\": {\n \"id\": current.id,\n \"type\": \"CanonicalUser\",\n },\n \"permission\": \"READ\",\n },\n {\n \"grantee\": {\n \"type\": \"Group\",\n \"uri\": \"http://acs.amazonaws.com/groups/s3/LogDelivery\",\n },\n \"permission\": \"READ_ACP\",\n },\n ],\n \"owner\": {\n \"id\": current.id,\n },\n },\n opts = pulumi.ResourceOptions(depends_on=[example_bucket_ownership_controls]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.S3.GetCanonicalUserId.Invoke();\n\n var example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-tf-example-bucket\",\n });\n\n var exampleBucketOwnershipControls = new Aws.S3.BucketOwnershipControls(\"example\", new()\n {\n Bucket = example.Id,\n Rule = new Aws.S3.Inputs.BucketOwnershipControlsRuleArgs\n {\n ObjectOwnership = \"BucketOwnerPreferred\",\n },\n });\n\n var exampleBucketAclV2 = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = example.Id,\n AccessControlPolicy = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyArgs\n {\n Grants = new[]\n {\n new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantArgs\n {\n Grantee = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantGranteeArgs\n {\n Id = current.Apply(getCanonicalUserIdResult =\u003e getCanonicalUserIdResult.Id),\n Type = \"CanonicalUser\",\n },\n Permission = \"READ\",\n },\n new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantArgs\n {\n Grantee = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantGranteeArgs\n {\n Type = \"Group\",\n Uri = \"http://acs.amazonaws.com/groups/s3/LogDelivery\",\n },\n Permission = \"READ_ACP\",\n },\n },\n Owner = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyOwnerArgs\n {\n Id = current.Apply(getCanonicalUserIdResult =\u003e getCanonicalUserIdResult.Id),\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketOwnershipControls,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := s3.GetCanonicalUserId(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-tf-example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketOwnershipControls, err := s3.NewBucketOwnershipControls(ctx, \"example\", \u0026s3.BucketOwnershipControlsArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tRule: \u0026s3.BucketOwnershipControlsRuleArgs{\n\t\t\t\tObjectOwnership: pulumi.String(\"BucketOwnerPreferred\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tAccessControlPolicy: \u0026s3.BucketAclV2AccessControlPolicyArgs{\n\t\t\t\tGrants: s3.BucketAclV2AccessControlPolicyGrantArray{\n\t\t\t\t\t\u0026s3.BucketAclV2AccessControlPolicyGrantArgs{\n\t\t\t\t\t\tGrantee: \u0026s3.BucketAclV2AccessControlPolicyGrantGranteeArgs{\n\t\t\t\t\t\t\tId: pulumi.String(current.Id),\n\t\t\t\t\t\t\tType: pulumi.String(\"CanonicalUser\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPermission: pulumi.String(\"READ\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026s3.BucketAclV2AccessControlPolicyGrantArgs{\n\t\t\t\t\t\tGrantee: \u0026s3.BucketAclV2AccessControlPolicyGrantGranteeArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Group\"),\n\t\t\t\t\t\t\tUri: pulumi.String(\"http://acs.amazonaws.com/groups/s3/LogDelivery\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPermission: pulumi.String(\"READ_ACP\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tOwner: \u0026s3.BucketAclV2AccessControlPolicyOwnerArgs{\n\t\t\t\t\tId: pulumi.String(current.Id),\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketOwnershipControls,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketOwnershipControls;\nimport com.pulumi.aws.s3.BucketOwnershipControlsArgs;\nimport com.pulumi.aws.s3.inputs.BucketOwnershipControlsRuleArgs;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.inputs.BucketAclV2AccessControlPolicyArgs;\nimport com.pulumi.aws.s3.inputs.BucketAclV2AccessControlPolicyOwnerArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = S3Functions.getCanonicalUserId();\n\n var example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"my-tf-example-bucket\")\n .build());\n\n var exampleBucketOwnershipControls = new BucketOwnershipControls(\"exampleBucketOwnershipControls\", BucketOwnershipControlsArgs.builder()\n .bucket(example.id())\n .rule(BucketOwnershipControlsRuleArgs.builder()\n .objectOwnership(\"BucketOwnerPreferred\")\n .build())\n .build());\n\n var exampleBucketAclV2 = new BucketAclV2(\"exampleBucketAclV2\", BucketAclV2Args.builder()\n .bucket(example.id())\n .accessControlPolicy(BucketAclV2AccessControlPolicyArgs.builder()\n .grants( \n BucketAclV2AccessControlPolicyGrantArgs.builder()\n .grantee(BucketAclV2AccessControlPolicyGrantGranteeArgs.builder()\n .id(current.applyValue(getCanonicalUserIdResult -\u003e getCanonicalUserIdResult.id()))\n .type(\"CanonicalUser\")\n .build())\n .permission(\"READ\")\n .build(),\n BucketAclV2AccessControlPolicyGrantArgs.builder()\n .grantee(BucketAclV2AccessControlPolicyGrantGranteeArgs.builder()\n .type(\"Group\")\n .uri(\"http://acs.amazonaws.com/groups/s3/LogDelivery\")\n .build())\n .permission(\"READ_ACP\")\n .build())\n .owner(BucketAclV2AccessControlPolicyOwnerArgs.builder()\n .id(current.applyValue(getCanonicalUserIdResult -\u003e getCanonicalUserIdResult.id()))\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleBucketOwnershipControls)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: my-tf-example-bucket\n exampleBucketOwnershipControls:\n type: aws:s3:BucketOwnershipControls\n name: example\n properties:\n bucket: ${example.id}\n rule:\n objectOwnership: BucketOwnerPreferred\n exampleBucketAclV2:\n type: aws:s3:BucketAclV2\n name: example\n properties:\n bucket: ${example.id}\n accessControlPolicy:\n grants:\n - grantee:\n id: ${current.id}\n type: CanonicalUser\n permission: READ\n - grantee:\n type: Group\n uri: http://acs.amazonaws.com/groups/s3/LogDelivery\n permission: READ_ACP\n owner:\n id: ${current.id}\n options:\n dependson:\n - ${exampleBucketOwnershipControls}\nvariables:\n current:\n fn::invoke:\n Function: aws:s3:getCanonicalUserId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nIf the owner (account ID) of the source bucket is the _same_ account used to configure the AWS Provider, and the source bucket is __configured__ with a\n[canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), import using the `bucket` and `acl` separated by a comma (`,`):\n\nIf the owner (account ID) of the source bucket _differs_ from the account used to configure the AWS Provider, and the source bucket is __not configured__ with a [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), imported using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):\n\nIf the owner (account ID) of the source bucket _differs_ from the account used to configure the AWS Provider, and the source bucket is __configured__ with a\n[canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), imported using the `bucket`, `expected_bucket_owner`, and `acl` separated by commas (`,`):\n\n__Using `pulumi import` to import__ using `bucket`, `expected_bucket_owner`, and/or `acl`, depending on your situation. For example:\n\nIf the owner (account ID) of the source bucket is the _same_ account used to configure the AWS Provider, and the source bucket is __not configured__ with a\n[canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), import using the `bucket`:\n\n```sh\n$ pulumi import aws:s3/bucketAclV2:BucketAclV2 example bucket-name\n```\nIf the owner (account ID) of the source bucket is the _same_ account used to configure the AWS Provider, and the source bucket is __configured__ with a [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), import using the `bucket` and `acl` separated by a comma (`,`):\n\n```sh\n$ pulumi import aws:s3/bucketAclV2:BucketAclV2 example bucket-name,private\n```\nIf the owner (account ID) of the source bucket _differs_ from the account used to configure the AWS Provider, and the source bucket is __not configured__ with a [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), imported using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):\n\n```sh\n$ pulumi import aws:s3/bucketAclV2:BucketAclV2 example bucket-name,123456789012\n```\nIf the owner (account ID) of the source bucket _differs_ from the account used to configure the AWS Provider, and the source bucket is __configured__ with a [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), imported using the `bucket`, `expected_bucket_owner`, and `acl` separated by commas (`,`):\n\n```sh\n$ pulumi import aws:s3/bucketAclV2:BucketAclV2 example bucket-name,123456789012,private\n```\n", + "description": "Provides an S3 bucket ACL resource.\n\n\u003e **Note:** destroy does not delete the S3 Bucket ACL but does remove the resource from state.\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### With `private` ACL\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketV2(\"example\", {bucket: \"my-tf-example-bucket\"});\nconst exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls(\"example\", {\n bucket: example.id,\n rule: {\n objectOwnership: \"BucketOwnerPreferred\",\n },\n});\nconst exampleBucketAclV2 = new aws.s3.BucketAclV2(\"example\", {\n bucket: example.id,\n acl: \"private\",\n}, {\n dependsOn: [exampleBucketOwnershipControls],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"my-tf-example-bucket\")\nexample_bucket_ownership_controls = aws.s3.BucketOwnershipControls(\"example\",\n bucket=example.id,\n rule={\n \"object_ownership\": \"BucketOwnerPreferred\",\n })\nexample_bucket_acl_v2 = aws.s3.BucketAclV2(\"example\",\n bucket=example.id,\n acl=\"private\",\n opts = pulumi.ResourceOptions(depends_on=[example_bucket_ownership_controls]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-tf-example-bucket\",\n });\n\n var exampleBucketOwnershipControls = new Aws.S3.BucketOwnershipControls(\"example\", new()\n {\n Bucket = example.Id,\n Rule = new Aws.S3.Inputs.BucketOwnershipControlsRuleArgs\n {\n ObjectOwnership = \"BucketOwnerPreferred\",\n },\n });\n\n var exampleBucketAclV2 = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = example.Id,\n Acl = \"private\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketOwnershipControls,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-tf-example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketOwnershipControls, err := s3.NewBucketOwnershipControls(ctx, \"example\", \u0026s3.BucketOwnershipControlsArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tRule: \u0026s3.BucketOwnershipControlsRuleArgs{\n\t\t\t\tObjectOwnership: pulumi.String(\"BucketOwnerPreferred\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketOwnershipControls,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketOwnershipControls;\nimport com.pulumi.aws.s3.BucketOwnershipControlsArgs;\nimport com.pulumi.aws.s3.inputs.BucketOwnershipControlsRuleArgs;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"my-tf-example-bucket\")\n .build());\n\n var exampleBucketOwnershipControls = new BucketOwnershipControls(\"exampleBucketOwnershipControls\", BucketOwnershipControlsArgs.builder()\n .bucket(example.id())\n .rule(BucketOwnershipControlsRuleArgs.builder()\n .objectOwnership(\"BucketOwnerPreferred\")\n .build())\n .build());\n\n var exampleBucketAclV2 = new BucketAclV2(\"exampleBucketAclV2\", BucketAclV2Args.builder()\n .bucket(example.id())\n .acl(\"private\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleBucketOwnershipControls)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: my-tf-example-bucket\n exampleBucketOwnershipControls:\n type: aws:s3:BucketOwnershipControls\n name: example\n properties:\n bucket: ${example.id}\n rule:\n objectOwnership: BucketOwnerPreferred\n exampleBucketAclV2:\n type: aws:s3:BucketAclV2\n name: example\n properties:\n bucket: ${example.id}\n acl: private\n options:\n dependson:\n - ${exampleBucketOwnershipControls}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With `public-read` ACL\n\n\u003e This example explicitly disables the default S3 bucket security settings. This\nshould be done with caution, as all bucket objects become publicly exposed.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketV2(\"example\", {bucket: \"my-tf-example-bucket\"});\nconst exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls(\"example\", {\n bucket: example.id,\n rule: {\n objectOwnership: \"BucketOwnerPreferred\",\n },\n});\nconst exampleBucketPublicAccessBlock = new aws.s3.BucketPublicAccessBlock(\"example\", {\n bucket: example.id,\n blockPublicAcls: false,\n blockPublicPolicy: false,\n ignorePublicAcls: false,\n restrictPublicBuckets: false,\n});\nconst exampleBucketAclV2 = new aws.s3.BucketAclV2(\"example\", {\n bucket: example.id,\n acl: \"public-read\",\n}, {\n dependsOn: [\n exampleBucketOwnershipControls,\n exampleBucketPublicAccessBlock,\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketV2(\"example\", bucket=\"my-tf-example-bucket\")\nexample_bucket_ownership_controls = aws.s3.BucketOwnershipControls(\"example\",\n bucket=example.id,\n rule={\n \"object_ownership\": \"BucketOwnerPreferred\",\n })\nexample_bucket_public_access_block = aws.s3.BucketPublicAccessBlock(\"example\",\n bucket=example.id,\n block_public_acls=False,\n block_public_policy=False,\n ignore_public_acls=False,\n restrict_public_buckets=False)\nexample_bucket_acl_v2 = aws.s3.BucketAclV2(\"example\",\n bucket=example.id,\n acl=\"public-read\",\n opts = pulumi.ResourceOptions(depends_on=[\n example_bucket_ownership_controls,\n example_bucket_public_access_block,\n ]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-tf-example-bucket\",\n });\n\n var exampleBucketOwnershipControls = new Aws.S3.BucketOwnershipControls(\"example\", new()\n {\n Bucket = example.Id,\n Rule = new Aws.S3.Inputs.BucketOwnershipControlsRuleArgs\n {\n ObjectOwnership = \"BucketOwnerPreferred\",\n },\n });\n\n var exampleBucketPublicAccessBlock = new Aws.S3.BucketPublicAccessBlock(\"example\", new()\n {\n Bucket = example.Id,\n BlockPublicAcls = false,\n BlockPublicPolicy = false,\n IgnorePublicAcls = false,\n RestrictPublicBuckets = false,\n });\n\n var exampleBucketAclV2 = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = example.Id,\n Acl = \"public-read\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketOwnershipControls,\n exampleBucketPublicAccessBlock,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-tf-example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketOwnershipControls, err := s3.NewBucketOwnershipControls(ctx, \"example\", \u0026s3.BucketOwnershipControlsArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tRule: \u0026s3.BucketOwnershipControlsRuleArgs{\n\t\t\t\tObjectOwnership: pulumi.String(\"BucketOwnerPreferred\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketPublicAccessBlock, err := s3.NewBucketPublicAccessBlock(ctx, \"example\", \u0026s3.BucketPublicAccessBlockArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tBlockPublicAcls: pulumi.Bool(false),\n\t\t\tBlockPublicPolicy: pulumi.Bool(false),\n\t\t\tIgnorePublicAcls: pulumi.Bool(false),\n\t\t\tRestrictPublicBuckets: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tAcl: pulumi.String(\"public-read\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketOwnershipControls,\n\t\t\texampleBucketPublicAccessBlock,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketOwnershipControls;\nimport com.pulumi.aws.s3.BucketOwnershipControlsArgs;\nimport com.pulumi.aws.s3.inputs.BucketOwnershipControlsRuleArgs;\nimport com.pulumi.aws.s3.BucketPublicAccessBlock;\nimport com.pulumi.aws.s3.BucketPublicAccessBlockArgs;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"my-tf-example-bucket\")\n .build());\n\n var exampleBucketOwnershipControls = new BucketOwnershipControls(\"exampleBucketOwnershipControls\", BucketOwnershipControlsArgs.builder()\n .bucket(example.id())\n .rule(BucketOwnershipControlsRuleArgs.builder()\n .objectOwnership(\"BucketOwnerPreferred\")\n .build())\n .build());\n\n var exampleBucketPublicAccessBlock = new BucketPublicAccessBlock(\"exampleBucketPublicAccessBlock\", BucketPublicAccessBlockArgs.builder()\n .bucket(example.id())\n .blockPublicAcls(false)\n .blockPublicPolicy(false)\n .ignorePublicAcls(false)\n .restrictPublicBuckets(false)\n .build());\n\n var exampleBucketAclV2 = new BucketAclV2(\"exampleBucketAclV2\", BucketAclV2Args.builder()\n .bucket(example.id())\n .acl(\"public-read\")\n .build(), CustomResourceOptions.builder()\n .dependsOn( \n exampleBucketOwnershipControls,\n exampleBucketPublicAccessBlock)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: my-tf-example-bucket\n exampleBucketOwnershipControls:\n type: aws:s3:BucketOwnershipControls\n name: example\n properties:\n bucket: ${example.id}\n rule:\n objectOwnership: BucketOwnerPreferred\n exampleBucketPublicAccessBlock:\n type: aws:s3:BucketPublicAccessBlock\n name: example\n properties:\n bucket: ${example.id}\n blockPublicAcls: false\n blockPublicPolicy: false\n ignorePublicAcls: false\n restrictPublicBuckets: false\n exampleBucketAclV2:\n type: aws:s3:BucketAclV2\n name: example\n properties:\n bucket: ${example.id}\n acl: public-read\n options:\n dependson:\n - ${exampleBucketOwnershipControls}\n - ${exampleBucketPublicAccessBlock}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Grants\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.s3.getCanonicalUserId({});\nconst example = new aws.s3.BucketV2(\"example\", {bucket: \"my-tf-example-bucket\"});\nconst exampleBucketOwnershipControls = new aws.s3.BucketOwnershipControls(\"example\", {\n bucket: example.id,\n rule: {\n objectOwnership: \"BucketOwnerPreferred\",\n },\n});\nconst exampleBucketAclV2 = new aws.s3.BucketAclV2(\"example\", {\n bucket: example.id,\n accessControlPolicy: {\n grants: [\n {\n grantee: {\n id: current.then(current =\u003e current.id),\n type: \"CanonicalUser\",\n },\n permission: \"READ\",\n },\n {\n grantee: {\n type: \"Group\",\n uri: \"http://acs.amazonaws.com/groups/s3/LogDelivery\",\n },\n permission: \"READ_ACP\",\n },\n ],\n owner: {\n id: current.then(current =\u003e current.id),\n },\n },\n}, {\n dependsOn: [exampleBucketOwnershipControls],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.s3.get_canonical_user_id()\nexample = aws.s3.BucketV2(\"example\", bucket=\"my-tf-example-bucket\")\nexample_bucket_ownership_controls = aws.s3.BucketOwnershipControls(\"example\",\n bucket=example.id,\n rule={\n \"object_ownership\": \"BucketOwnerPreferred\",\n })\nexample_bucket_acl_v2 = aws.s3.BucketAclV2(\"example\",\n bucket=example.id,\n access_control_policy={\n \"grants\": [\n {\n \"grantee\": {\n \"id\": current.id,\n \"type\": \"CanonicalUser\",\n },\n \"permission\": \"READ\",\n },\n {\n \"grantee\": {\n \"type\": \"Group\",\n \"uri\": \"http://acs.amazonaws.com/groups/s3/LogDelivery\",\n },\n \"permission\": \"READ_ACP\",\n },\n ],\n \"owner\": {\n \"id\": current.id,\n },\n },\n opts = pulumi.ResourceOptions(depends_on=[example_bucket_ownership_controls]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.S3.GetCanonicalUserId.Invoke();\n\n var example = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-tf-example-bucket\",\n });\n\n var exampleBucketOwnershipControls = new Aws.S3.BucketOwnershipControls(\"example\", new()\n {\n Bucket = example.Id,\n Rule = new Aws.S3.Inputs.BucketOwnershipControlsRuleArgs\n {\n ObjectOwnership = \"BucketOwnerPreferred\",\n },\n });\n\n var exampleBucketAclV2 = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = example.Id,\n AccessControlPolicy = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyArgs\n {\n Grants = new[]\n {\n new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantArgs\n {\n Grantee = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantGranteeArgs\n {\n Id = current.Apply(getCanonicalUserIdResult =\u003e getCanonicalUserIdResult.Id),\n Type = \"CanonicalUser\",\n },\n Permission = \"READ\",\n },\n new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantArgs\n {\n Grantee = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantGranteeArgs\n {\n Type = \"Group\",\n Uri = \"http://acs.amazonaws.com/groups/s3/LogDelivery\",\n },\n Permission = \"READ_ACP\",\n },\n },\n Owner = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyOwnerArgs\n {\n Id = current.Apply(getCanonicalUserIdResult =\u003e getCanonicalUserIdResult.Id),\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketOwnershipControls,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := s3.GetCanonicalUserId(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-tf-example-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketOwnershipControls, err := s3.NewBucketOwnershipControls(ctx, \"example\", \u0026s3.BucketOwnershipControlsArgs{\n\t\t\tBucket: example.ID(),\n\t\t\tRule: \u0026s3.BucketOwnershipControlsRuleArgs{\n\t\t\t\tObjectOwnership: pulumi.String(\"BucketOwnerPreferred\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: example.ID(),\n\t\t\tAccessControlPolicy: \u0026s3.BucketAclV2AccessControlPolicyArgs{\n\t\t\t\tGrants: s3.BucketAclV2AccessControlPolicyGrantArray{\n\t\t\t\t\t\u0026s3.BucketAclV2AccessControlPolicyGrantArgs{\n\t\t\t\t\t\tGrantee: \u0026s3.BucketAclV2AccessControlPolicyGrantGranteeArgs{\n\t\t\t\t\t\t\tId: pulumi.String(current.Id),\n\t\t\t\t\t\t\tType: pulumi.String(\"CanonicalUser\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPermission: pulumi.String(\"READ\"),\n\t\t\t\t\t},\n\t\t\t\t\t\u0026s3.BucketAclV2AccessControlPolicyGrantArgs{\n\t\t\t\t\t\tGrantee: \u0026s3.BucketAclV2AccessControlPolicyGrantGranteeArgs{\n\t\t\t\t\t\t\tType: pulumi.String(\"Group\"),\n\t\t\t\t\t\t\tUri: pulumi.String(\"http://acs.amazonaws.com/groups/s3/LogDelivery\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPermission: pulumi.String(\"READ_ACP\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tOwner: \u0026s3.BucketAclV2AccessControlPolicyOwnerArgs{\n\t\t\t\t\tId: pulumi.String(current.Id),\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketOwnershipControls,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketOwnershipControls;\nimport com.pulumi.aws.s3.BucketOwnershipControlsArgs;\nimport com.pulumi.aws.s3.inputs.BucketOwnershipControlsRuleArgs;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.inputs.BucketAclV2AccessControlPolicyArgs;\nimport com.pulumi.aws.s3.inputs.BucketAclV2AccessControlPolicyOwnerArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = S3Functions.getCanonicalUserId();\n\n var example = new BucketV2(\"example\", BucketV2Args.builder()\n .bucket(\"my-tf-example-bucket\")\n .build());\n\n var exampleBucketOwnershipControls = new BucketOwnershipControls(\"exampleBucketOwnershipControls\", BucketOwnershipControlsArgs.builder()\n .bucket(example.id())\n .rule(BucketOwnershipControlsRuleArgs.builder()\n .objectOwnership(\"BucketOwnerPreferred\")\n .build())\n .build());\n\n var exampleBucketAclV2 = new BucketAclV2(\"exampleBucketAclV2\", BucketAclV2Args.builder()\n .bucket(example.id())\n .accessControlPolicy(BucketAclV2AccessControlPolicyArgs.builder()\n .grants( \n BucketAclV2AccessControlPolicyGrantArgs.builder()\n .grantee(BucketAclV2AccessControlPolicyGrantGranteeArgs.builder()\n .id(current.applyValue(getCanonicalUserIdResult -\u003e getCanonicalUserIdResult.id()))\n .type(\"CanonicalUser\")\n .build())\n .permission(\"READ\")\n .build(),\n BucketAclV2AccessControlPolicyGrantArgs.builder()\n .grantee(BucketAclV2AccessControlPolicyGrantGranteeArgs.builder()\n .type(\"Group\")\n .uri(\"http://acs.amazonaws.com/groups/s3/LogDelivery\")\n .build())\n .permission(\"READ_ACP\")\n .build())\n .owner(BucketAclV2AccessControlPolicyOwnerArgs.builder()\n .id(current.applyValue(getCanonicalUserIdResult -\u003e getCanonicalUserIdResult.id()))\n .build())\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleBucketOwnershipControls)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketV2\n properties:\n bucket: my-tf-example-bucket\n exampleBucketOwnershipControls:\n type: aws:s3:BucketOwnershipControls\n name: example\n properties:\n bucket: ${example.id}\n rule:\n objectOwnership: BucketOwnerPreferred\n exampleBucketAclV2:\n type: aws:s3:BucketAclV2\n name: example\n properties:\n bucket: ${example.id}\n accessControlPolicy:\n grants:\n - grantee:\n id: ${current.id}\n type: CanonicalUser\n permission: READ\n - grantee:\n type: Group\n uri: http://acs.amazonaws.com/groups/s3/LogDelivery\n permission: READ_ACP\n owner:\n id: ${current.id}\n options:\n dependson:\n - ${exampleBucketOwnershipControls}\nvariables:\n current:\n fn::invoke:\n Function: aws:s3:getCanonicalUserId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nIf the owner (account ID) of the source bucket is the _same_ account used to configure the AWS Provider, and the source bucket is __configured__ with a\n[canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), import using the `bucket` and `acl` separated by a comma (`,`):\n\nIf the owner (account ID) of the source bucket _differs_ from the account used to configure the AWS Provider, and the source bucket is __not configured__ with a [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), imported using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):\n\nIf the owner (account ID) of the source bucket _differs_ from the account used to configure the AWS Provider, and the source bucket is __configured__ with a\n[canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), imported using the `bucket`, `expected_bucket_owner`, and `acl` separated by commas (`,`):\n\n__Using `pulumi import` to import__ using `bucket`, `expected_bucket_owner`, and/or `acl`, depending on your situation. For example:\n\nIf the owner (account ID) of the source bucket is the _same_ account used to configure the AWS Provider, and the source bucket is __not configured__ with a\n[canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), import using the `bucket`:\n\n```sh\n$ pulumi import aws:s3/bucketAclV2:BucketAclV2 example bucket-name\n```\nIf the owner (account ID) of the source bucket is the _same_ account used to configure the AWS Provider, and the source bucket is __configured__ with a [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), import using the `bucket` and `acl` separated by a comma (`,`):\n\n```sh\n$ pulumi import aws:s3/bucketAclV2:BucketAclV2 example bucket-name,private\n```\nIf the owner (account ID) of the source bucket _differs_ from the account used to configure the AWS Provider, and the source bucket is __not configured__ with a [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), imported using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):\n\n```sh\n$ pulumi import aws:s3/bucketAclV2:BucketAclV2 example bucket-name,123456789012\n```\nIf the owner (account ID) of the source bucket _differs_ from the account used to configure the AWS Provider, and the source bucket is __configured__ with a [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) (i.e. predefined grant), imported using the `bucket`, `expected_bucket_owner`, and `acl` separated by commas (`,`):\n\n```sh\n$ pulumi import aws:s3/bucketAclV2:BucketAclV2 example bucket-name,123456789012,private\n```\n", "properties": { "accessControlPolicy": { "$ref": "#/types/aws:s3/BucketAclV2AccessControlPolicy:BucketAclV2AccessControlPolicy", @@ -340795,7 +340795,7 @@ } }, "aws:s3/bucketLifecycleConfigurationV2:BucketLifecycleConfigurationV2": { - "description": "Provides an independent configuration resource for S3 bucket [lifecycle configuration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html).\n\nAn S3 Lifecycle configuration consists of one or more Lifecycle rules. Each rule consists of the following:\n\n* Rule metadata (`id` and `status`)\n* Filter identifying objects to which the rule applies\n* One or more transition or expiration actions\n\nFor more information see the Amazon S3 User Guide on [`Lifecycle Configuration Elements`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html).\n\n\u003e **NOTE:** S3 Buckets only support a single lifecycle configuration. Declaring multiple `aws.s3.BucketLifecycleConfigurationV2` resources to the same S3 Bucket will cause a perpetual difference in configuration.\n\n\u003e **NOTE:** Lifecycle configurations may take some time to fully propagate to all AWS S3 systems.\nRunning Pulumi operations shortly after creating a lifecycle configuration may result in changes that affect configuration idempotence.\nSee the Amazon S3 User Guide on [setting lifecycle configuration on a bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-set-lifecycle-configuration-intro.html).\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### With neither a filter nor prefix specified\n\nThe Lifecycle rule applies to a subset of objects based on the key name prefix (`\"\"`).\n\nThis configuration is intended to replicate the default behavior of the `lifecycle_rule`\nparameter in the AWS Provider `aws.s3.BucketV2` resource prior to `v4.0`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying an empty filter\n\nThe Lifecycle rule applies to all objects in the bucket.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {},\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {},\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = null,\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: nil,\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter()\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter: {}\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter using key prefixes\n\nThe Lifecycle rule applies to a subset of objects based on the key name prefix (`logs/`).\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n prefix: \"logs/\",\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"prefix\": \"logs/\",\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"logs/\",\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"logs/\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"logs/\")\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n prefix: logs/\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nIf you want to apply a Lifecycle action to a subset of objects based on different key name prefixes, specify separate rules.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [\n {\n id: \"rule-1\",\n filter: {\n prefix: \"logs/\",\n },\n status: \"Enabled\",\n },\n {\n id: \"rule-2\",\n filter: {\n prefix: \"tmp/\",\n },\n status: \"Enabled\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[\n {\n \"id\": \"rule-1\",\n \"filter\": {\n \"prefix\": \"logs/\",\n },\n \"status\": \"Enabled\",\n },\n {\n \"id\": \"rule-2\",\n \"filter\": {\n \"prefix\": \"tmp/\",\n },\n \"status\": \"Enabled\",\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"logs/\",\n },\n Status = \"Enabled\",\n },\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-2\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"tmp/\",\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"logs/\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-2\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"tmp/\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules( \n BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"logs/\")\n .build())\n .status(\"Enabled\")\n .build(),\n BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-2\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"tmp/\")\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n prefix: logs/\n status: Enabled\n - id: rule-2\n filter:\n prefix: tmp/\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on an object tag\n\nThe Lifecycle rule specifies a filter based on a tag key and value. The rule then applies only to a subset of objects with the specific tag.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n tag: {\n key: \"Name\",\n value: \"Staging\",\n },\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"tag\": {\n \"key\": \"Name\",\n \"value\": \"Staging\",\n },\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Tag = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterTagArgs\n {\n Key = \"Name\",\n Value = \"Staging\",\n },\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tTag: \u0026s3.BucketLifecycleConfigurationV2RuleFilterTagArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"Name\"),\n\t\t\t\t\t\t\tValue: pulumi.String(\"Staging\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterTagArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .tag(BucketLifecycleConfigurationV2RuleFilterTagArgs.builder()\n .key(\"Name\")\n .value(\"Staging\")\n .build())\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n tag:\n key: Name\n value: Staging\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on multiple tags\n\nThe Lifecycle rule directs Amazon S3 to perform lifecycle actions on objects with two tags (with the specific tag keys and values). Notice `tags` is wrapped in the `and` configuration block.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n and: {\n tags: {\n Key1: \"Value1\",\n Key2: \"Value2\",\n },\n },\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"and_\": {\n \"tags\": {\n \"key1\": \"Value1\",\n \"key2\": \"Value2\",\n },\n },\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n And = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs\n {\n Tags = \n {\n { \"Key1\", \"Value1\" },\n { \"Key2\", \"Value2\" },\n },\n },\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tAnd: \u0026s3.BucketLifecycleConfigurationV2RuleFilterAndArgs{\n\t\t\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t\t\t\t\t\t\"Key2\": pulumi.String(\"Value2\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .and(BucketLifecycleConfigurationV2RuleFilterAndArgs.builder()\n .tags(Map.ofEntries(\n Map.entry(\"Key1\", \"Value1\"),\n Map.entry(\"Key2\", \"Value2\")\n ))\n .build())\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n and:\n tags:\n Key1: Value1\n Key2: Value2\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on both prefix and one or more tags\n\nThe Lifecycle rule directs Amazon S3 to perform lifecycle actions on objects with the specified prefix and two tags (with the specific tag keys and values). Notice both `prefix` and `tags` are wrapped in the `and` configuration block.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n and: {\n prefix: \"logs/\",\n tags: {\n Key1: \"Value1\",\n Key2: \"Value2\",\n },\n },\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"and_\": {\n \"prefix\": \"logs/\",\n \"tags\": {\n \"key1\": \"Value1\",\n \"key2\": \"Value2\",\n },\n },\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n And = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs\n {\n Prefix = \"logs/\",\n Tags = \n {\n { \"Key1\", \"Value1\" },\n { \"Key2\", \"Value2\" },\n },\n },\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tAnd: \u0026s3.BucketLifecycleConfigurationV2RuleFilterAndArgs{\n\t\t\t\t\t\t\tPrefix: pulumi.String(\"logs/\"),\n\t\t\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t\t\t\t\t\t\"Key2\": pulumi.String(\"Value2\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .and(BucketLifecycleConfigurationV2RuleFilterAndArgs.builder()\n .prefix(\"logs/\")\n .tags(Map.ofEntries(\n Map.entry(\"Key1\", \"Value1\"),\n Map.entry(\"Key2\", \"Value2\")\n ))\n .build())\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n and:\n prefix: logs/\n tags:\n Key1: Value1\n Key2: Value2\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on object size\n\nObject size values are in bytes. Maximum filter size is 5TB. Amazon S3 applies a default behavior to your Lifecycle configuration that prevents objects smaller than 128 KB from being transitioned to any storage class. You can allow smaller objects to transition by adding a minimum size (`object_size_greater_than`) or a maximum size (`object_size_less_than`) filter that specifies a smaller size to the configuration. This example allows any object smaller than 128 KB to transition to the S3 Glacier Instant Retrieval storage class:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"Allow small object transitions\",\n filter: {\n objectSizeGreaterThan: \"1\",\n },\n status: \"Enabled\",\n transitions: [{\n days: 365,\n storageClass: \"GLACIER_IR\",\n }],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"Allow small object transitions\",\n \"filter\": {\n \"object_size_greater_than\": \"1\",\n },\n \"status\": \"Enabled\",\n \"transitions\": [{\n \"days\": 365,\n \"storage_class\": \"GLACIER_IR\",\n }],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"Allow small object transitions\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n ObjectSizeGreaterThan = \"1\",\n },\n Status = \"Enabled\",\n Transitions = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleTransitionArgs\n {\n Days = 365,\n StorageClass = \"GLACIER_IR\",\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"Allow small object transitions\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tObjectSizeGreaterThan: pulumi.String(\"1\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t\tTransitions: s3.BucketLifecycleConfigurationV2RuleTransitionArray{\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleTransitionArgs{\n\t\t\t\t\t\t\tDays: pulumi.Int(365),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"GLACIER_IR\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"Allow small object transitions\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .objectSizeGreaterThan(1)\n .build())\n .status(\"Enabled\")\n .transitions(BucketLifecycleConfigurationV2RuleTransitionArgs.builder()\n .days(365)\n .storageClass(\"GLACIER_IR\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: Allow small object transitions\n filter:\n objectSizeGreaterThan: 1\n status: Enabled\n transitions:\n - days: 365\n storageClass: GLACIER_IR\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on object size range and prefix\n\nThe `object_size_greater_than` must be less than the `object_size_less_than`. Notice both the object size range and prefix are wrapped in the `and` configuration block.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n and: {\n prefix: \"logs/\",\n objectSizeGreaterThan: 500,\n objectSizeLessThan: 64000,\n },\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"and_\": {\n \"prefix\": \"logs/\",\n \"object_size_greater_than\": 500,\n \"object_size_less_than\": 64000,\n },\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n And = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs\n {\n Prefix = \"logs/\",\n ObjectSizeGreaterThan = 500,\n ObjectSizeLessThan = 64000,\n },\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tAnd: \u0026s3.BucketLifecycleConfigurationV2RuleFilterAndArgs{\n\t\t\t\t\t\t\tPrefix: pulumi.String(\"logs/\"),\n\t\t\t\t\t\t\tObjectSizeGreaterThan: pulumi.Int(500),\n\t\t\t\t\t\t\tObjectSizeLessThan: pulumi.Int(64000),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .and(BucketLifecycleConfigurationV2RuleFilterAndArgs.builder()\n .prefix(\"logs/\")\n .objectSizeGreaterThan(500)\n .objectSizeLessThan(64000)\n .build())\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n and:\n prefix: logs/\n objectSizeGreaterThan: 500\n objectSizeLessThan: 64000\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Creating a Lifecycle Configuration for a bucket with versioning\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst bucket = new aws.s3.BucketV2(\"bucket\", {bucket: \"my-bucket\"});\nconst bucketAcl = new aws.s3.BucketAclV2(\"bucket_acl\", {\n bucket: bucket.id,\n acl: \"private\",\n});\nconst bucket_config = new aws.s3.BucketLifecycleConfigurationV2(\"bucket-config\", {\n bucket: bucket.id,\n rules: [\n {\n id: \"log\",\n expiration: {\n days: 90,\n },\n filter: {\n and: {\n prefix: \"log/\",\n tags: {\n rule: \"log\",\n autoclean: \"true\",\n },\n },\n },\n status: \"Enabled\",\n transitions: [\n {\n days: 30,\n storageClass: \"STANDARD_IA\",\n },\n {\n days: 60,\n storageClass: \"GLACIER\",\n },\n ],\n },\n {\n id: \"tmp\",\n filter: {\n prefix: \"tmp/\",\n },\n expiration: {\n date: \"2023-01-13T00:00:00Z\",\n },\n status: \"Enabled\",\n },\n ],\n});\nconst versioningBucket = new aws.s3.BucketV2(\"versioning_bucket\", {bucket: \"my-versioning-bucket\"});\nconst versioningBucketAcl = new aws.s3.BucketAclV2(\"versioning_bucket_acl\", {\n bucket: versioningBucket.id,\n acl: \"private\",\n});\nconst versioning = new aws.s3.BucketVersioningV2(\"versioning\", {\n bucket: versioningBucket.id,\n versioningConfiguration: {\n status: \"Enabled\",\n },\n});\nconst versioning_bucket_config = new aws.s3.BucketLifecycleConfigurationV2(\"versioning-bucket-config\", {\n bucket: versioningBucket.id,\n rules: [{\n id: \"config\",\n filter: {\n prefix: \"config/\",\n },\n noncurrentVersionExpiration: {\n noncurrentDays: 90,\n },\n noncurrentVersionTransitions: [\n {\n noncurrentDays: 30,\n storageClass: \"STANDARD_IA\",\n },\n {\n noncurrentDays: 60,\n storageClass: \"GLACIER\",\n },\n ],\n status: \"Enabled\",\n }],\n}, {\n dependsOn: [versioning],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nbucket = aws.s3.BucketV2(\"bucket\", bucket=\"my-bucket\")\nbucket_acl = aws.s3.BucketAclV2(\"bucket_acl\",\n bucket=bucket.id,\n acl=\"private\")\nbucket_config = aws.s3.BucketLifecycleConfigurationV2(\"bucket-config\",\n bucket=bucket.id,\n rules=[\n {\n \"id\": \"log\",\n \"expiration\": {\n \"days\": 90,\n },\n \"filter\": {\n \"and_\": {\n \"prefix\": \"log/\",\n \"tags\": {\n \"rule\": \"log\",\n \"autoclean\": \"true\",\n },\n },\n },\n \"status\": \"Enabled\",\n \"transitions\": [\n {\n \"days\": 30,\n \"storage_class\": \"STANDARD_IA\",\n },\n {\n \"days\": 60,\n \"storage_class\": \"GLACIER\",\n },\n ],\n },\n {\n \"id\": \"tmp\",\n \"filter\": {\n \"prefix\": \"tmp/\",\n },\n \"expiration\": {\n \"date\": \"2023-01-13T00:00:00Z\",\n },\n \"status\": \"Enabled\",\n },\n ])\nversioning_bucket = aws.s3.BucketV2(\"versioning_bucket\", bucket=\"my-versioning-bucket\")\nversioning_bucket_acl = aws.s3.BucketAclV2(\"versioning_bucket_acl\",\n bucket=versioning_bucket.id,\n acl=\"private\")\nversioning = aws.s3.BucketVersioningV2(\"versioning\",\n bucket=versioning_bucket.id,\n versioning_configuration={\n \"status\": \"Enabled\",\n })\nversioning_bucket_config = aws.s3.BucketLifecycleConfigurationV2(\"versioning-bucket-config\",\n bucket=versioning_bucket.id,\n rules=[{\n \"id\": \"config\",\n \"filter\": {\n \"prefix\": \"config/\",\n },\n \"noncurrent_version_expiration\": {\n \"noncurrent_days\": 90,\n },\n \"noncurrent_version_transitions\": [\n {\n \"noncurrent_days\": 30,\n \"storage_class\": \"STANDARD_IA\",\n },\n {\n \"noncurrent_days\": 60,\n \"storage_class\": \"GLACIER\",\n },\n ],\n \"status\": \"Enabled\",\n }],\n opts = pulumi.ResourceOptions(depends_on=[versioning]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var bucket = new Aws.S3.BucketV2(\"bucket\", new()\n {\n Bucket = \"my-bucket\",\n });\n\n var bucketAcl = new Aws.S3.BucketAclV2(\"bucket_acl\", new()\n {\n Bucket = bucket.Id,\n Acl = \"private\",\n });\n\n var bucket_config = new Aws.S3.BucketLifecycleConfigurationV2(\"bucket-config\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"log\",\n Expiration = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleExpirationArgs\n {\n Days = 90,\n },\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n And = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs\n {\n Prefix = \"log/\",\n Tags = \n {\n { \"rule\", \"log\" },\n { \"autoclean\", \"true\" },\n },\n },\n },\n Status = \"Enabled\",\n Transitions = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleTransitionArgs\n {\n Days = 30,\n StorageClass = \"STANDARD_IA\",\n },\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleTransitionArgs\n {\n Days = 60,\n StorageClass = \"GLACIER\",\n },\n },\n },\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"tmp\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"tmp/\",\n },\n Expiration = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleExpirationArgs\n {\n Date = \"2023-01-13T00:00:00Z\",\n },\n Status = \"Enabled\",\n },\n },\n });\n\n var versioningBucket = new Aws.S3.BucketV2(\"versioning_bucket\", new()\n {\n Bucket = \"my-versioning-bucket\",\n });\n\n var versioningBucketAcl = new Aws.S3.BucketAclV2(\"versioning_bucket_acl\", new()\n {\n Bucket = versioningBucket.Id,\n Acl = \"private\",\n });\n\n var versioning = new Aws.S3.BucketVersioningV2(\"versioning\", new()\n {\n Bucket = versioningBucket.Id,\n VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs\n {\n Status = \"Enabled\",\n },\n });\n\n var versioning_bucket_config = new Aws.S3.BucketLifecycleConfigurationV2(\"versioning-bucket-config\", new()\n {\n Bucket = versioningBucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"config\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"config/\",\n },\n NoncurrentVersionExpiration = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleNoncurrentVersionExpirationArgs\n {\n NoncurrentDays = 90,\n },\n NoncurrentVersionTransitions = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs\n {\n NoncurrentDays = 30,\n StorageClass = \"STANDARD_IA\",\n },\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs\n {\n NoncurrentDays = 60,\n StorageClass = \"GLACIER\",\n },\n },\n Status = \"Enabled\",\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n versioning,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tbucket, err := s3.NewBucketV2(ctx, \"bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"bucket_acl\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: bucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketLifecycleConfigurationV2(ctx, \"bucket-config\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: bucket.ID(),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"log\"),\n\t\t\t\t\tExpiration: \u0026s3.BucketLifecycleConfigurationV2RuleExpirationArgs{\n\t\t\t\t\t\tDays: pulumi.Int(90),\n\t\t\t\t\t},\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tAnd: \u0026s3.BucketLifecycleConfigurationV2RuleFilterAndArgs{\n\t\t\t\t\t\t\tPrefix: pulumi.String(\"log/\"),\n\t\t\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"rule\": pulumi.String(\"log\"),\n\t\t\t\t\t\t\t\t\"autoclean\": pulumi.String(\"true\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t\tTransitions: s3.BucketLifecycleConfigurationV2RuleTransitionArray{\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleTransitionArgs{\n\t\t\t\t\t\t\tDays: pulumi.Int(30),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"STANDARD_IA\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleTransitionArgs{\n\t\t\t\t\t\t\tDays: pulumi.Int(60),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"GLACIER\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"tmp\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"tmp/\"),\n\t\t\t\t\t},\n\t\t\t\t\tExpiration: \u0026s3.BucketLifecycleConfigurationV2RuleExpirationArgs{\n\t\t\t\t\t\tDate: pulumi.String(\"2023-01-13T00:00:00Z\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tversioningBucket, err := s3.NewBucketV2(ctx, \"versioning_bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-versioning-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"versioning_bucket_acl\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: versioningBucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tversioning, err := s3.NewBucketVersioningV2(ctx, \"versioning\", \u0026s3.BucketVersioningV2Args{\n\t\t\tBucket: versioningBucket.ID(),\n\t\t\tVersioningConfiguration: \u0026s3.BucketVersioningV2VersioningConfigurationArgs{\n\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketLifecycleConfigurationV2(ctx, \"versioning-bucket-config\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: versioningBucket.ID(),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"config\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"config/\"),\n\t\t\t\t\t},\n\t\t\t\t\tNoncurrentVersionExpiration: \u0026s3.BucketLifecycleConfigurationV2RuleNoncurrentVersionExpirationArgs{\n\t\t\t\t\t\tNoncurrentDays: pulumi.Int(90),\n\t\t\t\t\t},\n\t\t\t\t\tNoncurrentVersionTransitions: s3.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArray{\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs{\n\t\t\t\t\t\t\tNoncurrentDays: pulumi.Int(30),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"STANDARD_IA\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs{\n\t\t\t\t\t\t\tNoncurrentDays: pulumi.Int(60),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"GLACIER\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tversioning,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleExpirationArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs;\nimport com.pulumi.aws.s3.BucketVersioningV2;\nimport com.pulumi.aws.s3.BucketVersioningV2Args;\nimport com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleNoncurrentVersionExpirationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bucket = new BucketV2(\"bucket\", BucketV2Args.builder()\n .bucket(\"my-bucket\")\n .build());\n\n var bucketAcl = new BucketAclV2(\"bucketAcl\", BucketAclV2Args.builder()\n .bucket(bucket.id())\n .acl(\"private\")\n .build());\n\n var bucket_config = new BucketLifecycleConfigurationV2(\"bucket-config\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules( \n BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"log\")\n .expiration(BucketLifecycleConfigurationV2RuleExpirationArgs.builder()\n .days(90)\n .build())\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .and(BucketLifecycleConfigurationV2RuleFilterAndArgs.builder()\n .prefix(\"log/\")\n .tags(Map.ofEntries(\n Map.entry(\"rule\", \"log\"),\n Map.entry(\"autoclean\", \"true\")\n ))\n .build())\n .build())\n .status(\"Enabled\")\n .transitions( \n BucketLifecycleConfigurationV2RuleTransitionArgs.builder()\n .days(30)\n .storageClass(\"STANDARD_IA\")\n .build(),\n BucketLifecycleConfigurationV2RuleTransitionArgs.builder()\n .days(60)\n .storageClass(\"GLACIER\")\n .build())\n .build(),\n BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"tmp\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"tmp/\")\n .build())\n .expiration(BucketLifecycleConfigurationV2RuleExpirationArgs.builder()\n .date(\"2023-01-13T00:00:00Z\")\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n var versioningBucket = new BucketV2(\"versioningBucket\", BucketV2Args.builder()\n .bucket(\"my-versioning-bucket\")\n .build());\n\n var versioningBucketAcl = new BucketAclV2(\"versioningBucketAcl\", BucketAclV2Args.builder()\n .bucket(versioningBucket.id())\n .acl(\"private\")\n .build());\n\n var versioning = new BucketVersioningV2(\"versioning\", BucketVersioningV2Args.builder()\n .bucket(versioningBucket.id())\n .versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()\n .status(\"Enabled\")\n .build())\n .build());\n\n var versioning_bucket_config = new BucketLifecycleConfigurationV2(\"versioning-bucket-config\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(versioningBucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"config\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"config/\")\n .build())\n .noncurrentVersionExpiration(BucketLifecycleConfigurationV2RuleNoncurrentVersionExpirationArgs.builder()\n .noncurrentDays(90)\n .build())\n .noncurrentVersionTransitions( \n BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs.builder()\n .noncurrentDays(30)\n .storageClass(\"STANDARD_IA\")\n .build(),\n BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs.builder()\n .noncurrentDays(60)\n .storageClass(\"GLACIER\")\n .build())\n .status(\"Enabled\")\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(versioning)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bucket:\n type: aws:s3:BucketV2\n properties:\n bucket: my-bucket\n bucketAcl:\n type: aws:s3:BucketAclV2\n name: bucket_acl\n properties:\n bucket: ${bucket.id}\n acl: private\n bucket-config:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: log\n expiration:\n days: 90\n filter:\n and:\n prefix: log/\n tags:\n rule: log\n autoclean: 'true'\n status: Enabled\n transitions:\n - days: 30\n storageClass: STANDARD_IA\n - days: 60\n storageClass: GLACIER\n - id: tmp\n filter:\n prefix: tmp/\n expiration:\n date: 2023-01-13T00:00:00Z\n status: Enabled\n versioningBucket:\n type: aws:s3:BucketV2\n name: versioning_bucket\n properties:\n bucket: my-versioning-bucket\n versioningBucketAcl:\n type: aws:s3:BucketAclV2\n name: versioning_bucket_acl\n properties:\n bucket: ${versioningBucket.id}\n acl: private\n versioning:\n type: aws:s3:BucketVersioningV2\n properties:\n bucket: ${versioningBucket.id}\n versioningConfiguration:\n status: Enabled\n versioning-bucket-config:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${versioningBucket.id}\n rules:\n - id: config\n filter:\n prefix: config/\n noncurrentVersionExpiration:\n noncurrentDays: 90\n noncurrentVersionTransitions:\n - noncurrentDays: 30\n storageClass: STANDARD_IA\n - noncurrentDays: 60\n storageClass: GLACIER\n status: Enabled\n options:\n dependson:\n - ${versioning}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nIf the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):\n\n__Using `pulumi import` to import__ S3 bucket lifecycle configuration using the `bucket` or using the `bucket` and `expected_bucket_owner` separated by a comma (`,`). For example:\n\nIf the owner (account ID) of the source bucket is the same account used to configure the AWS Provider, import using the `bucket`:\n\n```sh\n$ pulumi import aws:s3/bucketLifecycleConfigurationV2:BucketLifecycleConfigurationV2 example bucket-name\n```\nIf the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):\n\n```sh\n$ pulumi import aws:s3/bucketLifecycleConfigurationV2:BucketLifecycleConfigurationV2 example bucket-name,123456789012\n```\n", + "description": "Provides an independent configuration resource for S3 bucket [lifecycle configuration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html).\n\nAn S3 Lifecycle configuration consists of one or more Lifecycle rules. Each rule consists of the following:\n\n* Rule metadata (`id` and `status`)\n* Filter identifying objects to which the rule applies\n* One or more transition or expiration actions\n\nFor more information see the Amazon S3 User Guide on [`Lifecycle Configuration Elements`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html).\n\n\u003e **NOTE:** S3 Buckets only support a single lifecycle configuration. Declaring multiple `aws.s3.BucketLifecycleConfigurationV2` resources to the same S3 Bucket will cause a perpetual difference in configuration.\n\n\u003e **NOTE:** Lifecycle configurations may take some time to fully propagate to all AWS S3 systems.\nRunning Pulumi operations shortly after creating a lifecycle configuration may result in changes that affect configuration idempotence.\nSee the Amazon S3 User Guide on [setting lifecycle configuration on a bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/how-to-set-lifecycle-configuration-intro.html).\n\n\u003e This resource cannot be used with S3 directory buckets.\n\n## Example Usage\n\n### With neither a filter nor prefix specified\n\nThe Lifecycle rule applies to a subset of objects based on the key name prefix (`\"\"`).\n\nThis configuration is intended to replicate the default behavior of the `lifecycle_rule`\nparameter in the AWS Provider `aws.s3.BucketV2` resource prior to `v4.0`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying an empty filter\n\nThe Lifecycle rule applies to all objects in the bucket.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {},\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {},\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = null,\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter()\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter: {}\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter using key prefixes\n\nThe Lifecycle rule applies to a subset of objects based on the key name prefix (`logs/`).\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n prefix: \"logs/\",\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"prefix\": \"logs/\",\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"logs/\",\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"logs/\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"logs/\")\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n prefix: logs/\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nIf you want to apply a Lifecycle action to a subset of objects based on different key name prefixes, specify separate rules.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [\n {\n id: \"rule-1\",\n filter: {\n prefix: \"logs/\",\n },\n status: \"Enabled\",\n },\n {\n id: \"rule-2\",\n filter: {\n prefix: \"tmp/\",\n },\n status: \"Enabled\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[\n {\n \"id\": \"rule-1\",\n \"filter\": {\n \"prefix\": \"logs/\",\n },\n \"status\": \"Enabled\",\n },\n {\n \"id\": \"rule-2\",\n \"filter\": {\n \"prefix\": \"tmp/\",\n },\n \"status\": \"Enabled\",\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"logs/\",\n },\n Status = \"Enabled\",\n },\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-2\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"tmp/\",\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"logs/\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-2\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"tmp/\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules( \n BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"logs/\")\n .build())\n .status(\"Enabled\")\n .build(),\n BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-2\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"tmp/\")\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n prefix: logs/\n status: Enabled\n - id: rule-2\n filter:\n prefix: tmp/\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on an object tag\n\nThe Lifecycle rule specifies a filter based on a tag key and value. The rule then applies only to a subset of objects with the specific tag.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n tag: {\n key: \"Name\",\n value: \"Staging\",\n },\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"tag\": {\n \"key\": \"Name\",\n \"value\": \"Staging\",\n },\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Tag = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterTagArgs\n {\n Key = \"Name\",\n Value = \"Staging\",\n },\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tTag: \u0026s3.BucketLifecycleConfigurationV2RuleFilterTagArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"Name\"),\n\t\t\t\t\t\t\tValue: pulumi.String(\"Staging\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterTagArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .tag(BucketLifecycleConfigurationV2RuleFilterTagArgs.builder()\n .key(\"Name\")\n .value(\"Staging\")\n .build())\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n tag:\n key: Name\n value: Staging\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on multiple tags\n\nThe Lifecycle rule directs Amazon S3 to perform lifecycle actions on objects with two tags (with the specific tag keys and values). Notice `tags` is wrapped in the `and` configuration block.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n and: {\n tags: {\n Key1: \"Value1\",\n Key2: \"Value2\",\n },\n },\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"and_\": {\n \"tags\": {\n \"key1\": \"Value1\",\n \"key2\": \"Value2\",\n },\n },\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n And = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs\n {\n Tags = \n {\n { \"Key1\", \"Value1\" },\n { \"Key2\", \"Value2\" },\n },\n },\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tAnd: \u0026s3.BucketLifecycleConfigurationV2RuleFilterAndArgs{\n\t\t\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t\t\t\t\t\t\"Key2\": pulumi.String(\"Value2\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .and(BucketLifecycleConfigurationV2RuleFilterAndArgs.builder()\n .tags(Map.ofEntries(\n Map.entry(\"Key1\", \"Value1\"),\n Map.entry(\"Key2\", \"Value2\")\n ))\n .build())\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n and:\n tags:\n Key1: Value1\n Key2: Value2\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on both prefix and one or more tags\n\nThe Lifecycle rule directs Amazon S3 to perform lifecycle actions on objects with the specified prefix and two tags (with the specific tag keys and values). Notice both `prefix` and `tags` are wrapped in the `and` configuration block.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n and: {\n prefix: \"logs/\",\n tags: {\n Key1: \"Value1\",\n Key2: \"Value2\",\n },\n },\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"and_\": {\n \"prefix\": \"logs/\",\n \"tags\": {\n \"key1\": \"Value1\",\n \"key2\": \"Value2\",\n },\n },\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n And = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs\n {\n Prefix = \"logs/\",\n Tags = \n {\n { \"Key1\", \"Value1\" },\n { \"Key2\", \"Value2\" },\n },\n },\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tAnd: \u0026s3.BucketLifecycleConfigurationV2RuleFilterAndArgs{\n\t\t\t\t\t\t\tPrefix: pulumi.String(\"logs/\"),\n\t\t\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"Key1\": pulumi.String(\"Value1\"),\n\t\t\t\t\t\t\t\t\"Key2\": pulumi.String(\"Value2\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .and(BucketLifecycleConfigurationV2RuleFilterAndArgs.builder()\n .prefix(\"logs/\")\n .tags(Map.ofEntries(\n Map.entry(\"Key1\", \"Value1\"),\n Map.entry(\"Key2\", \"Value2\")\n ))\n .build())\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n and:\n prefix: logs/\n tags:\n Key1: Value1\n Key2: Value2\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on object size\n\nObject size values are in bytes. Maximum filter size is 5TB. Amazon S3 applies a default behavior to your Lifecycle configuration that prevents objects smaller than 128 KB from being transitioned to any storage class. You can allow smaller objects to transition by adding a minimum size (`object_size_greater_than`) or a maximum size (`object_size_less_than`) filter that specifies a smaller size to the configuration. This example allows any object smaller than 128 KB to transition to the S3 Glacier Instant Retrieval storage class:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"Allow small object transitions\",\n filter: {\n objectSizeGreaterThan: \"1\",\n },\n status: \"Enabled\",\n transitions: [{\n days: 365,\n storageClass: \"GLACIER_IR\",\n }],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"Allow small object transitions\",\n \"filter\": {\n \"object_size_greater_than\": \"1\",\n },\n \"status\": \"Enabled\",\n \"transitions\": [{\n \"days\": 365,\n \"storage_class\": \"GLACIER_IR\",\n }],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"Allow small object transitions\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n ObjectSizeGreaterThan = \"1\",\n },\n Status = \"Enabled\",\n Transitions = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleTransitionArgs\n {\n Days = 365,\n StorageClass = \"GLACIER_IR\",\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"Allow small object transitions\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tObjectSizeGreaterThan: pulumi.String(\"1\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t\tTransitions: s3.BucketLifecycleConfigurationV2RuleTransitionArray{\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleTransitionArgs{\n\t\t\t\t\t\t\tDays: pulumi.Int(365),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"GLACIER_IR\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"Allow small object transitions\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .objectSizeGreaterThan(1)\n .build())\n .status(\"Enabled\")\n .transitions(BucketLifecycleConfigurationV2RuleTransitionArgs.builder()\n .days(365)\n .storageClass(\"GLACIER_IR\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: Allow small object transitions\n filter:\n objectSizeGreaterThan: 1\n status: Enabled\n transitions:\n - days: 365\n storageClass: GLACIER_IR\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Specifying a filter based on object size range and prefix\n\nThe `object_size_greater_than` must be less than the `object_size_less_than`. Notice both the object size range and prefix are wrapped in the `and` configuration block.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketLifecycleConfigurationV2(\"example\", {\n bucket: bucket.id,\n rules: [{\n id: \"rule-1\",\n filter: {\n and: {\n prefix: \"logs/\",\n objectSizeGreaterThan: 500,\n objectSizeLessThan: 64000,\n },\n },\n status: \"Enabled\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketLifecycleConfigurationV2(\"example\",\n bucket=bucket[\"id\"],\n rules=[{\n \"id\": \"rule-1\",\n \"filter\": {\n \"and_\": {\n \"prefix\": \"logs/\",\n \"object_size_greater_than\": 500,\n \"object_size_less_than\": 64000,\n },\n },\n \"status\": \"Enabled\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketLifecycleConfigurationV2(\"example\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"rule-1\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n And = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs\n {\n Prefix = \"logs/\",\n ObjectSizeGreaterThan = 500,\n ObjectSizeLessThan = 64000,\n },\n },\n Status = \"Enabled\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketLifecycleConfigurationV2(ctx, \"example\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: pulumi.Any(bucket.Id),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"rule-1\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tAnd: \u0026s3.BucketLifecycleConfigurationV2RuleFilterAndArgs{\n\t\t\t\t\t\t\tPrefix: pulumi.String(\"logs/\"),\n\t\t\t\t\t\t\tObjectSizeGreaterThan: pulumi.Int(500),\n\t\t\t\t\t\t\tObjectSizeLessThan: pulumi.Int(64000),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketLifecycleConfigurationV2(\"example\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"rule-1\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .and(BucketLifecycleConfigurationV2RuleFilterAndArgs.builder()\n .prefix(\"logs/\")\n .objectSizeGreaterThan(500)\n .objectSizeLessThan(64000)\n .build())\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: rule-1\n filter:\n and:\n prefix: logs/\n objectSizeGreaterThan: 500\n objectSizeLessThan: 64000\n status: Enabled\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Creating a Lifecycle Configuration for a bucket with versioning\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst bucket = new aws.s3.BucketV2(\"bucket\", {bucket: \"my-bucket\"});\nconst bucketAcl = new aws.s3.BucketAclV2(\"bucket_acl\", {\n bucket: bucket.id,\n acl: \"private\",\n});\nconst bucket_config = new aws.s3.BucketLifecycleConfigurationV2(\"bucket-config\", {\n bucket: bucket.id,\n rules: [\n {\n id: \"log\",\n expiration: {\n days: 90,\n },\n filter: {\n and: {\n prefix: \"log/\",\n tags: {\n rule: \"log\",\n autoclean: \"true\",\n },\n },\n },\n status: \"Enabled\",\n transitions: [\n {\n days: 30,\n storageClass: \"STANDARD_IA\",\n },\n {\n days: 60,\n storageClass: \"GLACIER\",\n },\n ],\n },\n {\n id: \"tmp\",\n filter: {\n prefix: \"tmp/\",\n },\n expiration: {\n date: \"2023-01-13T00:00:00Z\",\n },\n status: \"Enabled\",\n },\n ],\n});\nconst versioningBucket = new aws.s3.BucketV2(\"versioning_bucket\", {bucket: \"my-versioning-bucket\"});\nconst versioningBucketAcl = new aws.s3.BucketAclV2(\"versioning_bucket_acl\", {\n bucket: versioningBucket.id,\n acl: \"private\",\n});\nconst versioning = new aws.s3.BucketVersioningV2(\"versioning\", {\n bucket: versioningBucket.id,\n versioningConfiguration: {\n status: \"Enabled\",\n },\n});\nconst versioning_bucket_config = new aws.s3.BucketLifecycleConfigurationV2(\"versioning-bucket-config\", {\n bucket: versioningBucket.id,\n rules: [{\n id: \"config\",\n filter: {\n prefix: \"config/\",\n },\n noncurrentVersionExpiration: {\n noncurrentDays: 90,\n },\n noncurrentVersionTransitions: [\n {\n noncurrentDays: 30,\n storageClass: \"STANDARD_IA\",\n },\n {\n noncurrentDays: 60,\n storageClass: \"GLACIER\",\n },\n ],\n status: \"Enabled\",\n }],\n}, {\n dependsOn: [versioning],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nbucket = aws.s3.BucketV2(\"bucket\", bucket=\"my-bucket\")\nbucket_acl = aws.s3.BucketAclV2(\"bucket_acl\",\n bucket=bucket.id,\n acl=\"private\")\nbucket_config = aws.s3.BucketLifecycleConfigurationV2(\"bucket-config\",\n bucket=bucket.id,\n rules=[\n {\n \"id\": \"log\",\n \"expiration\": {\n \"days\": 90,\n },\n \"filter\": {\n \"and_\": {\n \"prefix\": \"log/\",\n \"tags\": {\n \"rule\": \"log\",\n \"autoclean\": \"true\",\n },\n },\n },\n \"status\": \"Enabled\",\n \"transitions\": [\n {\n \"days\": 30,\n \"storage_class\": \"STANDARD_IA\",\n },\n {\n \"days\": 60,\n \"storage_class\": \"GLACIER\",\n },\n ],\n },\n {\n \"id\": \"tmp\",\n \"filter\": {\n \"prefix\": \"tmp/\",\n },\n \"expiration\": {\n \"date\": \"2023-01-13T00:00:00Z\",\n },\n \"status\": \"Enabled\",\n },\n ])\nversioning_bucket = aws.s3.BucketV2(\"versioning_bucket\", bucket=\"my-versioning-bucket\")\nversioning_bucket_acl = aws.s3.BucketAclV2(\"versioning_bucket_acl\",\n bucket=versioning_bucket.id,\n acl=\"private\")\nversioning = aws.s3.BucketVersioningV2(\"versioning\",\n bucket=versioning_bucket.id,\n versioning_configuration={\n \"status\": \"Enabled\",\n })\nversioning_bucket_config = aws.s3.BucketLifecycleConfigurationV2(\"versioning-bucket-config\",\n bucket=versioning_bucket.id,\n rules=[{\n \"id\": \"config\",\n \"filter\": {\n \"prefix\": \"config/\",\n },\n \"noncurrent_version_expiration\": {\n \"noncurrent_days\": 90,\n },\n \"noncurrent_version_transitions\": [\n {\n \"noncurrent_days\": 30,\n \"storage_class\": \"STANDARD_IA\",\n },\n {\n \"noncurrent_days\": 60,\n \"storage_class\": \"GLACIER\",\n },\n ],\n \"status\": \"Enabled\",\n }],\n opts = pulumi.ResourceOptions(depends_on=[versioning]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var bucket = new Aws.S3.BucketV2(\"bucket\", new()\n {\n Bucket = \"my-bucket\",\n });\n\n var bucketAcl = new Aws.S3.BucketAclV2(\"bucket_acl\", new()\n {\n Bucket = bucket.Id,\n Acl = \"private\",\n });\n\n var bucket_config = new Aws.S3.BucketLifecycleConfigurationV2(\"bucket-config\", new()\n {\n Bucket = bucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"log\",\n Expiration = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleExpirationArgs\n {\n Days = 90,\n },\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n And = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs\n {\n Prefix = \"log/\",\n Tags = \n {\n { \"rule\", \"log\" },\n { \"autoclean\", \"true\" },\n },\n },\n },\n Status = \"Enabled\",\n Transitions = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleTransitionArgs\n {\n Days = 30,\n StorageClass = \"STANDARD_IA\",\n },\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleTransitionArgs\n {\n Days = 60,\n StorageClass = \"GLACIER\",\n },\n },\n },\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"tmp\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"tmp/\",\n },\n Expiration = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleExpirationArgs\n {\n Date = \"2023-01-13T00:00:00Z\",\n },\n Status = \"Enabled\",\n },\n },\n });\n\n var versioningBucket = new Aws.S3.BucketV2(\"versioning_bucket\", new()\n {\n Bucket = \"my-versioning-bucket\",\n });\n\n var versioningBucketAcl = new Aws.S3.BucketAclV2(\"versioning_bucket_acl\", new()\n {\n Bucket = versioningBucket.Id,\n Acl = \"private\",\n });\n\n var versioning = new Aws.S3.BucketVersioningV2(\"versioning\", new()\n {\n Bucket = versioningBucket.Id,\n VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs\n {\n Status = \"Enabled\",\n },\n });\n\n var versioning_bucket_config = new Aws.S3.BucketLifecycleConfigurationV2(\"versioning-bucket-config\", new()\n {\n Bucket = versioningBucket.Id,\n Rules = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleArgs\n {\n Id = \"config\",\n Filter = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleFilterArgs\n {\n Prefix = \"config/\",\n },\n NoncurrentVersionExpiration = new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleNoncurrentVersionExpirationArgs\n {\n NoncurrentDays = 90,\n },\n NoncurrentVersionTransitions = new[]\n {\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs\n {\n NoncurrentDays = 30,\n StorageClass = \"STANDARD_IA\",\n },\n new Aws.S3.Inputs.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs\n {\n NoncurrentDays = 60,\n StorageClass = \"GLACIER\",\n },\n },\n Status = \"Enabled\",\n },\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n versioning,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tbucket, err := s3.NewBucketV2(ctx, \"bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"bucket_acl\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: bucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketLifecycleConfigurationV2(ctx, \"bucket-config\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: bucket.ID(),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"log\"),\n\t\t\t\t\tExpiration: \u0026s3.BucketLifecycleConfigurationV2RuleExpirationArgs{\n\t\t\t\t\t\tDays: pulumi.Int(90),\n\t\t\t\t\t},\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tAnd: \u0026s3.BucketLifecycleConfigurationV2RuleFilterAndArgs{\n\t\t\t\t\t\t\tPrefix: pulumi.String(\"log/\"),\n\t\t\t\t\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\t\t\t\t\"rule\": pulumi.String(\"log\"),\n\t\t\t\t\t\t\t\t\"autoclean\": pulumi.String(\"true\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t\tTransitions: s3.BucketLifecycleConfigurationV2RuleTransitionArray{\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleTransitionArgs{\n\t\t\t\t\t\t\tDays: pulumi.Int(30),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"STANDARD_IA\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleTransitionArgs{\n\t\t\t\t\t\t\tDays: pulumi.Int(60),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"GLACIER\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"tmp\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"tmp/\"),\n\t\t\t\t\t},\n\t\t\t\t\tExpiration: \u0026s3.BucketLifecycleConfigurationV2RuleExpirationArgs{\n\t\t\t\t\t\tDate: pulumi.String(\"2023-01-13T00:00:00Z\"),\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tversioningBucket, err := s3.NewBucketV2(ctx, \"versioning_bucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-versioning-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"versioning_bucket_acl\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: versioningBucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tversioning, err := s3.NewBucketVersioningV2(ctx, \"versioning\", \u0026s3.BucketVersioningV2Args{\n\t\t\tBucket: versioningBucket.ID(),\n\t\t\tVersioningConfiguration: \u0026s3.BucketVersioningV2VersioningConfigurationArgs{\n\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketLifecycleConfigurationV2(ctx, \"versioning-bucket-config\", \u0026s3.BucketLifecycleConfigurationV2Args{\n\t\t\tBucket: versioningBucket.ID(),\n\t\t\tRules: s3.BucketLifecycleConfigurationV2RuleArray{\n\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleArgs{\n\t\t\t\t\tId: pulumi.String(\"config\"),\n\t\t\t\t\tFilter: \u0026s3.BucketLifecycleConfigurationV2RuleFilterArgs{\n\t\t\t\t\t\tPrefix: pulumi.String(\"config/\"),\n\t\t\t\t\t},\n\t\t\t\t\tNoncurrentVersionExpiration: \u0026s3.BucketLifecycleConfigurationV2RuleNoncurrentVersionExpirationArgs{\n\t\t\t\t\t\tNoncurrentDays: pulumi.Int(90),\n\t\t\t\t\t},\n\t\t\t\t\tNoncurrentVersionTransitions: s3.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArray{\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs{\n\t\t\t\t\t\t\tNoncurrentDays: pulumi.Int(30),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"STANDARD_IA\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026s3.BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs{\n\t\t\t\t\t\t\tNoncurrentDays: pulumi.Int(60),\n\t\t\t\t\t\t\tStorageClass: pulumi.String(\"GLACIER\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tversioning,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2;\nimport com.pulumi.aws.s3.BucketLifecycleConfigurationV2Args;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleExpirationArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleFilterAndArgs;\nimport com.pulumi.aws.s3.BucketVersioningV2;\nimport com.pulumi.aws.s3.BucketVersioningV2Args;\nimport com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;\nimport com.pulumi.aws.s3.inputs.BucketLifecycleConfigurationV2RuleNoncurrentVersionExpirationArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var bucket = new BucketV2(\"bucket\", BucketV2Args.builder()\n .bucket(\"my-bucket\")\n .build());\n\n var bucketAcl = new BucketAclV2(\"bucketAcl\", BucketAclV2Args.builder()\n .bucket(bucket.id())\n .acl(\"private\")\n .build());\n\n var bucket_config = new BucketLifecycleConfigurationV2(\"bucket-config\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(bucket.id())\n .rules( \n BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"log\")\n .expiration(BucketLifecycleConfigurationV2RuleExpirationArgs.builder()\n .days(90)\n .build())\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .and(BucketLifecycleConfigurationV2RuleFilterAndArgs.builder()\n .prefix(\"log/\")\n .tags(Map.ofEntries(\n Map.entry(\"rule\", \"log\"),\n Map.entry(\"autoclean\", \"true\")\n ))\n .build())\n .build())\n .status(\"Enabled\")\n .transitions( \n BucketLifecycleConfigurationV2RuleTransitionArgs.builder()\n .days(30)\n .storageClass(\"STANDARD_IA\")\n .build(),\n BucketLifecycleConfigurationV2RuleTransitionArgs.builder()\n .days(60)\n .storageClass(\"GLACIER\")\n .build())\n .build(),\n BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"tmp\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"tmp/\")\n .build())\n .expiration(BucketLifecycleConfigurationV2RuleExpirationArgs.builder()\n .date(\"2023-01-13T00:00:00Z\")\n .build())\n .status(\"Enabled\")\n .build())\n .build());\n\n var versioningBucket = new BucketV2(\"versioningBucket\", BucketV2Args.builder()\n .bucket(\"my-versioning-bucket\")\n .build());\n\n var versioningBucketAcl = new BucketAclV2(\"versioningBucketAcl\", BucketAclV2Args.builder()\n .bucket(versioningBucket.id())\n .acl(\"private\")\n .build());\n\n var versioning = new BucketVersioningV2(\"versioning\", BucketVersioningV2Args.builder()\n .bucket(versioningBucket.id())\n .versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()\n .status(\"Enabled\")\n .build())\n .build());\n\n var versioning_bucket_config = new BucketLifecycleConfigurationV2(\"versioning-bucket-config\", BucketLifecycleConfigurationV2Args.builder()\n .bucket(versioningBucket.id())\n .rules(BucketLifecycleConfigurationV2RuleArgs.builder()\n .id(\"config\")\n .filter(BucketLifecycleConfigurationV2RuleFilterArgs.builder()\n .prefix(\"config/\")\n .build())\n .noncurrentVersionExpiration(BucketLifecycleConfigurationV2RuleNoncurrentVersionExpirationArgs.builder()\n .noncurrentDays(90)\n .build())\n .noncurrentVersionTransitions( \n BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs.builder()\n .noncurrentDays(30)\n .storageClass(\"STANDARD_IA\")\n .build(),\n BucketLifecycleConfigurationV2RuleNoncurrentVersionTransitionArgs.builder()\n .noncurrentDays(60)\n .storageClass(\"GLACIER\")\n .build())\n .status(\"Enabled\")\n .build())\n .build(), CustomResourceOptions.builder()\n .dependsOn(versioning)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bucket:\n type: aws:s3:BucketV2\n properties:\n bucket: my-bucket\n bucketAcl:\n type: aws:s3:BucketAclV2\n name: bucket_acl\n properties:\n bucket: ${bucket.id}\n acl: private\n bucket-config:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${bucket.id}\n rules:\n - id: log\n expiration:\n days: 90\n filter:\n and:\n prefix: log/\n tags:\n rule: log\n autoclean: 'true'\n status: Enabled\n transitions:\n - days: 30\n storageClass: STANDARD_IA\n - days: 60\n storageClass: GLACIER\n - id: tmp\n filter:\n prefix: tmp/\n expiration:\n date: 2023-01-13T00:00:00Z\n status: Enabled\n versioningBucket:\n type: aws:s3:BucketV2\n name: versioning_bucket\n properties:\n bucket: my-versioning-bucket\n versioningBucketAcl:\n type: aws:s3:BucketAclV2\n name: versioning_bucket_acl\n properties:\n bucket: ${versioningBucket.id}\n acl: private\n versioning:\n type: aws:s3:BucketVersioningV2\n properties:\n bucket: ${versioningBucket.id}\n versioningConfiguration:\n status: Enabled\n versioning-bucket-config:\n type: aws:s3:BucketLifecycleConfigurationV2\n properties:\n bucket: ${versioningBucket.id}\n rules:\n - id: config\n filter:\n prefix: config/\n noncurrentVersionExpiration:\n noncurrentDays: 90\n noncurrentVersionTransitions:\n - noncurrentDays: 30\n storageClass: STANDARD_IA\n - noncurrentDays: 60\n storageClass: GLACIER\n status: Enabled\n options:\n dependson:\n - ${versioning}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nIf the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):\n\n__Using `pulumi import` to import__ S3 bucket lifecycle configuration using the `bucket` or using the `bucket` and `expected_bucket_owner` separated by a comma (`,`). For example:\n\nIf the owner (account ID) of the source bucket is the same account used to configure the AWS Provider, import using the `bucket`:\n\n```sh\n$ pulumi import aws:s3/bucketLifecycleConfigurationV2:BucketLifecycleConfigurationV2 example bucket-name\n```\nIf the owner (account ID) of the source bucket differs from the account used to configure the AWS Provider, import using the `bucket` and `expected_bucket_owner` separated by a comma (`,`):\n\n```sh\n$ pulumi import aws:s3/bucketLifecycleConfigurationV2:BucketLifecycleConfigurationV2 example bucket-name,123456789012\n```\n", "properties": { "bucket": { "type": "string", @@ -341631,7 +341631,7 @@ } }, "aws:s3/bucketObjectv2:BucketObjectv2": { - "description": "Provides an S3 object resource.\n\n## Example Usage\n\n### Uploading a file to a bucket\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst object = new aws.s3.BucketObjectv2(\"object\", {\n bucket: \"your_bucket_name\",\n key: \"new_object_key\",\n source: new pulumi.asset.FileAsset(\"path/to/file\"),\n etag: std.filemd5({\n input: \"path/to/file\",\n }).then(invoke =\u003e invoke.result),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nobject = aws.s3.BucketObjectv2(\"object\",\n bucket=\"your_bucket_name\",\n key=\"new_object_key\",\n source=pulumi.FileAsset(\"path/to/file\"),\n etag=std.filemd5(input=\"path/to/file\").result)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @object = new Aws.S3.BucketObjectv2(\"object\", new()\n {\n Bucket = \"your_bucket_name\",\n Key = \"new_object_key\",\n Source = new FileAsset(\"path/to/file\"),\n Etag = Std.Filemd5.Invoke(new()\n {\n Input = \"path/to/file\",\n }).Apply(invoke =\u003e invoke.Result),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeFilemd5, err := std.Filemd5(ctx, \u0026std.Filemd5Args{\n\t\t\tInput: \"path/to/file\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"object\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: pulumi.Any(\"your_bucket_name\"),\n\t\t\tKey: pulumi.String(\"new_object_key\"),\n\t\t\tSource: pulumi.NewFileAsset(\"path/to/file\"),\n\t\t\tEtag: pulumi.String(invokeFilemd5.Result),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var object = new BucketObjectv2(\"object\", BucketObjectv2Args.builder()\n .bucket(\"your_bucket_name\")\n .key(\"new_object_key\")\n .source(new FileAsset(\"path/to/file\"))\n .etag(StdFunctions.filemd5(Filemd5Args.builder()\n .input(\"path/to/file\")\n .build()).result())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n object:\n type: aws:s3:BucketObjectv2\n properties:\n bucket: your_bucket_name\n key: new_object_key\n source:\n fn::FileAsset: path/to/file\n etag:\n fn::invoke:\n Function: std:filemd5\n Arguments:\n input: path/to/file\n Return: result\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Encrypting with KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplekms = new aws.kms.Key(\"examplekms\", {\n description: \"KMS key 1\",\n deletionWindowInDays: 7,\n});\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {bucket: \"examplebuckettftest\"});\nconst example = new aws.s3.BucketAclV2(\"example\", {\n bucket: examplebucket.id,\n acl: \"private\",\n});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"index.html\"),\n kmsKeyId: examplekms.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplekms = aws.kms.Key(\"examplekms\",\n description=\"KMS key 1\",\n deletion_window_in_days=7)\nexamplebucket = aws.s3.BucketV2(\"examplebucket\", bucket=\"examplebuckettftest\")\nexample = aws.s3.BucketAclV2(\"example\",\n bucket=examplebucket.id,\n acl=\"private\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"index.html\"),\n kms_key_id=examplekms.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplekms = new Aws.Kms.Key(\"examplekms\", new()\n {\n Description = \"KMS key 1\",\n DeletionWindowInDays = 7,\n });\n\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n });\n\n var example = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n Acl = \"private\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"index.html\"),\n KmsKeyId = examplekms.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplekms, err := kms.NewKey(ctx, \"examplekms\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"KMS key 1\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"index.html\"),\n\t\t\tKmsKeyId: examplekms.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplekms = new Key(\"examplekms\", KeyArgs.builder()\n .description(\"KMS key 1\")\n .deletionWindowInDays(7)\n .build());\n\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .build());\n\n var example = new BucketAclV2(\"example\", BucketAclV2Args.builder()\n .bucket(examplebucket.id())\n .acl(\"private\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"index.html\"))\n .kmsKeyId(examplekms.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplekms:\n type: aws:kms:Key\n properties:\n description: KMS key 1\n deletionWindowInDays: 7\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n example:\n type: aws:s3:BucketAclV2\n properties:\n bucket: ${examplebucket.id}\n acl: private\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: index.html\n kmsKeyId: ${examplekms.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Server Side Encryption with S3 Default Master Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {bucket: \"examplebuckettftest\"});\nconst example = new aws.s3.BucketAclV2(\"example\", {\n bucket: examplebucket.id,\n acl: \"private\",\n});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"index.html\"),\n serverSideEncryption: \"aws:kms\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplebucket = aws.s3.BucketV2(\"examplebucket\", bucket=\"examplebuckettftest\")\nexample = aws.s3.BucketAclV2(\"example\",\n bucket=examplebucket.id,\n acl=\"private\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"index.html\"),\n server_side_encryption=\"aws:kms\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n });\n\n var example = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n Acl = \"private\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"index.html\"),\n ServerSideEncryption = \"aws:kms\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"index.html\"),\n\t\t\tServerSideEncryption: pulumi.String(\"aws:kms\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .build());\n\n var example = new BucketAclV2(\"example\", BucketAclV2Args.builder()\n .bucket(examplebucket.id())\n .acl(\"private\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"index.html\"))\n .serverSideEncryption(\"aws:kms\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n example:\n type: aws:s3:BucketAclV2\n properties:\n bucket: ${examplebucket.id}\n acl: private\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: index.html\n serverSideEncryption: aws:kms\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Server Side Encryption with AWS-Managed Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {bucket: \"examplebuckettftest\"});\nconst example = new aws.s3.BucketAclV2(\"example\", {\n bucket: examplebucket.id,\n acl: \"private\",\n});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"index.html\"),\n serverSideEncryption: \"AES256\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplebucket = aws.s3.BucketV2(\"examplebucket\", bucket=\"examplebuckettftest\")\nexample = aws.s3.BucketAclV2(\"example\",\n bucket=examplebucket.id,\n acl=\"private\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"index.html\"),\n server_side_encryption=\"AES256\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n });\n\n var example = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n Acl = \"private\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"index.html\"),\n ServerSideEncryption = \"AES256\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"index.html\"),\n\t\t\tServerSideEncryption: pulumi.String(\"AES256\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .build());\n\n var example = new BucketAclV2(\"example\", BucketAclV2Args.builder()\n .bucket(examplebucket.id())\n .acl(\"private\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"index.html\"))\n .serverSideEncryption(\"AES256\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n example:\n type: aws:s3:BucketAclV2\n properties:\n bucket: ${examplebucket.id}\n acl: private\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: index.html\n serverSideEncryption: AES256\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### S3 Object Lock\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {\n bucket: \"examplebuckettftest\",\n objectLockEnabled: true,\n});\nconst example = new aws.s3.BucketAclV2(\"example\", {\n bucket: examplebucket.id,\n acl: \"private\",\n});\nconst exampleBucketVersioningV2 = new aws.s3.BucketVersioningV2(\"example\", {\n bucket: examplebucket.id,\n versioningConfiguration: {\n status: \"Enabled\",\n },\n});\nconst examplebucketObject = new aws.s3.BucketObjectv2(\"examplebucket_object\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"important.txt\"),\n objectLockLegalHoldStatus: \"ON\",\n objectLockMode: \"GOVERNANCE\",\n objectLockRetainUntilDate: \"2021-12-31T23:59:60Z\",\n forceDestroy: true,\n}, {\n dependsOn: [exampleBucketVersioningV2],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplebucket = aws.s3.BucketV2(\"examplebucket\",\n bucket=\"examplebuckettftest\",\n object_lock_enabled=True)\nexample = aws.s3.BucketAclV2(\"example\",\n bucket=examplebucket.id,\n acl=\"private\")\nexample_bucket_versioning_v2 = aws.s3.BucketVersioningV2(\"example\",\n bucket=examplebucket.id,\n versioning_configuration={\n \"status\": \"Enabled\",\n })\nexamplebucket_object = aws.s3.BucketObjectv2(\"examplebucket_object\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"important.txt\"),\n object_lock_legal_hold_status=\"ON\",\n object_lock_mode=\"GOVERNANCE\",\n object_lock_retain_until_date=\"2021-12-31T23:59:60Z\",\n force_destroy=True,\n opts = pulumi.ResourceOptions(depends_on=[example_bucket_versioning_v2]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n ObjectLockEnabled = true,\n });\n\n var example = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n Acl = \"private\",\n });\n\n var exampleBucketVersioningV2 = new Aws.S3.BucketVersioningV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs\n {\n Status = \"Enabled\",\n },\n });\n\n var examplebucketObject = new Aws.S3.BucketObjectv2(\"examplebucket_object\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"important.txt\"),\n ObjectLockLegalHoldStatus = \"ON\",\n ObjectLockMode = \"GOVERNANCE\",\n ObjectLockRetainUntilDate = \"2021-12-31T23:59:60Z\",\n ForceDestroy = true,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketVersioningV2,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t\tObjectLockEnabled: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketVersioningV2, err := s3.NewBucketVersioningV2(ctx, \"example\", \u0026s3.BucketVersioningV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tVersioningConfiguration: \u0026s3.BucketVersioningV2VersioningConfigurationArgs{\n\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"examplebucket_object\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"important.txt\"),\n\t\t\tObjectLockLegalHoldStatus: pulumi.String(\"ON\"),\n\t\t\tObjectLockMode: pulumi.String(\"GOVERNANCE\"),\n\t\t\tObjectLockRetainUntilDate: pulumi.String(\"2021-12-31T23:59:60Z\"),\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketVersioningV2,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketVersioningV2;\nimport com.pulumi.aws.s3.BucketVersioningV2Args;\nimport com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.resources.CustomResourceOptions;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .objectLockEnabled(true)\n .build());\n\n var example = new BucketAclV2(\"example\", BucketAclV2Args.builder()\n .bucket(examplebucket.id())\n .acl(\"private\")\n .build());\n\n var exampleBucketVersioningV2 = new BucketVersioningV2(\"exampleBucketVersioningV2\", BucketVersioningV2Args.builder()\n .bucket(examplebucket.id())\n .versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()\n .status(\"Enabled\")\n .build())\n .build());\n\n var examplebucketObject = new BucketObjectv2(\"examplebucketObject\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"important.txt\"))\n .objectLockLegalHoldStatus(\"ON\")\n .objectLockMode(\"GOVERNANCE\")\n .objectLockRetainUntilDate(\"2021-12-31T23:59:60Z\")\n .forceDestroy(true)\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleBucketVersioningV2)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n objectLockEnabled: true\n example:\n type: aws:s3:BucketAclV2\n properties:\n bucket: ${examplebucket.id}\n acl: private\n exampleBucketVersioningV2:\n type: aws:s3:BucketVersioningV2\n name: example\n properties:\n bucket: ${examplebucket.id}\n versioningConfiguration:\n status: Enabled\n examplebucketObject:\n type: aws:s3:BucketObjectv2\n name: examplebucket_object\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: important.txt\n objectLockLegalHoldStatus: ON\n objectLockMode: GOVERNANCE\n objectLockRetainUntilDate: 2021-12-31T23:59:60Z\n forceDestroy: true\n options:\n dependson:\n - ${exampleBucketVersioningV2}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Ignoring Provider `default_tags`\n\nS3 objects support a [maximum of 10 tags](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html).\nIf the resource's own `tags` and the provider-level `default_tags` would together lead to more than 10 tags on an S3 object, use the `override_provider` configuration block to suppress any provider-level `default_tags`.\n\n\u003e S3 objects stored in Amazon S3 Express directory buckets do not support tags, so any provider-level `default_tags` must be suppressed.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {bucket: \"examplebuckettftest\"});\nconst examplebucketObject = new aws.s3.BucketObjectv2(\"examplebucket_object\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"important.txt\"),\n tags: {\n Env: \"test\",\n },\n overrideProvider: {\n defaultTags: {\n tags: {},\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplebucket = aws.s3.BucketV2(\"examplebucket\", bucket=\"examplebuckettftest\")\nexamplebucket_object = aws.s3.BucketObjectv2(\"examplebucket_object\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"important.txt\"),\n tags={\n \"Env\": \"test\",\n },\n override_provider={\n \"default_tags\": {\n \"tags\": {},\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n });\n\n var examplebucketObject = new Aws.S3.BucketObjectv2(\"examplebucket_object\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"important.txt\"),\n Tags = \n {\n { \"Env\", \"test\" },\n },\n OverrideProvider = new Aws.S3.Inputs.BucketObjectv2OverrideProviderArgs\n {\n DefaultTags = new Aws.S3.Inputs.BucketObjectv2OverrideProviderDefaultTagsArgs\n {\n Tags = null,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"examplebucket_object\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"important.txt\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Env\": pulumi.String(\"test\"),\n\t\t\t},\n\t\t\tOverrideProvider: \u0026s3.BucketObjectv2OverrideProviderArgs{\n\t\t\t\tDefaultTags: \u0026s3.BucketObjectv2OverrideProviderDefaultTagsArgs{\n\t\t\t\t\tTags: nil,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.s3.inputs.BucketObjectv2OverrideProviderArgs;\nimport com.pulumi.aws.s3.inputs.BucketObjectv2OverrideProviderDefaultTagsArgs;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .build());\n\n var examplebucketObject = new BucketObjectv2(\"examplebucketObject\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"important.txt\"))\n .tags(Map.of(\"Env\", \"test\"))\n .overrideProvider(BucketObjectv2OverrideProviderArgs.builder()\n .defaultTags(BucketObjectv2OverrideProviderDefaultTagsArgs.builder()\n .tags()\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n examplebucketObject:\n type: aws:s3:BucketObjectv2\n name: examplebucket_object\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: important.txt\n tags:\n Env: test\n overrideProvider:\n defaultTags:\n tags: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nImport using S3 URL syntax:\n\n__Using `pulumi import` to import__ objects using the `id` or S3 URL. For example:\n\nImport using the `id`, which is the bucket name and the key together:\n\n```sh\n$ pulumi import aws:s3/bucketObjectv2:BucketObjectv2 example some-bucket-name/some/key.txt\n```\nImport using S3 URL syntax:\n\n```sh\n$ pulumi import aws:s3/bucketObjectv2:BucketObjectv2 example s3://some-bucket-name/some/key.txt\n```\n", + "description": "Provides an S3 object resource.\n\n## Example Usage\n\n### Uploading a file to a bucket\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as std from \"@pulumi/std\";\n\nconst object = new aws.s3.BucketObjectv2(\"object\", {\n bucket: \"your_bucket_name\",\n key: \"new_object_key\",\n source: new pulumi.asset.FileAsset(\"path/to/file\"),\n etag: std.filemd5({\n input: \"path/to/file\",\n }).then(invoke =\u003e invoke.result),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_std as std\n\nobject = aws.s3.BucketObjectv2(\"object\",\n bucket=\"your_bucket_name\",\n key=\"new_object_key\",\n source=pulumi.FileAsset(\"path/to/file\"),\n etag=std.filemd5(input=\"path/to/file\").result)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Std = Pulumi.Std;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var @object = new Aws.S3.BucketObjectv2(\"object\", new()\n {\n Bucket = \"your_bucket_name\",\n Key = \"new_object_key\",\n Source = new FileAsset(\"path/to/file\"),\n Etag = Std.Filemd5.Invoke(new()\n {\n Input = \"path/to/file\",\n }).Apply(invoke =\u003e invoke.Result),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi-std/sdk/go/std\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tinvokeFilemd5, err := std.Filemd5(ctx, \u0026std.Filemd5Args{\n\t\t\tInput: \"path/to/file\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"object\", \u0026s3.BucketObjectv2Args{\n\t\t\tBucket: pulumi.Any(\"your_bucket_name\"),\n\t\t\tKey: pulumi.String(\"new_object_key\"),\n\t\t\tSource: pulumi.NewFileAsset(\"path/to/file\"),\n\t\t\tEtag: pulumi.String(invokeFilemd5.Result),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var object = new BucketObjectv2(\"object\", BucketObjectv2Args.builder()\n .bucket(\"your_bucket_name\")\n .key(\"new_object_key\")\n .source(new FileAsset(\"path/to/file\"))\n .etag(StdFunctions.filemd5(Filemd5Args.builder()\n .input(\"path/to/file\")\n .build()).result())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n object:\n type: aws:s3:BucketObjectv2\n properties:\n bucket: your_bucket_name\n key: new_object_key\n source:\n fn::FileAsset: path/to/file\n etag:\n fn::invoke:\n Function: std:filemd5\n Arguments:\n input: path/to/file\n Return: result\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Encrypting with KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplekms = new aws.kms.Key(\"examplekms\", {\n description: \"KMS key 1\",\n deletionWindowInDays: 7,\n});\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {bucket: \"examplebuckettftest\"});\nconst example = new aws.s3.BucketAclV2(\"example\", {\n bucket: examplebucket.id,\n acl: \"private\",\n});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"index.html\"),\n kmsKeyId: examplekms.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplekms = aws.kms.Key(\"examplekms\",\n description=\"KMS key 1\",\n deletion_window_in_days=7)\nexamplebucket = aws.s3.BucketV2(\"examplebucket\", bucket=\"examplebuckettftest\")\nexample = aws.s3.BucketAclV2(\"example\",\n bucket=examplebucket.id,\n acl=\"private\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"index.html\"),\n kms_key_id=examplekms.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplekms = new Aws.Kms.Key(\"examplekms\", new()\n {\n Description = \"KMS key 1\",\n DeletionWindowInDays = 7,\n });\n\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n });\n\n var example = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n Acl = \"private\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"index.html\"),\n KmsKeyId = examplekms.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplekms, err := kms.NewKey(ctx, \"examplekms\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"KMS key 1\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"index.html\"),\n\t\t\tKmsKeyId: examplekms.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplekms = new Key(\"examplekms\", KeyArgs.builder()\n .description(\"KMS key 1\")\n .deletionWindowInDays(7)\n .build());\n\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .build());\n\n var example = new BucketAclV2(\"example\", BucketAclV2Args.builder()\n .bucket(examplebucket.id())\n .acl(\"private\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"index.html\"))\n .kmsKeyId(examplekms.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplekms:\n type: aws:kms:Key\n properties:\n description: KMS key 1\n deletionWindowInDays: 7\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n example:\n type: aws:s3:BucketAclV2\n properties:\n bucket: ${examplebucket.id}\n acl: private\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: index.html\n kmsKeyId: ${examplekms.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Server Side Encryption with S3 Default Master Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {bucket: \"examplebuckettftest\"});\nconst example = new aws.s3.BucketAclV2(\"example\", {\n bucket: examplebucket.id,\n acl: \"private\",\n});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"index.html\"),\n serverSideEncryption: \"aws:kms\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplebucket = aws.s3.BucketV2(\"examplebucket\", bucket=\"examplebuckettftest\")\nexample = aws.s3.BucketAclV2(\"example\",\n bucket=examplebucket.id,\n acl=\"private\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"index.html\"),\n server_side_encryption=\"aws:kms\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n });\n\n var example = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n Acl = \"private\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"index.html\"),\n ServerSideEncryption = \"aws:kms\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"index.html\"),\n\t\t\tServerSideEncryption: pulumi.String(\"aws:kms\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .build());\n\n var example = new BucketAclV2(\"example\", BucketAclV2Args.builder()\n .bucket(examplebucket.id())\n .acl(\"private\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"index.html\"))\n .serverSideEncryption(\"aws:kms\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n example:\n type: aws:s3:BucketAclV2\n properties:\n bucket: ${examplebucket.id}\n acl: private\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: index.html\n serverSideEncryption: aws:kms\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Server Side Encryption with AWS-Managed Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {bucket: \"examplebuckettftest\"});\nconst example = new aws.s3.BucketAclV2(\"example\", {\n bucket: examplebucket.id,\n acl: \"private\",\n});\nconst exampleBucketObjectv2 = new aws.s3.BucketObjectv2(\"example\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"index.html\"),\n serverSideEncryption: \"AES256\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplebucket = aws.s3.BucketV2(\"examplebucket\", bucket=\"examplebuckettftest\")\nexample = aws.s3.BucketAclV2(\"example\",\n bucket=examplebucket.id,\n acl=\"private\")\nexample_bucket_objectv2 = aws.s3.BucketObjectv2(\"example\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"index.html\"),\n server_side_encryption=\"AES256\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n });\n\n var example = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n Acl = \"private\",\n });\n\n var exampleBucketObjectv2 = new Aws.S3.BucketObjectv2(\"example\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"index.html\"),\n ServerSideEncryption = \"AES256\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"example\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"index.html\"),\n\t\t\tServerSideEncryption: pulumi.String(\"AES256\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .build());\n\n var example = new BucketAclV2(\"example\", BucketAclV2Args.builder()\n .bucket(examplebucket.id())\n .acl(\"private\")\n .build());\n\n var exampleBucketObjectv2 = new BucketObjectv2(\"exampleBucketObjectv2\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"index.html\"))\n .serverSideEncryption(\"AES256\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n example:\n type: aws:s3:BucketAclV2\n properties:\n bucket: ${examplebucket.id}\n acl: private\n exampleBucketObjectv2:\n type: aws:s3:BucketObjectv2\n name: example\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: index.html\n serverSideEncryption: AES256\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### S3 Object Lock\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {\n bucket: \"examplebuckettftest\",\n objectLockEnabled: true,\n});\nconst example = new aws.s3.BucketAclV2(\"example\", {\n bucket: examplebucket.id,\n acl: \"private\",\n});\nconst exampleBucketVersioningV2 = new aws.s3.BucketVersioningV2(\"example\", {\n bucket: examplebucket.id,\n versioningConfiguration: {\n status: \"Enabled\",\n },\n});\nconst examplebucketObject = new aws.s3.BucketObjectv2(\"examplebucket_object\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"important.txt\"),\n objectLockLegalHoldStatus: \"ON\",\n objectLockMode: \"GOVERNANCE\",\n objectLockRetainUntilDate: \"2021-12-31T23:59:60Z\",\n forceDestroy: true,\n}, {\n dependsOn: [exampleBucketVersioningV2],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplebucket = aws.s3.BucketV2(\"examplebucket\",\n bucket=\"examplebuckettftest\",\n object_lock_enabled=True)\nexample = aws.s3.BucketAclV2(\"example\",\n bucket=examplebucket.id,\n acl=\"private\")\nexample_bucket_versioning_v2 = aws.s3.BucketVersioningV2(\"example\",\n bucket=examplebucket.id,\n versioning_configuration={\n \"status\": \"Enabled\",\n })\nexamplebucket_object = aws.s3.BucketObjectv2(\"examplebucket_object\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"important.txt\"),\n object_lock_legal_hold_status=\"ON\",\n object_lock_mode=\"GOVERNANCE\",\n object_lock_retain_until_date=\"2021-12-31T23:59:60Z\",\n force_destroy=True,\n opts = pulumi.ResourceOptions(depends_on=[example_bucket_versioning_v2]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n ObjectLockEnabled = true,\n });\n\n var example = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n Acl = \"private\",\n });\n\n var exampleBucketVersioningV2 = new Aws.S3.BucketVersioningV2(\"example\", new()\n {\n Bucket = examplebucket.Id,\n VersioningConfiguration = new Aws.S3.Inputs.BucketVersioningV2VersioningConfigurationArgs\n {\n Status = \"Enabled\",\n },\n });\n\n var examplebucketObject = new Aws.S3.BucketObjectv2(\"examplebucket_object\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"important.txt\"),\n ObjectLockLegalHoldStatus = \"ON\",\n ObjectLockMode = \"GOVERNANCE\",\n ObjectLockRetainUntilDate = \"2021-12-31T23:59:60Z\",\n ForceDestroy = true,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleBucketVersioningV2,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t\tObjectLockEnabled: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tAcl: pulumi.String(\"private\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketVersioningV2, err := s3.NewBucketVersioningV2(ctx, \"example\", \u0026s3.BucketVersioningV2Args{\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tVersioningConfiguration: \u0026s3.BucketVersioningV2VersioningConfigurationArgs{\n\t\t\t\tStatus: pulumi.String(\"Enabled\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"examplebucket_object\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"important.txt\"),\n\t\t\tObjectLockLegalHoldStatus: pulumi.String(\"ON\"),\n\t\t\tObjectLockMode: pulumi.String(\"GOVERNANCE\"),\n\t\t\tObjectLockRetainUntilDate: pulumi.String(\"2021-12-31T23:59:60Z\"),\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleBucketVersioningV2,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.BucketVersioningV2;\nimport com.pulumi.aws.s3.BucketVersioningV2Args;\nimport com.pulumi.aws.s3.inputs.BucketVersioningV2VersioningConfigurationArgs;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.resources.CustomResourceOptions;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .objectLockEnabled(true)\n .build());\n\n var example = new BucketAclV2(\"example\", BucketAclV2Args.builder()\n .bucket(examplebucket.id())\n .acl(\"private\")\n .build());\n\n var exampleBucketVersioningV2 = new BucketVersioningV2(\"exampleBucketVersioningV2\", BucketVersioningV2Args.builder()\n .bucket(examplebucket.id())\n .versioningConfiguration(BucketVersioningV2VersioningConfigurationArgs.builder()\n .status(\"Enabled\")\n .build())\n .build());\n\n var examplebucketObject = new BucketObjectv2(\"examplebucketObject\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"important.txt\"))\n .objectLockLegalHoldStatus(\"ON\")\n .objectLockMode(\"GOVERNANCE\")\n .objectLockRetainUntilDate(\"2021-12-31T23:59:60Z\")\n .forceDestroy(true)\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleBucketVersioningV2)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n objectLockEnabled: true\n example:\n type: aws:s3:BucketAclV2\n properties:\n bucket: ${examplebucket.id}\n acl: private\n exampleBucketVersioningV2:\n type: aws:s3:BucketVersioningV2\n name: example\n properties:\n bucket: ${examplebucket.id}\n versioningConfiguration:\n status: Enabled\n examplebucketObject:\n type: aws:s3:BucketObjectv2\n name: examplebucket_object\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: important.txt\n objectLockLegalHoldStatus: ON\n objectLockMode: GOVERNANCE\n objectLockRetainUntilDate: 2021-12-31T23:59:60Z\n forceDestroy: true\n options:\n dependson:\n - ${exampleBucketVersioningV2}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Ignoring Provider `default_tags`\n\nS3 objects support a [maximum of 10 tags](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html).\nIf the resource's own `tags` and the provider-level `default_tags` would together lead to more than 10 tags on an S3 object, use the `override_provider` configuration block to suppress any provider-level `default_tags`.\n\n\u003e S3 objects stored in Amazon S3 Express directory buckets do not support tags, so any provider-level `default_tags` must be suppressed.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst examplebucket = new aws.s3.BucketV2(\"examplebucket\", {bucket: \"examplebuckettftest\"});\nconst examplebucketObject = new aws.s3.BucketObjectv2(\"examplebucket_object\", {\n key: \"someobject\",\n bucket: examplebucket.id,\n source: new pulumi.asset.FileAsset(\"important.txt\"),\n tags: {\n Env: \"test\",\n },\n overrideProvider: {\n defaultTags: {\n tags: {},\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexamplebucket = aws.s3.BucketV2(\"examplebucket\", bucket=\"examplebuckettftest\")\nexamplebucket_object = aws.s3.BucketObjectv2(\"examplebucket_object\",\n key=\"someobject\",\n bucket=examplebucket.id,\n source=pulumi.FileAsset(\"important.txt\"),\n tags={\n \"Env\": \"test\",\n },\n override_provider={\n \"default_tags\": {\n \"tags\": {},\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var examplebucket = new Aws.S3.BucketV2(\"examplebucket\", new()\n {\n Bucket = \"examplebuckettftest\",\n });\n\n var examplebucketObject = new Aws.S3.BucketObjectv2(\"examplebucket_object\", new()\n {\n Key = \"someobject\",\n Bucket = examplebucket.Id,\n Source = new FileAsset(\"important.txt\"),\n Tags = \n {\n { \"Env\", \"test\" },\n },\n OverrideProvider = new Aws.S3.Inputs.BucketObjectv2OverrideProviderArgs\n {\n DefaultTags = new Aws.S3.Inputs.BucketObjectv2OverrideProviderDefaultTagsArgs\n {\n Tags = null,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texamplebucket, err := s3.NewBucketV2(ctx, \"examplebucket\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"examplebuckettftest\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketObjectv2(ctx, \"examplebucket_object\", \u0026s3.BucketObjectv2Args{\n\t\t\tKey: pulumi.String(\"someobject\"),\n\t\t\tBucket: examplebucket.ID(),\n\t\t\tSource: pulumi.NewFileAsset(\"important.txt\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Env\": pulumi.String(\"test\"),\n\t\t\t},\n\t\t\tOverrideProvider: \u0026s3.BucketObjectv2OverrideProviderArgs{\n\t\t\t\tDefaultTags: \u0026s3.BucketObjectv2OverrideProviderDefaultTagsArgs{\n\t\t\t\t\tTags: pulumi.StringMap{},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketObjectv2;\nimport com.pulumi.aws.s3.BucketObjectv2Args;\nimport com.pulumi.aws.s3.inputs.BucketObjectv2OverrideProviderArgs;\nimport com.pulumi.aws.s3.inputs.BucketObjectv2OverrideProviderDefaultTagsArgs;\nimport com.pulumi.asset.FileAsset;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var examplebucket = new BucketV2(\"examplebucket\", BucketV2Args.builder()\n .bucket(\"examplebuckettftest\")\n .build());\n\n var examplebucketObject = new BucketObjectv2(\"examplebucketObject\", BucketObjectv2Args.builder()\n .key(\"someobject\")\n .bucket(examplebucket.id())\n .source(new FileAsset(\"important.txt\"))\n .tags(Map.of(\"Env\", \"test\"))\n .overrideProvider(BucketObjectv2OverrideProviderArgs.builder()\n .defaultTags(BucketObjectv2OverrideProviderDefaultTagsArgs.builder()\n .tags()\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplebucket:\n type: aws:s3:BucketV2\n properties:\n bucket: examplebuckettftest\n examplebucketObject:\n type: aws:s3:BucketObjectv2\n name: examplebucket_object\n properties:\n key: someobject\n bucket: ${examplebucket.id}\n source:\n fn::FileAsset: important.txt\n tags:\n Env: test\n overrideProvider:\n defaultTags:\n tags: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nImport using S3 URL syntax:\n\n__Using `pulumi import` to import__ objects using the `id` or S3 URL. For example:\n\nImport using the `id`, which is the bucket name and the key together:\n\n```sh\n$ pulumi import aws:s3/bucketObjectv2:BucketObjectv2 example some-bucket-name/some/key.txt\n```\nImport using S3 URL syntax:\n\n```sh\n$ pulumi import aws:s3/bucketObjectv2:BucketObjectv2 example s3://some-bucket-name/some/key.txt\n```\n", "properties": { "acl": { "type": "string", @@ -345054,7 +345054,7 @@ } }, "aws:s3control/storageLensConfiguration:StorageLensConfiguration": { - "description": "Provides a resource to manage an S3 Storage Lens configuration.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.s3control.StorageLensConfiguration(\"example\", {\n configId: \"example-1\",\n storageLensConfiguration: {\n enabled: true,\n accountLevel: {\n activityMetrics: {\n enabled: true,\n },\n bucketLevel: {\n activityMetrics: {\n enabled: true,\n },\n },\n },\n dataExport: {\n cloudWatchMetrics: {\n enabled: true,\n },\n s3BucketDestination: {\n accountId: current.then(current =\u003e current.accountId),\n arn: target.arn,\n format: \"CSV\",\n outputSchemaVersion: \"V_1\",\n encryption: {\n sseS3s: [{}],\n },\n },\n },\n exclude: {\n buckets: [\n b1.arn,\n b2.arn,\n ],\n regions: [\"us-east-2\"],\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.s3control.StorageLensConfiguration(\"example\",\n config_id=\"example-1\",\n storage_lens_configuration={\n \"enabled\": True,\n \"account_level\": {\n \"activity_metrics\": {\n \"enabled\": True,\n },\n \"bucket_level\": {\n \"activity_metrics\": {\n \"enabled\": True,\n },\n },\n },\n \"data_export\": {\n \"cloud_watch_metrics\": {\n \"enabled\": True,\n },\n \"s3_bucket_destination\": {\n \"account_id\": current.account_id,\n \"arn\": target[\"arn\"],\n \"format\": \"CSV\",\n \"output_schema_version\": \"V_1\",\n \"encryption\": {\n \"sse_s3s\": [{}],\n },\n },\n },\n \"exclude\": {\n \"buckets\": [\n b1[\"arn\"],\n b2[\"arn\"],\n ],\n \"regions\": [\"us-east-2\"],\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.S3Control.StorageLensConfiguration(\"example\", new()\n {\n ConfigId = \"example-1\",\n StorageLensConfigurationDetail = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationArgs\n {\n Enabled = true,\n AccountLevel = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelArgs\n {\n ActivityMetrics = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs\n {\n Enabled = true,\n },\n BucketLevel = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs\n {\n ActivityMetrics = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs\n {\n Enabled = true,\n },\n },\n },\n DataExport = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationDataExportArgs\n {\n CloudWatchMetrics = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs\n {\n Enabled = true,\n },\n S3BucketDestination = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs\n {\n AccountId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Arn = target.Arn,\n Format = \"CSV\",\n OutputSchemaVersion = \"V_1\",\n Encryption = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs\n {\n SseS3s = new[]\n {\n null,\n },\n },\n },\n },\n Exclude = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationExcludeArgs\n {\n Buckets = new[]\n {\n b1.Arn,\n b2.Arn,\n },\n Regions = new[]\n {\n \"us-east-2\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3control\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3control.NewStorageLensConfiguration(ctx, \"example\", \u0026s3control.StorageLensConfigurationArgs{\n\t\t\tConfigId: pulumi.String(\"example-1\"),\n\t\t\tStorageLensConfiguration: \u0026s3control.StorageLensConfigurationStorageLensConfigurationArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\tAccountLevel: \u0026s3control.StorageLensConfigurationStorageLensConfigurationAccountLevelArgs{\n\t\t\t\t\tActivityMetrics: \u0026s3control.StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs{\n\t\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tBucketLevel: \u0026s3control.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs{\n\t\t\t\t\t\tActivityMetrics: \u0026s3control.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs{\n\t\t\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tDataExport: \u0026s3control.StorageLensConfigurationStorageLensConfigurationDataExportArgs{\n\t\t\t\t\tCloudWatchMetrics: \u0026s3control.StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs{\n\t\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tS3BucketDestination: \u0026s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs{\n\t\t\t\t\t\tAccountId: pulumi.String(current.AccountId),\n\t\t\t\t\t\tArn: pulumi.Any(target.Arn),\n\t\t\t\t\t\tFormat: pulumi.String(\"CSV\"),\n\t\t\t\t\t\tOutputSchemaVersion: pulumi.String(\"V_1\"),\n\t\t\t\t\t\tEncryption: \u0026s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs{\n\t\t\t\t\t\t\tSseS3s: s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionSseS3Array{\n\t\t\t\t\t\t\t\tnil,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tExclude: \u0026s3control.StorageLensConfigurationStorageLensConfigurationExcludeArgs{\n\t\t\t\t\tBuckets: pulumi.StringArray{\n\t\t\t\t\t\tb1.Arn,\n\t\t\t\t\t\tb2.Arn,\n\t\t\t\t\t},\n\t\t\t\t\tRegions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"us-east-2\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.s3control.StorageLensConfiguration;\nimport com.pulumi.aws.s3control.StorageLensConfigurationArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationExcludeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new StorageLensConfiguration(\"example\", StorageLensConfigurationArgs.builder()\n .configId(\"example-1\")\n .storageLensConfiguration(StorageLensConfigurationStorageLensConfigurationArgs.builder()\n .enabled(true)\n .accountLevel(StorageLensConfigurationStorageLensConfigurationAccountLevelArgs.builder()\n .activityMetrics(StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs.builder()\n .enabled(true)\n .build())\n .bucketLevel(StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs.builder()\n .activityMetrics(StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs.builder()\n .enabled(true)\n .build())\n .build())\n .build())\n .dataExport(StorageLensConfigurationStorageLensConfigurationDataExportArgs.builder()\n .cloudWatchMetrics(StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs.builder()\n .enabled(true)\n .build())\n .s3BucketDestination(StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs.builder()\n .accountId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .arn(target.arn())\n .format(\"CSV\")\n .outputSchemaVersion(\"V_1\")\n .encryption(StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs.builder()\n .sseS3s()\n .build())\n .build())\n .build())\n .exclude(StorageLensConfigurationStorageLensConfigurationExcludeArgs.builder()\n .buckets( \n b1.arn(),\n b2.arn())\n .regions(\"us-east-2\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3control:StorageLensConfiguration\n properties:\n configId: example-1\n storageLensConfiguration:\n enabled: true\n accountLevel:\n activityMetrics:\n enabled: true\n bucketLevel:\n activityMetrics:\n enabled: true\n dataExport:\n cloudWatchMetrics:\n enabled: true\n s3BucketDestination:\n accountId: ${current.accountId}\n arn: ${target.arn}\n format: CSV\n outputSchemaVersion: V_1\n encryption:\n sseS3s:\n - {}\n exclude:\n buckets:\n - ${b1.arn}\n - ${b2.arn}\n regions:\n - us-east-2\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 Storage Lens configurations using the `account_id` and `config_id`, separated by a colon (`:`). For example:\n\n```sh\n$ pulumi import aws:s3control/storageLensConfiguration:StorageLensConfiguration example 123456789012:example-1\n```\n", + "description": "Provides a resource to manage an S3 Storage Lens configuration.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.s3control.StorageLensConfiguration(\"example\", {\n configId: \"example-1\",\n storageLensConfiguration: {\n enabled: true,\n accountLevel: {\n activityMetrics: {\n enabled: true,\n },\n bucketLevel: {\n activityMetrics: {\n enabled: true,\n },\n },\n },\n dataExport: {\n cloudWatchMetrics: {\n enabled: true,\n },\n s3BucketDestination: {\n accountId: current.then(current =\u003e current.accountId),\n arn: target.arn,\n format: \"CSV\",\n outputSchemaVersion: \"V_1\",\n encryption: {\n sseS3s: [{}],\n },\n },\n },\n exclude: {\n buckets: [\n b1.arn,\n b2.arn,\n ],\n regions: [\"us-east-2\"],\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.s3control.StorageLensConfiguration(\"example\",\n config_id=\"example-1\",\n storage_lens_configuration={\n \"enabled\": True,\n \"account_level\": {\n \"activity_metrics\": {\n \"enabled\": True,\n },\n \"bucket_level\": {\n \"activity_metrics\": {\n \"enabled\": True,\n },\n },\n },\n \"data_export\": {\n \"cloud_watch_metrics\": {\n \"enabled\": True,\n },\n \"s3_bucket_destination\": {\n \"account_id\": current.account_id,\n \"arn\": target[\"arn\"],\n \"format\": \"CSV\",\n \"output_schema_version\": \"V_1\",\n \"encryption\": {\n \"sse_s3s\": [{}],\n },\n },\n },\n \"exclude\": {\n \"buckets\": [\n b1[\"arn\"],\n b2[\"arn\"],\n ],\n \"regions\": [\"us-east-2\"],\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.S3Control.StorageLensConfiguration(\"example\", new()\n {\n ConfigId = \"example-1\",\n StorageLensConfigurationDetail = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationArgs\n {\n Enabled = true,\n AccountLevel = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelArgs\n {\n ActivityMetrics = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs\n {\n Enabled = true,\n },\n BucketLevel = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs\n {\n ActivityMetrics = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs\n {\n Enabled = true,\n },\n },\n },\n DataExport = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationDataExportArgs\n {\n CloudWatchMetrics = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs\n {\n Enabled = true,\n },\n S3BucketDestination = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs\n {\n AccountId = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n Arn = target.Arn,\n Format = \"CSV\",\n OutputSchemaVersion = \"V_1\",\n Encryption = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs\n {\n SseS3s = new[]\n {\n null,\n },\n },\n },\n },\n Exclude = new Aws.S3Control.Inputs.StorageLensConfigurationStorageLensConfigurationExcludeArgs\n {\n Buckets = new[]\n {\n b1.Arn,\n b2.Arn,\n },\n Regions = new[]\n {\n \"us-east-2\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3control\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3control.NewStorageLensConfiguration(ctx, \"example\", \u0026s3control.StorageLensConfigurationArgs{\n\t\t\tConfigId: pulumi.String(\"example-1\"),\n\t\t\tStorageLensConfiguration: \u0026s3control.StorageLensConfigurationStorageLensConfigurationArgs{\n\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\tAccountLevel: \u0026s3control.StorageLensConfigurationStorageLensConfigurationAccountLevelArgs{\n\t\t\t\t\tActivityMetrics: \u0026s3control.StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs{\n\t\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tBucketLevel: \u0026s3control.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs{\n\t\t\t\t\t\tActivityMetrics: \u0026s3control.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs{\n\t\t\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tDataExport: \u0026s3control.StorageLensConfigurationStorageLensConfigurationDataExportArgs{\n\t\t\t\t\tCloudWatchMetrics: \u0026s3control.StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs{\n\t\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t\tS3BucketDestination: \u0026s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs{\n\t\t\t\t\t\tAccountId: pulumi.String(current.AccountId),\n\t\t\t\t\t\tArn: pulumi.Any(target.Arn),\n\t\t\t\t\t\tFormat: pulumi.String(\"CSV\"),\n\t\t\t\t\t\tOutputSchemaVersion: pulumi.String(\"V_1\"),\n\t\t\t\t\t\tEncryption: \u0026s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs{\n\t\t\t\t\t\t\tSseS3s: s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionSseS3Array{\n\t\t\t\t\t\t\t\t\u0026s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionSseS3Args{},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tExclude: \u0026s3control.StorageLensConfigurationStorageLensConfigurationExcludeArgs{\n\t\t\t\t\tBuckets: pulumi.StringArray{\n\t\t\t\t\t\tb1.Arn,\n\t\t\t\t\t\tb2.Arn,\n\t\t\t\t\t},\n\t\t\t\t\tRegions: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"us-east-2\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.s3control.StorageLensConfiguration;\nimport com.pulumi.aws.s3control.StorageLensConfigurationArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs;\nimport com.pulumi.aws.s3control.inputs.StorageLensConfigurationStorageLensConfigurationExcludeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new StorageLensConfiguration(\"example\", StorageLensConfigurationArgs.builder()\n .configId(\"example-1\")\n .storageLensConfiguration(StorageLensConfigurationStorageLensConfigurationArgs.builder()\n .enabled(true)\n .accountLevel(StorageLensConfigurationStorageLensConfigurationAccountLevelArgs.builder()\n .activityMetrics(StorageLensConfigurationStorageLensConfigurationAccountLevelActivityMetricsArgs.builder()\n .enabled(true)\n .build())\n .bucketLevel(StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelArgs.builder()\n .activityMetrics(StorageLensConfigurationStorageLensConfigurationAccountLevelBucketLevelActivityMetricsArgs.builder()\n .enabled(true)\n .build())\n .build())\n .build())\n .dataExport(StorageLensConfigurationStorageLensConfigurationDataExportArgs.builder()\n .cloudWatchMetrics(StorageLensConfigurationStorageLensConfigurationDataExportCloudWatchMetricsArgs.builder()\n .enabled(true)\n .build())\n .s3BucketDestination(StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationArgs.builder()\n .accountId(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .arn(target.arn())\n .format(\"CSV\")\n .outputSchemaVersion(\"V_1\")\n .encryption(StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs.builder()\n .sseS3s()\n .build())\n .build())\n .build())\n .exclude(StorageLensConfigurationStorageLensConfigurationExcludeArgs.builder()\n .buckets( \n b1.arn(),\n b2.arn())\n .regions(\"us-east-2\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3control:StorageLensConfiguration\n properties:\n configId: example-1\n storageLensConfiguration:\n enabled: true\n accountLevel:\n activityMetrics:\n enabled: true\n bucketLevel:\n activityMetrics:\n enabled: true\n dataExport:\n cloudWatchMetrics:\n enabled: true\n s3BucketDestination:\n accountId: ${current.accountId}\n arn: ${target.arn}\n format: CSV\n outputSchemaVersion: V_1\n encryption:\n sseS3s:\n - {}\n exclude:\n buckets:\n - ${b1.arn}\n - ${b2.arn}\n regions:\n - us-east-2\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import S3 Storage Lens configurations using the `account_id` and `config_id`, separated by a colon (`:`). For example:\n\n```sh\n$ pulumi import aws:s3control/storageLensConfiguration:StorageLensConfiguration example 123456789012:example-1\n```\n", "properties": { "accountId": { "type": "string", @@ -349600,7 +349600,7 @@ } }, "aws:schemas/schema:Schema": { - "description": "Provides an EventBridge Schema resource.\n\n\u003e **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = new aws.schemas.Registry(\"test\", {name: \"my_own_registry\"});\nconst testSchema = new aws.schemas.Schema(\"test\", {\n name: \"my_schema\",\n registryName: test.name,\n type: \"OpenApi3\",\n description: \"The schema definition for my event\",\n content: JSON.stringify({\n openapi: \"3.0.0\",\n info: {\n version: \"1.0.0\",\n title: \"Event\",\n },\n paths: {},\n components: {\n schemas: {\n Event: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n },\n },\n },\n },\n },\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ntest = aws.schemas.Registry(\"test\", name=\"my_own_registry\")\ntest_schema = aws.schemas.Schema(\"test\",\n name=\"my_schema\",\n registry_name=test.name,\n type=\"OpenApi3\",\n description=\"The schema definition for my event\",\n content=json.dumps({\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"version\": \"1.0.0\",\n \"title\": \"Event\",\n },\n \"paths\": {},\n \"components\": {\n \"schemas\": {\n \"Event\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n },\n },\n },\n },\n },\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.Schemas.Registry(\"test\", new()\n {\n Name = \"my_own_registry\",\n });\n\n var testSchema = new Aws.Schemas.Schema(\"test\", new()\n {\n Name = \"my_schema\",\n RegistryName = test.Name,\n Type = \"OpenApi3\",\n Description = \"The schema definition for my event\",\n Content = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"openapi\"] = \"3.0.0\",\n [\"info\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"version\"] = \"1.0.0\",\n [\"title\"] = \"Event\",\n },\n [\"paths\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n [\"components\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"schemas\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Event\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"object\",\n [\"properties\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"string\",\n },\n },\n },\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/schemas\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttest, err := schemas.NewRegistry(ctx, \"test\", \u0026schemas.RegistryArgs{\n\t\t\tName: pulumi.String(\"my_own_registry\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"openapi\": \"3.0.0\",\n\t\t\t\"info\": map[string]interface{}{\n\t\t\t\t\"version\": \"1.0.0\",\n\t\t\t\t\"title\": \"Event\",\n\t\t\t},\n\t\t\t\"paths\": nil,\n\t\t\t\"components\": map[string]interface{}{\n\t\t\t\t\"schemas\": map[string]interface{}{\n\t\t\t\t\t\"Event\": map[string]interface{}{\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"properties\": map[string]interface{}{\n\t\t\t\t\t\t\t\"name\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = schemas.NewSchema(ctx, \"test\", \u0026schemas.SchemaArgs{\n\t\t\tName: pulumi.String(\"my_schema\"),\n\t\t\tRegistryName: test.Name,\n\t\t\tType: pulumi.String(\"OpenApi3\"),\n\t\t\tDescription: pulumi.String(\"The schema definition for my event\"),\n\t\t\tContent: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.schemas.Registry;\nimport com.pulumi.aws.schemas.RegistryArgs;\nimport com.pulumi.aws.schemas.Schema;\nimport com.pulumi.aws.schemas.SchemaArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Registry(\"test\", RegistryArgs.builder()\n .name(\"my_own_registry\")\n .build());\n\n var testSchema = new Schema(\"testSchema\", SchemaArgs.builder()\n .name(\"my_schema\")\n .registryName(test.name())\n .type(\"OpenApi3\")\n .description(\"The schema definition for my event\")\n .content(serializeJson(\n jsonObject(\n jsonProperty(\"openapi\", \"3.0.0\"),\n jsonProperty(\"info\", jsonObject(\n jsonProperty(\"version\", \"1.0.0\"),\n jsonProperty(\"title\", \"Event\")\n )),\n jsonProperty(\"paths\", jsonObject(\n\n )),\n jsonProperty(\"components\", jsonObject(\n jsonProperty(\"schemas\", jsonObject(\n jsonProperty(\"Event\", jsonObject(\n jsonProperty(\"type\", \"object\"),\n jsonProperty(\"properties\", jsonObject(\n jsonProperty(\"name\", jsonObject(\n jsonProperty(\"type\", \"string\")\n ))\n ))\n ))\n ))\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:schemas:Registry\n properties:\n name: my_own_registry\n testSchema:\n type: aws:schemas:Schema\n name: test\n properties:\n name: my_schema\n registryName: ${test.name}\n type: OpenApi3\n description: The schema definition for my event\n content:\n fn::toJSON:\n openapi: 3.0.0\n info:\n version: 1.0.0\n title: Event\n paths: {}\n components:\n schemas:\n Event:\n type: object\n properties:\n name:\n type: string\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import EventBridge schema using the `name` and `registry_name`. For example:\n\n```sh\n$ pulumi import aws:schemas/schema:Schema test name/registry\n```\n", + "description": "Provides an EventBridge Schema resource.\n\n\u003e **Note:** EventBridge was formerly known as CloudWatch Events. The functionality is identical.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = new aws.schemas.Registry(\"test\", {name: \"my_own_registry\"});\nconst testSchema = new aws.schemas.Schema(\"test\", {\n name: \"my_schema\",\n registryName: test.name,\n type: \"OpenApi3\",\n description: \"The schema definition for my event\",\n content: JSON.stringify({\n openapi: \"3.0.0\",\n info: {\n version: \"1.0.0\",\n title: \"Event\",\n },\n paths: {},\n components: {\n schemas: {\n Event: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n },\n },\n },\n },\n },\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ntest = aws.schemas.Registry(\"test\", name=\"my_own_registry\")\ntest_schema = aws.schemas.Schema(\"test\",\n name=\"my_schema\",\n registry_name=test.name,\n type=\"OpenApi3\",\n description=\"The schema definition for my event\",\n content=json.dumps({\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"version\": \"1.0.0\",\n \"title\": \"Event\",\n },\n \"paths\": {},\n \"components\": {\n \"schemas\": {\n \"Event\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n },\n },\n },\n },\n },\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Aws.Schemas.Registry(\"test\", new()\n {\n Name = \"my_own_registry\",\n });\n\n var testSchema = new Aws.Schemas.Schema(\"test\", new()\n {\n Name = \"my_schema\",\n RegistryName = test.Name,\n Type = \"OpenApi3\",\n Description = \"The schema definition for my event\",\n Content = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"openapi\"] = \"3.0.0\",\n [\"info\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"version\"] = \"1.0.0\",\n [\"title\"] = \"Event\",\n },\n [\"paths\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n [\"components\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"schemas\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Event\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"object\",\n [\"properties\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"name\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"type\"] = \"string\",\n },\n },\n },\n },\n },\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/schemas\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttest, err := schemas.NewRegistry(ctx, \"test\", \u0026schemas.RegistryArgs{\n\t\t\tName: pulumi.String(\"my_own_registry\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"openapi\": \"3.0.0\",\n\t\t\t\"info\": map[string]interface{}{\n\t\t\t\t\"version\": \"1.0.0\",\n\t\t\t\t\"title\": \"Event\",\n\t\t\t},\n\t\t\t\"paths\": map[string]interface{}{},\n\t\t\t\"components\": map[string]interface{}{\n\t\t\t\t\"schemas\": map[string]interface{}{\n\t\t\t\t\t\"Event\": map[string]interface{}{\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"properties\": map[string]interface{}{\n\t\t\t\t\t\t\t\"name\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = schemas.NewSchema(ctx, \"test\", \u0026schemas.SchemaArgs{\n\t\t\tName: pulumi.String(\"my_schema\"),\n\t\t\tRegistryName: test.Name,\n\t\t\tType: pulumi.String(\"OpenApi3\"),\n\t\t\tDescription: pulumi.String(\"The schema definition for my event\"),\n\t\t\tContent: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.schemas.Registry;\nimport com.pulumi.aws.schemas.RegistryArgs;\nimport com.pulumi.aws.schemas.Schema;\nimport com.pulumi.aws.schemas.SchemaArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new Registry(\"test\", RegistryArgs.builder()\n .name(\"my_own_registry\")\n .build());\n\n var testSchema = new Schema(\"testSchema\", SchemaArgs.builder()\n .name(\"my_schema\")\n .registryName(test.name())\n .type(\"OpenApi3\")\n .description(\"The schema definition for my event\")\n .content(serializeJson(\n jsonObject(\n jsonProperty(\"openapi\", \"3.0.0\"),\n jsonProperty(\"info\", jsonObject(\n jsonProperty(\"version\", \"1.0.0\"),\n jsonProperty(\"title\", \"Event\")\n )),\n jsonProperty(\"paths\", jsonObject(\n\n )),\n jsonProperty(\"components\", jsonObject(\n jsonProperty(\"schemas\", jsonObject(\n jsonProperty(\"Event\", jsonObject(\n jsonProperty(\"type\", \"object\"),\n jsonProperty(\"properties\", jsonObject(\n jsonProperty(\"name\", jsonObject(\n jsonProperty(\"type\", \"string\")\n ))\n ))\n ))\n ))\n ))\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: aws:schemas:Registry\n properties:\n name: my_own_registry\n testSchema:\n type: aws:schemas:Schema\n name: test\n properties:\n name: my_schema\n registryName: ${test.name}\n type: OpenApi3\n description: The schema definition for my event\n content:\n fn::toJSON:\n openapi: 3.0.0\n info:\n version: 1.0.0\n title: Event\n paths: {}\n components:\n schemas:\n Event:\n type: object\n properties:\n name:\n type: string\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import EventBridge schema using the `name` and `registry_name`. For example:\n\n```sh\n$ pulumi import aws:schemas/schema:Schema test name/registry\n```\n", "properties": { "arn": { "type": "string", @@ -350945,7 +350945,7 @@ } }, "aws:securityhub/productSubscription:ProductSubscription": { - "description": "Subscribes to a Security Hub product.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.securityhub.Account(\"example\", {});\nconst current = aws.getRegion({});\nconst exampleProductSubscription = new aws.securityhub.ProductSubscription(\"example\", {productArn: current.then(current =\u003e `arn:aws:securityhub:${current.name}:733251395267:product/alertlogic/althreatmanagement`)}, {\n dependsOn: [example],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.securityhub.Account(\"example\")\ncurrent = aws.get_region()\nexample_product_subscription = aws.securityhub.ProductSubscription(\"example\", product_arn=f\"arn:aws:securityhub:{current.name}:733251395267:product/alertlogic/althreatmanagement\",\nopts = pulumi.ResourceOptions(depends_on=[example]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SecurityHub.Account(\"example\");\n\n var current = Aws.GetRegion.Invoke();\n\n var exampleProductSubscription = new Aws.SecurityHub.ProductSubscription(\"example\", new()\n {\n ProductArn = $\"arn:aws:securityhub:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:733251395267:product/alertlogic/althreatmanagement\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n example,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := securityhub.NewAccount(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = securityhub.NewProductSubscription(ctx, \"example\", \u0026securityhub.ProductSubscriptionArgs{\n\t\t\tProductArn: pulumi.Sprintf(\"arn:aws:securityhub:%v:733251395267:product/alertlogic/althreatmanagement\", current.Name),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texample,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.securityhub.Account;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.securityhub.ProductSubscription;\nimport com.pulumi.aws.securityhub.ProductSubscriptionArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Account(\"example\");\n\n final var current = AwsFunctions.getRegion();\n\n var exampleProductSubscription = new ProductSubscription(\"exampleProductSubscription\", ProductSubscriptionArgs.builder()\n .productArn(String.format(\"arn:aws:securityhub:%s:733251395267:product/alertlogic/althreatmanagement\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build(), CustomResourceOptions.builder()\n .dependsOn(example)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:securityhub:Account\n exampleProductSubscription:\n type: aws:securityhub:ProductSubscription\n name: example\n properties:\n productArn: arn:aws:securityhub:${current.name}:733251395267:product/alertlogic/althreatmanagement\n options:\n dependson:\n - ${example}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Security Hub product subscriptions using `product_arn,arn`. For example:\n\n```sh\n$ pulumi import aws:securityhub/productSubscription:ProductSubscription example arn:aws:securityhub:eu-west-1:733251395267:product/alertlogic/althreatmanagement,arn:aws:securityhub:eu-west-1:123456789012:product-subscription/alertlogic/althreatmanagement\n```\n", + "description": "Subscribes to a Security Hub product.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.securityhub.Account(\"example\", {});\nconst current = aws.getRegion({});\nconst exampleProductSubscription = new aws.securityhub.ProductSubscription(\"example\", {productArn: current.then(current =\u003e `arn:aws:securityhub:${current.name}:733251395267:product/alertlogic/althreatmanagement`)}, {\n dependsOn: [example],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.securityhub.Account(\"example\")\ncurrent = aws.get_region()\nexample_product_subscription = aws.securityhub.ProductSubscription(\"example\", product_arn=f\"arn:aws:securityhub:{current.name}:733251395267:product/alertlogic/althreatmanagement\",\nopts = pulumi.ResourceOptions(depends_on=[example]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SecurityHub.Account(\"example\");\n\n var current = Aws.GetRegion.Invoke();\n\n var exampleProductSubscription = new Aws.SecurityHub.ProductSubscription(\"example\", new()\n {\n ProductArn = $\"arn:aws:securityhub:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:733251395267:product/alertlogic/althreatmanagement\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n example,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := securityhub.NewAccount(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = securityhub.NewProductSubscription(ctx, \"example\", \u0026securityhub.ProductSubscriptionArgs{\n\t\t\tProductArn: pulumi.Sprintf(\"arn:aws:securityhub:%v:733251395267:product/alertlogic/althreatmanagement\", current.Name),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texample,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.securityhub.Account;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.securityhub.ProductSubscription;\nimport com.pulumi.aws.securityhub.ProductSubscriptionArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Account(\"example\");\n\n final var current = AwsFunctions.getRegion();\n\n var exampleProductSubscription = new ProductSubscription(\"exampleProductSubscription\", ProductSubscriptionArgs.builder()\n .productArn(String.format(\"arn:aws:securityhub:%s:733251395267:product/alertlogic/althreatmanagement\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build(), CustomResourceOptions.builder()\n .dependsOn(example)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:securityhub:Account\n exampleProductSubscription:\n type: aws:securityhub:ProductSubscription\n name: example\n properties:\n productArn: arn:aws:securityhub:${current.name}:733251395267:product/alertlogic/althreatmanagement\n options:\n dependson:\n - ${example}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Security Hub product subscriptions using `product_arn,arn`. For example:\n\n```sh\n$ pulumi import aws:securityhub/productSubscription:ProductSubscription example arn:aws:securityhub:eu-west-1:733251395267:product/alertlogic/althreatmanagement,arn:aws:securityhub:eu-west-1:123456789012:product-subscription/alertlogic/althreatmanagement\n```\n", "properties": { "arn": { "type": "string", @@ -351187,7 +351187,7 @@ } }, "aws:securityhub/standardsSubscription:StandardsSubscription": { - "description": "Subscribes to a Security Hub standard.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.securityhub.Account(\"example\", {});\nconst current = aws.getRegion({});\nconst cis = new aws.securityhub.StandardsSubscription(\"cis\", {standardsArn: \"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\"}, {\n dependsOn: [example],\n});\nconst pci321 = new aws.securityhub.StandardsSubscription(\"pci_321\", {standardsArn: current.then(current =\u003e `arn:aws:securityhub:${current.name}::standards/pci-dss/v/3.2.1`)}, {\n dependsOn: [example],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.securityhub.Account(\"example\")\ncurrent = aws.get_region()\ncis = aws.securityhub.StandardsSubscription(\"cis\", standards_arn=\"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\",\nopts = pulumi.ResourceOptions(depends_on=[example]))\npci321 = aws.securityhub.StandardsSubscription(\"pci_321\", standards_arn=f\"arn:aws:securityhub:{current.name}::standards/pci-dss/v/3.2.1\",\nopts = pulumi.ResourceOptions(depends_on=[example]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SecurityHub.Account(\"example\");\n\n var current = Aws.GetRegion.Invoke();\n\n var cis = new Aws.SecurityHub.StandardsSubscription(\"cis\", new()\n {\n StandardsArn = \"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n example,\n },\n });\n\n var pci321 = new Aws.SecurityHub.StandardsSubscription(\"pci_321\", new()\n {\n StandardsArn = $\"arn:aws:securityhub:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}::standards/pci-dss/v/3.2.1\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n example,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := securityhub.NewAccount(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = securityhub.NewStandardsSubscription(ctx, \"cis\", \u0026securityhub.StandardsSubscriptionArgs{\n\t\t\tStandardsArn: pulumi.String(\"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texample,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = securityhub.NewStandardsSubscription(ctx, \"pci_321\", \u0026securityhub.StandardsSubscriptionArgs{\n\t\t\tStandardsArn: pulumi.Sprintf(\"arn:aws:securityhub:%v::standards/pci-dss/v/3.2.1\", current.Name),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texample,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.securityhub.Account;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.securityhub.StandardsSubscription;\nimport com.pulumi.aws.securityhub.StandardsSubscriptionArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Account(\"example\");\n\n final var current = AwsFunctions.getRegion();\n\n var cis = new StandardsSubscription(\"cis\", StandardsSubscriptionArgs.builder()\n .standardsArn(\"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(example)\n .build());\n\n var pci321 = new StandardsSubscription(\"pci321\", StandardsSubscriptionArgs.builder()\n .standardsArn(String.format(\"arn:aws:securityhub:%s::standards/pci-dss/v/3.2.1\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build(), CustomResourceOptions.builder()\n .dependsOn(example)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:securityhub:Account\n cis:\n type: aws:securityhub:StandardsSubscription\n properties:\n standardsArn: arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\n options:\n dependson:\n - ${example}\n pci321:\n type: aws:securityhub:StandardsSubscription\n name: pci_321\n properties:\n standardsArn: arn:aws:securityhub:${current.name}::standards/pci-dss/v/3.2.1\n options:\n dependson:\n - ${example}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Security Hub standards subscriptions using the standards subscription ARN. For example:\n\n```sh\n$ pulumi import aws:securityhub/standardsSubscription:StandardsSubscription cis arn:aws:securityhub:eu-west-1:123456789012:subscription/cis-aws-foundations-benchmark/v/1.2.0\n```\n```sh\n$ pulumi import aws:securityhub/standardsSubscription:StandardsSubscription pci_321 arn:aws:securityhub:eu-west-1:123456789012:subscription/pci-dss/v/3.2.1\n```\n```sh\n$ pulumi import aws:securityhub/standardsSubscription:StandardsSubscription nist_800_53_rev_5 arn:aws:securityhub:eu-west-1:123456789012:subscription/nist-800-53/v/5.0.0\n```\n", + "description": "Subscribes to a Security Hub standard.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.securityhub.Account(\"example\", {});\nconst current = aws.getRegion({});\nconst cis = new aws.securityhub.StandardsSubscription(\"cis\", {standardsArn: \"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\"}, {\n dependsOn: [example],\n});\nconst pci321 = new aws.securityhub.StandardsSubscription(\"pci_321\", {standardsArn: current.then(current =\u003e `arn:aws:securityhub:${current.name}::standards/pci-dss/v/3.2.1`)}, {\n dependsOn: [example],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.securityhub.Account(\"example\")\ncurrent = aws.get_region()\ncis = aws.securityhub.StandardsSubscription(\"cis\", standards_arn=\"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\",\nopts = pulumi.ResourceOptions(depends_on=[example]))\npci321 = aws.securityhub.StandardsSubscription(\"pci_321\", standards_arn=f\"arn:aws:securityhub:{current.name}::standards/pci-dss/v/3.2.1\",\nopts = pulumi.ResourceOptions(depends_on=[example]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SecurityHub.Account(\"example\");\n\n var current = Aws.GetRegion.Invoke();\n\n var cis = new Aws.SecurityHub.StandardsSubscription(\"cis\", new()\n {\n StandardsArn = \"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n example,\n },\n });\n\n var pci321 = new Aws.SecurityHub.StandardsSubscription(\"pci_321\", new()\n {\n StandardsArn = $\"arn:aws:securityhub:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}::standards/pci-dss/v/3.2.1\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n example,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securityhub\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := securityhub.NewAccount(ctx, \"example\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = securityhub.NewStandardsSubscription(ctx, \"cis\", \u0026securityhub.StandardsSubscriptionArgs{\n\t\t\tStandardsArn: pulumi.String(\"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texample,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = securityhub.NewStandardsSubscription(ctx, \"pci_321\", \u0026securityhub.StandardsSubscriptionArgs{\n\t\t\tStandardsArn: pulumi.Sprintf(\"arn:aws:securityhub:%v::standards/pci-dss/v/3.2.1\", current.Name),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texample,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.securityhub.Account;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.securityhub.StandardsSubscription;\nimport com.pulumi.aws.securityhub.StandardsSubscriptionArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Account(\"example\");\n\n final var current = AwsFunctions.getRegion();\n\n var cis = new StandardsSubscription(\"cis\", StandardsSubscriptionArgs.builder()\n .standardsArn(\"arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(example)\n .build());\n\n var pci321 = new StandardsSubscription(\"pci321\", StandardsSubscriptionArgs.builder()\n .standardsArn(String.format(\"arn:aws:securityhub:%s::standards/pci-dss/v/3.2.1\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build(), CustomResourceOptions.builder()\n .dependsOn(example)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:securityhub:Account\n cis:\n type: aws:securityhub:StandardsSubscription\n properties:\n standardsArn: arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0\n options:\n dependson:\n - ${example}\n pci321:\n type: aws:securityhub:StandardsSubscription\n name: pci_321\n properties:\n standardsArn: arn:aws:securityhub:${current.name}::standards/pci-dss/v/3.2.1\n options:\n dependson:\n - ${example}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Security Hub standards subscriptions using the standards subscription ARN. For example:\n\n```sh\n$ pulumi import aws:securityhub/standardsSubscription:StandardsSubscription cis arn:aws:securityhub:eu-west-1:123456789012:subscription/cis-aws-foundations-benchmark/v/1.2.0\n```\n```sh\n$ pulumi import aws:securityhub/standardsSubscription:StandardsSubscription pci_321 arn:aws:securityhub:eu-west-1:123456789012:subscription/pci-dss/v/3.2.1\n```\n```sh\n$ pulumi import aws:securityhub/standardsSubscription:StandardsSubscription nist_800_53_rev_5 arn:aws:securityhub:eu-west-1:123456789012:subscription/nist-800-53/v/5.0.0\n```\n", "properties": { "standardsArn": { "type": "string", @@ -351646,7 +351646,7 @@ } }, "aws:securitylake/subscriberNotification:SubscriberNotification": { - "description": "Resource for managing an AWS Security Lake Subscriber Notification.\n\n## Example Usage\n\n### SQS Notification\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.securitylake.SubscriberNotification(\"example\", {\n subscriberId: exampleAwsSecuritylakeSubscriber.id,\n configuration: {\n sqsNotificationConfiguration: {},\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.securitylake.SubscriberNotification(\"example\",\n subscriber_id=example_aws_securitylake_subscriber[\"id\"],\n configuration={\n \"sqs_notification_configuration\": {},\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SecurityLake.SubscriberNotification(\"example\", new()\n {\n SubscriberId = exampleAwsSecuritylakeSubscriber.Id,\n Configuration = new Aws.SecurityLake.Inputs.SubscriberNotificationConfigurationArgs\n {\n SqsNotificationConfiguration = null,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securitylake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := securitylake.NewSubscriberNotification(ctx, \"example\", \u0026securitylake.SubscriberNotificationArgs{\n\t\t\tSubscriberId: pulumi.Any(exampleAwsSecuritylakeSubscriber.Id),\n\t\t\tConfiguration: \u0026securitylake.SubscriberNotificationConfigurationArgs{\n\t\t\t\tSqsNotificationConfiguration: nil,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.securitylake.SubscriberNotification;\nimport com.pulumi.aws.securitylake.SubscriberNotificationArgs;\nimport com.pulumi.aws.securitylake.inputs.SubscriberNotificationConfigurationArgs;\nimport com.pulumi.aws.securitylake.inputs.SubscriberNotificationConfigurationSqsNotificationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new SubscriberNotification(\"example\", SubscriberNotificationArgs.builder()\n .subscriberId(exampleAwsSecuritylakeSubscriber.id())\n .configuration(SubscriberNotificationConfigurationArgs.builder()\n .sqsNotificationConfiguration()\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:securitylake:SubscriberNotification\n properties:\n subscriberId: ${exampleAwsSecuritylakeSubscriber.id}\n configuration:\n sqsNotificationConfiguration: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### HTTPS Notification\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.securitylake.SubscriberNotification(\"example\", {\n subscriberId: exampleAwsSecuritylakeSubscriber.id,\n configuration: {\n httpsNotificationConfiguration: {\n endpoint: test.apiEndpoint,\n targetRoleArn: eventBridge.arn,\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.securitylake.SubscriberNotification(\"example\",\n subscriber_id=example_aws_securitylake_subscriber[\"id\"],\n configuration={\n \"https_notification_configuration\": {\n \"endpoint\": test[\"apiEndpoint\"],\n \"target_role_arn\": event_bridge[\"arn\"],\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SecurityLake.SubscriberNotification(\"example\", new()\n {\n SubscriberId = exampleAwsSecuritylakeSubscriber.Id,\n Configuration = new Aws.SecurityLake.Inputs.SubscriberNotificationConfigurationArgs\n {\n HttpsNotificationConfiguration = new Aws.SecurityLake.Inputs.SubscriberNotificationConfigurationHttpsNotificationConfigurationArgs\n {\n Endpoint = test.ApiEndpoint,\n TargetRoleArn = eventBridge.Arn,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securitylake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := securitylake.NewSubscriberNotification(ctx, \"example\", \u0026securitylake.SubscriberNotificationArgs{\n\t\t\tSubscriberId: pulumi.Any(exampleAwsSecuritylakeSubscriber.Id),\n\t\t\tConfiguration: \u0026securitylake.SubscriberNotificationConfigurationArgs{\n\t\t\t\tHttpsNotificationConfiguration: \u0026securitylake.SubscriberNotificationConfigurationHttpsNotificationConfigurationArgs{\n\t\t\t\t\tEndpoint: pulumi.Any(test.ApiEndpoint),\n\t\t\t\t\tTargetRoleArn: pulumi.Any(eventBridge.Arn),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.securitylake.SubscriberNotification;\nimport com.pulumi.aws.securitylake.SubscriberNotificationArgs;\nimport com.pulumi.aws.securitylake.inputs.SubscriberNotificationConfigurationArgs;\nimport com.pulumi.aws.securitylake.inputs.SubscriberNotificationConfigurationHttpsNotificationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new SubscriberNotification(\"example\", SubscriberNotificationArgs.builder()\n .subscriberId(exampleAwsSecuritylakeSubscriber.id())\n .configuration(SubscriberNotificationConfigurationArgs.builder()\n .httpsNotificationConfiguration(SubscriberNotificationConfigurationHttpsNotificationConfigurationArgs.builder()\n .endpoint(test.apiEndpoint())\n .targetRoleArn(eventBridge.arn())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:securitylake:SubscriberNotification\n properties:\n subscriberId: ${exampleAwsSecuritylakeSubscriber.id}\n configuration:\n httpsNotificationConfiguration:\n endpoint: ${test.apiEndpoint}\n targetRoleArn: ${eventBridge.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Resource for managing an AWS Security Lake Subscriber Notification.\n\n## Example Usage\n\n### SQS Notification\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.securitylake.SubscriberNotification(\"example\", {\n subscriberId: exampleAwsSecuritylakeSubscriber.id,\n configuration: {\n sqsNotificationConfiguration: {},\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.securitylake.SubscriberNotification(\"example\",\n subscriber_id=example_aws_securitylake_subscriber[\"id\"],\n configuration={\n \"sqs_notification_configuration\": {},\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SecurityLake.SubscriberNotification(\"example\", new()\n {\n SubscriberId = exampleAwsSecuritylakeSubscriber.Id,\n Configuration = new Aws.SecurityLake.Inputs.SubscriberNotificationConfigurationArgs\n {\n SqsNotificationConfiguration = null,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securitylake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := securitylake.NewSubscriberNotification(ctx, \"example\", \u0026securitylake.SubscriberNotificationArgs{\n\t\t\tSubscriberId: pulumi.Any(exampleAwsSecuritylakeSubscriber.Id),\n\t\t\tConfiguration: \u0026securitylake.SubscriberNotificationConfigurationArgs{\n\t\t\t\tSqsNotificationConfiguration: \u0026securitylake.SubscriberNotificationConfigurationSqsNotificationConfigurationArgs{},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.securitylake.SubscriberNotification;\nimport com.pulumi.aws.securitylake.SubscriberNotificationArgs;\nimport com.pulumi.aws.securitylake.inputs.SubscriberNotificationConfigurationArgs;\nimport com.pulumi.aws.securitylake.inputs.SubscriberNotificationConfigurationSqsNotificationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new SubscriberNotification(\"example\", SubscriberNotificationArgs.builder()\n .subscriberId(exampleAwsSecuritylakeSubscriber.id())\n .configuration(SubscriberNotificationConfigurationArgs.builder()\n .sqsNotificationConfiguration()\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:securitylake:SubscriberNotification\n properties:\n subscriberId: ${exampleAwsSecuritylakeSubscriber.id}\n configuration:\n sqsNotificationConfiguration: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### HTTPS Notification\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.securitylake.SubscriberNotification(\"example\", {\n subscriberId: exampleAwsSecuritylakeSubscriber.id,\n configuration: {\n httpsNotificationConfiguration: {\n endpoint: test.apiEndpoint,\n targetRoleArn: eventBridge.arn,\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.securitylake.SubscriberNotification(\"example\",\n subscriber_id=example_aws_securitylake_subscriber[\"id\"],\n configuration={\n \"https_notification_configuration\": {\n \"endpoint\": test[\"apiEndpoint\"],\n \"target_role_arn\": event_bridge[\"arn\"],\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SecurityLake.SubscriberNotification(\"example\", new()\n {\n SubscriberId = exampleAwsSecuritylakeSubscriber.Id,\n Configuration = new Aws.SecurityLake.Inputs.SubscriberNotificationConfigurationArgs\n {\n HttpsNotificationConfiguration = new Aws.SecurityLake.Inputs.SubscriberNotificationConfigurationHttpsNotificationConfigurationArgs\n {\n Endpoint = test.ApiEndpoint,\n TargetRoleArn = eventBridge.Arn,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securitylake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := securitylake.NewSubscriberNotification(ctx, \"example\", \u0026securitylake.SubscriberNotificationArgs{\n\t\t\tSubscriberId: pulumi.Any(exampleAwsSecuritylakeSubscriber.Id),\n\t\t\tConfiguration: \u0026securitylake.SubscriberNotificationConfigurationArgs{\n\t\t\t\tHttpsNotificationConfiguration: \u0026securitylake.SubscriberNotificationConfigurationHttpsNotificationConfigurationArgs{\n\t\t\t\t\tEndpoint: pulumi.Any(test.ApiEndpoint),\n\t\t\t\t\tTargetRoleArn: pulumi.Any(eventBridge.Arn),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.securitylake.SubscriberNotification;\nimport com.pulumi.aws.securitylake.SubscriberNotificationArgs;\nimport com.pulumi.aws.securitylake.inputs.SubscriberNotificationConfigurationArgs;\nimport com.pulumi.aws.securitylake.inputs.SubscriberNotificationConfigurationHttpsNotificationConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new SubscriberNotification(\"example\", SubscriberNotificationArgs.builder()\n .subscriberId(exampleAwsSecuritylakeSubscriber.id())\n .configuration(SubscriberNotificationConfigurationArgs.builder()\n .httpsNotificationConfiguration(SubscriberNotificationConfigurationHttpsNotificationConfigurationArgs.builder()\n .endpoint(test.apiEndpoint())\n .targetRoleArn(eventBridge.arn())\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:securitylake:SubscriberNotification\n properties:\n subscriberId: ${exampleAwsSecuritylakeSubscriber.id}\n configuration:\n httpsNotificationConfiguration:\n endpoint: ${test.apiEndpoint}\n targetRoleArn: ${eventBridge.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "configuration": { "$ref": "#/types/aws:securitylake/SubscriberNotificationConfiguration:SubscriberNotificationConfiguration", @@ -351709,7 +351709,7 @@ } }, "aws:serverlessrepository/cloudFormationStack:CloudFormationStack": { - "description": "Deploys an Application CloudFormation Stack from the Serverless Application Repository.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst postgres_rotator = new aws.serverlessrepository.CloudFormationStack(\"postgres-rotator\", {\n name: \"postgres-rotator\",\n applicationId: \"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\",\n capabilities: [\n \"CAPABILITY_IAM\",\n \"CAPABILITY_RESOURCE_POLICY\",\n ],\n parameters: {\n functionName: \"func-postgres-rotator\",\n endpoint: Promise.all([currentGetRegion, current]).then(([currentGetRegion, current]) =\u003e `secretsmanager.${currentGetRegion.name}.${current.dnsSuffix}`),\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_partition()\ncurrent_get_region = aws.get_region()\npostgres_rotator = aws.serverlessrepository.CloudFormationStack(\"postgres-rotator\",\n name=\"postgres-rotator\",\n application_id=\"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\",\n capabilities=[\n \"CAPABILITY_IAM\",\n \"CAPABILITY_RESOURCE_POLICY\",\n ],\n parameters={\n \"functionName\": \"func-postgres-rotator\",\n \"endpoint\": f\"secretsmanager.{current_get_region.name}.{current.dns_suffix}\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetPartition.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var postgres_rotator = new Aws.ServerlessRepository.CloudFormationStack(\"postgres-rotator\", new()\n {\n Name = \"postgres-rotator\",\n ApplicationId = \"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\",\n Capabilities = new[]\n {\n \"CAPABILITY_IAM\",\n \"CAPABILITY_RESOURCE_POLICY\",\n },\n Parameters = \n {\n { \"functionName\", \"func-postgres-rotator\" },\n { \"endpoint\", Output.Tuple(currentGetRegion, current).Apply(values =\u003e\n {\n var currentGetRegion = values.Item1;\n var current = values.Item2;\n return $\"secretsmanager.{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}.{current.Apply(getPartitionResult =\u003e getPartitionResult.DnsSuffix)}\";\n }) },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/serverlessrepository\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = serverlessrepository.NewCloudFormationStack(ctx, \"postgres-rotator\", \u0026serverlessrepository.CloudFormationStackArgs{\n\t\t\tName: pulumi.String(\"postgres-rotator\"),\n\t\t\tApplicationId: pulumi.String(\"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\"),\n\t\t\tCapabilities: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"CAPABILITY_IAM\"),\n\t\t\t\tpulumi.String(\"CAPABILITY_RESOURCE_POLICY\"),\n\t\t\t},\n\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\"functionName\": pulumi.String(\"func-postgres-rotator\"),\n\t\t\t\t\"endpoint\": pulumi.Sprintf(\"secretsmanager.%v.%v\", currentGetRegion.Name, current.DnsSuffix),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.serverlessrepository.CloudFormationStack;\nimport com.pulumi.aws.serverlessrepository.CloudFormationStackArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getPartition();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n var postgres_rotator = new CloudFormationStack(\"postgres-rotator\", CloudFormationStackArgs.builder()\n .name(\"postgres-rotator\")\n .applicationId(\"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\")\n .capabilities( \n \"CAPABILITY_IAM\",\n \"CAPABILITY_RESOURCE_POLICY\")\n .parameters(Map.ofEntries(\n Map.entry(\"functionName\", \"func-postgres-rotator\"),\n Map.entry(\"endpoint\", String.format(\"secretsmanager.%s.%s\", currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getPartitionResult -\u003e getPartitionResult.dnsSuffix())))\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n postgres-rotator:\n type: aws:serverlessrepository:CloudFormationStack\n properties:\n name: postgres-rotator\n applicationId: arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\n capabilities:\n - CAPABILITY_IAM\n - CAPABILITY_RESOURCE_POLICY\n parameters:\n functionName: func-postgres-rotator\n endpoint: secretsmanager.${currentGetRegion.name}.${current.dnsSuffix}\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Serverless Application Repository Stack using the CloudFormation Stack name (with or without the `serverlessrepo-` prefix) or the CloudFormation Stack ID. For example:\n\n```sh\n$ pulumi import aws:serverlessrepository/cloudFormationStack:CloudFormationStack example serverlessrepo-postgres-rotator\n```\n", + "description": "Deploys an Application CloudFormation Stack from the Serverless Application Repository.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getPartition({});\nconst currentGetRegion = aws.getRegion({});\nconst postgres_rotator = new aws.serverlessrepository.CloudFormationStack(\"postgres-rotator\", {\n name: \"postgres-rotator\",\n applicationId: \"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\",\n capabilities: [\n \"CAPABILITY_IAM\",\n \"CAPABILITY_RESOURCE_POLICY\",\n ],\n parameters: {\n functionName: \"func-postgres-rotator\",\n endpoint: Promise.all([currentGetRegion, current]).then(([currentGetRegion, current]) =\u003e `secretsmanager.${currentGetRegion.name}.${current.dnsSuffix}`),\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_partition()\ncurrent_get_region = aws.get_region()\npostgres_rotator = aws.serverlessrepository.CloudFormationStack(\"postgres-rotator\",\n name=\"postgres-rotator\",\n application_id=\"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\",\n capabilities=[\n \"CAPABILITY_IAM\",\n \"CAPABILITY_RESOURCE_POLICY\",\n ],\n parameters={\n \"functionName\": \"func-postgres-rotator\",\n \"endpoint\": f\"secretsmanager.{current_get_region.name}.{current.dns_suffix}\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetPartition.Invoke();\n\n var currentGetRegion = Aws.GetRegion.Invoke();\n\n var postgres_rotator = new Aws.ServerlessRepository.CloudFormationStack(\"postgres-rotator\", new()\n {\n Name = \"postgres-rotator\",\n ApplicationId = \"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\",\n Capabilities = new[]\n {\n \"CAPABILITY_IAM\",\n \"CAPABILITY_RESOURCE_POLICY\",\n },\n Parameters = \n {\n { \"functionName\", \"func-postgres-rotator\" },\n { \"endpoint\", Output.Tuple(currentGetRegion, current).Apply(values =\u003e\n {\n var currentGetRegion = values.Item1;\n var current = values.Item2;\n return $\"secretsmanager.{currentGetRegion.Apply(getRegionResult =\u003e getRegionResult.Name)}.{current.Apply(getPartitionResult =\u003e getPartitionResult.DnsSuffix)}\";\n }) },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/serverlessrepository\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetRegion, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = serverlessrepository.NewCloudFormationStack(ctx, \"postgres-rotator\", \u0026serverlessrepository.CloudFormationStackArgs{\n\t\t\tName: pulumi.String(\"postgres-rotator\"),\n\t\t\tApplicationId: pulumi.String(\"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\"),\n\t\t\tCapabilities: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"CAPABILITY_IAM\"),\n\t\t\t\tpulumi.String(\"CAPABILITY_RESOURCE_POLICY\"),\n\t\t\t},\n\t\t\tParameters: pulumi.StringMap{\n\t\t\t\t\"functionName\": pulumi.String(\"func-postgres-rotator\"),\n\t\t\t\t\"endpoint\": pulumi.Sprintf(\"secretsmanager.%v.%v\", currentGetRegion.Name, current.DnsSuffix),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.serverlessrepository.CloudFormationStack;\nimport com.pulumi.aws.serverlessrepository.CloudFormationStackArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getPartition();\n\n final var currentGetRegion = AwsFunctions.getRegion();\n\n var postgres_rotator = new CloudFormationStack(\"postgres-rotator\", CloudFormationStackArgs.builder()\n .name(\"postgres-rotator\")\n .applicationId(\"arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\")\n .capabilities( \n \"CAPABILITY_IAM\",\n \"CAPABILITY_RESOURCE_POLICY\")\n .parameters(Map.ofEntries(\n Map.entry(\"functionName\", \"func-postgres-rotator\"),\n Map.entry(\"endpoint\", String.format(\"secretsmanager.%s.%s\", currentGetRegion.applyValue(getRegionResult -\u003e getRegionResult.name()),current.applyValue(getPartitionResult -\u003e getPartitionResult.dnsSuffix())))\n ))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n postgres-rotator:\n type: aws:serverlessrepository:CloudFormationStack\n properties:\n name: postgres-rotator\n applicationId: arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser\n capabilities:\n - CAPABILITY_IAM\n - CAPABILITY_RESOURCE_POLICY\n parameters:\n functionName: func-postgres-rotator\n endpoint: secretsmanager.${currentGetRegion.name}.${current.dnsSuffix}\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n currentGetRegion:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Serverless Application Repository Stack using the CloudFormation Stack name (with or without the `serverlessrepo-` prefix) or the CloudFormation Stack ID. For example:\n\n```sh\n$ pulumi import aws:serverlessrepository/cloudFormationStack:CloudFormationStack example serverlessrepo-postgres-rotator\n```\n", "properties": { "applicationId": { "type": "string", @@ -356734,7 +356734,7 @@ } }, "aws:shield/applicationLayerAutomaticResponse:ApplicationLayerAutomaticResponse": { - "description": "Resource for managing an AWS Shield Application Layer Automatic Response for automatic DDoS mitigation.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst config = new pulumi.Config();\n// The Cloudfront Distribution on which to enable the Application Layer Automatic Response.\nconst distributionId = config.require(\"distributionId\");\nconst example = new aws.shield.ApplicationLayerAutomaticResponse(\"example\", {\n resourceArn: Promise.all([currentGetPartition, currentGetCallerIdentity]).then(([currentGetPartition, currentGetCallerIdentity]) =\u003e `arn:${currentGetPartition.partition}:cloudfront:${currentGetCallerIdentity.accountId}:distribution/${distributionId}`),\n action: \"COUNT\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\nconfig = pulumi.Config()\n# The Cloudfront Distribution on which to enable the Application Layer Automatic Response.\ndistribution_id = config.require(\"distributionId\")\nexample = aws.shield.ApplicationLayerAutomaticResponse(\"example\",\n resource_arn=f\"arn:{current_get_partition.partition}:cloudfront:{current_get_caller_identity.account_id}:distribution/{distribution_id}\",\n action=\"COUNT\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var config = new Config();\n // The Cloudfront Distribution on which to enable the Application Layer Automatic Response.\n var distributionId = config.Require(\"distributionId\");\n var example = new Aws.Shield.ApplicationLayerAutomaticResponse(\"example\", new()\n {\n ResourceArn = Output.Tuple(currentGetPartition, currentGetCallerIdentity).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:cloudfront:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:distribution/{distributionId}\";\n }),\n Action = \"COUNT\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcfg := config.New(ctx, \"\")\n\t\t// The Cloudfront Distribution on which to enable the Application Layer Automatic Response.\n\t\tdistributionId := cfg.Require(\"distributionId\")\n\t\t_, err = shield.NewApplicationLayerAutomaticResponse(ctx, \"example\", \u0026shield.ApplicationLayerAutomaticResponseArgs{\n\t\t\tResourceArn: pulumi.Sprintf(\"arn:%v:cloudfront:%v:distribution/%v\", currentGetPartition.Partition, currentGetCallerIdentity.AccountId, distributionId),\n\t\t\tAction: pulumi.String(\"COUNT\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.shield.ApplicationLayerAutomaticResponse;\nimport com.pulumi.aws.shield.ApplicationLayerAutomaticResponseArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n final var distributionId = config.get(\"distributionId\");\n var example = new ApplicationLayerAutomaticResponse(\"example\", ApplicationLayerAutomaticResponseArgs.builder()\n .resourceArn(String.format(\"arn:%s:cloudfront:%s:distribution/%s\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),distributionId))\n .action(\"COUNT\")\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n distributionId:\n type: string\nresources:\n example:\n type: aws:shield:ApplicationLayerAutomaticResponse\n properties:\n resourceArn: arn:${currentGetPartition.partition}:cloudfront:${currentGetCallerIdentity.accountId}:distribution/${distributionId}\n action: COUNT\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Resource for managing an AWS Shield Application Layer Automatic Response for automatic DDoS mitigation.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst config = new pulumi.Config();\n// The Cloudfront Distribution on which to enable the Application Layer Automatic Response.\nconst distributionId = config.require(\"distributionId\");\nconst example = new aws.shield.ApplicationLayerAutomaticResponse(\"example\", {\n resourceArn: Promise.all([currentGetPartition, currentGetCallerIdentity]).then(([currentGetPartition, currentGetCallerIdentity]) =\u003e `arn:${currentGetPartition.partition}:cloudfront:${currentGetCallerIdentity.accountId}:distribution/${distributionId}`),\n action: \"COUNT\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\nconfig = pulumi.Config()\n# The Cloudfront Distribution on which to enable the Application Layer Automatic Response.\ndistribution_id = config.require(\"distributionId\")\nexample = aws.shield.ApplicationLayerAutomaticResponse(\"example\",\n resource_arn=f\"arn:{current_get_partition.partition}:cloudfront:{current_get_caller_identity.account_id}:distribution/{distribution_id}\",\n action=\"COUNT\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var config = new Config();\n // The Cloudfront Distribution on which to enable the Application Layer Automatic Response.\n var distributionId = config.Require(\"distributionId\");\n var example = new Aws.Shield.ApplicationLayerAutomaticResponse(\"example\", new()\n {\n ResourceArn = Output.Tuple(currentGetPartition, currentGetCallerIdentity).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:cloudfront:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:distribution/{distributionId}\";\n }),\n Action = \"COUNT\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcfg := config.New(ctx, \"\")\n\t\t// The Cloudfront Distribution on which to enable the Application Layer Automatic Response.\n\t\tdistributionId := cfg.Require(\"distributionId\")\n\t\t_, err = shield.NewApplicationLayerAutomaticResponse(ctx, \"example\", \u0026shield.ApplicationLayerAutomaticResponseArgs{\n\t\t\tResourceArn: pulumi.Sprintf(\"arn:%v:cloudfront:%v:distribution/%v\", currentGetPartition.Partition, currentGetCallerIdentity.AccountId, distributionId),\n\t\t\tAction: pulumi.String(\"COUNT\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.shield.ApplicationLayerAutomaticResponse;\nimport com.pulumi.aws.shield.ApplicationLayerAutomaticResponseArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var config = ctx.config();\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n final var distributionId = config.get(\"distributionId\");\n var example = new ApplicationLayerAutomaticResponse(\"example\", ApplicationLayerAutomaticResponseArgs.builder()\n .resourceArn(String.format(\"arn:%s:cloudfront:%s:distribution/%s\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),distributionId))\n .action(\"COUNT\")\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n distributionId:\n type: string\nresources:\n example:\n type: aws:shield:ApplicationLayerAutomaticResponse\n properties:\n resourceArn: arn:${currentGetPartition.partition}:cloudfront:${currentGetCallerIdentity.accountId}:distribution/${distributionId}\n action: COUNT\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "action": { "type": "string", @@ -356934,7 +356934,7 @@ } }, "aws:shield/protection:Protection": { - "description": "Enables AWS Shield Advanced for a specific AWS resource.\nThe resource can be an Amazon CloudFront distribution, Elastic Load Balancing load balancer, AWS Global Accelerator accelerator, Elastic IP Address, or an Amazon Route 53 hosted zone.\n\n## Example Usage\n\n### Create protection\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst available = aws.getAvailabilityZones({});\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst example = new aws.ec2.Eip(\"example\", {domain: \"vpc\"});\nconst exampleProtection = new aws.shield.Protection(\"example\", {\n name: \"example\",\n resourceArn: pulumi.all([current, currentGetCallerIdentity, example.id]).apply(([current, currentGetCallerIdentity, id]) =\u003e `arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${id}`),\n tags: {\n Environment: \"Dev\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\navailable = aws.get_availability_zones()\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample = aws.ec2.Eip(\"example\", domain=\"vpc\")\nexample_protection = aws.shield.Protection(\"example\",\n name=\"example\",\n resource_arn=example.id.apply(lambda id: f\"arn:aws:ec2:{current.name}:{current_get_caller_identity.account_id}:eip-allocation/{id}\"),\n tags={\n \"Environment\": \"Dev\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var available = Aws.GetAvailabilityZones.Invoke();\n\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Ec2.Eip(\"example\", new()\n {\n Domain = \"vpc\",\n });\n\n var exampleProtection = new Aws.Shield.Protection(\"example\", new()\n {\n Name = \"example\",\n ResourceArn = Output.Tuple(current, currentGetCallerIdentity, example.Id).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n var id = values.Item3;\n return $\"arn:aws:ec2:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:eip-allocation/{id}\";\n }),\n Tags = \n {\n { \"Environment\", \"Dev\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetAvailabilityZones(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewEip(ctx, \"example\", \u0026ec2.EipArgs{\n\t\t\tDomain: pulumi.String(\"vpc\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = shield.NewProtection(ctx, \"example\", \u0026shield.ProtectionArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tResourceArn: example.ID().ApplyT(func(id string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"arn:aws:ec2:%v:%v:eip-allocation/%v\", current.Name, currentGetCallerIdentity.AccountId, id), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Environment\": pulumi.String(\"Dev\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetAvailabilityZonesArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.Eip;\nimport com.pulumi.aws.ec2.EipArgs;\nimport com.pulumi.aws.shield.Protection;\nimport com.pulumi.aws.shield.ProtectionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var available = AwsFunctions.getAvailabilityZones();\n\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var example = new Eip(\"example\", EipArgs.builder()\n .domain(\"vpc\")\n .build());\n\n var exampleProtection = new Protection(\"exampleProtection\", ProtectionArgs.builder()\n .name(\"example\")\n .resourceArn(example.id().applyValue(id -\u003e String.format(\"arn:aws:ec2:%s:%s:eip-allocation/%s\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),id)))\n .tags(Map.of(\"Environment\", \"Dev\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:Eip\n properties:\n domain: vpc\n exampleProtection:\n type: aws:shield:Protection\n name: example\n properties:\n name: example\n resourceArn: arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${example.id}\n tags:\n Environment: Dev\nvariables:\n available:\n fn::invoke:\n Function: aws:getAvailabilityZones\n Arguments: {}\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Shield protection resources using specifying their ID. For example:\n\n```sh\n$ pulumi import aws:shield/protection:Protection example ff9592dc-22f3-4e88-afa1-7b29fde9669a\n```\n", + "description": "Enables AWS Shield Advanced for a specific AWS resource.\nThe resource can be an Amazon CloudFront distribution, Elastic Load Balancing load balancer, AWS Global Accelerator accelerator, Elastic IP Address, or an Amazon Route 53 hosted zone.\n\n## Example Usage\n\n### Create protection\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst available = aws.getAvailabilityZones({});\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst example = new aws.ec2.Eip(\"example\", {domain: \"vpc\"});\nconst exampleProtection = new aws.shield.Protection(\"example\", {\n name: \"example\",\n resourceArn: pulumi.all([current, currentGetCallerIdentity, example.id]).apply(([current, currentGetCallerIdentity, id]) =\u003e `arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${id}`),\n tags: {\n Environment: \"Dev\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\navailable = aws.get_availability_zones()\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample = aws.ec2.Eip(\"example\", domain=\"vpc\")\nexample_protection = aws.shield.Protection(\"example\",\n name=\"example\",\n resource_arn=example.id.apply(lambda id: f\"arn:aws:ec2:{current.name}:{current_get_caller_identity.account_id}:eip-allocation/{id}\"),\n tags={\n \"Environment\": \"Dev\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var available = Aws.GetAvailabilityZones.Invoke();\n\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Ec2.Eip(\"example\", new()\n {\n Domain = \"vpc\",\n });\n\n var exampleProtection = new Aws.Shield.Protection(\"example\", new()\n {\n Name = \"example\",\n ResourceArn = Output.Tuple(current, currentGetCallerIdentity, example.Id).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n var id = values.Item3;\n return $\"arn:aws:ec2:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:eip-allocation/{id}\";\n }),\n Tags = \n {\n { \"Environment\", \"Dev\" },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetAvailabilityZones(ctx, \u0026aws.GetAvailabilityZonesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewEip(ctx, \"example\", \u0026ec2.EipArgs{\n\t\t\tDomain: pulumi.String(\"vpc\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = shield.NewProtection(ctx, \"example\", \u0026shield.ProtectionArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tResourceArn: example.ID().ApplyT(func(id string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"arn:aws:ec2:%v:%v:eip-allocation/%v\", current.Name, currentGetCallerIdentity.AccountId, id), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Environment\": pulumi.String(\"Dev\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetAvailabilityZonesArgs;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.Eip;\nimport com.pulumi.aws.ec2.EipArgs;\nimport com.pulumi.aws.shield.Protection;\nimport com.pulumi.aws.shield.ProtectionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var available = AwsFunctions.getAvailabilityZones();\n\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var example = new Eip(\"example\", EipArgs.builder()\n .domain(\"vpc\")\n .build());\n\n var exampleProtection = new Protection(\"exampleProtection\", ProtectionArgs.builder()\n .name(\"example\")\n .resourceArn(example.id().applyValue(id -\u003e String.format(\"arn:aws:ec2:%s:%s:eip-allocation/%s\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),id)))\n .tags(Map.of(\"Environment\", \"Dev\"))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:Eip\n properties:\n domain: vpc\n exampleProtection:\n type: aws:shield:Protection\n name: example\n properties:\n name: example\n resourceArn: arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${example.id}\n tags:\n Environment: Dev\nvariables:\n available:\n fn::invoke:\n Function: aws:getAvailabilityZones\n Arguments: {}\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Shield protection resources using specifying their ID. For example:\n\n```sh\n$ pulumi import aws:shield/protection:Protection example ff9592dc-22f3-4e88-afa1-7b29fde9669a\n```\n", "properties": { "arn": { "type": "string", @@ -357029,7 +357029,7 @@ } }, "aws:shield/protectionGroup:ProtectionGroup": { - "description": "Creates a grouping of protected resources so they can be handled as a collective.\nThis resource grouping improves the accuracy of detection and reduces false positives. For more information see\n[Managing AWS Shield Advanced protection groups](https://docs.aws.amazon.com/waf/latest/developerguide/manage-protection-group.html)\n\n## Example Usage\n\n### Create protection group for all resources\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.shield.ProtectionGroup(\"example\", {\n protectionGroupId: \"example\",\n aggregation: \"MAX\",\n pattern: \"ALL\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.shield.ProtectionGroup(\"example\",\n protection_group_id=\"example\",\n aggregation=\"MAX\",\n pattern=\"ALL\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Shield.ProtectionGroup(\"example\", new()\n {\n ProtectionGroupId = \"example\",\n Aggregation = \"MAX\",\n Pattern = \"ALL\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := shield.NewProtectionGroup(ctx, \"example\", \u0026shield.ProtectionGroupArgs{\n\t\t\tProtectionGroupId: pulumi.String(\"example\"),\n\t\t\tAggregation: pulumi.String(\"MAX\"),\n\t\t\tPattern: pulumi.String(\"ALL\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.shield.ProtectionGroup;\nimport com.pulumi.aws.shield.ProtectionGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ProtectionGroup(\"example\", ProtectionGroupArgs.builder()\n .protectionGroupId(\"example\")\n .aggregation(\"MAX\")\n .pattern(\"ALL\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:shield:ProtectionGroup\n properties:\n protectionGroupId: example\n aggregation: MAX\n pattern: ALL\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create protection group for arbitrary number of resources\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst example = new aws.ec2.Eip(\"example\", {domain: \"vpc\"});\nconst exampleProtection = new aws.shield.Protection(\"example\", {\n name: \"example\",\n resourceArn: pulumi.all([current, currentGetCallerIdentity, example.id]).apply(([current, currentGetCallerIdentity, id]) =\u003e `arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${id}`),\n});\nconst exampleProtectionGroup = new aws.shield.ProtectionGroup(\"example\", {\n protectionGroupId: \"example\",\n aggregation: \"MEAN\",\n pattern: \"ARBITRARY\",\n members: [pulumi.all([current, currentGetCallerIdentity, example.id]).apply(([current, currentGetCallerIdentity, id]) =\u003e `arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${id}`)],\n}, {\n dependsOn: [exampleProtection],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample = aws.ec2.Eip(\"example\", domain=\"vpc\")\nexample_protection = aws.shield.Protection(\"example\",\n name=\"example\",\n resource_arn=example.id.apply(lambda id: f\"arn:aws:ec2:{current.name}:{current_get_caller_identity.account_id}:eip-allocation/{id}\"))\nexample_protection_group = aws.shield.ProtectionGroup(\"example\",\n protection_group_id=\"example\",\n aggregation=\"MEAN\",\n pattern=\"ARBITRARY\",\n members=[example.id.apply(lambda id: f\"arn:aws:ec2:{current.name}:{current_get_caller_identity.account_id}:eip-allocation/{id}\")],\n opts = pulumi.ResourceOptions(depends_on=[example_protection]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Ec2.Eip(\"example\", new()\n {\n Domain = \"vpc\",\n });\n\n var exampleProtection = new Aws.Shield.Protection(\"example\", new()\n {\n Name = \"example\",\n ResourceArn = Output.Tuple(current, currentGetCallerIdentity, example.Id).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n var id = values.Item3;\n return $\"arn:aws:ec2:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:eip-allocation/{id}\";\n }),\n });\n\n var exampleProtectionGroup = new Aws.Shield.ProtectionGroup(\"example\", new()\n {\n ProtectionGroupId = \"example\",\n Aggregation = \"MEAN\",\n Pattern = \"ARBITRARY\",\n Members = new[]\n {\n Output.Tuple(current, currentGetCallerIdentity, example.Id).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n var id = values.Item3;\n return $\"arn:aws:ec2:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:eip-allocation/{id}\";\n }),\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleProtection,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewEip(ctx, \"example\", \u0026ec2.EipArgs{\n\t\t\tDomain: pulumi.String(\"vpc\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleProtection, err := shield.NewProtection(ctx, \"example\", \u0026shield.ProtectionArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tResourceArn: example.ID().ApplyT(func(id string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"arn:aws:ec2:%v:%v:eip-allocation/%v\", current.Name, currentGetCallerIdentity.AccountId, id), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = shield.NewProtectionGroup(ctx, \"example\", \u0026shield.ProtectionGroupArgs{\n\t\t\tProtectionGroupId: pulumi.String(\"example\"),\n\t\t\tAggregation: pulumi.String(\"MEAN\"),\n\t\t\tPattern: pulumi.String(\"ARBITRARY\"),\n\t\t\tMembers: pulumi.StringArray{\n\t\t\t\texample.ID().ApplyT(func(id string) (string, error) {\n\t\t\t\t\treturn fmt.Sprintf(\"arn:aws:ec2:%v:%v:eip-allocation/%v\", current.Name, currentGetCallerIdentity.AccountId, id), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleProtection,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.Eip;\nimport com.pulumi.aws.ec2.EipArgs;\nimport com.pulumi.aws.shield.Protection;\nimport com.pulumi.aws.shield.ProtectionArgs;\nimport com.pulumi.aws.shield.ProtectionGroup;\nimport com.pulumi.aws.shield.ProtectionGroupArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var example = new Eip(\"example\", EipArgs.builder()\n .domain(\"vpc\")\n .build());\n\n var exampleProtection = new Protection(\"exampleProtection\", ProtectionArgs.builder()\n .name(\"example\")\n .resourceArn(example.id().applyValue(id -\u003e String.format(\"arn:aws:ec2:%s:%s:eip-allocation/%s\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),id)))\n .build());\n\n var exampleProtectionGroup = new ProtectionGroup(\"exampleProtectionGroup\", ProtectionGroupArgs.builder()\n .protectionGroupId(\"example\")\n .aggregation(\"MEAN\")\n .pattern(\"ARBITRARY\")\n .members(example.id().applyValue(id -\u003e String.format(\"arn:aws:ec2:%s:%s:eip-allocation/%s\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),id)))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleProtection)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:Eip\n properties:\n domain: vpc\n exampleProtection:\n type: aws:shield:Protection\n name: example\n properties:\n name: example\n resourceArn: arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${example.id}\n exampleProtectionGroup:\n type: aws:shield:ProtectionGroup\n name: example\n properties:\n protectionGroupId: example\n aggregation: MEAN\n pattern: ARBITRARY\n members:\n - arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${example.id}\n options:\n dependson:\n - ${exampleProtection}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create protection group for a type of resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.shield.ProtectionGroup(\"example\", {\n protectionGroupId: \"example\",\n aggregation: \"SUM\",\n pattern: \"BY_RESOURCE_TYPE\",\n resourceType: \"ELASTIC_IP_ALLOCATION\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.shield.ProtectionGroup(\"example\",\n protection_group_id=\"example\",\n aggregation=\"SUM\",\n pattern=\"BY_RESOURCE_TYPE\",\n resource_type=\"ELASTIC_IP_ALLOCATION\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Shield.ProtectionGroup(\"example\", new()\n {\n ProtectionGroupId = \"example\",\n Aggregation = \"SUM\",\n Pattern = \"BY_RESOURCE_TYPE\",\n ResourceType = \"ELASTIC_IP_ALLOCATION\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := shield.NewProtectionGroup(ctx, \"example\", \u0026shield.ProtectionGroupArgs{\n\t\t\tProtectionGroupId: pulumi.String(\"example\"),\n\t\t\tAggregation: pulumi.String(\"SUM\"),\n\t\t\tPattern: pulumi.String(\"BY_RESOURCE_TYPE\"),\n\t\t\tResourceType: pulumi.String(\"ELASTIC_IP_ALLOCATION\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.shield.ProtectionGroup;\nimport com.pulumi.aws.shield.ProtectionGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ProtectionGroup(\"example\", ProtectionGroupArgs.builder()\n .protectionGroupId(\"example\")\n .aggregation(\"SUM\")\n .pattern(\"BY_RESOURCE_TYPE\")\n .resourceType(\"ELASTIC_IP_ALLOCATION\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:shield:ProtectionGroup\n properties:\n protectionGroupId: example\n aggregation: SUM\n pattern: BY_RESOURCE_TYPE\n resourceType: ELASTIC_IP_ALLOCATION\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Shield protection group resources using their protection group id. For example:\n\n```sh\n$ pulumi import aws:shield/protectionGroup:ProtectionGroup example example\n```\n", + "description": "Creates a grouping of protected resources so they can be handled as a collective.\nThis resource grouping improves the accuracy of detection and reduces false positives. For more information see\n[Managing AWS Shield Advanced protection groups](https://docs.aws.amazon.com/waf/latest/developerguide/manage-protection-group.html)\n\n## Example Usage\n\n### Create protection group for all resources\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.shield.ProtectionGroup(\"example\", {\n protectionGroupId: \"example\",\n aggregation: \"MAX\",\n pattern: \"ALL\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.shield.ProtectionGroup(\"example\",\n protection_group_id=\"example\",\n aggregation=\"MAX\",\n pattern=\"ALL\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Shield.ProtectionGroup(\"example\", new()\n {\n ProtectionGroupId = \"example\",\n Aggregation = \"MAX\",\n Pattern = \"ALL\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := shield.NewProtectionGroup(ctx, \"example\", \u0026shield.ProtectionGroupArgs{\n\t\t\tProtectionGroupId: pulumi.String(\"example\"),\n\t\t\tAggregation: pulumi.String(\"MAX\"),\n\t\t\tPattern: pulumi.String(\"ALL\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.shield.ProtectionGroup;\nimport com.pulumi.aws.shield.ProtectionGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ProtectionGroup(\"example\", ProtectionGroupArgs.builder()\n .protectionGroupId(\"example\")\n .aggregation(\"MAX\")\n .pattern(\"ALL\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:shield:ProtectionGroup\n properties:\n protectionGroupId: example\n aggregation: MAX\n pattern: ALL\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create protection group for arbitrary number of resources\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst example = new aws.ec2.Eip(\"example\", {domain: \"vpc\"});\nconst exampleProtection = new aws.shield.Protection(\"example\", {\n name: \"example\",\n resourceArn: pulumi.all([current, currentGetCallerIdentity, example.id]).apply(([current, currentGetCallerIdentity, id]) =\u003e `arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${id}`),\n});\nconst exampleProtectionGroup = new aws.shield.ProtectionGroup(\"example\", {\n protectionGroupId: \"example\",\n aggregation: \"MEAN\",\n pattern: \"ARBITRARY\",\n members: [pulumi.all([current, currentGetCallerIdentity, example.id]).apply(([current, currentGetCallerIdentity, id]) =\u003e `arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${id}`)],\n}, {\n dependsOn: [exampleProtection],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\nexample = aws.ec2.Eip(\"example\", domain=\"vpc\")\nexample_protection = aws.shield.Protection(\"example\",\n name=\"example\",\n resource_arn=example.id.apply(lambda id: f\"arn:aws:ec2:{current.name}:{current_get_caller_identity.account_id}:eip-allocation/{id}\"))\nexample_protection_group = aws.shield.ProtectionGroup(\"example\",\n protection_group_id=\"example\",\n aggregation=\"MEAN\",\n pattern=\"ARBITRARY\",\n members=[example.id.apply(lambda id: f\"arn:aws:ec2:{current.name}:{current_get_caller_identity.account_id}:eip-allocation/{id}\")],\n opts = pulumi.ResourceOptions(depends_on=[example_protection]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Ec2.Eip(\"example\", new()\n {\n Domain = \"vpc\",\n });\n\n var exampleProtection = new Aws.Shield.Protection(\"example\", new()\n {\n Name = \"example\",\n ResourceArn = Output.Tuple(current, currentGetCallerIdentity, example.Id).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n var id = values.Item3;\n return $\"arn:aws:ec2:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:eip-allocation/{id}\";\n }),\n });\n\n var exampleProtectionGroup = new Aws.Shield.ProtectionGroup(\"example\", new()\n {\n ProtectionGroupId = \"example\",\n Aggregation = \"MEAN\",\n Pattern = \"ARBITRARY\",\n Members = new[]\n {\n Output.Tuple(current, currentGetCallerIdentity, example.Id).Apply(values =\u003e\n {\n var current = values.Item1;\n var currentGetCallerIdentity = values.Item2;\n var id = values.Item3;\n return $\"arn:aws:ec2:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:eip-allocation/{id}\";\n }),\n },\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleProtection,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewEip(ctx, \"example\", \u0026ec2.EipArgs{\n\t\t\tDomain: pulumi.String(\"vpc\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleProtection, err := shield.NewProtection(ctx, \"example\", \u0026shield.ProtectionArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tResourceArn: example.ID().ApplyT(func(id string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"arn:aws:ec2:%v:%v:eip-allocation/%v\", current.Name, currentGetCallerIdentity.AccountId, id), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = shield.NewProtectionGroup(ctx, \"example\", \u0026shield.ProtectionGroupArgs{\n\t\t\tProtectionGroupId: pulumi.String(\"example\"),\n\t\t\tAggregation: pulumi.String(\"MEAN\"),\n\t\t\tPattern: pulumi.String(\"ARBITRARY\"),\n\t\t\tMembers: pulumi.StringArray{\n\t\t\t\texample.ID().ApplyT(func(id string) (string, error) {\n\t\t\t\t\treturn fmt.Sprintf(\"arn:aws:ec2:%v:%v:eip-allocation/%v\", current.Name, currentGetCallerIdentity.AccountId, id), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleProtection,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.ec2.Eip;\nimport com.pulumi.aws.ec2.EipArgs;\nimport com.pulumi.aws.shield.Protection;\nimport com.pulumi.aws.shield.ProtectionArgs;\nimport com.pulumi.aws.shield.ProtectionGroup;\nimport com.pulumi.aws.shield.ProtectionGroupArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n var example = new Eip(\"example\", EipArgs.builder()\n .domain(\"vpc\")\n .build());\n\n var exampleProtection = new Protection(\"exampleProtection\", ProtectionArgs.builder()\n .name(\"example\")\n .resourceArn(example.id().applyValue(id -\u003e String.format(\"arn:aws:ec2:%s:%s:eip-allocation/%s\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),id)))\n .build());\n\n var exampleProtectionGroup = new ProtectionGroup(\"exampleProtectionGroup\", ProtectionGroupArgs.builder()\n .protectionGroupId(\"example\")\n .aggregation(\"MEAN\")\n .pattern(\"ARBITRARY\")\n .members(example.id().applyValue(id -\u003e String.format(\"arn:aws:ec2:%s:%s:eip-allocation/%s\", current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),id)))\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleProtection)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:Eip\n properties:\n domain: vpc\n exampleProtection:\n type: aws:shield:Protection\n name: example\n properties:\n name: example\n resourceArn: arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${example.id}\n exampleProtectionGroup:\n type: aws:shield:ProtectionGroup\n name: example\n properties:\n protectionGroupId: example\n aggregation: MEAN\n pattern: ARBITRARY\n members:\n - arn:aws:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${example.id}\n options:\n dependson:\n - ${exampleProtection}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Create protection group for a type of resource\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.shield.ProtectionGroup(\"example\", {\n protectionGroupId: \"example\",\n aggregation: \"SUM\",\n pattern: \"BY_RESOURCE_TYPE\",\n resourceType: \"ELASTIC_IP_ALLOCATION\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.shield.ProtectionGroup(\"example\",\n protection_group_id=\"example\",\n aggregation=\"SUM\",\n pattern=\"BY_RESOURCE_TYPE\",\n resource_type=\"ELASTIC_IP_ALLOCATION\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Shield.ProtectionGroup(\"example\", new()\n {\n ProtectionGroupId = \"example\",\n Aggregation = \"SUM\",\n Pattern = \"BY_RESOURCE_TYPE\",\n ResourceType = \"ELASTIC_IP_ALLOCATION\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := shield.NewProtectionGroup(ctx, \"example\", \u0026shield.ProtectionGroupArgs{\n\t\t\tProtectionGroupId: pulumi.String(\"example\"),\n\t\t\tAggregation: pulumi.String(\"SUM\"),\n\t\t\tPattern: pulumi.String(\"BY_RESOURCE_TYPE\"),\n\t\t\tResourceType: pulumi.String(\"ELASTIC_IP_ALLOCATION\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.shield.ProtectionGroup;\nimport com.pulumi.aws.shield.ProtectionGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new ProtectionGroup(\"example\", ProtectionGroupArgs.builder()\n .protectionGroupId(\"example\")\n .aggregation(\"SUM\")\n .pattern(\"BY_RESOURCE_TYPE\")\n .resourceType(\"ELASTIC_IP_ALLOCATION\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:shield:ProtectionGroup\n properties:\n protectionGroupId: example\n aggregation: SUM\n pattern: BY_RESOURCE_TYPE\n resourceType: ELASTIC_IP_ALLOCATION\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Shield protection group resources using their protection group id. For example:\n\n```sh\n$ pulumi import aws:shield/protectionGroup:ProtectionGroup example example\n```\n", "properties": { "aggregation": { "type": "string", @@ -357170,7 +357170,7 @@ } }, "aws:shield/protectionHealthCheckAssociation:ProtectionHealthCheckAssociation": { - "description": "Creates an association between a Route53 Health Check and a Shield Advanced protected resource.\nThis association uses the health of your applications to improve responsiveness and accuracy in attack detection and mitigation.\n\nBlog post: [AWS Shield Advanced now supports Health Based Detection](https://aws.amazon.com/about-aws/whats-new/2020/02/aws-shield-advanced-now-supports-health-based-detection/)\n\n## Example Usage\n\n### Create an association between a protected EIP and a Route53 Health Check\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst example = new aws.ec2.Eip(\"example\", {\n domain: \"vpc\",\n tags: {\n Name: \"example\",\n },\n});\nconst exampleProtection = new aws.shield.Protection(\"example\", {\n name: \"example-protection\",\n resourceArn: pulumi.all([currentGetPartition, current, currentGetCallerIdentity, example.id]).apply(([currentGetPartition, current, currentGetCallerIdentity, id]) =\u003e `arn:${currentGetPartition.partition}:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${id}`),\n});\nconst exampleHealthCheck = new aws.route53.HealthCheck(\"example\", {\n ipAddress: example.publicIp,\n port: 80,\n type: \"HTTP\",\n resourcePath: \"/ready\",\n failureThreshold: 3,\n requestInterval: 30,\n tags: {\n Name: \"tf-example-health-check\",\n },\n});\nconst exampleProtectionHealthCheckAssociation = new aws.shield.ProtectionHealthCheckAssociation(\"example\", {\n healthCheckArn: exampleHealthCheck.arn,\n shieldProtectionId: exampleProtection.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\nexample = aws.ec2.Eip(\"example\",\n domain=\"vpc\",\n tags={\n \"Name\": \"example\",\n })\nexample_protection = aws.shield.Protection(\"example\",\n name=\"example-protection\",\n resource_arn=example.id.apply(lambda id: f\"arn:{current_get_partition.partition}:ec2:{current.name}:{current_get_caller_identity.account_id}:eip-allocation/{id}\"))\nexample_health_check = aws.route53.HealthCheck(\"example\",\n ip_address=example.public_ip,\n port=80,\n type=\"HTTP\",\n resource_path=\"/ready\",\n failure_threshold=3,\n request_interval=30,\n tags={\n \"Name\": \"tf-example-health-check\",\n })\nexample_protection_health_check_association = aws.shield.ProtectionHealthCheckAssociation(\"example\",\n health_check_arn=example_health_check.arn,\n shield_protection_id=example_protection.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var example = new Aws.Ec2.Eip(\"example\", new()\n {\n Domain = \"vpc\",\n Tags = \n {\n { \"Name\", \"example\" },\n },\n });\n\n var exampleProtection = new Aws.Shield.Protection(\"example\", new()\n {\n Name = \"example-protection\",\n ResourceArn = Output.Tuple(currentGetPartition, current, currentGetCallerIdentity, example.Id).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var current = values.Item2;\n var currentGetCallerIdentity = values.Item3;\n var id = values.Item4;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:ec2:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:eip-allocation/{id}\";\n }),\n });\n\n var exampleHealthCheck = new Aws.Route53.HealthCheck(\"example\", new()\n {\n IpAddress = example.PublicIp,\n Port = 80,\n Type = \"HTTP\",\n ResourcePath = \"/ready\",\n FailureThreshold = 3,\n RequestInterval = 30,\n Tags = \n {\n { \"Name\", \"tf-example-health-check\" },\n },\n });\n\n var exampleProtectionHealthCheckAssociation = new Aws.Shield.ProtectionHealthCheckAssociation(\"example\", new()\n {\n HealthCheckArn = exampleHealthCheck.Arn,\n ShieldProtectionId = exampleProtection.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewEip(ctx, \"example\", \u0026ec2.EipArgs{\n\t\t\tDomain: pulumi.String(\"vpc\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"example\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleProtection, err := shield.NewProtection(ctx, \"example\", \u0026shield.ProtectionArgs{\n\t\t\tName: pulumi.String(\"example-protection\"),\n\t\t\tResourceArn: example.ID().ApplyT(func(id string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"arn:%v:ec2:%v:%v:eip-allocation/%v\", currentGetPartition.Partition, current.Name, currentGetCallerIdentity.AccountId, id), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleHealthCheck, err := route53.NewHealthCheck(ctx, \"example\", \u0026route53.HealthCheckArgs{\n\t\t\tIpAddress: example.PublicIp,\n\t\t\tPort: pulumi.Int(80),\n\t\t\tType: pulumi.String(\"HTTP\"),\n\t\t\tResourcePath: pulumi.String(\"/ready\"),\n\t\t\tFailureThreshold: pulumi.Int(3),\n\t\t\tRequestInterval: pulumi.Int(30),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"tf-example-health-check\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = shield.NewProtectionHealthCheckAssociation(ctx, \"example\", \u0026shield.ProtectionHealthCheckAssociationArgs{\n\t\t\tHealthCheckArn: exampleHealthCheck.Arn,\n\t\t\tShieldProtectionId: exampleProtection.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.ec2.Eip;\nimport com.pulumi.aws.ec2.EipArgs;\nimport com.pulumi.aws.shield.Protection;\nimport com.pulumi.aws.shield.ProtectionArgs;\nimport com.pulumi.aws.route53.HealthCheck;\nimport com.pulumi.aws.route53.HealthCheckArgs;\nimport com.pulumi.aws.shield.ProtectionHealthCheckAssociation;\nimport com.pulumi.aws.shield.ProtectionHealthCheckAssociationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n var example = new Eip(\"example\", EipArgs.builder()\n .domain(\"vpc\")\n .tags(Map.of(\"Name\", \"example\"))\n .build());\n\n var exampleProtection = new Protection(\"exampleProtection\", ProtectionArgs.builder()\n .name(\"example-protection\")\n .resourceArn(example.id().applyValue(id -\u003e String.format(\"arn:%s:ec2:%s:%s:eip-allocation/%s\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),id)))\n .build());\n\n var exampleHealthCheck = new HealthCheck(\"exampleHealthCheck\", HealthCheckArgs.builder()\n .ipAddress(example.publicIp())\n .port(80)\n .type(\"HTTP\")\n .resourcePath(\"/ready\")\n .failureThreshold(\"3\")\n .requestInterval(\"30\")\n .tags(Map.of(\"Name\", \"tf-example-health-check\"))\n .build());\n\n var exampleProtectionHealthCheckAssociation = new ProtectionHealthCheckAssociation(\"exampleProtectionHealthCheckAssociation\", ProtectionHealthCheckAssociationArgs.builder()\n .healthCheckArn(exampleHealthCheck.arn())\n .shieldProtectionId(exampleProtection.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:Eip\n properties:\n domain: vpc\n tags:\n Name: example\n exampleProtection:\n type: aws:shield:Protection\n name: example\n properties:\n name: example-protection\n resourceArn: arn:${currentGetPartition.partition}:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${example.id}\n exampleHealthCheck:\n type: aws:route53:HealthCheck\n name: example\n properties:\n ipAddress: ${example.publicIp}\n port: 80\n type: HTTP\n resourcePath: /ready\n failureThreshold: '3'\n requestInterval: '30'\n tags:\n Name: tf-example-health-check\n exampleProtectionHealthCheckAssociation:\n type: aws:shield:ProtectionHealthCheckAssociation\n name: example\n properties:\n healthCheckArn: ${exampleHealthCheck.arn}\n shieldProtectionId: ${exampleProtection.id}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Shield protection health check association resources using the `shield_protection_id` and `health_check_arn`. For example:\n\n```sh\n$ pulumi import aws:shield/protectionHealthCheckAssociation:ProtectionHealthCheckAssociation example ff9592dc-22f3-4e88-afa1-7b29fde9669a+arn:aws:route53:::healthcheck/3742b175-edb9-46bc-9359-f53e3b794b1b\n```\n", + "description": "Creates an association between a Route53 Health Check and a Shield Advanced protected resource.\nThis association uses the health of your applications to improve responsiveness and accuracy in attack detection and mitigation.\n\nBlog post: [AWS Shield Advanced now supports Health Based Detection](https://aws.amazon.com/about-aws/whats-new/2020/02/aws-shield-advanced-now-supports-health-based-detection/)\n\n## Example Usage\n\n### Create an association between a protected EIP and a Route53 Health Check\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst currentGetCallerIdentity = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst example = new aws.ec2.Eip(\"example\", {\n domain: \"vpc\",\n tags: {\n Name: \"example\",\n },\n});\nconst exampleProtection = new aws.shield.Protection(\"example\", {\n name: \"example-protection\",\n resourceArn: pulumi.all([currentGetPartition, current, currentGetCallerIdentity, example.id]).apply(([currentGetPartition, current, currentGetCallerIdentity, id]) =\u003e `arn:${currentGetPartition.partition}:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${id}`),\n});\nconst exampleHealthCheck = new aws.route53.HealthCheck(\"example\", {\n ipAddress: example.publicIp,\n port: 80,\n type: \"HTTP\",\n resourcePath: \"/ready\",\n failureThreshold: 3,\n requestInterval: 30,\n tags: {\n Name: \"tf-example-health-check\",\n },\n});\nconst exampleProtectionHealthCheckAssociation = new aws.shield.ProtectionHealthCheckAssociation(\"example\", {\n healthCheckArn: exampleHealthCheck.arn,\n shieldProtectionId: exampleProtection.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ncurrent_get_caller_identity = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\nexample = aws.ec2.Eip(\"example\",\n domain=\"vpc\",\n tags={\n \"Name\": \"example\",\n })\nexample_protection = aws.shield.Protection(\"example\",\n name=\"example-protection\",\n resource_arn=example.id.apply(lambda id: f\"arn:{current_get_partition.partition}:ec2:{current.name}:{current_get_caller_identity.account_id}:eip-allocation/{id}\"))\nexample_health_check = aws.route53.HealthCheck(\"example\",\n ip_address=example.public_ip,\n port=80,\n type=\"HTTP\",\n resource_path=\"/ready\",\n failure_threshold=3,\n request_interval=30,\n tags={\n \"Name\": \"tf-example-health-check\",\n })\nexample_protection_health_check_association = aws.shield.ProtectionHealthCheckAssociation(\"example\",\n health_check_arn=example_health_check.arn,\n shield_protection_id=example_protection.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var currentGetCallerIdentity = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var example = new Aws.Ec2.Eip(\"example\", new()\n {\n Domain = \"vpc\",\n Tags = \n {\n { \"Name\", \"example\" },\n },\n });\n\n var exampleProtection = new Aws.Shield.Protection(\"example\", new()\n {\n Name = \"example-protection\",\n ResourceArn = Output.Tuple(currentGetPartition, current, currentGetCallerIdentity, example.Id).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var current = values.Item2;\n var currentGetCallerIdentity = values.Item3;\n var id = values.Item4;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:ec2:{current.Apply(getRegionResult =\u003e getRegionResult.Name)}:{currentGetCallerIdentity.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:eip-allocation/{id}\";\n }),\n });\n\n var exampleHealthCheck = new Aws.Route53.HealthCheck(\"example\", new()\n {\n IpAddress = example.PublicIp,\n Port = 80,\n Type = \"HTTP\",\n ResourcePath = \"/ready\",\n FailureThreshold = 3,\n RequestInterval = 30,\n Tags = \n {\n { \"Name\", \"tf-example-health-check\" },\n },\n });\n\n var exampleProtectionHealthCheckAssociation = new Aws.Shield.ProtectionHealthCheckAssociation(\"example\", new()\n {\n HealthCheckArn = exampleHealthCheck.Arn,\n ShieldProtectionId = exampleProtection.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := ec2.NewEip(ctx, \"example\", \u0026ec2.EipArgs{\n\t\t\tDomain: pulumi.String(\"vpc\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"example\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleProtection, err := shield.NewProtection(ctx, \"example\", \u0026shield.ProtectionArgs{\n\t\t\tName: pulumi.String(\"example-protection\"),\n\t\t\tResourceArn: example.ID().ApplyT(func(id string) (string, error) {\n\t\t\t\treturn fmt.Sprintf(\"arn:%v:ec2:%v:%v:eip-allocation/%v\", currentGetPartition.Partition, current.Name, currentGetCallerIdentity.AccountId, id), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleHealthCheck, err := route53.NewHealthCheck(ctx, \"example\", \u0026route53.HealthCheckArgs{\n\t\t\tIpAddress: example.PublicIp,\n\t\t\tPort: pulumi.Int(80),\n\t\t\tType: pulumi.String(\"HTTP\"),\n\t\t\tResourcePath: pulumi.String(\"/ready\"),\n\t\t\tFailureThreshold: pulumi.Int(3),\n\t\t\tRequestInterval: pulumi.Int(30),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": pulumi.String(\"tf-example-health-check\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = shield.NewProtectionHealthCheckAssociation(ctx, \"example\", \u0026shield.ProtectionHealthCheckAssociationArgs{\n\t\t\tHealthCheckArn: exampleHealthCheck.Arn,\n\t\t\tShieldProtectionId: exampleProtection.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.ec2.Eip;\nimport com.pulumi.aws.ec2.EipArgs;\nimport com.pulumi.aws.shield.Protection;\nimport com.pulumi.aws.shield.ProtectionArgs;\nimport com.pulumi.aws.route53.HealthCheck;\nimport com.pulumi.aws.route53.HealthCheckArgs;\nimport com.pulumi.aws.shield.ProtectionHealthCheckAssociation;\nimport com.pulumi.aws.shield.ProtectionHealthCheckAssociationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var currentGetCallerIdentity = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n var example = new Eip(\"example\", EipArgs.builder()\n .domain(\"vpc\")\n .tags(Map.of(\"Name\", \"example\"))\n .build());\n\n var exampleProtection = new Protection(\"exampleProtection\", ProtectionArgs.builder()\n .name(\"example-protection\")\n .resourceArn(example.id().applyValue(id -\u003e String.format(\"arn:%s:ec2:%s:%s:eip-allocation/%s\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),current.applyValue(getRegionResult -\u003e getRegionResult.name()),currentGetCallerIdentity.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()),id)))\n .build());\n\n var exampleHealthCheck = new HealthCheck(\"exampleHealthCheck\", HealthCheckArgs.builder()\n .ipAddress(example.publicIp())\n .port(80)\n .type(\"HTTP\")\n .resourcePath(\"/ready\")\n .failureThreshold(\"3\")\n .requestInterval(\"30\")\n .tags(Map.of(\"Name\", \"tf-example-health-check\"))\n .build());\n\n var exampleProtectionHealthCheckAssociation = new ProtectionHealthCheckAssociation(\"exampleProtectionHealthCheckAssociation\", ProtectionHealthCheckAssociationArgs.builder()\n .healthCheckArn(exampleHealthCheck.arn())\n .shieldProtectionId(exampleProtection.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ec2:Eip\n properties:\n domain: vpc\n tags:\n Name: example\n exampleProtection:\n type: aws:shield:Protection\n name: example\n properties:\n name: example-protection\n resourceArn: arn:${currentGetPartition.partition}:ec2:${current.name}:${currentGetCallerIdentity.accountId}:eip-allocation/${example.id}\n exampleHealthCheck:\n type: aws:route53:HealthCheck\n name: example\n properties:\n ipAddress: ${example.publicIp}\n port: 80\n type: HTTP\n resourcePath: /ready\n failureThreshold: '3'\n requestInterval: '30'\n tags:\n Name: tf-example-health-check\n exampleProtectionHealthCheckAssociation:\n type: aws:shield:ProtectionHealthCheckAssociation\n name: example\n properties:\n healthCheckArn: ${exampleHealthCheck.arn}\n shieldProtectionId: ${exampleProtection.id}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n currentGetCallerIdentity:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import Shield protection health check association resources using the `shield_protection_id` and `health_check_arn`. For example:\n\n```sh\n$ pulumi import aws:shield/protectionHealthCheckAssociation:ProtectionHealthCheckAssociation example ff9592dc-22f3-4e88-afa1-7b29fde9669a+arn:aws:route53:::healthcheck/3742b175-edb9-46bc-9359-f53e3b794b1b\n```\n", "properties": { "healthCheckArn": { "type": "string", @@ -357799,7 +357799,7 @@ } }, "aws:sns/dataProtectionPolicy:DataProtectionPolicy": { - "description": "Provides an SNS data protection topic policy resource\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.sns.Topic(\"example\", {name: \"example\"});\nconst exampleDataProtectionPolicy = new aws.sns.DataProtectionPolicy(\"example\", {\n arn: example.arn,\n policy: JSON.stringify({\n Description: \"Example data protection policy\",\n Name: \"__example_data_protection_policy\",\n Statement: [{\n DataDirection: \"Inbound\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Deny: {},\n },\n Principal: [\"*\"],\n Sid: \"__deny_statement_11ba9d96\",\n }],\n Version: \"2021-06-01\",\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.sns.Topic(\"example\", name=\"example\")\nexample_data_protection_policy = aws.sns.DataProtectionPolicy(\"example\",\n arn=example.arn,\n policy=json.dumps({\n \"Description\": \"Example data protection policy\",\n \"Name\": \"__example_data_protection_policy\",\n \"Statement\": [{\n \"DataDirection\": \"Inbound\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Deny\": {},\n },\n \"Principal\": [\"*\"],\n \"Sid\": \"__deny_statement_11ba9d96\",\n }],\n \"Version\": \"2021-06-01\",\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Sns.Topic(\"example\", new()\n {\n Name = \"example\",\n });\n\n var exampleDataProtectionPolicy = new Aws.Sns.DataProtectionPolicy(\"example\", new()\n {\n Arn = example.Arn,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Description\"] = \"Example data protection policy\",\n [\"Name\"] = \"__example_data_protection_policy\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"DataDirection\"] = \"Inbound\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Deny\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n [\"Principal\"] = new[]\n {\n \"*\",\n },\n [\"Sid\"] = \"__deny_statement_11ba9d96\",\n },\n },\n [\"Version\"] = \"2021-06-01\",\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := sns.NewTopic(ctx, \"example\", \u0026sns.TopicArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Description\": \"Example data protection policy\",\n\t\t\t\"Name\": \"__example_data_protection_policy\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"DataDirection\": \"Inbound\",\n\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\"Deny\": nil,\n\t\t\t\t\t},\n\t\t\t\t\t\"Principal\": []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"__deny_statement_11ba9d96\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2021-06-01\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = sns.NewDataProtectionPolicy(ctx, \"example\", \u0026sns.DataProtectionPolicyArgs{\n\t\t\tArn: example.Arn,\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.sns.DataProtectionPolicy;\nimport com.pulumi.aws.sns.DataProtectionPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Topic(\"example\", TopicArgs.builder()\n .name(\"example\")\n .build());\n\n var exampleDataProtectionPolicy = new DataProtectionPolicy(\"exampleDataProtectionPolicy\", DataProtectionPolicyArgs.builder()\n .arn(example.arn())\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Description\", \"Example data protection policy\"),\n jsonProperty(\"Name\", \"__example_data_protection_policy\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"DataDirection\", \"Inbound\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Deny\", jsonObject(\n\n ))\n )),\n jsonProperty(\"Principal\", jsonArray(\"*\")),\n jsonProperty(\"Sid\", \"__deny_statement_11ba9d96\")\n ))),\n jsonProperty(\"Version\", \"2021-06-01\")\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:sns:Topic\n properties:\n name: example\n exampleDataProtectionPolicy:\n type: aws:sns:DataProtectionPolicy\n name: example\n properties:\n arn: ${example.arn}\n policy:\n fn::toJSON:\n Description: Example data protection policy\n Name: __example_data_protection_policy\n Statement:\n - DataDirection: Inbound\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Deny: {}\n Principal:\n - '*'\n Sid: __deny_statement_11ba9d96\n Version: 2021-06-01\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SNS Data Protection Topic Policy using the topic ARN. For example:\n\n```sh\n$ pulumi import aws:sns/dataProtectionPolicy:DataProtectionPolicy example arn:aws:sns:us-west-2:0123456789012:example\n```\n", + "description": "Provides an SNS data protection topic policy resource\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.sns.Topic(\"example\", {name: \"example\"});\nconst exampleDataProtectionPolicy = new aws.sns.DataProtectionPolicy(\"example\", {\n arn: example.arn,\n policy: JSON.stringify({\n Description: \"Example data protection policy\",\n Name: \"__example_data_protection_policy\",\n Statement: [{\n DataDirection: \"Inbound\",\n DataIdentifier: [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n Operation: {\n Deny: {},\n },\n Principal: [\"*\"],\n Sid: \"__deny_statement_11ba9d96\",\n }],\n Version: \"2021-06-01\",\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.sns.Topic(\"example\", name=\"example\")\nexample_data_protection_policy = aws.sns.DataProtectionPolicy(\"example\",\n arn=example.arn,\n policy=json.dumps({\n \"Description\": \"Example data protection policy\",\n \"Name\": \"__example_data_protection_policy\",\n \"Statement\": [{\n \"DataDirection\": \"Inbound\",\n \"DataIdentifier\": [\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\"],\n \"Operation\": {\n \"Deny\": {},\n },\n \"Principal\": [\"*\"],\n \"Sid\": \"__deny_statement_11ba9d96\",\n }],\n \"Version\": \"2021-06-01\",\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Sns.Topic(\"example\", new()\n {\n Name = \"example\",\n });\n\n var exampleDataProtectionPolicy = new Aws.Sns.DataProtectionPolicy(\"example\", new()\n {\n Arn = example.Arn,\n Policy = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Description\"] = \"Example data protection policy\",\n [\"Name\"] = \"__example_data_protection_policy\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"DataDirection\"] = \"Inbound\",\n [\"DataIdentifier\"] = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n },\n [\"Operation\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"Deny\"] = new Dictionary\u003cstring, object?\u003e\n {\n },\n },\n [\"Principal\"] = new[]\n {\n \"*\",\n },\n [\"Sid\"] = \"__deny_statement_11ba9d96\",\n },\n },\n [\"Version\"] = \"2021-06-01\",\n }),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := sns.NewTopic(ctx, \"example\", \u0026sns.TopicArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Description\": \"Example data protection policy\",\n\t\t\t\"Name\": \"__example_data_protection_policy\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"DataDirection\": \"Inbound\",\n\t\t\t\t\t\"DataIdentifier\": []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Operation\": map[string]interface{}{\n\t\t\t\t\t\t\"Deny\": map[string]interface{}{},\n\t\t\t\t\t},\n\t\t\t\t\t\"Principal\": []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Sid\": \"__deny_statement_11ba9d96\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"Version\": \"2021-06-01\",\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\t_, err = sns.NewDataProtectionPolicy(ctx, \"example\", \u0026sns.DataProtectionPolicyArgs{\n\t\t\tArn: example.Arn,\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.sns.DataProtectionPolicy;\nimport com.pulumi.aws.sns.DataProtectionPolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new Topic(\"example\", TopicArgs.builder()\n .name(\"example\")\n .build());\n\n var exampleDataProtectionPolicy = new DataProtectionPolicy(\"exampleDataProtectionPolicy\", DataProtectionPolicyArgs.builder()\n .arn(example.arn())\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Description\", \"Example data protection policy\"),\n jsonProperty(\"Name\", \"__example_data_protection_policy\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"DataDirection\", \"Inbound\"),\n jsonProperty(\"DataIdentifier\", jsonArray(\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\")),\n jsonProperty(\"Operation\", jsonObject(\n jsonProperty(\"Deny\", jsonObject(\n\n ))\n )),\n jsonProperty(\"Principal\", jsonArray(\"*\")),\n jsonProperty(\"Sid\", \"__deny_statement_11ba9d96\")\n ))),\n jsonProperty(\"Version\", \"2021-06-01\")\n )))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:sns:Topic\n properties:\n name: example\n exampleDataProtectionPolicy:\n type: aws:sns:DataProtectionPolicy\n name: example\n properties:\n arn: ${example.arn}\n policy:\n fn::toJSON:\n Description: Example data protection policy\n Name: __example_data_protection_policy\n Statement:\n - DataDirection: Inbound\n DataIdentifier:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n Operation:\n Deny: {}\n Principal:\n - '*'\n Sid: __deny_statement_11ba9d96\n Version: 2021-06-01\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SNS Data Protection Topic Policy using the topic ARN. For example:\n\n```sh\n$ pulumi import aws:sns/dataProtectionPolicy:DataProtectionPolicy example arn:aws:sns:us-west-2:0123456789012:example\n```\n", "properties": { "arn": { "type": "string", @@ -360989,7 +360989,7 @@ } }, "aws:ssm/patchBaseline:PatchBaseline": { - "description": "Provides an SSM Patch Baseline resource.\n\n\u003e **NOTE on Patch Baselines:** The `approved_patches` and `approval_rule` are\nboth marked as optional fields, but the Patch Baseline requires that at least one\nof them is specified.\n\n## Example Usage\n\n### Basic Usage\n\nUsing `approved_patches` only.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst production = new aws.ssm.PatchBaseline(\"production\", {\n name: \"patch-baseline\",\n approvedPatches: [\"KB123456\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nproduction = aws.ssm.PatchBaseline(\"production\",\n name=\"patch-baseline\",\n approved_patches=[\"KB123456\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var production = new Aws.Ssm.PatchBaseline(\"production\", new()\n {\n Name = \"patch-baseline\",\n ApprovedPatches = new[]\n {\n \"KB123456\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssm.NewPatchBaseline(ctx, \"production\", \u0026ssm.PatchBaselineArgs{\n\t\t\tName: pulumi.String(\"patch-baseline\"),\n\t\t\tApprovedPatches: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"KB123456\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssm.PatchBaseline;\nimport com.pulumi.aws.ssm.PatchBaselineArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var production = new PatchBaseline(\"production\", PatchBaselineArgs.builder()\n .name(\"patch-baseline\")\n .approvedPatches(\"KB123456\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n production:\n type: aws:ssm:PatchBaseline\n properties:\n name: patch-baseline\n approvedPatches:\n - KB123456\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Advanced Usage, specifying patch filters\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst production = new aws.ssm.PatchBaseline(\"production\", {\n name: \"patch-baseline\",\n description: \"Patch Baseline Description\",\n approvedPatches: [\n \"KB123456\",\n \"KB456789\",\n ],\n rejectedPatches: [\"KB987654\"],\n globalFilters: [\n {\n key: \"PRODUCT\",\n values: [\"WindowsServer2008\"],\n },\n {\n key: \"CLASSIFICATION\",\n values: [\"ServicePacks\"],\n },\n {\n key: \"MSRC_SEVERITY\",\n values: [\"Low\"],\n },\n ],\n approvalRules: [\n {\n approveAfterDays: 7,\n complianceLevel: \"HIGH\",\n patchFilters: [\n {\n key: \"PRODUCT\",\n values: [\"WindowsServer2016\"],\n },\n {\n key: \"CLASSIFICATION\",\n values: [\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n \"Updates\",\n ],\n },\n {\n key: \"MSRC_SEVERITY\",\n values: [\n \"Critical\",\n \"Important\",\n \"Moderate\",\n ],\n },\n ],\n },\n {\n approveAfterDays: 7,\n patchFilters: [{\n key: \"PRODUCT\",\n values: [\"WindowsServer2012\"],\n }],\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nproduction = aws.ssm.PatchBaseline(\"production\",\n name=\"patch-baseline\",\n description=\"Patch Baseline Description\",\n approved_patches=[\n \"KB123456\",\n \"KB456789\",\n ],\n rejected_patches=[\"KB987654\"],\n global_filters=[\n {\n \"key\": \"PRODUCT\",\n \"values\": [\"WindowsServer2008\"],\n },\n {\n \"key\": \"CLASSIFICATION\",\n \"values\": [\"ServicePacks\"],\n },\n {\n \"key\": \"MSRC_SEVERITY\",\n \"values\": [\"Low\"],\n },\n ],\n approval_rules=[\n {\n \"approve_after_days\": 7,\n \"compliance_level\": \"HIGH\",\n \"patch_filters\": [\n {\n \"key\": \"PRODUCT\",\n \"values\": [\"WindowsServer2016\"],\n },\n {\n \"key\": \"CLASSIFICATION\",\n \"values\": [\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n \"Updates\",\n ],\n },\n {\n \"key\": \"MSRC_SEVERITY\",\n \"values\": [\n \"Critical\",\n \"Important\",\n \"Moderate\",\n ],\n },\n ],\n },\n {\n \"approve_after_days\": 7,\n \"patch_filters\": [{\n \"key\": \"PRODUCT\",\n \"values\": [\"WindowsServer2012\"],\n }],\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var production = new Aws.Ssm.PatchBaseline(\"production\", new()\n {\n Name = \"patch-baseline\",\n Description = \"Patch Baseline Description\",\n ApprovedPatches = new[]\n {\n \"KB123456\",\n \"KB456789\",\n },\n RejectedPatches = new[]\n {\n \"KB987654\",\n },\n GlobalFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineGlobalFilterArgs\n {\n Key = \"PRODUCT\",\n Values = new[]\n {\n \"WindowsServer2008\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineGlobalFilterArgs\n {\n Key = \"CLASSIFICATION\",\n Values = new[]\n {\n \"ServicePacks\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineGlobalFilterArgs\n {\n Key = \"MSRC_SEVERITY\",\n Values = new[]\n {\n \"Low\",\n },\n },\n },\n ApprovalRules = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRuleArgs\n {\n ApproveAfterDays = 7,\n ComplianceLevel = \"HIGH\",\n PatchFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"PRODUCT\",\n Values = new[]\n {\n \"WindowsServer2016\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"CLASSIFICATION\",\n Values = new[]\n {\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n \"Updates\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"MSRC_SEVERITY\",\n Values = new[]\n {\n \"Critical\",\n \"Important\",\n \"Moderate\",\n },\n },\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRuleArgs\n {\n ApproveAfterDays = 7,\n PatchFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"PRODUCT\",\n Values = new[]\n {\n \"WindowsServer2012\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssm.NewPatchBaseline(ctx, \"production\", \u0026ssm.PatchBaselineArgs{\n\t\t\tName: pulumi.String(\"patch-baseline\"),\n\t\t\tDescription: pulumi.String(\"Patch Baseline Description\"),\n\t\t\tApprovedPatches: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"KB123456\"),\n\t\t\t\tpulumi.String(\"KB456789\"),\n\t\t\t},\n\t\t\tRejectedPatches: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"KB987654\"),\n\t\t\t},\n\t\t\tGlobalFilters: ssm.PatchBaselineGlobalFilterArray{\n\t\t\t\t\u0026ssm.PatchBaselineGlobalFilterArgs{\n\t\t\t\t\tKey: pulumi.String(\"PRODUCT\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"WindowsServer2008\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssm.PatchBaselineGlobalFilterArgs{\n\t\t\t\t\tKey: pulumi.String(\"CLASSIFICATION\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"ServicePacks\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssm.PatchBaselineGlobalFilterArgs{\n\t\t\t\t\tKey: pulumi.String(\"MSRC_SEVERITY\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"Low\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tApprovalRules: ssm.PatchBaselineApprovalRuleArray{\n\t\t\t\t\u0026ssm.PatchBaselineApprovalRuleArgs{\n\t\t\t\t\tApproveAfterDays: pulumi.Int(7),\n\t\t\t\t\tComplianceLevel: pulumi.String(\"HIGH\"),\n\t\t\t\t\tPatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"PRODUCT\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"WindowsServer2016\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"CLASSIFICATION\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"CriticalUpdates\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"SecurityUpdates\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Updates\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"MSRC_SEVERITY\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Critical\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Important\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Moderate\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssm.PatchBaselineApprovalRuleArgs{\n\t\t\t\t\tApproveAfterDays: pulumi.Int(7),\n\t\t\t\t\tPatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"PRODUCT\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"WindowsServer2012\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssm.PatchBaseline;\nimport com.pulumi.aws.ssm.PatchBaselineArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineGlobalFilterArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineApprovalRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var production = new PatchBaseline(\"production\", PatchBaselineArgs.builder()\n .name(\"patch-baseline\")\n .description(\"Patch Baseline Description\")\n .approvedPatches( \n \"KB123456\",\n \"KB456789\")\n .rejectedPatches(\"KB987654\")\n .globalFilters( \n PatchBaselineGlobalFilterArgs.builder()\n .key(\"PRODUCT\")\n .values(\"WindowsServer2008\")\n .build(),\n PatchBaselineGlobalFilterArgs.builder()\n .key(\"CLASSIFICATION\")\n .values(\"ServicePacks\")\n .build(),\n PatchBaselineGlobalFilterArgs.builder()\n .key(\"MSRC_SEVERITY\")\n .values(\"Low\")\n .build())\n .approvalRules( \n PatchBaselineApprovalRuleArgs.builder()\n .approveAfterDays(7)\n .complianceLevel(\"HIGH\")\n .patchFilters( \n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"PRODUCT\")\n .values(\"WindowsServer2016\")\n .build(),\n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"CLASSIFICATION\")\n .values( \n \"CriticalUpdates\",\n \"SecurityUpdates\",\n \"Updates\")\n .build(),\n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"MSRC_SEVERITY\")\n .values( \n \"Critical\",\n \"Important\",\n \"Moderate\")\n .build())\n .build(),\n PatchBaselineApprovalRuleArgs.builder()\n .approveAfterDays(7)\n .patchFilters(PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"PRODUCT\")\n .values(\"WindowsServer2012\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n production:\n type: aws:ssm:PatchBaseline\n properties:\n name: patch-baseline\n description: Patch Baseline Description\n approvedPatches:\n - KB123456\n - KB456789\n rejectedPatches:\n - KB987654\n globalFilters:\n - key: PRODUCT\n values:\n - WindowsServer2008\n - key: CLASSIFICATION\n values:\n - ServicePacks\n - key: MSRC_SEVERITY\n values:\n - Low\n approvalRules:\n - approveAfterDays: 7\n complianceLevel: HIGH\n patchFilters:\n - key: PRODUCT\n values:\n - WindowsServer2016\n - key: CLASSIFICATION\n values:\n - CriticalUpdates\n - SecurityUpdates\n - Updates\n - key: MSRC_SEVERITY\n values:\n - Critical\n - Important\n - Moderate\n - approveAfterDays: 7\n patchFilters:\n - key: PRODUCT\n values:\n - WindowsServer2012\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Advanced usage, specifying Microsoft application and Windows patch rules\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst windowsOsApps = new aws.ssm.PatchBaseline(\"windows_os_apps\", {\n name: \"WindowsOSAndMicrosoftApps\",\n description: \"Patch both Windows and Microsoft apps\",\n operatingSystem: \"WINDOWS\",\n approvalRules: [\n {\n approveAfterDays: 7,\n patchFilters: [\n {\n key: \"CLASSIFICATION\",\n values: [\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n ],\n },\n {\n key: \"MSRC_SEVERITY\",\n values: [\n \"Critical\",\n \"Important\",\n ],\n },\n ],\n },\n {\n approveAfterDays: 7,\n patchFilters: [\n {\n key: \"PATCH_SET\",\n values: [\"APPLICATION\"],\n },\n {\n key: \"PRODUCT\",\n values: [\n \"Office 2013\",\n \"Office 2016\",\n ],\n },\n ],\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nwindows_os_apps = aws.ssm.PatchBaseline(\"windows_os_apps\",\n name=\"WindowsOSAndMicrosoftApps\",\n description=\"Patch both Windows and Microsoft apps\",\n operating_system=\"WINDOWS\",\n approval_rules=[\n {\n \"approve_after_days\": 7,\n \"patch_filters\": [\n {\n \"key\": \"CLASSIFICATION\",\n \"values\": [\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n ],\n },\n {\n \"key\": \"MSRC_SEVERITY\",\n \"values\": [\n \"Critical\",\n \"Important\",\n ],\n },\n ],\n },\n {\n \"approve_after_days\": 7,\n \"patch_filters\": [\n {\n \"key\": \"PATCH_SET\",\n \"values\": [\"APPLICATION\"],\n },\n {\n \"key\": \"PRODUCT\",\n \"values\": [\n \"Office 2013\",\n \"Office 2016\",\n ],\n },\n ],\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var windowsOsApps = new Aws.Ssm.PatchBaseline(\"windows_os_apps\", new()\n {\n Name = \"WindowsOSAndMicrosoftApps\",\n Description = \"Patch both Windows and Microsoft apps\",\n OperatingSystem = \"WINDOWS\",\n ApprovalRules = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRuleArgs\n {\n ApproveAfterDays = 7,\n PatchFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"CLASSIFICATION\",\n Values = new[]\n {\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"MSRC_SEVERITY\",\n Values = new[]\n {\n \"Critical\",\n \"Important\",\n },\n },\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRuleArgs\n {\n ApproveAfterDays = 7,\n PatchFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"PATCH_SET\",\n Values = new[]\n {\n \"APPLICATION\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"PRODUCT\",\n Values = new[]\n {\n \"Office 2013\",\n \"Office 2016\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssm.NewPatchBaseline(ctx, \"windows_os_apps\", \u0026ssm.PatchBaselineArgs{\n\t\t\tName: pulumi.String(\"WindowsOSAndMicrosoftApps\"),\n\t\t\tDescription: pulumi.String(\"Patch both Windows and Microsoft apps\"),\n\t\t\tOperatingSystem: pulumi.String(\"WINDOWS\"),\n\t\t\tApprovalRules: ssm.PatchBaselineApprovalRuleArray{\n\t\t\t\t\u0026ssm.PatchBaselineApprovalRuleArgs{\n\t\t\t\t\tApproveAfterDays: pulumi.Int(7),\n\t\t\t\t\tPatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"CLASSIFICATION\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"CriticalUpdates\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"SecurityUpdates\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"MSRC_SEVERITY\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Critical\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Important\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssm.PatchBaselineApprovalRuleArgs{\n\t\t\t\t\tApproveAfterDays: pulumi.Int(7),\n\t\t\t\t\tPatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"PATCH_SET\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"APPLICATION\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"PRODUCT\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Office 2013\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Office 2016\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssm.PatchBaseline;\nimport com.pulumi.aws.ssm.PatchBaselineArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineApprovalRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var windowsOsApps = new PatchBaseline(\"windowsOsApps\", PatchBaselineArgs.builder()\n .name(\"WindowsOSAndMicrosoftApps\")\n .description(\"Patch both Windows and Microsoft apps\")\n .operatingSystem(\"WINDOWS\")\n .approvalRules( \n PatchBaselineApprovalRuleArgs.builder()\n .approveAfterDays(7)\n .patchFilters( \n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"CLASSIFICATION\")\n .values( \n \"CriticalUpdates\",\n \"SecurityUpdates\")\n .build(),\n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"MSRC_SEVERITY\")\n .values( \n \"Critical\",\n \"Important\")\n .build())\n .build(),\n PatchBaselineApprovalRuleArgs.builder()\n .approveAfterDays(7)\n .patchFilters( \n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"PATCH_SET\")\n .values(\"APPLICATION\")\n .build(),\n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"PRODUCT\")\n .values( \n \"Office 2013\",\n \"Office 2016\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n windowsOsApps:\n type: aws:ssm:PatchBaseline\n name: windows_os_apps\n properties:\n name: WindowsOSAndMicrosoftApps\n description: Patch both Windows and Microsoft apps\n operatingSystem: WINDOWS\n approvalRules:\n - approveAfterDays: 7\n patchFilters:\n - key: CLASSIFICATION\n values:\n - CriticalUpdates\n - SecurityUpdates\n - key: MSRC_SEVERITY\n values:\n - Critical\n - Important\n - approveAfterDays: 7\n patchFilters:\n - key: PATCH_SET\n values:\n - APPLICATION\n - key: PRODUCT\n values:\n - Office 2013\n - Office 2016\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Advanced usage, specifying alternate patch source repository\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst al201709 = new aws.ssm.PatchBaseline(\"al_2017_09\", {\n approvalRules: [{}],\n name: \"Amazon-Linux-2017.09\",\n description: \"My patch repository for Amazon Linux 2017.09\",\n operatingSystem: \"AMAZON_LINUX\",\n sources: [{\n name: \"My-AL2017.09\",\n products: [\"AmazonLinux2017.09\"],\n configuration: `[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./awsregion./awsdomain//releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n`,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nal201709 = aws.ssm.PatchBaseline(\"al_2017_09\",\n approval_rules=[{}],\n name=\"Amazon-Linux-2017.09\",\n description=\"My patch repository for Amazon Linux 2017.09\",\n operating_system=\"AMAZON_LINUX\",\n sources=[{\n \"name\": \"My-AL2017.09\",\n \"products\": [\"AmazonLinux2017.09\"],\n \"configuration\": \"\"\"[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n\"\"\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var al201709 = new Aws.Ssm.PatchBaseline(\"al_2017_09\", new()\n {\n ApprovalRules = new[]\n {\n null,\n },\n Name = \"Amazon-Linux-2017.09\",\n Description = \"My patch repository for Amazon Linux 2017.09\",\n OperatingSystem = \"AMAZON_LINUX\",\n Sources = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineSourceArgs\n {\n Name = \"My-AL2017.09\",\n Products = new[]\n {\n \"AmazonLinux2017.09\",\n },\n Configuration = @\"[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssm.NewPatchBaseline(ctx, \"al_2017_09\", \u0026ssm.PatchBaselineArgs{\n\t\t\tApprovalRules: ssm.PatchBaselineApprovalRuleArray{\n\t\t\t\tnil,\n\t\t\t},\n\t\t\tName: pulumi.String(\"Amazon-Linux-2017.09\"),\n\t\t\tDescription: pulumi.String(\"My patch repository for Amazon Linux 2017.09\"),\n\t\t\tOperatingSystem: pulumi.String(\"AMAZON_LINUX\"),\n\t\t\tSources: ssm.PatchBaselineSourceArray{\n\t\t\t\t\u0026ssm.PatchBaselineSourceArgs{\n\t\t\t\t\tName: pulumi.String(\"My-AL2017.09\"),\n\t\t\t\t\tProducts: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"AmazonLinux2017.09\"),\n\t\t\t\t\t},\n\t\t\t\t\tConfiguration: pulumi.String(`[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n`),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssm.PatchBaseline;\nimport com.pulumi.aws.ssm.PatchBaselineArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineApprovalRuleArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineSourceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var al201709 = new PatchBaseline(\"al201709\", PatchBaselineArgs.builder()\n .approvalRules()\n .name(\"Amazon-Linux-2017.09\")\n .description(\"My patch repository for Amazon Linux 2017.09\")\n .operatingSystem(\"AMAZON_LINUX\")\n .sources(PatchBaselineSourceArgs.builder()\n .name(\"My-AL2017.09\")\n .products(\"AmazonLinux2017.09\")\n .configuration(\"\"\"\n[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n \"\"\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n al201709:\n type: aws:ssm:PatchBaseline\n name: al_2017_09\n properties:\n approvalRules:\n - {}\n name: Amazon-Linux-2017.09\n description: My patch repository for Amazon Linux 2017.09\n operatingSystem: AMAZON_LINUX\n sources:\n - name: My-AL2017.09\n products:\n - AmazonLinux2017.09\n configuration: |\n [amzn-main]\n name=amzn-main-Base\n mirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\n mirrorlist_expire=300\n metadata_expire=300\n priority=10\n failovermethod=priority\n fastestmirror_enabled=0\n gpgcheck=1\n gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\n enabled=1\n retries=3\n timeout=5\n report_instanceid=yes\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSM Patch Baselines using their baseline ID. For example:\n\n```sh\n$ pulumi import aws:ssm/patchBaseline:PatchBaseline example pb-12345678\n```\n", + "description": "Provides an SSM Patch Baseline resource.\n\n\u003e **NOTE on Patch Baselines:** The `approved_patches` and `approval_rule` are\nboth marked as optional fields, but the Patch Baseline requires that at least one\nof them is specified.\n\n## Example Usage\n\n### Basic Usage\n\nUsing `approved_patches` only.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst production = new aws.ssm.PatchBaseline(\"production\", {\n name: \"patch-baseline\",\n approvedPatches: [\"KB123456\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nproduction = aws.ssm.PatchBaseline(\"production\",\n name=\"patch-baseline\",\n approved_patches=[\"KB123456\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var production = new Aws.Ssm.PatchBaseline(\"production\", new()\n {\n Name = \"patch-baseline\",\n ApprovedPatches = new[]\n {\n \"KB123456\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssm.NewPatchBaseline(ctx, \"production\", \u0026ssm.PatchBaselineArgs{\n\t\t\tName: pulumi.String(\"patch-baseline\"),\n\t\t\tApprovedPatches: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"KB123456\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssm.PatchBaseline;\nimport com.pulumi.aws.ssm.PatchBaselineArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var production = new PatchBaseline(\"production\", PatchBaselineArgs.builder()\n .name(\"patch-baseline\")\n .approvedPatches(\"KB123456\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n production:\n type: aws:ssm:PatchBaseline\n properties:\n name: patch-baseline\n approvedPatches:\n - KB123456\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Advanced Usage, specifying patch filters\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst production = new aws.ssm.PatchBaseline(\"production\", {\n name: \"patch-baseline\",\n description: \"Patch Baseline Description\",\n approvedPatches: [\n \"KB123456\",\n \"KB456789\",\n ],\n rejectedPatches: [\"KB987654\"],\n globalFilters: [\n {\n key: \"PRODUCT\",\n values: [\"WindowsServer2008\"],\n },\n {\n key: \"CLASSIFICATION\",\n values: [\"ServicePacks\"],\n },\n {\n key: \"MSRC_SEVERITY\",\n values: [\"Low\"],\n },\n ],\n approvalRules: [\n {\n approveAfterDays: 7,\n complianceLevel: \"HIGH\",\n patchFilters: [\n {\n key: \"PRODUCT\",\n values: [\"WindowsServer2016\"],\n },\n {\n key: \"CLASSIFICATION\",\n values: [\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n \"Updates\",\n ],\n },\n {\n key: \"MSRC_SEVERITY\",\n values: [\n \"Critical\",\n \"Important\",\n \"Moderate\",\n ],\n },\n ],\n },\n {\n approveAfterDays: 7,\n patchFilters: [{\n key: \"PRODUCT\",\n values: [\"WindowsServer2012\"],\n }],\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nproduction = aws.ssm.PatchBaseline(\"production\",\n name=\"patch-baseline\",\n description=\"Patch Baseline Description\",\n approved_patches=[\n \"KB123456\",\n \"KB456789\",\n ],\n rejected_patches=[\"KB987654\"],\n global_filters=[\n {\n \"key\": \"PRODUCT\",\n \"values\": [\"WindowsServer2008\"],\n },\n {\n \"key\": \"CLASSIFICATION\",\n \"values\": [\"ServicePacks\"],\n },\n {\n \"key\": \"MSRC_SEVERITY\",\n \"values\": [\"Low\"],\n },\n ],\n approval_rules=[\n {\n \"approve_after_days\": 7,\n \"compliance_level\": \"HIGH\",\n \"patch_filters\": [\n {\n \"key\": \"PRODUCT\",\n \"values\": [\"WindowsServer2016\"],\n },\n {\n \"key\": \"CLASSIFICATION\",\n \"values\": [\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n \"Updates\",\n ],\n },\n {\n \"key\": \"MSRC_SEVERITY\",\n \"values\": [\n \"Critical\",\n \"Important\",\n \"Moderate\",\n ],\n },\n ],\n },\n {\n \"approve_after_days\": 7,\n \"patch_filters\": [{\n \"key\": \"PRODUCT\",\n \"values\": [\"WindowsServer2012\"],\n }],\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var production = new Aws.Ssm.PatchBaseline(\"production\", new()\n {\n Name = \"patch-baseline\",\n Description = \"Patch Baseline Description\",\n ApprovedPatches = new[]\n {\n \"KB123456\",\n \"KB456789\",\n },\n RejectedPatches = new[]\n {\n \"KB987654\",\n },\n GlobalFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineGlobalFilterArgs\n {\n Key = \"PRODUCT\",\n Values = new[]\n {\n \"WindowsServer2008\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineGlobalFilterArgs\n {\n Key = \"CLASSIFICATION\",\n Values = new[]\n {\n \"ServicePacks\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineGlobalFilterArgs\n {\n Key = \"MSRC_SEVERITY\",\n Values = new[]\n {\n \"Low\",\n },\n },\n },\n ApprovalRules = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRuleArgs\n {\n ApproveAfterDays = 7,\n ComplianceLevel = \"HIGH\",\n PatchFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"PRODUCT\",\n Values = new[]\n {\n \"WindowsServer2016\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"CLASSIFICATION\",\n Values = new[]\n {\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n \"Updates\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"MSRC_SEVERITY\",\n Values = new[]\n {\n \"Critical\",\n \"Important\",\n \"Moderate\",\n },\n },\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRuleArgs\n {\n ApproveAfterDays = 7,\n PatchFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"PRODUCT\",\n Values = new[]\n {\n \"WindowsServer2012\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssm.NewPatchBaseline(ctx, \"production\", \u0026ssm.PatchBaselineArgs{\n\t\t\tName: pulumi.String(\"patch-baseline\"),\n\t\t\tDescription: pulumi.String(\"Patch Baseline Description\"),\n\t\t\tApprovedPatches: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"KB123456\"),\n\t\t\t\tpulumi.String(\"KB456789\"),\n\t\t\t},\n\t\t\tRejectedPatches: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"KB987654\"),\n\t\t\t},\n\t\t\tGlobalFilters: ssm.PatchBaselineGlobalFilterArray{\n\t\t\t\t\u0026ssm.PatchBaselineGlobalFilterArgs{\n\t\t\t\t\tKey: pulumi.String(\"PRODUCT\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"WindowsServer2008\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssm.PatchBaselineGlobalFilterArgs{\n\t\t\t\t\tKey: pulumi.String(\"CLASSIFICATION\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"ServicePacks\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssm.PatchBaselineGlobalFilterArgs{\n\t\t\t\t\tKey: pulumi.String(\"MSRC_SEVERITY\"),\n\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"Low\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tApprovalRules: ssm.PatchBaselineApprovalRuleArray{\n\t\t\t\t\u0026ssm.PatchBaselineApprovalRuleArgs{\n\t\t\t\t\tApproveAfterDays: pulumi.Int(7),\n\t\t\t\t\tComplianceLevel: pulumi.String(\"HIGH\"),\n\t\t\t\t\tPatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"PRODUCT\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"WindowsServer2016\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"CLASSIFICATION\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"CriticalUpdates\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"SecurityUpdates\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Updates\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"MSRC_SEVERITY\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Critical\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Important\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Moderate\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssm.PatchBaselineApprovalRuleArgs{\n\t\t\t\t\tApproveAfterDays: pulumi.Int(7),\n\t\t\t\t\tPatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"PRODUCT\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"WindowsServer2012\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssm.PatchBaseline;\nimport com.pulumi.aws.ssm.PatchBaselineArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineGlobalFilterArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineApprovalRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var production = new PatchBaseline(\"production\", PatchBaselineArgs.builder()\n .name(\"patch-baseline\")\n .description(\"Patch Baseline Description\")\n .approvedPatches( \n \"KB123456\",\n \"KB456789\")\n .rejectedPatches(\"KB987654\")\n .globalFilters( \n PatchBaselineGlobalFilterArgs.builder()\n .key(\"PRODUCT\")\n .values(\"WindowsServer2008\")\n .build(),\n PatchBaselineGlobalFilterArgs.builder()\n .key(\"CLASSIFICATION\")\n .values(\"ServicePacks\")\n .build(),\n PatchBaselineGlobalFilterArgs.builder()\n .key(\"MSRC_SEVERITY\")\n .values(\"Low\")\n .build())\n .approvalRules( \n PatchBaselineApprovalRuleArgs.builder()\n .approveAfterDays(7)\n .complianceLevel(\"HIGH\")\n .patchFilters( \n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"PRODUCT\")\n .values(\"WindowsServer2016\")\n .build(),\n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"CLASSIFICATION\")\n .values( \n \"CriticalUpdates\",\n \"SecurityUpdates\",\n \"Updates\")\n .build(),\n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"MSRC_SEVERITY\")\n .values( \n \"Critical\",\n \"Important\",\n \"Moderate\")\n .build())\n .build(),\n PatchBaselineApprovalRuleArgs.builder()\n .approveAfterDays(7)\n .patchFilters(PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"PRODUCT\")\n .values(\"WindowsServer2012\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n production:\n type: aws:ssm:PatchBaseline\n properties:\n name: patch-baseline\n description: Patch Baseline Description\n approvedPatches:\n - KB123456\n - KB456789\n rejectedPatches:\n - KB987654\n globalFilters:\n - key: PRODUCT\n values:\n - WindowsServer2008\n - key: CLASSIFICATION\n values:\n - ServicePacks\n - key: MSRC_SEVERITY\n values:\n - Low\n approvalRules:\n - approveAfterDays: 7\n complianceLevel: HIGH\n patchFilters:\n - key: PRODUCT\n values:\n - WindowsServer2016\n - key: CLASSIFICATION\n values:\n - CriticalUpdates\n - SecurityUpdates\n - Updates\n - key: MSRC_SEVERITY\n values:\n - Critical\n - Important\n - Moderate\n - approveAfterDays: 7\n patchFilters:\n - key: PRODUCT\n values:\n - WindowsServer2012\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Advanced usage, specifying Microsoft application and Windows patch rules\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst windowsOsApps = new aws.ssm.PatchBaseline(\"windows_os_apps\", {\n name: \"WindowsOSAndMicrosoftApps\",\n description: \"Patch both Windows and Microsoft apps\",\n operatingSystem: \"WINDOWS\",\n approvalRules: [\n {\n approveAfterDays: 7,\n patchFilters: [\n {\n key: \"CLASSIFICATION\",\n values: [\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n ],\n },\n {\n key: \"MSRC_SEVERITY\",\n values: [\n \"Critical\",\n \"Important\",\n ],\n },\n ],\n },\n {\n approveAfterDays: 7,\n patchFilters: [\n {\n key: \"PATCH_SET\",\n values: [\"APPLICATION\"],\n },\n {\n key: \"PRODUCT\",\n values: [\n \"Office 2013\",\n \"Office 2016\",\n ],\n },\n ],\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nwindows_os_apps = aws.ssm.PatchBaseline(\"windows_os_apps\",\n name=\"WindowsOSAndMicrosoftApps\",\n description=\"Patch both Windows and Microsoft apps\",\n operating_system=\"WINDOWS\",\n approval_rules=[\n {\n \"approve_after_days\": 7,\n \"patch_filters\": [\n {\n \"key\": \"CLASSIFICATION\",\n \"values\": [\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n ],\n },\n {\n \"key\": \"MSRC_SEVERITY\",\n \"values\": [\n \"Critical\",\n \"Important\",\n ],\n },\n ],\n },\n {\n \"approve_after_days\": 7,\n \"patch_filters\": [\n {\n \"key\": \"PATCH_SET\",\n \"values\": [\"APPLICATION\"],\n },\n {\n \"key\": \"PRODUCT\",\n \"values\": [\n \"Office 2013\",\n \"Office 2016\",\n ],\n },\n ],\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var windowsOsApps = new Aws.Ssm.PatchBaseline(\"windows_os_apps\", new()\n {\n Name = \"WindowsOSAndMicrosoftApps\",\n Description = \"Patch both Windows and Microsoft apps\",\n OperatingSystem = \"WINDOWS\",\n ApprovalRules = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRuleArgs\n {\n ApproveAfterDays = 7,\n PatchFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"CLASSIFICATION\",\n Values = new[]\n {\n \"CriticalUpdates\",\n \"SecurityUpdates\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"MSRC_SEVERITY\",\n Values = new[]\n {\n \"Critical\",\n \"Important\",\n },\n },\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRuleArgs\n {\n ApproveAfterDays = 7,\n PatchFilters = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"PATCH_SET\",\n Values = new[]\n {\n \"APPLICATION\",\n },\n },\n new Aws.Ssm.Inputs.PatchBaselineApprovalRulePatchFilterArgs\n {\n Key = \"PRODUCT\",\n Values = new[]\n {\n \"Office 2013\",\n \"Office 2016\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssm.NewPatchBaseline(ctx, \"windows_os_apps\", \u0026ssm.PatchBaselineArgs{\n\t\t\tName: pulumi.String(\"WindowsOSAndMicrosoftApps\"),\n\t\t\tDescription: pulumi.String(\"Patch both Windows and Microsoft apps\"),\n\t\t\tOperatingSystem: pulumi.String(\"WINDOWS\"),\n\t\t\tApprovalRules: ssm.PatchBaselineApprovalRuleArray{\n\t\t\t\t\u0026ssm.PatchBaselineApprovalRuleArgs{\n\t\t\t\t\tApproveAfterDays: pulumi.Int(7),\n\t\t\t\t\tPatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"CLASSIFICATION\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"CriticalUpdates\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"SecurityUpdates\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"MSRC_SEVERITY\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Critical\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Important\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssm.PatchBaselineApprovalRuleArgs{\n\t\t\t\t\tApproveAfterDays: pulumi.Int(7),\n\t\t\t\t\tPatchFilters: ssm.PatchBaselineApprovalRulePatchFilterArray{\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"PATCH_SET\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"APPLICATION\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026ssm.PatchBaselineApprovalRulePatchFilterArgs{\n\t\t\t\t\t\t\tKey: pulumi.String(\"PRODUCT\"),\n\t\t\t\t\t\t\tValues: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"Office 2013\"),\n\t\t\t\t\t\t\t\tpulumi.String(\"Office 2016\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssm.PatchBaseline;\nimport com.pulumi.aws.ssm.PatchBaselineArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineApprovalRuleArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var windowsOsApps = new PatchBaseline(\"windowsOsApps\", PatchBaselineArgs.builder()\n .name(\"WindowsOSAndMicrosoftApps\")\n .description(\"Patch both Windows and Microsoft apps\")\n .operatingSystem(\"WINDOWS\")\n .approvalRules( \n PatchBaselineApprovalRuleArgs.builder()\n .approveAfterDays(7)\n .patchFilters( \n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"CLASSIFICATION\")\n .values( \n \"CriticalUpdates\",\n \"SecurityUpdates\")\n .build(),\n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"MSRC_SEVERITY\")\n .values( \n \"Critical\",\n \"Important\")\n .build())\n .build(),\n PatchBaselineApprovalRuleArgs.builder()\n .approveAfterDays(7)\n .patchFilters( \n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"PATCH_SET\")\n .values(\"APPLICATION\")\n .build(),\n PatchBaselineApprovalRulePatchFilterArgs.builder()\n .key(\"PRODUCT\")\n .values( \n \"Office 2013\",\n \"Office 2016\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n windowsOsApps:\n type: aws:ssm:PatchBaseline\n name: windows_os_apps\n properties:\n name: WindowsOSAndMicrosoftApps\n description: Patch both Windows and Microsoft apps\n operatingSystem: WINDOWS\n approvalRules:\n - approveAfterDays: 7\n patchFilters:\n - key: CLASSIFICATION\n values:\n - CriticalUpdates\n - SecurityUpdates\n - key: MSRC_SEVERITY\n values:\n - Critical\n - Important\n - approveAfterDays: 7\n patchFilters:\n - key: PATCH_SET\n values:\n - APPLICATION\n - key: PRODUCT\n values:\n - Office 2013\n - Office 2016\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Advanced usage, specifying alternate patch source repository\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst al201709 = new aws.ssm.PatchBaseline(\"al_2017_09\", {\n approvalRules: [{}],\n name: \"Amazon-Linux-2017.09\",\n description: \"My patch repository for Amazon Linux 2017.09\",\n operatingSystem: \"AMAZON_LINUX\",\n sources: [{\n name: \"My-AL2017.09\",\n products: [\"AmazonLinux2017.09\"],\n configuration: `[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./awsregion./awsdomain//releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n`,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nal201709 = aws.ssm.PatchBaseline(\"al_2017_09\",\n approval_rules=[{}],\n name=\"Amazon-Linux-2017.09\",\n description=\"My patch repository for Amazon Linux 2017.09\",\n operating_system=\"AMAZON_LINUX\",\n sources=[{\n \"name\": \"My-AL2017.09\",\n \"products\": [\"AmazonLinux2017.09\"],\n \"configuration\": \"\"\"[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n\"\"\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var al201709 = new Aws.Ssm.PatchBaseline(\"al_2017_09\", new()\n {\n ApprovalRules = new[]\n {\n null,\n },\n Name = \"Amazon-Linux-2017.09\",\n Description = \"My patch repository for Amazon Linux 2017.09\",\n OperatingSystem = \"AMAZON_LINUX\",\n Sources = new[]\n {\n new Aws.Ssm.Inputs.PatchBaselineSourceArgs\n {\n Name = \"My-AL2017.09\",\n Products = new[]\n {\n \"AmazonLinux2017.09\",\n },\n Configuration = @\"[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssm.NewPatchBaseline(ctx, \"al_2017_09\", \u0026ssm.PatchBaselineArgs{\n\t\t\tApprovalRules: ssm.PatchBaselineApprovalRuleArray{\n\t\t\t\t\u0026ssm.PatchBaselineApprovalRuleArgs{},\n\t\t\t},\n\t\t\tName: pulumi.String(\"Amazon-Linux-2017.09\"),\n\t\t\tDescription: pulumi.String(\"My patch repository for Amazon Linux 2017.09\"),\n\t\t\tOperatingSystem: pulumi.String(\"AMAZON_LINUX\"),\n\t\t\tSources: ssm.PatchBaselineSourceArray{\n\t\t\t\t\u0026ssm.PatchBaselineSourceArgs{\n\t\t\t\t\tName: pulumi.String(\"My-AL2017.09\"),\n\t\t\t\t\tProducts: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"AmazonLinux2017.09\"),\n\t\t\t\t\t},\n\t\t\t\t\tConfiguration: pulumi.String(`[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n`),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssm.PatchBaseline;\nimport com.pulumi.aws.ssm.PatchBaselineArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineApprovalRuleArgs;\nimport com.pulumi.aws.ssm.inputs.PatchBaselineSourceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var al201709 = new PatchBaseline(\"al201709\", PatchBaselineArgs.builder()\n .approvalRules()\n .name(\"Amazon-Linux-2017.09\")\n .description(\"My patch repository for Amazon Linux 2017.09\")\n .operatingSystem(\"AMAZON_LINUX\")\n .sources(PatchBaselineSourceArgs.builder()\n .name(\"My-AL2017.09\")\n .products(\"AmazonLinux2017.09\")\n .configuration(\"\"\"\n[amzn-main]\nname=amzn-main-Base\nmirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\nmirrorlist_expire=300\nmetadata_expire=300\npriority=10\nfailovermethod=priority\nfastestmirror_enabled=0\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\nenabled=1\nretries=3\ntimeout=5\nreport_instanceid=yes\n \"\"\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n al201709:\n type: aws:ssm:PatchBaseline\n name: al_2017_09\n properties:\n approvalRules:\n - {}\n name: Amazon-Linux-2017.09\n description: My patch repository for Amazon Linux 2017.09\n operatingSystem: AMAZON_LINUX\n sources:\n - name: My-AL2017.09\n products:\n - AmazonLinux2017.09\n configuration: |\n [amzn-main]\n name=amzn-main-Base\n mirrorlist=http://repo./$awsregion./$awsdomain//$releasever/main/mirror.list\n mirrorlist_expire=300\n metadata_expire=300\n priority=10\n failovermethod=priority\n fastestmirror_enabled=0\n gpgcheck=1\n gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga\n enabled=1\n retries=3\n timeout=5\n report_instanceid=yes\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSM Patch Baselines using their baseline ID. For example:\n\n```sh\n$ pulumi import aws:ssm/patchBaseline:PatchBaseline example pb-12345678\n```\n", "properties": { "approvalRules": { "type": "array", @@ -361941,7 +361941,7 @@ } }, "aws:ssoadmin/accountAssignment:AccountAssignment": { - "description": "Provides a Single Sign-On (SSO) Account Assignment resource\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetPermissionSet = example.then(example =\u003e aws.ssoadmin.getPermissionSet({\n instanceArn: example.arns?.[0],\n name: \"AWSReadOnlyAccess\",\n}));\nconst exampleGetGroup = example.then(example =\u003e aws.identitystore.getGroup({\n identityStoreId: example.identityStoreIds?.[0],\n alternateIdentifier: {\n uniqueAttribute: {\n attributePath: \"DisplayName\",\n attributeValue: \"ExampleGroup\",\n },\n },\n}));\nconst exampleAccountAssignment = new aws.ssoadmin.AccountAssignment(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n permissionSetArn: exampleGetPermissionSet.then(exampleGetPermissionSet =\u003e exampleGetPermissionSet.arn),\n principalId: exampleGetGroup.then(exampleGetGroup =\u003e exampleGetGroup.groupId),\n principalType: \"GROUP\",\n targetId: \"123456789012\",\n targetType: \"AWS_ACCOUNT\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_permission_set = aws.ssoadmin.get_permission_set(instance_arn=example.arns[0],\n name=\"AWSReadOnlyAccess\")\nexample_get_group = aws.identitystore.get_group(identity_store_id=example.identity_store_ids[0],\n alternate_identifier={\n \"unique_attribute\": {\n \"attribute_path\": \"DisplayName\",\n \"attribute_value\": \"ExampleGroup\",\n },\n })\nexample_account_assignment = aws.ssoadmin.AccountAssignment(\"example\",\n instance_arn=example.arns[0],\n permission_set_arn=example_get_permission_set.arn,\n principal_id=example_get_group.group_id,\n principal_type=\"GROUP\",\n target_id=\"123456789012\",\n target_type=\"AWS_ACCOUNT\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetPermissionSet = Aws.SsoAdmin.GetPermissionSet.Invoke(new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n Name = \"AWSReadOnlyAccess\",\n });\n\n var exampleGetGroup = Aws.IdentityStore.GetGroup.Invoke(new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n AlternateIdentifier = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierInputArgs\n {\n UniqueAttribute = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierUniqueAttributeInputArgs\n {\n AttributePath = \"DisplayName\",\n AttributeValue = \"ExampleGroup\",\n },\n },\n });\n\n var exampleAccountAssignment = new Aws.SsoAdmin.AccountAssignment(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PermissionSetArn = exampleGetPermissionSet.Apply(getPermissionSetResult =\u003e getPermissionSetResult.Arn),\n PrincipalId = exampleGetGroup.Apply(getGroupResult =\u003e getGroupResult.GroupId),\n PrincipalType = \"GROUP\",\n TargetId = \"123456789012\",\n TargetType = \"AWS_ACCOUNT\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetPermissionSet, err := ssoadmin.LookupPermissionSet(ctx, \u0026ssoadmin.LookupPermissionSetArgs{\n\t\t\tInstanceArn: example.Arns[0],\n\t\t\tName: pulumi.StringRef(\"AWSReadOnlyAccess\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetGroup, err := identitystore.LookupGroup(ctx, \u0026identitystore.LookupGroupArgs{\n\t\t\tIdentityStoreId: example.IdentityStoreIds[0],\n\t\t\tAlternateIdentifier: identitystore.GetGroupAlternateIdentifier{\n\t\t\t\tUniqueAttribute: identitystore.GetGroupAlternateIdentifierUniqueAttribute{\n\t\t\t\t\tAttributePath: \"DisplayName\",\n\t\t\t\t\tAttributeValue: \"ExampleGroup\",\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewAccountAssignment(ctx, \"example\", \u0026ssoadmin.AccountAssignmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPermissionSetArn: pulumi.String(exampleGetPermissionSet.Arn),\n\t\t\tPrincipalId: pulumi.String(exampleGetGroup.GroupId),\n\t\t\tPrincipalType: pulumi.String(\"GROUP\"),\n\t\t\tTargetId: pulumi.String(\"123456789012\"),\n\t\t\tTargetType: pulumi.String(\"AWS_ACCOUNT\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.inputs.GetPermissionSetArgs;\nimport com.pulumi.aws.identitystore.IdentitystoreFunctions;\nimport com.pulumi.aws.identitystore.inputs.GetGroupArgs;\nimport com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierArgs;\nimport com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierUniqueAttributeArgs;\nimport com.pulumi.aws.ssoadmin.AccountAssignment;\nimport com.pulumi.aws.ssoadmin.AccountAssignmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetPermissionSet = SsoadminFunctions.getPermissionSet(GetPermissionSetArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .name(\"AWSReadOnlyAccess\")\n .build());\n\n final var exampleGetGroup = IdentitystoreFunctions.getGroup(GetGroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .alternateIdentifier(GetGroupAlternateIdentifierArgs.builder()\n .uniqueAttribute(GetGroupAlternateIdentifierUniqueAttributeArgs.builder()\n .attributePath(\"DisplayName\")\n .attributeValue(\"ExampleGroup\")\n .build())\n .build())\n .build());\n\n var exampleAccountAssignment = new AccountAssignment(\"exampleAccountAssignment\", AccountAssignmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .permissionSetArn(exampleGetPermissionSet.applyValue(getPermissionSetResult -\u003e getPermissionSetResult.arn()))\n .principalId(exampleGetGroup.applyValue(getGroupResult -\u003e getGroupResult.groupId()))\n .principalType(\"GROUP\")\n .targetId(\"123456789012\")\n .targetType(\"AWS_ACCOUNT\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleAccountAssignment:\n type: aws:ssoadmin:AccountAssignment\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n permissionSetArn: ${exampleGetPermissionSet.arn}\n principalId: ${exampleGetGroup.groupId}\n principalType: GROUP\n targetId: '123456789012'\n targetType: AWS_ACCOUNT\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetPermissionSet:\n fn::invoke:\n Function: aws:ssoadmin:getPermissionSet\n Arguments:\n instanceArn: ${example.arns[0]}\n name: AWSReadOnlyAccess\n exampleGetGroup:\n fn::invoke:\n Function: aws:identitystore:getGroup\n Arguments:\n identityStoreId: ${example.identityStoreIds[0]}\n alternateIdentifier:\n uniqueAttribute:\n attributePath: DisplayName\n attributeValue: ExampleGroup\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Managed Policy Attachment\n\n\u003e Because destruction of a managed policy attachment resource also re-provisions the associated permission set to all accounts, explicitly indicating the dependency with the account assignment resource via the `depends_on` meta argument is necessary to ensure proper deletion order when these resources are used together.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleGroup = new aws.identitystore.Group(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n displayName: \"Admin\",\n description: \"Admin Group\",\n});\nconst accountAssignment = new aws.ssoadmin.AccountAssignment(\"account_assignment\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n permissionSetArn: examplePermissionSet.arn,\n principalId: exampleGroup.groupId,\n principalType: \"GROUP\",\n targetId: \"123456789012\",\n targetType: \"AWS_ACCOUNT\",\n});\nconst exampleManagedPolicyAttachment = new aws.ssoadmin.ManagedPolicyAttachment(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n managedPolicyArn: \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permissionSetArn: examplePermissionSet.arn,\n}, {\n dependsOn: [exampleAwsSsoadminAccountAssignment],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_group = aws.identitystore.Group(\"example\",\n identity_store_id=example.identity_store_ids[0],\n display_name=\"Admin\",\n description=\"Admin Group\")\naccount_assignment = aws.ssoadmin.AccountAssignment(\"account_assignment\",\n instance_arn=example.arns[0],\n permission_set_arn=example_permission_set.arn,\n principal_id=example_group.group_id,\n principal_type=\"GROUP\",\n target_id=\"123456789012\",\n target_type=\"AWS_ACCOUNT\")\nexample_managed_policy_attachment = aws.ssoadmin.ManagedPolicyAttachment(\"example\",\n instance_arn=example.arns[0],\n managed_policy_arn=\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permission_set_arn=example_permission_set.arn,\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssoadmin_account_assignment]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleGroup = new Aws.IdentityStore.Group(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n DisplayName = \"Admin\",\n Description = \"Admin Group\",\n });\n\n var accountAssignment = new Aws.SsoAdmin.AccountAssignment(\"account_assignment\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PermissionSetArn = examplePermissionSet.Arn,\n PrincipalId = exampleGroup.GroupId,\n PrincipalType = \"GROUP\",\n TargetId = \"123456789012\",\n TargetType = \"AWS_ACCOUNT\",\n });\n\n var exampleManagedPolicyAttachment = new Aws.SsoAdmin.ManagedPolicyAttachment(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n ManagedPolicyArn = \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n PermissionSetArn = examplePermissionSet.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsoadminAccountAssignment,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGroup, err := identitystore.NewGroup(ctx, \"example\", \u0026identitystore.GroupArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tDisplayName: pulumi.String(\"Admin\"),\n\t\t\tDescription: pulumi.String(\"Admin Group\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewAccountAssignment(ctx, \"account_assignment\", \u0026ssoadmin.AccountAssignmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t\tPrincipalId: exampleGroup.GroupId,\n\t\t\tPrincipalType: pulumi.String(\"GROUP\"),\n\t\t\tTargetId: pulumi.String(\"123456789012\"),\n\t\t\tTargetType: pulumi.String(\"AWS_ACCOUNT\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewManagedPolicyAttachment(ctx, \"example\", \u0026ssoadmin.ManagedPolicyAttachmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tManagedPolicyArn: pulumi.String(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\"),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsoadminAccountAssignment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.identitystore.Group;\nimport com.pulumi.aws.identitystore.GroupArgs;\nimport com.pulumi.aws.ssoadmin.AccountAssignment;\nimport com.pulumi.aws.ssoadmin.AccountAssignmentArgs;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachment;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachmentArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .displayName(\"Admin\")\n .description(\"Admin Group\")\n .build());\n\n var accountAssignment = new AccountAssignment(\"accountAssignment\", AccountAssignmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .permissionSetArn(examplePermissionSet.arn())\n .principalId(exampleGroup.groupId())\n .principalType(\"GROUP\")\n .targetId(\"123456789012\")\n .targetType(\"AWS_ACCOUNT\")\n .build());\n\n var exampleManagedPolicyAttachment = new ManagedPolicyAttachment(\"exampleManagedPolicyAttachment\", ManagedPolicyAttachmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .managedPolicyArn(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\")\n .permissionSetArn(examplePermissionSet.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsoadminAccountAssignment)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n exampleGroup:\n type: aws:identitystore:Group\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n displayName: Admin\n description: Admin Group\n accountAssignment:\n type: aws:ssoadmin:AccountAssignment\n name: account_assignment\n properties:\n instanceArn: ${example.arns[0]}\n permissionSetArn: ${examplePermissionSet.arn}\n principalId: ${exampleGroup.groupId}\n principalType: GROUP\n targetId: '123456789012'\n targetType: AWS_ACCOUNT\n exampleManagedPolicyAttachment:\n type: aws:ssoadmin:ManagedPolicyAttachment\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n managedPolicyArn: arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\n permissionSetArn: ${examplePermissionSet.arn}\n options:\n dependson:\n - ${exampleAwsSsoadminAccountAssignment}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Account Assignments using the `principal_id`, `principal_type`, `target_id`, `target_type`, `permission_set_arn`, `instance_arn` separated by commas (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/accountAssignment:AccountAssignment example f81d4fae-7dec-11d0-a765-00a0c91e6bf6,GROUP,1234567890,AWS_ACCOUNT,arn:aws:sso:::permissionSet/ssoins-0123456789abcdef/ps-0123456789abcdef,arn:aws:sso:::instance/ssoins-0123456789abcdef\n```\n", + "description": "Provides a Single Sign-On (SSO) Account Assignment resource\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetPermissionSet = example.then(example =\u003e aws.ssoadmin.getPermissionSet({\n instanceArn: example.arns?.[0],\n name: \"AWSReadOnlyAccess\",\n}));\nconst exampleGetGroup = example.then(example =\u003e aws.identitystore.getGroup({\n identityStoreId: example.identityStoreIds?.[0],\n alternateIdentifier: {\n uniqueAttribute: {\n attributePath: \"DisplayName\",\n attributeValue: \"ExampleGroup\",\n },\n },\n}));\nconst exampleAccountAssignment = new aws.ssoadmin.AccountAssignment(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n permissionSetArn: exampleGetPermissionSet.then(exampleGetPermissionSet =\u003e exampleGetPermissionSet.arn),\n principalId: exampleGetGroup.then(exampleGetGroup =\u003e exampleGetGroup.groupId),\n principalType: \"GROUP\",\n targetId: \"123456789012\",\n targetType: \"AWS_ACCOUNT\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_permission_set = aws.ssoadmin.get_permission_set(instance_arn=example.arns[0],\n name=\"AWSReadOnlyAccess\")\nexample_get_group = aws.identitystore.get_group(identity_store_id=example.identity_store_ids[0],\n alternate_identifier={\n \"unique_attribute\": {\n \"attribute_path\": \"DisplayName\",\n \"attribute_value\": \"ExampleGroup\",\n },\n })\nexample_account_assignment = aws.ssoadmin.AccountAssignment(\"example\",\n instance_arn=example.arns[0],\n permission_set_arn=example_get_permission_set.arn,\n principal_id=example_get_group.group_id,\n principal_type=\"GROUP\",\n target_id=\"123456789012\",\n target_type=\"AWS_ACCOUNT\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetPermissionSet = Aws.SsoAdmin.GetPermissionSet.Invoke(new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n Name = \"AWSReadOnlyAccess\",\n });\n\n var exampleGetGroup = Aws.IdentityStore.GetGroup.Invoke(new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n AlternateIdentifier = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierInputArgs\n {\n UniqueAttribute = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierUniqueAttributeInputArgs\n {\n AttributePath = \"DisplayName\",\n AttributeValue = \"ExampleGroup\",\n },\n },\n });\n\n var exampleAccountAssignment = new Aws.SsoAdmin.AccountAssignment(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PermissionSetArn = exampleGetPermissionSet.Apply(getPermissionSetResult =\u003e getPermissionSetResult.Arn),\n PrincipalId = exampleGetGroup.Apply(getGroupResult =\u003e getGroupResult.GroupId),\n PrincipalType = \"GROUP\",\n TargetId = \"123456789012\",\n TargetType = \"AWS_ACCOUNT\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetPermissionSet, err := ssoadmin.LookupPermissionSet(ctx, \u0026ssoadmin.LookupPermissionSetArgs{\n\t\t\tInstanceArn: example.Arns[0],\n\t\t\tName: pulumi.StringRef(\"AWSReadOnlyAccess\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetGroup, err := identitystore.LookupGroup(ctx, \u0026identitystore.LookupGroupArgs{\n\t\t\tIdentityStoreId: example.IdentityStoreIds[0],\n\t\t\tAlternateIdentifier: identitystore.GetGroupAlternateIdentifier{\n\t\t\t\tUniqueAttribute: identitystore.GetGroupAlternateIdentifierUniqueAttribute{\n\t\t\t\t\tAttributePath: \"DisplayName\",\n\t\t\t\t\tAttributeValue: \"ExampleGroup\",\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewAccountAssignment(ctx, \"example\", \u0026ssoadmin.AccountAssignmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPermissionSetArn: pulumi.String(exampleGetPermissionSet.Arn),\n\t\t\tPrincipalId: pulumi.String(exampleGetGroup.GroupId),\n\t\t\tPrincipalType: pulumi.String(\"GROUP\"),\n\t\t\tTargetId: pulumi.String(\"123456789012\"),\n\t\t\tTargetType: pulumi.String(\"AWS_ACCOUNT\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.inputs.GetPermissionSetArgs;\nimport com.pulumi.aws.identitystore.IdentitystoreFunctions;\nimport com.pulumi.aws.identitystore.inputs.GetGroupArgs;\nimport com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierArgs;\nimport com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierUniqueAttributeArgs;\nimport com.pulumi.aws.ssoadmin.AccountAssignment;\nimport com.pulumi.aws.ssoadmin.AccountAssignmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetPermissionSet = SsoadminFunctions.getPermissionSet(GetPermissionSetArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .name(\"AWSReadOnlyAccess\")\n .build());\n\n final var exampleGetGroup = IdentitystoreFunctions.getGroup(GetGroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .alternateIdentifier(GetGroupAlternateIdentifierArgs.builder()\n .uniqueAttribute(GetGroupAlternateIdentifierUniqueAttributeArgs.builder()\n .attributePath(\"DisplayName\")\n .attributeValue(\"ExampleGroup\")\n .build())\n .build())\n .build());\n\n var exampleAccountAssignment = new AccountAssignment(\"exampleAccountAssignment\", AccountAssignmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .permissionSetArn(exampleGetPermissionSet.applyValue(getPermissionSetResult -\u003e getPermissionSetResult.arn()))\n .principalId(exampleGetGroup.applyValue(getGroupResult -\u003e getGroupResult.groupId()))\n .principalType(\"GROUP\")\n .targetId(\"123456789012\")\n .targetType(\"AWS_ACCOUNT\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleAccountAssignment:\n type: aws:ssoadmin:AccountAssignment\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n permissionSetArn: ${exampleGetPermissionSet.arn}\n principalId: ${exampleGetGroup.groupId}\n principalType: GROUP\n targetId: '123456789012'\n targetType: AWS_ACCOUNT\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetPermissionSet:\n fn::invoke:\n Function: aws:ssoadmin:getPermissionSet\n Arguments:\n instanceArn: ${example.arns[0]}\n name: AWSReadOnlyAccess\n exampleGetGroup:\n fn::invoke:\n Function: aws:identitystore:getGroup\n Arguments:\n identityStoreId: ${example.identityStoreIds[0]}\n alternateIdentifier:\n uniqueAttribute:\n attributePath: DisplayName\n attributeValue: ExampleGroup\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Managed Policy Attachment\n\n\u003e Because destruction of a managed policy attachment resource also re-provisions the associated permission set to all accounts, explicitly indicating the dependency with the account assignment resource via the `depends_on` meta argument is necessary to ensure proper deletion order when these resources are used together.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleGroup = new aws.identitystore.Group(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n displayName: \"Admin\",\n description: \"Admin Group\",\n});\nconst accountAssignment = new aws.ssoadmin.AccountAssignment(\"account_assignment\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n permissionSetArn: examplePermissionSet.arn,\n principalId: exampleGroup.groupId,\n principalType: \"GROUP\",\n targetId: \"123456789012\",\n targetType: \"AWS_ACCOUNT\",\n});\nconst exampleManagedPolicyAttachment = new aws.ssoadmin.ManagedPolicyAttachment(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n managedPolicyArn: \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permissionSetArn: examplePermissionSet.arn,\n}, {\n dependsOn: [exampleAwsSsoadminAccountAssignment],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_group = aws.identitystore.Group(\"example\",\n identity_store_id=example.identity_store_ids[0],\n display_name=\"Admin\",\n description=\"Admin Group\")\naccount_assignment = aws.ssoadmin.AccountAssignment(\"account_assignment\",\n instance_arn=example.arns[0],\n permission_set_arn=example_permission_set.arn,\n principal_id=example_group.group_id,\n principal_type=\"GROUP\",\n target_id=\"123456789012\",\n target_type=\"AWS_ACCOUNT\")\nexample_managed_policy_attachment = aws.ssoadmin.ManagedPolicyAttachment(\"example\",\n instance_arn=example.arns[0],\n managed_policy_arn=\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permission_set_arn=example_permission_set.arn,\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssoadmin_account_assignment]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleGroup = new Aws.IdentityStore.Group(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n DisplayName = \"Admin\",\n Description = \"Admin Group\",\n });\n\n var accountAssignment = new Aws.SsoAdmin.AccountAssignment(\"account_assignment\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PermissionSetArn = examplePermissionSet.Arn,\n PrincipalId = exampleGroup.GroupId,\n PrincipalType = \"GROUP\",\n TargetId = \"123456789012\",\n TargetType = \"AWS_ACCOUNT\",\n });\n\n var exampleManagedPolicyAttachment = new Aws.SsoAdmin.ManagedPolicyAttachment(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n ManagedPolicyArn = \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n PermissionSetArn = examplePermissionSet.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsoadminAccountAssignment,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGroup, err := identitystore.NewGroup(ctx, \"example\", \u0026identitystore.GroupArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tDisplayName: pulumi.String(\"Admin\"),\n\t\t\tDescription: pulumi.String(\"Admin Group\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewAccountAssignment(ctx, \"account_assignment\", \u0026ssoadmin.AccountAssignmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t\tPrincipalId: exampleGroup.GroupId,\n\t\t\tPrincipalType: pulumi.String(\"GROUP\"),\n\t\t\tTargetId: pulumi.String(\"123456789012\"),\n\t\t\tTargetType: pulumi.String(\"AWS_ACCOUNT\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewManagedPolicyAttachment(ctx, \"example\", \u0026ssoadmin.ManagedPolicyAttachmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tManagedPolicyArn: pulumi.String(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\"),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsoadminAccountAssignment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.identitystore.Group;\nimport com.pulumi.aws.identitystore.GroupArgs;\nimport com.pulumi.aws.ssoadmin.AccountAssignment;\nimport com.pulumi.aws.ssoadmin.AccountAssignmentArgs;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachment;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachmentArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .displayName(\"Admin\")\n .description(\"Admin Group\")\n .build());\n\n var accountAssignment = new AccountAssignment(\"accountAssignment\", AccountAssignmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .permissionSetArn(examplePermissionSet.arn())\n .principalId(exampleGroup.groupId())\n .principalType(\"GROUP\")\n .targetId(\"123456789012\")\n .targetType(\"AWS_ACCOUNT\")\n .build());\n\n var exampleManagedPolicyAttachment = new ManagedPolicyAttachment(\"exampleManagedPolicyAttachment\", ManagedPolicyAttachmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .managedPolicyArn(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\")\n .permissionSetArn(examplePermissionSet.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsoadminAccountAssignment)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n exampleGroup:\n type: aws:identitystore:Group\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n displayName: Admin\n description: Admin Group\n accountAssignment:\n type: aws:ssoadmin:AccountAssignment\n name: account_assignment\n properties:\n instanceArn: ${example.arns[0]}\n permissionSetArn: ${examplePermissionSet.arn}\n principalId: ${exampleGroup.groupId}\n principalType: GROUP\n targetId: '123456789012'\n targetType: AWS_ACCOUNT\n exampleManagedPolicyAttachment:\n type: aws:ssoadmin:ManagedPolicyAttachment\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n managedPolicyArn: arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\n permissionSetArn: ${examplePermissionSet.arn}\n options:\n dependson:\n - ${exampleAwsSsoadminAccountAssignment}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Account Assignments using the `principal_id`, `principal_type`, `target_id`, `target_type`, `permission_set_arn`, `instance_arn` separated by commas (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/accountAssignment:AccountAssignment example f81d4fae-7dec-11d0-a765-00a0c91e6bf6,GROUP,1234567890,AWS_ACCOUNT,arn:aws:sso:::permissionSet/ssoins-0123456789abcdef/ps-0123456789abcdef,arn:aws:sso:::instance/ssoins-0123456789abcdef\n```\n", "properties": { "instanceArn": { "type": "string", @@ -362052,7 +362052,7 @@ } }, "aws:ssoadmin/application:Application": { - "description": "Resource for managing an AWS SSO Admin Application.\n\n\u003e The `CreateApplication` API only supports custom OAuth 2.0 applications.\nCreation of 3rd party SAML or OAuth 2.0 applications require setup to be done through the associated app service or AWS console.\nSee this issue for additional context.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleApplication = new aws.ssoadmin.Application(\"example\", {\n name: \"example\",\n applicationProviderArn: \"arn:aws:sso::aws:applicationProvider/custom\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_application = aws.ssoadmin.Application(\"example\",\n name=\"example\",\n application_provider_arn=\"arn:aws:sso::aws:applicationProvider/custom\",\n instance_arn=example.arns[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleApplication = new Aws.SsoAdmin.Application(\"example\", new()\n {\n Name = \"example\",\n ApplicationProviderArn = \"arn:aws:sso::aws:applicationProvider/custom\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewApplication(ctx, \"example\", \u0026ssoadmin.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tApplicationProviderArn: pulumi.String(\"arn:aws:sso::aws:applicationProvider/custom\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.Application;\nimport com.pulumi.aws.ssoadmin.ApplicationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example\")\n .applicationProviderArn(\"arn:aws:sso::aws:applicationProvider/custom\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleApplication:\n type: aws:ssoadmin:Application\n name: example\n properties:\n name: example\n applicationProviderArn: arn:aws:sso::aws:applicationProvider/custom\n instanceArn: ${example.arns[0]}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Portal Options\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleApplication = new aws.ssoadmin.Application(\"example\", {\n name: \"example\",\n applicationProviderArn: \"arn:aws:sso::aws:applicationProvider/custom\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n portalOptions: {\n visibility: \"ENABLED\",\n signInOptions: {\n applicationUrl: \"http://example.com\",\n origin: \"APPLICATION\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_application = aws.ssoadmin.Application(\"example\",\n name=\"example\",\n application_provider_arn=\"arn:aws:sso::aws:applicationProvider/custom\",\n instance_arn=example.arns[0],\n portal_options={\n \"visibility\": \"ENABLED\",\n \"sign_in_options\": {\n \"application_url\": \"http://example.com\",\n \"origin\": \"APPLICATION\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleApplication = new Aws.SsoAdmin.Application(\"example\", new()\n {\n Name = \"example\",\n ApplicationProviderArn = \"arn:aws:sso::aws:applicationProvider/custom\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PortalOptions = new Aws.SsoAdmin.Inputs.ApplicationPortalOptionsArgs\n {\n Visibility = \"ENABLED\",\n SignInOptions = new Aws.SsoAdmin.Inputs.ApplicationPortalOptionsSignInOptionsArgs\n {\n ApplicationUrl = \"http://example.com\",\n Origin = \"APPLICATION\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewApplication(ctx, \"example\", \u0026ssoadmin.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tApplicationProviderArn: pulumi.String(\"arn:aws:sso::aws:applicationProvider/custom\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPortalOptions: \u0026ssoadmin.ApplicationPortalOptionsArgs{\n\t\t\t\tVisibility: pulumi.String(\"ENABLED\"),\n\t\t\t\tSignInOptions: \u0026ssoadmin.ApplicationPortalOptionsSignInOptionsArgs{\n\t\t\t\t\tApplicationUrl: pulumi.String(\"http://example.com\"),\n\t\t\t\t\tOrigin: pulumi.String(\"APPLICATION\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.Application;\nimport com.pulumi.aws.ssoadmin.ApplicationArgs;\nimport com.pulumi.aws.ssoadmin.inputs.ApplicationPortalOptionsArgs;\nimport com.pulumi.aws.ssoadmin.inputs.ApplicationPortalOptionsSignInOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example\")\n .applicationProviderArn(\"arn:aws:sso::aws:applicationProvider/custom\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .portalOptions(ApplicationPortalOptionsArgs.builder()\n .visibility(\"ENABLED\")\n .signInOptions(ApplicationPortalOptionsSignInOptionsArgs.builder()\n .applicationUrl(\"http://example.com\")\n .origin(\"APPLICATION\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleApplication:\n type: aws:ssoadmin:Application\n name: example\n properties:\n name: example\n applicationProviderArn: arn:aws:sso::aws:applicationProvider/custom\n instanceArn: ${example.arns[0]}\n portalOptions:\n visibility: ENABLED\n signInOptions:\n applicationUrl: http://example.com\n origin: APPLICATION\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Admin Application using the `id`. For example:\n\n```sh\n$ pulumi import aws:ssoadmin/application:Application example arn:aws:sso::012345678901:application/id-12345678\n```\n", + "description": "Resource for managing an AWS SSO Admin Application.\n\n\u003e The `CreateApplication` API only supports custom OAuth 2.0 applications.\nCreation of 3rd party SAML or OAuth 2.0 applications require setup to be done through the associated app service or AWS console.\nSee this issue for additional context.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleApplication = new aws.ssoadmin.Application(\"example\", {\n name: \"example\",\n applicationProviderArn: \"arn:aws:sso::aws:applicationProvider/custom\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_application = aws.ssoadmin.Application(\"example\",\n name=\"example\",\n application_provider_arn=\"arn:aws:sso::aws:applicationProvider/custom\",\n instance_arn=example.arns[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleApplication = new Aws.SsoAdmin.Application(\"example\", new()\n {\n Name = \"example\",\n ApplicationProviderArn = \"arn:aws:sso::aws:applicationProvider/custom\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewApplication(ctx, \"example\", \u0026ssoadmin.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tApplicationProviderArn: pulumi.String(\"arn:aws:sso::aws:applicationProvider/custom\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.Application;\nimport com.pulumi.aws.ssoadmin.ApplicationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example\")\n .applicationProviderArn(\"arn:aws:sso::aws:applicationProvider/custom\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleApplication:\n type: aws:ssoadmin:Application\n name: example\n properties:\n name: example\n applicationProviderArn: arn:aws:sso::aws:applicationProvider/custom\n instanceArn: ${example.arns[0]}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Portal Options\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleApplication = new aws.ssoadmin.Application(\"example\", {\n name: \"example\",\n applicationProviderArn: \"arn:aws:sso::aws:applicationProvider/custom\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n portalOptions: {\n visibility: \"ENABLED\",\n signInOptions: {\n applicationUrl: \"http://example.com\",\n origin: \"APPLICATION\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_application = aws.ssoadmin.Application(\"example\",\n name=\"example\",\n application_provider_arn=\"arn:aws:sso::aws:applicationProvider/custom\",\n instance_arn=example.arns[0],\n portal_options={\n \"visibility\": \"ENABLED\",\n \"sign_in_options\": {\n \"application_url\": \"http://example.com\",\n \"origin\": \"APPLICATION\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleApplication = new Aws.SsoAdmin.Application(\"example\", new()\n {\n Name = \"example\",\n ApplicationProviderArn = \"arn:aws:sso::aws:applicationProvider/custom\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PortalOptions = new Aws.SsoAdmin.Inputs.ApplicationPortalOptionsArgs\n {\n Visibility = \"ENABLED\",\n SignInOptions = new Aws.SsoAdmin.Inputs.ApplicationPortalOptionsSignInOptionsArgs\n {\n ApplicationUrl = \"http://example.com\",\n Origin = \"APPLICATION\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewApplication(ctx, \"example\", \u0026ssoadmin.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tApplicationProviderArn: pulumi.String(\"arn:aws:sso::aws:applicationProvider/custom\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPortalOptions: \u0026ssoadmin.ApplicationPortalOptionsArgs{\n\t\t\t\tVisibility: pulumi.String(\"ENABLED\"),\n\t\t\t\tSignInOptions: \u0026ssoadmin.ApplicationPortalOptionsSignInOptionsArgs{\n\t\t\t\t\tApplicationUrl: pulumi.String(\"http://example.com\"),\n\t\t\t\t\tOrigin: pulumi.String(\"APPLICATION\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.Application;\nimport com.pulumi.aws.ssoadmin.ApplicationArgs;\nimport com.pulumi.aws.ssoadmin.inputs.ApplicationPortalOptionsArgs;\nimport com.pulumi.aws.ssoadmin.inputs.ApplicationPortalOptionsSignInOptionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example\")\n .applicationProviderArn(\"arn:aws:sso::aws:applicationProvider/custom\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .portalOptions(ApplicationPortalOptionsArgs.builder()\n .visibility(\"ENABLED\")\n .signInOptions(ApplicationPortalOptionsSignInOptionsArgs.builder()\n .applicationUrl(\"http://example.com\")\n .origin(\"APPLICATION\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleApplication:\n type: aws:ssoadmin:Application\n name: example\n properties:\n name: example\n applicationProviderArn: arn:aws:sso::aws:applicationProvider/custom\n instanceArn: ${example.arns[0]}\n portalOptions:\n visibility: ENABLED\n signInOptions:\n applicationUrl: http://example.com\n origin: APPLICATION\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Admin Application using the `id`. For example:\n\n```sh\n$ pulumi import aws:ssoadmin/application:Application example arn:aws:sso::012345678901:application/id-12345678\n```\n", "properties": { "applicationAccount": { "type": "string", @@ -362215,7 +362215,7 @@ } }, "aws:ssoadmin/applicationAccessScope:ApplicationAccessScope": { - "description": "Resource for managing an AWS SSO Admin Application Access Scope.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleApplication = new aws.ssoadmin.Application(\"example\", {\n name: \"example\",\n applicationProviderArn: \"arn:aws:sso::aws:applicationProvider/custom\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleApplicationAccessScope = new aws.ssoadmin.ApplicationAccessScope(\"example\", {\n applicationArn: exampleApplication.applicationArn,\n authorizedTargets: [\"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\"],\n scope: \"sso:account:access\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_application = aws.ssoadmin.Application(\"example\",\n name=\"example\",\n application_provider_arn=\"arn:aws:sso::aws:applicationProvider/custom\",\n instance_arn=example.arns[0])\nexample_application_access_scope = aws.ssoadmin.ApplicationAccessScope(\"example\",\n application_arn=example_application.application_arn,\n authorized_targets=[\"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\"],\n scope=\"sso:account:access\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleApplication = new Aws.SsoAdmin.Application(\"example\", new()\n {\n Name = \"example\",\n ApplicationProviderArn = \"arn:aws:sso::aws:applicationProvider/custom\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleApplicationAccessScope = new Aws.SsoAdmin.ApplicationAccessScope(\"example\", new()\n {\n ApplicationArn = exampleApplication.ApplicationArn,\n AuthorizedTargets = new[]\n {\n \"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\",\n },\n Scope = \"sso:account:access\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleApplication, err := ssoadmin.NewApplication(ctx, \"example\", \u0026ssoadmin.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tApplicationProviderArn: pulumi.String(\"arn:aws:sso::aws:applicationProvider/custom\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewApplicationAccessScope(ctx, \"example\", \u0026ssoadmin.ApplicationAccessScopeArgs{\n\t\t\tApplicationArn: exampleApplication.ApplicationArn,\n\t\t\tAuthorizedTargets: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\"),\n\t\t\t},\n\t\t\tScope: pulumi.String(\"sso:account:access\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.Application;\nimport com.pulumi.aws.ssoadmin.ApplicationArgs;\nimport com.pulumi.aws.ssoadmin.ApplicationAccessScope;\nimport com.pulumi.aws.ssoadmin.ApplicationAccessScopeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example\")\n .applicationProviderArn(\"arn:aws:sso::aws:applicationProvider/custom\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var exampleApplicationAccessScope = new ApplicationAccessScope(\"exampleApplicationAccessScope\", ApplicationAccessScopeArgs.builder()\n .applicationArn(exampleApplication.applicationArn())\n .authorizedTargets(\"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\")\n .scope(\"sso:account:access\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleApplication:\n type: aws:ssoadmin:Application\n name: example\n properties:\n name: example\n applicationProviderArn: arn:aws:sso::aws:applicationProvider/custom\n instanceArn: ${example.arns[0]}\n exampleApplicationAccessScope:\n type: aws:ssoadmin:ApplicationAccessScope\n name: example\n properties:\n applicationArn: ${exampleApplication.applicationArn}\n authorizedTargets:\n - arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\n scope: sso:account:access\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Admin Application Access Scope using the `id`. For example:\n\n```sh\n$ pulumi import aws:ssoadmin/applicationAccessScope:ApplicationAccessScope example arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901,sso:account:access\n```\n", + "description": "Resource for managing an AWS SSO Admin Application Access Scope.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleApplication = new aws.ssoadmin.Application(\"example\", {\n name: \"example\",\n applicationProviderArn: \"arn:aws:sso::aws:applicationProvider/custom\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleApplicationAccessScope = new aws.ssoadmin.ApplicationAccessScope(\"example\", {\n applicationArn: exampleApplication.applicationArn,\n authorizedTargets: [\"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\"],\n scope: \"sso:account:access\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_application = aws.ssoadmin.Application(\"example\",\n name=\"example\",\n application_provider_arn=\"arn:aws:sso::aws:applicationProvider/custom\",\n instance_arn=example.arns[0])\nexample_application_access_scope = aws.ssoadmin.ApplicationAccessScope(\"example\",\n application_arn=example_application.application_arn,\n authorized_targets=[\"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\"],\n scope=\"sso:account:access\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleApplication = new Aws.SsoAdmin.Application(\"example\", new()\n {\n Name = \"example\",\n ApplicationProviderArn = \"arn:aws:sso::aws:applicationProvider/custom\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleApplicationAccessScope = new Aws.SsoAdmin.ApplicationAccessScope(\"example\", new()\n {\n ApplicationArn = exampleApplication.ApplicationArn,\n AuthorizedTargets = new[]\n {\n \"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\",\n },\n Scope = \"sso:account:access\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleApplication, err := ssoadmin.NewApplication(ctx, \"example\", \u0026ssoadmin.ApplicationArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tApplicationProviderArn: pulumi.String(\"arn:aws:sso::aws:applicationProvider/custom\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewApplicationAccessScope(ctx, \"example\", \u0026ssoadmin.ApplicationAccessScopeArgs{\n\t\t\tApplicationArn: exampleApplication.ApplicationArn,\n\t\t\tAuthorizedTargets: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\"),\n\t\t\t},\n\t\t\tScope: pulumi.String(\"sso:account:access\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.Application;\nimport com.pulumi.aws.ssoadmin.ApplicationArgs;\nimport com.pulumi.aws.ssoadmin.ApplicationAccessScope;\nimport com.pulumi.aws.ssoadmin.ApplicationAccessScopeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleApplication = new Application(\"exampleApplication\", ApplicationArgs.builder()\n .name(\"example\")\n .applicationProviderArn(\"arn:aws:sso::aws:applicationProvider/custom\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var exampleApplicationAccessScope = new ApplicationAccessScope(\"exampleApplicationAccessScope\", ApplicationAccessScopeArgs.builder()\n .applicationArn(exampleApplication.applicationArn())\n .authorizedTargets(\"arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\")\n .scope(\"sso:account:access\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleApplication:\n type: aws:ssoadmin:Application\n name: example\n properties:\n name: example\n applicationProviderArn: arn:aws:sso::aws:applicationProvider/custom\n instanceArn: ${example.arns[0]}\n exampleApplicationAccessScope:\n type: aws:ssoadmin:ApplicationAccessScope\n name: example\n properties:\n applicationArn: ${exampleApplication.applicationArn}\n authorizedTargets:\n - arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901\n scope: sso:account:access\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Admin Application Access Scope using the `id`. For example:\n\n```sh\n$ pulumi import aws:ssoadmin/applicationAccessScope:ApplicationAccessScope example arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901,sso:account:access\n```\n", "properties": { "applicationArn": { "type": "string", @@ -362385,7 +362385,7 @@ } }, "aws:ssoadmin/customerManagedPolicyAttachment:CustomerManagedPolicyAttachment": { - "description": "Provides a customer managed policy attachment for a Single Sign-On (SSO) Permission Set resource\n\n\u003e **NOTE:** Creating this resource will automatically [Provision the Permission Set](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ProvisionPermissionSet.html) to apply the corresponding updates to all assigned accounts.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst examplePolicy = new aws.iam.Policy(\"example\", {\n name: \"TestPolicy\",\n description: \"My test policy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\"ec2:Describe*\"],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n});\nconst exampleCustomerManagedPolicyAttachment = new aws.ssoadmin.CustomerManagedPolicyAttachment(\"example\", {\n instanceArn: examplePermissionSet.instanceArn,\n permissionSetArn: examplePermissionSet.arn,\n customerManagedPolicyReference: {\n name: examplePolicy.name,\n path: \"/\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_policy = aws.iam.Policy(\"example\",\n name=\"TestPolicy\",\n description=\"My test policy\",\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": [\"ec2:Describe*\"],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\",\n }],\n }))\nexample_customer_managed_policy_attachment = aws.ssoadmin.CustomerManagedPolicyAttachment(\"example\",\n instance_arn=example_permission_set.instance_arn,\n permission_set_arn=example_permission_set.arn,\n customer_managed_policy_reference={\n \"name\": example_policy.name,\n \"path\": \"/\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var examplePolicy = new Aws.Iam.Policy(\"example\", new()\n {\n Name = \"TestPolicy\",\n Description = \"My test policy\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"ec2:Describe*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n var exampleCustomerManagedPolicyAttachment = new Aws.SsoAdmin.CustomerManagedPolicyAttachment(\"example\", new()\n {\n InstanceArn = examplePermissionSet.InstanceArn,\n PermissionSetArn = examplePermissionSet.Arn,\n CustomerManagedPolicyReference = new Aws.SsoAdmin.Inputs.CustomerManagedPolicyAttachmentCustomerManagedPolicyReferenceArgs\n {\n Name = examplePolicy.Name,\n Path = \"/\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texamplePolicy, err := iam.NewPolicy(ctx, \"example\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"TestPolicy\"),\n\t\t\tDescription: pulumi.String(\"My test policy\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewCustomerManagedPolicyAttachment(ctx, \"example\", \u0026ssoadmin.CustomerManagedPolicyAttachmentArgs{\n\t\t\tInstanceArn: examplePermissionSet.InstanceArn,\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t\tCustomerManagedPolicyReference: \u0026ssoadmin.CustomerManagedPolicyAttachmentCustomerManagedPolicyReferenceArgs{\n\t\t\t\tName: examplePolicy.Name,\n\t\t\t\tPath: pulumi.String(\"/\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.ssoadmin.CustomerManagedPolicyAttachment;\nimport com.pulumi.aws.ssoadmin.CustomerManagedPolicyAttachmentArgs;\nimport com.pulumi.aws.ssoadmin.inputs.CustomerManagedPolicyAttachmentCustomerManagedPolicyReferenceArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var examplePolicy = new Policy(\"examplePolicy\", PolicyArgs.builder()\n .name(\"TestPolicy\")\n .description(\"My test policy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\"ec2:Describe*\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n var exampleCustomerManagedPolicyAttachment = new CustomerManagedPolicyAttachment(\"exampleCustomerManagedPolicyAttachment\", CustomerManagedPolicyAttachmentArgs.builder()\n .instanceArn(examplePermissionSet.instanceArn())\n .permissionSetArn(examplePermissionSet.arn())\n .customerManagedPolicyReference(CustomerManagedPolicyAttachmentCustomerManagedPolicyReferenceArgs.builder()\n .name(examplePolicy.name())\n .path(\"/\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n examplePolicy:\n type: aws:iam:Policy\n name: example\n properties:\n name: TestPolicy\n description: My test policy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - ec2:Describe*\n Effect: Allow\n Resource: '*'\n exampleCustomerManagedPolicyAttachment:\n type: aws:ssoadmin:CustomerManagedPolicyAttachment\n name: example\n properties:\n instanceArn: ${examplePermissionSet.instanceArn}\n permissionSetArn: ${examplePermissionSet.arn}\n customerManagedPolicyReference:\n name: ${examplePolicy.name}\n path: /\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Managed Policy Attachments using the `name`, `path`, `permission_set_arn`, and `instance_arn` separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/customerManagedPolicyAttachment:CustomerManagedPolicyAttachment example TestPolicy,/,arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", + "description": "Provides a customer managed policy attachment for a Single Sign-On (SSO) Permission Set resource\n\n\u003e **NOTE:** Creating this resource will automatically [Provision the Permission Set](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ProvisionPermissionSet.html) to apply the corresponding updates to all assigned accounts.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst examplePolicy = new aws.iam.Policy(\"example\", {\n name: \"TestPolicy\",\n description: \"My test policy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\"ec2:Describe*\"],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n});\nconst exampleCustomerManagedPolicyAttachment = new aws.ssoadmin.CustomerManagedPolicyAttachment(\"example\", {\n instanceArn: examplePermissionSet.instanceArn,\n permissionSetArn: examplePermissionSet.arn,\n customerManagedPolicyReference: {\n name: examplePolicy.name,\n path: \"/\",\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_policy = aws.iam.Policy(\"example\",\n name=\"TestPolicy\",\n description=\"My test policy\",\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": [\"ec2:Describe*\"],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\",\n }],\n }))\nexample_customer_managed_policy_attachment = aws.ssoadmin.CustomerManagedPolicyAttachment(\"example\",\n instance_arn=example_permission_set.instance_arn,\n permission_set_arn=example_permission_set.arn,\n customer_managed_policy_reference={\n \"name\": example_policy.name,\n \"path\": \"/\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var examplePolicy = new Aws.Iam.Policy(\"example\", new()\n {\n Name = \"TestPolicy\",\n Description = \"My test policy\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"ec2:Describe*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n var exampleCustomerManagedPolicyAttachment = new Aws.SsoAdmin.CustomerManagedPolicyAttachment(\"example\", new()\n {\n InstanceArn = examplePermissionSet.InstanceArn,\n PermissionSetArn = examplePermissionSet.Arn,\n CustomerManagedPolicyReference = new Aws.SsoAdmin.Inputs.CustomerManagedPolicyAttachmentCustomerManagedPolicyReferenceArgs\n {\n Name = examplePolicy.Name,\n Path = \"/\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texamplePolicy, err := iam.NewPolicy(ctx, \"example\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"TestPolicy\"),\n\t\t\tDescription: pulumi.String(\"My test policy\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewCustomerManagedPolicyAttachment(ctx, \"example\", \u0026ssoadmin.CustomerManagedPolicyAttachmentArgs{\n\t\t\tInstanceArn: examplePermissionSet.InstanceArn,\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t\tCustomerManagedPolicyReference: \u0026ssoadmin.CustomerManagedPolicyAttachmentCustomerManagedPolicyReferenceArgs{\n\t\t\t\tName: examplePolicy.Name,\n\t\t\t\tPath: pulumi.String(\"/\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.ssoadmin.CustomerManagedPolicyAttachment;\nimport com.pulumi.aws.ssoadmin.CustomerManagedPolicyAttachmentArgs;\nimport com.pulumi.aws.ssoadmin.inputs.CustomerManagedPolicyAttachmentCustomerManagedPolicyReferenceArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var examplePolicy = new Policy(\"examplePolicy\", PolicyArgs.builder()\n .name(\"TestPolicy\")\n .description(\"My test policy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\"ec2:Describe*\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n var exampleCustomerManagedPolicyAttachment = new CustomerManagedPolicyAttachment(\"exampleCustomerManagedPolicyAttachment\", CustomerManagedPolicyAttachmentArgs.builder()\n .instanceArn(examplePermissionSet.instanceArn())\n .permissionSetArn(examplePermissionSet.arn())\n .customerManagedPolicyReference(CustomerManagedPolicyAttachmentCustomerManagedPolicyReferenceArgs.builder()\n .name(examplePolicy.name())\n .path(\"/\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n examplePolicy:\n type: aws:iam:Policy\n name: example\n properties:\n name: TestPolicy\n description: My test policy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - ec2:Describe*\n Effect: Allow\n Resource: '*'\n exampleCustomerManagedPolicyAttachment:\n type: aws:ssoadmin:CustomerManagedPolicyAttachment\n name: example\n properties:\n instanceArn: ${examplePermissionSet.instanceArn}\n permissionSetArn: ${examplePermissionSet.arn}\n customerManagedPolicyReference:\n name: ${examplePolicy.name}\n path: /\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Managed Policy Attachments using the `name`, `path`, `permission_set_arn`, and `instance_arn` separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/customerManagedPolicyAttachment:CustomerManagedPolicyAttachment example TestPolicy,/,arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", "properties": { "customerManagedPolicyReference": { "$ref": "#/types/aws:ssoadmin/CustomerManagedPolicyAttachmentCustomerManagedPolicyReference:CustomerManagedPolicyAttachmentCustomerManagedPolicyReference", @@ -362450,7 +362450,7 @@ } }, "aws:ssoadmin/instanceAccessControlAttributes:InstanceAccessControlAttributes": { - "description": "Provides a Single Sign-On (SSO) ABAC Resource: https://docs.aws.amazon.com/singlesignon/latest/userguide/abac.html\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleInstanceAccessControlAttributes = new aws.ssoadmin.InstanceAccessControlAttributes(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n attributes: [\n {\n key: \"name\",\n values: [{\n sources: [\"${path:name.givenName}\"],\n }],\n },\n {\n key: \"last\",\n values: [{\n sources: [\"${path:name.familyName}\"],\n }],\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_instance_access_control_attributes = aws.ssoadmin.InstanceAccessControlAttributes(\"example\",\n instance_arn=example.arns[0],\n attributes=[\n {\n \"key\": \"name\",\n \"values\": [{\n \"sources\": [\"${path:name.givenName}\"],\n }],\n },\n {\n \"key\": \"last\",\n \"values\": [{\n \"sources\": [\"${path:name.familyName}\"],\n }],\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleInstanceAccessControlAttributes = new Aws.SsoAdmin.InstanceAccessControlAttributes(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n Attributes = new[]\n {\n new Aws.SsoAdmin.Inputs.InstanceAccessControlAttributesAttributeArgs\n {\n Key = \"name\",\n Values = new[]\n {\n new Aws.SsoAdmin.Inputs.InstanceAccessControlAttributesAttributeValueArgs\n {\n Sources = new[]\n {\n \"${path:name.givenName}\",\n },\n },\n },\n },\n new Aws.SsoAdmin.Inputs.InstanceAccessControlAttributesAttributeArgs\n {\n Key = \"last\",\n Values = new[]\n {\n new Aws.SsoAdmin.Inputs.InstanceAccessControlAttributesAttributeValueArgs\n {\n Sources = new[]\n {\n \"${path:name.familyName}\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewInstanceAccessControlAttributes(ctx, \"example\", \u0026ssoadmin.InstanceAccessControlAttributesArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tAttributes: ssoadmin.InstanceAccessControlAttributesAttributeArray{\n\t\t\t\t\u0026ssoadmin.InstanceAccessControlAttributesAttributeArgs{\n\t\t\t\t\tKey: pulumi.String(\"name\"),\n\t\t\t\t\tValues: ssoadmin.InstanceAccessControlAttributesAttributeValueArray{\n\t\t\t\t\t\t\u0026ssoadmin.InstanceAccessControlAttributesAttributeValueArgs{\n\t\t\t\t\t\t\tSources: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"${path:name.givenName}\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssoadmin.InstanceAccessControlAttributesAttributeArgs{\n\t\t\t\t\tKey: pulumi.String(\"last\"),\n\t\t\t\t\tValues: ssoadmin.InstanceAccessControlAttributesAttributeValueArray{\n\t\t\t\t\t\t\u0026ssoadmin.InstanceAccessControlAttributesAttributeValueArgs{\n\t\t\t\t\t\t\tSources: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"${path:name.familyName}\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.InstanceAccessControlAttributes;\nimport com.pulumi.aws.ssoadmin.InstanceAccessControlAttributesArgs;\nimport com.pulumi.aws.ssoadmin.inputs.InstanceAccessControlAttributesAttributeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleInstanceAccessControlAttributes = new InstanceAccessControlAttributes(\"exampleInstanceAccessControlAttributes\", InstanceAccessControlAttributesArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .attributes( \n InstanceAccessControlAttributesAttributeArgs.builder()\n .key(\"name\")\n .values(InstanceAccessControlAttributesAttributeValueArgs.builder()\n .sources(\"${path:name.givenName}\")\n .build())\n .build(),\n InstanceAccessControlAttributesAttributeArgs.builder()\n .key(\"last\")\n .values(InstanceAccessControlAttributesAttributeValueArgs.builder()\n .sources(\"${path:name.familyName}\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleInstanceAccessControlAttributes:\n type: aws:ssoadmin:InstanceAccessControlAttributes\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n attributes:\n - key: name\n values:\n - sources:\n - ${path:name.givenName}\n - key: last\n values:\n - sources:\n - ${path:name.familyName}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Account Assignments using the `instance_arn`. For example:\n\n```sh\n$ pulumi import aws:ssoadmin/instanceAccessControlAttributes:InstanceAccessControlAttributes example arn:aws:sso:::instance/ssoins-0123456789abcdef\n```\n", + "description": "Provides a Single Sign-On (SSO) ABAC Resource: https://docs.aws.amazon.com/singlesignon/latest/userguide/abac.html\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleInstanceAccessControlAttributes = new aws.ssoadmin.InstanceAccessControlAttributes(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n attributes: [\n {\n key: \"name\",\n values: [{\n sources: [\"${path:name.givenName}\"],\n }],\n },\n {\n key: \"last\",\n values: [{\n sources: [\"${path:name.familyName}\"],\n }],\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_instance_access_control_attributes = aws.ssoadmin.InstanceAccessControlAttributes(\"example\",\n instance_arn=example.arns[0],\n attributes=[\n {\n \"key\": \"name\",\n \"values\": [{\n \"sources\": [\"${path:name.givenName}\"],\n }],\n },\n {\n \"key\": \"last\",\n \"values\": [{\n \"sources\": [\"${path:name.familyName}\"],\n }],\n },\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleInstanceAccessControlAttributes = new Aws.SsoAdmin.InstanceAccessControlAttributes(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n Attributes = new[]\n {\n new Aws.SsoAdmin.Inputs.InstanceAccessControlAttributesAttributeArgs\n {\n Key = \"name\",\n Values = new[]\n {\n new Aws.SsoAdmin.Inputs.InstanceAccessControlAttributesAttributeValueArgs\n {\n Sources = new[]\n {\n \"${path:name.givenName}\",\n },\n },\n },\n },\n new Aws.SsoAdmin.Inputs.InstanceAccessControlAttributesAttributeArgs\n {\n Key = \"last\",\n Values = new[]\n {\n new Aws.SsoAdmin.Inputs.InstanceAccessControlAttributesAttributeValueArgs\n {\n Sources = new[]\n {\n \"${path:name.familyName}\",\n },\n },\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewInstanceAccessControlAttributes(ctx, \"example\", \u0026ssoadmin.InstanceAccessControlAttributesArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tAttributes: ssoadmin.InstanceAccessControlAttributesAttributeArray{\n\t\t\t\t\u0026ssoadmin.InstanceAccessControlAttributesAttributeArgs{\n\t\t\t\t\tKey: pulumi.String(\"name\"),\n\t\t\t\t\tValues: ssoadmin.InstanceAccessControlAttributesAttributeValueArray{\n\t\t\t\t\t\t\u0026ssoadmin.InstanceAccessControlAttributesAttributeValueArgs{\n\t\t\t\t\t\t\tSources: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"${path:name.givenName}\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026ssoadmin.InstanceAccessControlAttributesAttributeArgs{\n\t\t\t\t\tKey: pulumi.String(\"last\"),\n\t\t\t\t\tValues: ssoadmin.InstanceAccessControlAttributesAttributeValueArray{\n\t\t\t\t\t\t\u0026ssoadmin.InstanceAccessControlAttributesAttributeValueArgs{\n\t\t\t\t\t\t\tSources: pulumi.StringArray{\n\t\t\t\t\t\t\t\tpulumi.String(\"${path:name.familyName}\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.InstanceAccessControlAttributes;\nimport com.pulumi.aws.ssoadmin.InstanceAccessControlAttributesArgs;\nimport com.pulumi.aws.ssoadmin.inputs.InstanceAccessControlAttributesAttributeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleInstanceAccessControlAttributes = new InstanceAccessControlAttributes(\"exampleInstanceAccessControlAttributes\", InstanceAccessControlAttributesArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .attributes( \n InstanceAccessControlAttributesAttributeArgs.builder()\n .key(\"name\")\n .values(InstanceAccessControlAttributesAttributeValueArgs.builder()\n .sources(\"${path:name.givenName}\")\n .build())\n .build(),\n InstanceAccessControlAttributesAttributeArgs.builder()\n .key(\"last\")\n .values(InstanceAccessControlAttributesAttributeValueArgs.builder()\n .sources(\"${path:name.familyName}\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleInstanceAccessControlAttributes:\n type: aws:ssoadmin:InstanceAccessControlAttributes\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n attributes:\n - key: name\n values:\n - sources:\n - ${path:name.givenName}\n - key: last\n values:\n - sources:\n - ${path:name.familyName}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Account Assignments using the `instance_arn`. For example:\n\n```sh\n$ pulumi import aws:ssoadmin/instanceAccessControlAttributes:InstanceAccessControlAttributes example arn:aws:sso:::instance/ssoins-0123456789abcdef\n```\n", "properties": { "attributes": { "type": "array", @@ -362520,7 +362520,7 @@ } }, "aws:ssoadmin/managedPolicyAttachment:ManagedPolicyAttachment": { - "description": "Provides an IAM managed policy for a Single Sign-On (SSO) Permission Set resource\n\n\u003e **NOTE:** Creating this resource will automatically [Provision the Permission Set](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ProvisionPermissionSet.html) to apply the corresponding updates to all assigned accounts.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleManagedPolicyAttachment = new aws.ssoadmin.ManagedPolicyAttachment(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n managedPolicyArn: \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permissionSetArn: examplePermissionSet.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_managed_policy_attachment = aws.ssoadmin.ManagedPolicyAttachment(\"example\",\n instance_arn=example.arns[0],\n managed_policy_arn=\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permission_set_arn=example_permission_set.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleManagedPolicyAttachment = new Aws.SsoAdmin.ManagedPolicyAttachment(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n ManagedPolicyArn = \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n PermissionSetArn = examplePermissionSet.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewManagedPolicyAttachment(ctx, \"example\", \u0026ssoadmin.ManagedPolicyAttachmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tManagedPolicyArn: pulumi.String(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\"),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachment;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var exampleManagedPolicyAttachment = new ManagedPolicyAttachment(\"exampleManagedPolicyAttachment\", ManagedPolicyAttachmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .managedPolicyArn(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\")\n .permissionSetArn(examplePermissionSet.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n exampleManagedPolicyAttachment:\n type: aws:ssoadmin:ManagedPolicyAttachment\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n managedPolicyArn: arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\n permissionSetArn: ${examplePermissionSet.arn}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Account Assignment\n\n\u003e Because destruction of a managed policy attachment resource also re-provisions the associated permission set to all accounts, explicitly indicating the dependency with the account assignment resource via the `depends_on` meta argument is necessary to ensure proper deletion order when these resources are used together.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleGroup = new aws.identitystore.Group(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n displayName: \"Admin\",\n description: \"Admin Group\",\n});\nconst accountAssignment = new aws.ssoadmin.AccountAssignment(\"account_assignment\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n permissionSetArn: examplePermissionSet.arn,\n principalId: exampleGroup.groupId,\n principalType: \"GROUP\",\n targetId: \"123456789012\",\n targetType: \"AWS_ACCOUNT\",\n});\nconst exampleManagedPolicyAttachment = new aws.ssoadmin.ManagedPolicyAttachment(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n managedPolicyArn: \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permissionSetArn: examplePermissionSet.arn,\n}, {\n dependsOn: [exampleAwsSsoadminAccountAssignment],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_group = aws.identitystore.Group(\"example\",\n identity_store_id=example.identity_store_ids[0],\n display_name=\"Admin\",\n description=\"Admin Group\")\naccount_assignment = aws.ssoadmin.AccountAssignment(\"account_assignment\",\n instance_arn=example.arns[0],\n permission_set_arn=example_permission_set.arn,\n principal_id=example_group.group_id,\n principal_type=\"GROUP\",\n target_id=\"123456789012\",\n target_type=\"AWS_ACCOUNT\")\nexample_managed_policy_attachment = aws.ssoadmin.ManagedPolicyAttachment(\"example\",\n instance_arn=example.arns[0],\n managed_policy_arn=\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permission_set_arn=example_permission_set.arn,\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssoadmin_account_assignment]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleGroup = new Aws.IdentityStore.Group(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n DisplayName = \"Admin\",\n Description = \"Admin Group\",\n });\n\n var accountAssignment = new Aws.SsoAdmin.AccountAssignment(\"account_assignment\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PermissionSetArn = examplePermissionSet.Arn,\n PrincipalId = exampleGroup.GroupId,\n PrincipalType = \"GROUP\",\n TargetId = \"123456789012\",\n TargetType = \"AWS_ACCOUNT\",\n });\n\n var exampleManagedPolicyAttachment = new Aws.SsoAdmin.ManagedPolicyAttachment(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n ManagedPolicyArn = \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n PermissionSetArn = examplePermissionSet.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsoadminAccountAssignment,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGroup, err := identitystore.NewGroup(ctx, \"example\", \u0026identitystore.GroupArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tDisplayName: pulumi.String(\"Admin\"),\n\t\t\tDescription: pulumi.String(\"Admin Group\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewAccountAssignment(ctx, \"account_assignment\", \u0026ssoadmin.AccountAssignmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t\tPrincipalId: exampleGroup.GroupId,\n\t\t\tPrincipalType: pulumi.String(\"GROUP\"),\n\t\t\tTargetId: pulumi.String(\"123456789012\"),\n\t\t\tTargetType: pulumi.String(\"AWS_ACCOUNT\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewManagedPolicyAttachment(ctx, \"example\", \u0026ssoadmin.ManagedPolicyAttachmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tManagedPolicyArn: pulumi.String(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\"),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsoadminAccountAssignment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.identitystore.Group;\nimport com.pulumi.aws.identitystore.GroupArgs;\nimport com.pulumi.aws.ssoadmin.AccountAssignment;\nimport com.pulumi.aws.ssoadmin.AccountAssignmentArgs;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachment;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachmentArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .displayName(\"Admin\")\n .description(\"Admin Group\")\n .build());\n\n var accountAssignment = new AccountAssignment(\"accountAssignment\", AccountAssignmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .permissionSetArn(examplePermissionSet.arn())\n .principalId(exampleGroup.groupId())\n .principalType(\"GROUP\")\n .targetId(\"123456789012\")\n .targetType(\"AWS_ACCOUNT\")\n .build());\n\n var exampleManagedPolicyAttachment = new ManagedPolicyAttachment(\"exampleManagedPolicyAttachment\", ManagedPolicyAttachmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .managedPolicyArn(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\")\n .permissionSetArn(examplePermissionSet.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsoadminAccountAssignment)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n exampleGroup:\n type: aws:identitystore:Group\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n displayName: Admin\n description: Admin Group\n accountAssignment:\n type: aws:ssoadmin:AccountAssignment\n name: account_assignment\n properties:\n instanceArn: ${example.arns[0]}\n permissionSetArn: ${examplePermissionSet.arn}\n principalId: ${exampleGroup.groupId}\n principalType: GROUP\n targetId: '123456789012'\n targetType: AWS_ACCOUNT\n exampleManagedPolicyAttachment:\n type: aws:ssoadmin:ManagedPolicyAttachment\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n managedPolicyArn: arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\n permissionSetArn: ${examplePermissionSet.arn}\n options:\n dependson:\n - ${exampleAwsSsoadminAccountAssignment}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Managed Policy Attachments using the `managed_policy_arn`, `permission_set_arn`, and `instance_arn` separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/managedPolicyAttachment:ManagedPolicyAttachment example arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup,arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", + "description": "Provides an IAM managed policy for a Single Sign-On (SSO) Permission Set resource\n\n\u003e **NOTE:** Creating this resource will automatically [Provision the Permission Set](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ProvisionPermissionSet.html) to apply the corresponding updates to all assigned accounts.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleManagedPolicyAttachment = new aws.ssoadmin.ManagedPolicyAttachment(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n managedPolicyArn: \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permissionSetArn: examplePermissionSet.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_managed_policy_attachment = aws.ssoadmin.ManagedPolicyAttachment(\"example\",\n instance_arn=example.arns[0],\n managed_policy_arn=\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permission_set_arn=example_permission_set.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleManagedPolicyAttachment = new Aws.SsoAdmin.ManagedPolicyAttachment(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n ManagedPolicyArn = \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n PermissionSetArn = examplePermissionSet.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewManagedPolicyAttachment(ctx, \"example\", \u0026ssoadmin.ManagedPolicyAttachmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tManagedPolicyArn: pulumi.String(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\"),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachment;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var exampleManagedPolicyAttachment = new ManagedPolicyAttachment(\"exampleManagedPolicyAttachment\", ManagedPolicyAttachmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .managedPolicyArn(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\")\n .permissionSetArn(examplePermissionSet.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n exampleManagedPolicyAttachment:\n type: aws:ssoadmin:ManagedPolicyAttachment\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n managedPolicyArn: arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\n permissionSetArn: ${examplePermissionSet.arn}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Account Assignment\n\n\u003e Because destruction of a managed policy attachment resource also re-provisions the associated permission set to all accounts, explicitly indicating the dependency with the account assignment resource via the `depends_on` meta argument is necessary to ensure proper deletion order when these resources are used together.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleGroup = new aws.identitystore.Group(\"example\", {\n identityStoreId: example.then(example =\u003e example.identityStoreIds?.[0]),\n displayName: \"Admin\",\n description: \"Admin Group\",\n});\nconst accountAssignment = new aws.ssoadmin.AccountAssignment(\"account_assignment\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n permissionSetArn: examplePermissionSet.arn,\n principalId: exampleGroup.groupId,\n principalType: \"GROUP\",\n targetId: \"123456789012\",\n targetType: \"AWS_ACCOUNT\",\n});\nconst exampleManagedPolicyAttachment = new aws.ssoadmin.ManagedPolicyAttachment(\"example\", {\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n managedPolicyArn: \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permissionSetArn: examplePermissionSet.arn,\n}, {\n dependsOn: [exampleAwsSsoadminAccountAssignment],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_group = aws.identitystore.Group(\"example\",\n identity_store_id=example.identity_store_ids[0],\n display_name=\"Admin\",\n description=\"Admin Group\")\naccount_assignment = aws.ssoadmin.AccountAssignment(\"account_assignment\",\n instance_arn=example.arns[0],\n permission_set_arn=example_permission_set.arn,\n principal_id=example_group.group_id,\n principal_type=\"GROUP\",\n target_id=\"123456789012\",\n target_type=\"AWS_ACCOUNT\")\nexample_managed_policy_attachment = aws.ssoadmin.ManagedPolicyAttachment(\"example\",\n instance_arn=example.arns[0],\n managed_policy_arn=\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n permission_set_arn=example_permission_set.arn,\n opts = pulumi.ResourceOptions(depends_on=[example_aws_ssoadmin_account_assignment]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleGroup = new Aws.IdentityStore.Group(\"example\", new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n DisplayName = \"Admin\",\n Description = \"Admin Group\",\n });\n\n var accountAssignment = new Aws.SsoAdmin.AccountAssignment(\"account_assignment\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PermissionSetArn = examplePermissionSet.Arn,\n PrincipalId = exampleGroup.GroupId,\n PrincipalType = \"GROUP\",\n TargetId = \"123456789012\",\n TargetType = \"AWS_ACCOUNT\",\n });\n\n var exampleManagedPolicyAttachment = new Aws.SsoAdmin.ManagedPolicyAttachment(\"example\", new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n ManagedPolicyArn = \"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\",\n PermissionSetArn = examplePermissionSet.Arn,\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n exampleAwsSsoadminAccountAssignment,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGroup, err := identitystore.NewGroup(ctx, \"example\", \u0026identitystore.GroupArgs{\n\t\t\tIdentityStoreId: pulumi.String(example.IdentityStoreIds[0]),\n\t\t\tDisplayName: pulumi.String(\"Admin\"),\n\t\t\tDescription: pulumi.String(\"Admin Group\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewAccountAssignment(ctx, \"account_assignment\", \u0026ssoadmin.AccountAssignmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t\tPrincipalId: exampleGroup.GroupId,\n\t\t\tPrincipalType: pulumi.String(\"GROUP\"),\n\t\t\tTargetId: pulumi.String(\"123456789012\"),\n\t\t\tTargetType: pulumi.String(\"AWS_ACCOUNT\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewManagedPolicyAttachment(ctx, \"example\", \u0026ssoadmin.ManagedPolicyAttachmentArgs{\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tManagedPolicyArn: pulumi.String(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\"),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\texampleAwsSsoadminAccountAssignment,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.identitystore.Group;\nimport com.pulumi.aws.identitystore.GroupArgs;\nimport com.pulumi.aws.ssoadmin.AccountAssignment;\nimport com.pulumi.aws.ssoadmin.AccountAssignmentArgs;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachment;\nimport com.pulumi.aws.ssoadmin.ManagedPolicyAttachmentArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var exampleGroup = new Group(\"exampleGroup\", GroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .displayName(\"Admin\")\n .description(\"Admin Group\")\n .build());\n\n var accountAssignment = new AccountAssignment(\"accountAssignment\", AccountAssignmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .permissionSetArn(examplePermissionSet.arn())\n .principalId(exampleGroup.groupId())\n .principalType(\"GROUP\")\n .targetId(\"123456789012\")\n .targetType(\"AWS_ACCOUNT\")\n .build());\n\n var exampleManagedPolicyAttachment = new ManagedPolicyAttachment(\"exampleManagedPolicyAttachment\", ManagedPolicyAttachmentArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .managedPolicyArn(\"arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\")\n .permissionSetArn(examplePermissionSet.arn())\n .build(), CustomResourceOptions.builder()\n .dependsOn(exampleAwsSsoadminAccountAssignment)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n exampleGroup:\n type: aws:identitystore:Group\n name: example\n properties:\n identityStoreId: ${example.identityStoreIds[0]}\n displayName: Admin\n description: Admin Group\n accountAssignment:\n type: aws:ssoadmin:AccountAssignment\n name: account_assignment\n properties:\n instanceArn: ${example.arns[0]}\n permissionSetArn: ${examplePermissionSet.arn}\n principalId: ${exampleGroup.groupId}\n principalType: GROUP\n targetId: '123456789012'\n targetType: AWS_ACCOUNT\n exampleManagedPolicyAttachment:\n type: aws:ssoadmin:ManagedPolicyAttachment\n name: example\n properties:\n instanceArn: ${example.arns[0]}\n managedPolicyArn: arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup\n permissionSetArn: ${examplePermissionSet.arn}\n options:\n dependson:\n - ${exampleAwsSsoadminAccountAssignment}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Managed Policy Attachments using the `managed_policy_arn`, `permission_set_arn`, and `instance_arn` separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/managedPolicyAttachment:ManagedPolicyAttachment example arn:aws:iam::aws:policy/AlexaForBusinessDeviceSetup,arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", "properties": { "instanceArn": { "type": "string", @@ -362594,7 +362594,7 @@ } }, "aws:ssoadmin/permissionSet:PermissionSet": { - "description": "Provides a Single Sign-On (SSO) Permission Set resource\n\n\u003e **NOTE:** Updating this resource will automatically [Provision the Permission Set](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ProvisionPermissionSet.html) to apply the corresponding updates to all assigned accounts.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n description: \"An example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n relayState: \"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\",\n sessionDuration: \"PT2H\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n description=\"An example\",\n instance_arn=example.arns[0],\n relay_state=\"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\",\n session_duration=\"PT2H\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n Description = \"An example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n RelayState = \"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\",\n SessionDuration = \"PT2H\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tDescription: pulumi.String(\"An example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tRelayState: pulumi.String(\"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\"),\n\t\t\tSessionDuration: pulumi.String(\"PT2H\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .description(\"An example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .relayState(\"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\")\n .sessionDuration(\"PT2H\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n description: An example\n instanceArn: ${example.arns[0]}\n relayState: https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\n sessionDuration: PT2H\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Permission Sets using the `arn` and `instance_arn` separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/permissionSet:PermissionSet example arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", + "description": "Provides a Single Sign-On (SSO) Permission Set resource\n\n\u003e **NOTE:** Updating this resource will automatically [Provision the Permission Set](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ProvisionPermissionSet.html) to apply the corresponding updates to all assigned accounts.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n description: \"An example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n relayState: \"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\",\n sessionDuration: \"PT2H\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n description=\"An example\",\n instance_arn=example.arns[0],\n relay_state=\"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\",\n session_duration=\"PT2H\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n Description = \"An example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n RelayState = \"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\",\n SessionDuration = \"PT2H\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tDescription: pulumi.String(\"An example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tRelayState: pulumi.String(\"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\"),\n\t\t\tSessionDuration: pulumi.String(\"PT2H\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .description(\"An example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .relayState(\"https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\")\n .sessionDuration(\"PT2H\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n description: An example\n instanceArn: ${example.arns[0]}\n relayState: https://s3.console.aws.amazon.com/s3/home?region=us-east-1#\n sessionDuration: PT2H\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Permission Sets using the `arn` and `instance_arn` separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/permissionSet:PermissionSet example arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", "properties": { "arn": { "type": "string", @@ -362734,7 +362734,7 @@ } }, "aws:ssoadmin/permissionSetInlinePolicy:PermissionSetInlinePolicy": { - "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleGetPolicyDocument = aws.iam.getPolicyDocument({\n statements: [{\n sid: \"1\",\n actions: [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n resources: [\"arn:aws:s3:::*\"],\n }],\n});\nconst examplePermissionSetInlinePolicy = new aws.ssoadmin.PermissionSetInlinePolicy(\"example\", {\n inlinePolicy: exampleGetPolicyDocument.then(exampleGetPolicyDocument =\u003e exampleGetPolicyDocument.json),\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n permissionSetArn: examplePermissionSet.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_get_policy_document = aws.iam.get_policy_document(statements=[{\n \"sid\": \"1\",\n \"actions\": [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n \"resources\": [\"arn:aws:s3:::*\"],\n}])\nexample_permission_set_inline_policy = aws.ssoadmin.PermissionSetInlinePolicy(\"example\",\n inline_policy=example_get_policy_document.json,\n instance_arn=example.arns[0],\n permission_set_arn=example_permission_set.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleGetPolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"1\",\n Actions = new[]\n {\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::*\",\n },\n },\n },\n });\n\n var examplePermissionSetInlinePolicy = new Aws.SsoAdmin.PermissionSetInlinePolicy(\"example\", new()\n {\n InlinePolicy = exampleGetPolicyDocument.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PermissionSetArn = examplePermissionSet.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetPolicyDocument, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"1\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListAllMyBuckets\",\n\t\t\t\t\t\t\"s3:GetBucketLocation\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewPermissionSetInlinePolicy(ctx, \"example\", \u0026ssoadmin.PermissionSetInlinePolicyArgs{\n\t\t\tInlinePolicy: pulumi.String(exampleGetPolicyDocument.Json),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.ssoadmin.PermissionSetInlinePolicy;\nimport com.pulumi.aws.ssoadmin.PermissionSetInlinePolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n final var exampleGetPolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"1\")\n .actions( \n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\")\n .resources(\"arn:aws:s3:::*\")\n .build())\n .build());\n\n var examplePermissionSetInlinePolicy = new PermissionSetInlinePolicy(\"examplePermissionSetInlinePolicy\", PermissionSetInlinePolicyArgs.builder()\n .inlinePolicy(exampleGetPolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .permissionSetArn(examplePermissionSet.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n examplePermissionSetInlinePolicy:\n type: aws:ssoadmin:PermissionSetInlinePolicy\n name: example\n properties:\n inlinePolicy: ${exampleGetPolicyDocument.json}\n instanceArn: ${example.arns[0]}\n permissionSetArn: ${examplePermissionSet.arn}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetPolicyDocument:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: '1'\n actions:\n - s3:ListAllMyBuckets\n - s3:GetBucketLocation\n resources:\n - arn:aws:s3:::*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Permission Set Inline Policies using the `permission_set_arn` and `instance_arn` separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/permissionSetInlinePolicy:PermissionSetInlinePolicy example arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", + "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst exampleGetPolicyDocument = aws.iam.getPolicyDocument({\n statements: [{\n sid: \"1\",\n actions: [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n resources: [\"arn:aws:s3:::*\"],\n }],\n});\nconst examplePermissionSetInlinePolicy = new aws.ssoadmin.PermissionSetInlinePolicy(\"example\", {\n inlinePolicy: exampleGetPolicyDocument.then(exampleGetPolicyDocument =\u003e exampleGetPolicyDocument.json),\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n permissionSetArn: examplePermissionSet.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_get_policy_document = aws.iam.get_policy_document(statements=[{\n \"sid\": \"1\",\n \"actions\": [\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n ],\n \"resources\": [\"arn:aws:s3:::*\"],\n}])\nexample_permission_set_inline_policy = aws.ssoadmin.PermissionSetInlinePolicy(\"example\",\n inline_policy=example_get_policy_document.json,\n instance_arn=example.arns[0],\n permission_set_arn=example_permission_set.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var exampleGetPolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"1\",\n Actions = new[]\n {\n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\",\n },\n Resources = new[]\n {\n \"arn:aws:s3:::*\",\n },\n },\n },\n });\n\n var examplePermissionSetInlinePolicy = new Aws.SsoAdmin.PermissionSetInlinePolicy(\"example\", new()\n {\n InlinePolicy = exampleGetPolicyDocument.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n PermissionSetArn = examplePermissionSet.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetPolicyDocument, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"1\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListAllMyBuckets\",\n\t\t\t\t\t\t\"s3:GetBucketLocation\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"arn:aws:s3:::*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewPermissionSetInlinePolicy(ctx, \"example\", \u0026ssoadmin.PermissionSetInlinePolicyArgs{\n\t\t\tInlinePolicy: pulumi.String(exampleGetPolicyDocument.Json),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.ssoadmin.PermissionSetInlinePolicy;\nimport com.pulumi.aws.ssoadmin.PermissionSetInlinePolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n final var exampleGetPolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"1\")\n .actions( \n \"s3:ListAllMyBuckets\",\n \"s3:GetBucketLocation\")\n .resources(\"arn:aws:s3:::*\")\n .build())\n .build());\n\n var examplePermissionSetInlinePolicy = new PermissionSetInlinePolicy(\"examplePermissionSetInlinePolicy\", PermissionSetInlinePolicyArgs.builder()\n .inlinePolicy(exampleGetPolicyDocument.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .permissionSetArn(examplePermissionSet.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n examplePermissionSetInlinePolicy:\n type: aws:ssoadmin:PermissionSetInlinePolicy\n name: example\n properties:\n inlinePolicy: ${exampleGetPolicyDocument.json}\n instanceArn: ${example.arns[0]}\n permissionSetArn: ${examplePermissionSet.arn}\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetPolicyDocument:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: '1'\n actions:\n - s3:ListAllMyBuckets\n - s3:GetBucketLocation\n resources:\n - arn:aws:s3:::*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Permission Set Inline Policies using the `permission_set_arn` and `instance_arn` separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/permissionSetInlinePolicy:PermissionSetInlinePolicy example arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", "properties": { "inlinePolicy": { "type": "string", @@ -362797,7 +362797,7 @@ } }, "aws:ssoadmin/permissionsBoundaryAttachment:PermissionsBoundaryAttachment": { - "description": "Attaches a permissions boundary policy to a Single Sign-On (SSO) Permission Set resource.\n\n\u003e **NOTE:** A permission set can have at most one permissions boundary attached; using more than one `aws.ssoadmin.PermissionsBoundaryAttachment` references the same permission set will show a permanent difference.\n\n## Example Usage\n\n### Attaching a customer-managed policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst examplePolicy = new aws.iam.Policy(\"example\", {\n name: \"TestPolicy\",\n description: \"My test policy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\"ec2:Describe*\"],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n});\nconst examplePermissionsBoundaryAttachment = new aws.ssoadmin.PermissionsBoundaryAttachment(\"example\", {\n instanceArn: examplePermissionSet.instanceArn,\n permissionSetArn: examplePermissionSet.arn,\n permissionsBoundary: {\n customerManagedPolicyReference: {\n name: examplePolicy.name,\n path: \"/\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_policy = aws.iam.Policy(\"example\",\n name=\"TestPolicy\",\n description=\"My test policy\",\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": [\"ec2:Describe*\"],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\",\n }],\n }))\nexample_permissions_boundary_attachment = aws.ssoadmin.PermissionsBoundaryAttachment(\"example\",\n instance_arn=example_permission_set.instance_arn,\n permission_set_arn=example_permission_set.arn,\n permissions_boundary={\n \"customer_managed_policy_reference\": {\n \"name\": example_policy.name,\n \"path\": \"/\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var examplePolicy = new Aws.Iam.Policy(\"example\", new()\n {\n Name = \"TestPolicy\",\n Description = \"My test policy\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"ec2:Describe*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n var examplePermissionsBoundaryAttachment = new Aws.SsoAdmin.PermissionsBoundaryAttachment(\"example\", new()\n {\n InstanceArn = examplePermissionSet.InstanceArn,\n PermissionSetArn = examplePermissionSet.Arn,\n PermissionsBoundary = new Aws.SsoAdmin.Inputs.PermissionsBoundaryAttachmentPermissionsBoundaryArgs\n {\n CustomerManagedPolicyReference = new Aws.SsoAdmin.Inputs.PermissionsBoundaryAttachmentPermissionsBoundaryCustomerManagedPolicyReferenceArgs\n {\n Name = examplePolicy.Name,\n Path = \"/\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texamplePolicy, err := iam.NewPolicy(ctx, \"example\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"TestPolicy\"),\n\t\t\tDescription: pulumi.String(\"My test policy\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewPermissionsBoundaryAttachment(ctx, \"example\", \u0026ssoadmin.PermissionsBoundaryAttachmentArgs{\n\t\t\tInstanceArn: examplePermissionSet.InstanceArn,\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t\tPermissionsBoundary: \u0026ssoadmin.PermissionsBoundaryAttachmentPermissionsBoundaryArgs{\n\t\t\t\tCustomerManagedPolicyReference: \u0026ssoadmin.PermissionsBoundaryAttachmentPermissionsBoundaryCustomerManagedPolicyReferenceArgs{\n\t\t\t\t\tName: examplePolicy.Name,\n\t\t\t\t\tPath: pulumi.String(\"/\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.ssoadmin.PermissionsBoundaryAttachment;\nimport com.pulumi.aws.ssoadmin.PermissionsBoundaryAttachmentArgs;\nimport com.pulumi.aws.ssoadmin.inputs.PermissionsBoundaryAttachmentPermissionsBoundaryArgs;\nimport com.pulumi.aws.ssoadmin.inputs.PermissionsBoundaryAttachmentPermissionsBoundaryCustomerManagedPolicyReferenceArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var examplePolicy = new Policy(\"examplePolicy\", PolicyArgs.builder()\n .name(\"TestPolicy\")\n .description(\"My test policy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\"ec2:Describe*\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n var examplePermissionsBoundaryAttachment = new PermissionsBoundaryAttachment(\"examplePermissionsBoundaryAttachment\", PermissionsBoundaryAttachmentArgs.builder()\n .instanceArn(examplePermissionSet.instanceArn())\n .permissionSetArn(examplePermissionSet.arn())\n .permissionsBoundary(PermissionsBoundaryAttachmentPermissionsBoundaryArgs.builder()\n .customerManagedPolicyReference(PermissionsBoundaryAttachmentPermissionsBoundaryCustomerManagedPolicyReferenceArgs.builder()\n .name(examplePolicy.name())\n .path(\"/\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n examplePolicy:\n type: aws:iam:Policy\n name: example\n properties:\n name: TestPolicy\n description: My test policy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - ec2:Describe*\n Effect: Allow\n Resource: '*'\n examplePermissionsBoundaryAttachment:\n type: aws:ssoadmin:PermissionsBoundaryAttachment\n name: example\n properties:\n instanceArn: ${examplePermissionSet.instanceArn}\n permissionSetArn: ${examplePermissionSet.arn}\n permissionsBoundary:\n customerManagedPolicyReference:\n name: ${examplePolicy.name}\n path: /\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Attaching an AWS-managed policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.ssoadmin.PermissionsBoundaryAttachment(\"example\", {\n instanceArn: exampleAwsSsoadminPermissionSet.instanceArn,\n permissionSetArn: exampleAwsSsoadminPermissionSet.arn,\n permissionsBoundary: {\n managedPolicyArn: \"arn:aws:iam::aws:policy/ReadOnlyAccess\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.PermissionsBoundaryAttachment(\"example\",\n instance_arn=example_aws_ssoadmin_permission_set[\"instanceArn\"],\n permission_set_arn=example_aws_ssoadmin_permission_set[\"arn\"],\n permissions_boundary={\n \"managed_policy_arn\": \"arn:aws:iam::aws:policy/ReadOnlyAccess\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SsoAdmin.PermissionsBoundaryAttachment(\"example\", new()\n {\n InstanceArn = exampleAwsSsoadminPermissionSet.InstanceArn,\n PermissionSetArn = exampleAwsSsoadminPermissionSet.Arn,\n PermissionsBoundary = new Aws.SsoAdmin.Inputs.PermissionsBoundaryAttachmentPermissionsBoundaryArgs\n {\n ManagedPolicyArn = \"arn:aws:iam::aws:policy/ReadOnlyAccess\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssoadmin.NewPermissionsBoundaryAttachment(ctx, \"example\", \u0026ssoadmin.PermissionsBoundaryAttachmentArgs{\n\t\t\tInstanceArn: pulumi.Any(exampleAwsSsoadminPermissionSet.InstanceArn),\n\t\t\tPermissionSetArn: pulumi.Any(exampleAwsSsoadminPermissionSet.Arn),\n\t\t\tPermissionsBoundary: \u0026ssoadmin.PermissionsBoundaryAttachmentPermissionsBoundaryArgs{\n\t\t\t\tManagedPolicyArn: pulumi.String(\"arn:aws:iam::aws:policy/ReadOnlyAccess\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.PermissionsBoundaryAttachment;\nimport com.pulumi.aws.ssoadmin.PermissionsBoundaryAttachmentArgs;\nimport com.pulumi.aws.ssoadmin.inputs.PermissionsBoundaryAttachmentPermissionsBoundaryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new PermissionsBoundaryAttachment(\"example\", PermissionsBoundaryAttachmentArgs.builder()\n .instanceArn(exampleAwsSsoadminPermissionSet.instanceArn())\n .permissionSetArn(exampleAwsSsoadminPermissionSet.arn())\n .permissionsBoundary(PermissionsBoundaryAttachmentPermissionsBoundaryArgs.builder()\n .managedPolicyArn(\"arn:aws:iam::aws:policy/ReadOnlyAccess\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssoadmin:PermissionsBoundaryAttachment\n properties:\n instanceArn: ${exampleAwsSsoadminPermissionSet.instanceArn}\n permissionSetArn: ${exampleAwsSsoadminPermissionSet.arn}\n permissionsBoundary:\n managedPolicyArn: arn:aws:iam::aws:policy/ReadOnlyAccess\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Admin Permissions Boundary Attachments using the `permission_set_arn` and `instance_arn`, separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/permissionsBoundaryAttachment:PermissionsBoundaryAttachment example arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", + "description": "Attaches a permissions boundary policy to a Single Sign-On (SSO) Permission Set resource.\n\n\u003e **NOTE:** A permission set can have at most one permissions boundary attached; using more than one `aws.ssoadmin.PermissionsBoundaryAttachment` references the same permission set will show a permanent difference.\n\n## Example Usage\n\n### Attaching a customer-managed policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst examplePermissionSet = new aws.ssoadmin.PermissionSet(\"example\", {\n name: \"Example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n});\nconst examplePolicy = new aws.iam.Policy(\"example\", {\n name: \"TestPolicy\",\n description: \"My test policy\",\n policy: JSON.stringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: [\"ec2:Describe*\"],\n Effect: \"Allow\",\n Resource: \"*\",\n }],\n }),\n});\nconst examplePermissionsBoundaryAttachment = new aws.ssoadmin.PermissionsBoundaryAttachment(\"example\", {\n instanceArn: examplePermissionSet.instanceArn,\n permissionSetArn: examplePermissionSet.arn,\n permissionsBoundary: {\n customerManagedPolicyReference: {\n name: examplePolicy.name,\n path: \"/\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_permission_set = aws.ssoadmin.PermissionSet(\"example\",\n name=\"Example\",\n instance_arn=example.arns[0])\nexample_policy = aws.iam.Policy(\"example\",\n name=\"TestPolicy\",\n description=\"My test policy\",\n policy=json.dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": [\"ec2:Describe*\"],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\",\n }],\n }))\nexample_permissions_boundary_attachment = aws.ssoadmin.PermissionsBoundaryAttachment(\"example\",\n instance_arn=example_permission_set.instance_arn,\n permission_set_arn=example_permission_set.arn,\n permissions_boundary={\n \"customer_managed_policy_reference\": {\n \"name\": example_policy.name,\n \"path\": \"/\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var examplePermissionSet = new Aws.SsoAdmin.PermissionSet(\"example\", new()\n {\n Name = \"Example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n var examplePolicy = new Aws.Iam.Policy(\"example\", new()\n {\n Name = \"TestPolicy\",\n Description = \"My test policy\",\n PolicyDocument = JsonSerializer.Serialize(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = new[]\n {\n \"ec2:Describe*\",\n },\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = \"*\",\n },\n },\n }),\n });\n\n var examplePermissionsBoundaryAttachment = new Aws.SsoAdmin.PermissionsBoundaryAttachment(\"example\", new()\n {\n InstanceArn = examplePermissionSet.InstanceArn,\n PermissionSetArn = examplePermissionSet.Arn,\n PermissionsBoundary = new Aws.SsoAdmin.Inputs.PermissionsBoundaryAttachmentPermissionsBoundaryArgs\n {\n CustomerManagedPolicyReference = new Aws.SsoAdmin.Inputs.PermissionsBoundaryAttachmentPermissionsBoundaryCustomerManagedPolicyReferenceArgs\n {\n Name = examplePolicy.Name,\n Path = \"/\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texamplePermissionSet, err := ssoadmin.NewPermissionSet(ctx, \"example\", \u0026ssoadmin.PermissionSetArgs{\n\t\t\tName: pulumi.String(\"Example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\"ec2:Describe*\",\n\t\t\t\t\t},\n\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\"Resource\": \"*\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tjson0 := string(tmpJSON0)\n\t\texamplePolicy, err := iam.NewPolicy(ctx, \"example\", \u0026iam.PolicyArgs{\n\t\t\tName: pulumi.String(\"TestPolicy\"),\n\t\t\tDescription: pulumi.String(\"My test policy\"),\n\t\t\tPolicy: pulumi.String(json0),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewPermissionsBoundaryAttachment(ctx, \"example\", \u0026ssoadmin.PermissionsBoundaryAttachmentArgs{\n\t\t\tInstanceArn: examplePermissionSet.InstanceArn,\n\t\t\tPermissionSetArn: examplePermissionSet.Arn,\n\t\t\tPermissionsBoundary: \u0026ssoadmin.PermissionsBoundaryAttachmentPermissionsBoundaryArgs{\n\t\t\t\tCustomerManagedPolicyReference: \u0026ssoadmin.PermissionsBoundaryAttachmentPermissionsBoundaryCustomerManagedPolicyReferenceArgs{\n\t\t\t\t\tName: examplePolicy.Name,\n\t\t\t\t\tPath: pulumi.String(\"/\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.PermissionSet;\nimport com.pulumi.aws.ssoadmin.PermissionSetArgs;\nimport com.pulumi.aws.iam.Policy;\nimport com.pulumi.aws.iam.PolicyArgs;\nimport com.pulumi.aws.ssoadmin.PermissionsBoundaryAttachment;\nimport com.pulumi.aws.ssoadmin.PermissionsBoundaryAttachmentArgs;\nimport com.pulumi.aws.ssoadmin.inputs.PermissionsBoundaryAttachmentPermissionsBoundaryArgs;\nimport com.pulumi.aws.ssoadmin.inputs.PermissionsBoundaryAttachmentPermissionsBoundaryCustomerManagedPolicyReferenceArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var examplePermissionSet = new PermissionSet(\"examplePermissionSet\", PermissionSetArgs.builder()\n .name(\"Example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n var examplePolicy = new Policy(\"examplePolicy\", PolicyArgs.builder()\n .name(\"TestPolicy\")\n .description(\"My test policy\")\n .policy(serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", jsonArray(\"ec2:Describe*\")),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", \"*\")\n )))\n )))\n .build());\n\n var examplePermissionsBoundaryAttachment = new PermissionsBoundaryAttachment(\"examplePermissionsBoundaryAttachment\", PermissionsBoundaryAttachmentArgs.builder()\n .instanceArn(examplePermissionSet.instanceArn())\n .permissionSetArn(examplePermissionSet.arn())\n .permissionsBoundary(PermissionsBoundaryAttachmentPermissionsBoundaryArgs.builder()\n .customerManagedPolicyReference(PermissionsBoundaryAttachmentPermissionsBoundaryCustomerManagedPolicyReferenceArgs.builder()\n .name(examplePolicy.name())\n .path(\"/\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n examplePermissionSet:\n type: aws:ssoadmin:PermissionSet\n name: example\n properties:\n name: Example\n instanceArn: ${example.arns[0]}\n examplePolicy:\n type: aws:iam:Policy\n name: example\n properties:\n name: TestPolicy\n description: My test policy\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action:\n - ec2:Describe*\n Effect: Allow\n Resource: '*'\n examplePermissionsBoundaryAttachment:\n type: aws:ssoadmin:PermissionsBoundaryAttachment\n name: example\n properties:\n instanceArn: ${examplePermissionSet.instanceArn}\n permissionSetArn: ${examplePermissionSet.arn}\n permissionsBoundary:\n customerManagedPolicyReference:\n name: ${examplePolicy.name}\n path: /\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Attaching an AWS-managed policy\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.ssoadmin.PermissionsBoundaryAttachment(\"example\", {\n instanceArn: exampleAwsSsoadminPermissionSet.instanceArn,\n permissionSetArn: exampleAwsSsoadminPermissionSet.arn,\n permissionsBoundary: {\n managedPolicyArn: \"arn:aws:iam::aws:policy/ReadOnlyAccess\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.PermissionsBoundaryAttachment(\"example\",\n instance_arn=example_aws_ssoadmin_permission_set[\"instanceArn\"],\n permission_set_arn=example_aws_ssoadmin_permission_set[\"arn\"],\n permissions_boundary={\n \"managed_policy_arn\": \"arn:aws:iam::aws:policy/ReadOnlyAccess\",\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.SsoAdmin.PermissionsBoundaryAttachment(\"example\", new()\n {\n InstanceArn = exampleAwsSsoadminPermissionSet.InstanceArn,\n PermissionSetArn = exampleAwsSsoadminPermissionSet.Arn,\n PermissionsBoundary = new Aws.SsoAdmin.Inputs.PermissionsBoundaryAttachmentPermissionsBoundaryArgs\n {\n ManagedPolicyArn = \"arn:aws:iam::aws:policy/ReadOnlyAccess\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssoadmin.NewPermissionsBoundaryAttachment(ctx, \"example\", \u0026ssoadmin.PermissionsBoundaryAttachmentArgs{\n\t\t\tInstanceArn: pulumi.Any(exampleAwsSsoadminPermissionSet.InstanceArn),\n\t\t\tPermissionSetArn: pulumi.Any(exampleAwsSsoadminPermissionSet.Arn),\n\t\t\tPermissionsBoundary: \u0026ssoadmin.PermissionsBoundaryAttachmentPermissionsBoundaryArgs{\n\t\t\t\tManagedPolicyArn: pulumi.String(\"arn:aws:iam::aws:policy/ReadOnlyAccess\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.PermissionsBoundaryAttachment;\nimport com.pulumi.aws.ssoadmin.PermissionsBoundaryAttachmentArgs;\nimport com.pulumi.aws.ssoadmin.inputs.PermissionsBoundaryAttachmentPermissionsBoundaryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new PermissionsBoundaryAttachment(\"example\", PermissionsBoundaryAttachmentArgs.builder()\n .instanceArn(exampleAwsSsoadminPermissionSet.instanceArn())\n .permissionSetArn(exampleAwsSsoadminPermissionSet.arn())\n .permissionsBoundary(PermissionsBoundaryAttachmentPermissionsBoundaryArgs.builder()\n .managedPolicyArn(\"arn:aws:iam::aws:policy/ReadOnlyAccess\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ssoadmin:PermissionsBoundaryAttachment\n properties:\n instanceArn: ${exampleAwsSsoadminPermissionSet.instanceArn}\n permissionSetArn: ${exampleAwsSsoadminPermissionSet.arn}\n permissionsBoundary:\n managedPolicyArn: arn:aws:iam::aws:policy/ReadOnlyAccess\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Admin Permissions Boundary Attachments using the `permission_set_arn` and `instance_arn`, separated by a comma (`,`). For example:\n\n```sh\n$ pulumi import aws:ssoadmin/permissionsBoundaryAttachment:PermissionsBoundaryAttachment example arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72\n```\n", "properties": { "instanceArn": { "type": "string", @@ -362862,7 +362862,7 @@ } }, "aws:ssoadmin/trustedTokenIssuer:TrustedTokenIssuer": { - "description": "Resource for managing an AWS SSO Admin Trusted Token Issuer.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleTrustedTokenIssuer = new aws.ssoadmin.TrustedTokenIssuer(\"example\", {\n name: \"example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n trustedTokenIssuerType: \"OIDC_JWT\",\n trustedTokenIssuerConfiguration: {\n oidcJwtConfiguration: {\n claimAttributePath: \"email\",\n identityStoreAttributePath: \"emails.value\",\n issuerUrl: \"https://example.com\",\n jwksRetrievalOption: \"OPEN_ID_DISCOVERY\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_trusted_token_issuer = aws.ssoadmin.TrustedTokenIssuer(\"example\",\n name=\"example\",\n instance_arn=example.arns[0],\n trusted_token_issuer_type=\"OIDC_JWT\",\n trusted_token_issuer_configuration={\n \"oidc_jwt_configuration\": {\n \"claim_attribute_path\": \"email\",\n \"identity_store_attribute_path\": \"emails.value\",\n \"issuer_url\": \"https://example.com\",\n \"jwks_retrieval_option\": \"OPEN_ID_DISCOVERY\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleTrustedTokenIssuer = new Aws.SsoAdmin.TrustedTokenIssuer(\"example\", new()\n {\n Name = \"example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n TrustedTokenIssuerType = \"OIDC_JWT\",\n TrustedTokenIssuerConfiguration = new Aws.SsoAdmin.Inputs.TrustedTokenIssuerTrustedTokenIssuerConfigurationArgs\n {\n OidcJwtConfiguration = new Aws.SsoAdmin.Inputs.TrustedTokenIssuerTrustedTokenIssuerConfigurationOidcJwtConfigurationArgs\n {\n ClaimAttributePath = \"email\",\n IdentityStoreAttributePath = \"emails.value\",\n IssuerUrl = \"https://example.com\",\n JwksRetrievalOption = \"OPEN_ID_DISCOVERY\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewTrustedTokenIssuer(ctx, \"example\", \u0026ssoadmin.TrustedTokenIssuerArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tTrustedTokenIssuerType: pulumi.String(\"OIDC_JWT\"),\n\t\t\tTrustedTokenIssuerConfiguration: \u0026ssoadmin.TrustedTokenIssuerTrustedTokenIssuerConfigurationArgs{\n\t\t\t\tOidcJwtConfiguration: \u0026ssoadmin.TrustedTokenIssuerTrustedTokenIssuerConfigurationOidcJwtConfigurationArgs{\n\t\t\t\t\tClaimAttributePath: pulumi.String(\"email\"),\n\t\t\t\t\tIdentityStoreAttributePath: pulumi.String(\"emails.value\"),\n\t\t\t\t\tIssuerUrl: pulumi.String(\"https://example.com\"),\n\t\t\t\t\tJwksRetrievalOption: pulumi.String(\"OPEN_ID_DISCOVERY\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.TrustedTokenIssuer;\nimport com.pulumi.aws.ssoadmin.TrustedTokenIssuerArgs;\nimport com.pulumi.aws.ssoadmin.inputs.TrustedTokenIssuerTrustedTokenIssuerConfigurationArgs;\nimport com.pulumi.aws.ssoadmin.inputs.TrustedTokenIssuerTrustedTokenIssuerConfigurationOidcJwtConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleTrustedTokenIssuer = new TrustedTokenIssuer(\"exampleTrustedTokenIssuer\", TrustedTokenIssuerArgs.builder()\n .name(\"example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .trustedTokenIssuerType(\"OIDC_JWT\")\n .trustedTokenIssuerConfiguration(TrustedTokenIssuerTrustedTokenIssuerConfigurationArgs.builder()\n .oidcJwtConfiguration(TrustedTokenIssuerTrustedTokenIssuerConfigurationOidcJwtConfigurationArgs.builder()\n .claimAttributePath(\"email\")\n .identityStoreAttributePath(\"emails.value\")\n .issuerUrl(\"https://example.com\")\n .jwksRetrievalOption(\"OPEN_ID_DISCOVERY\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleTrustedTokenIssuer:\n type: aws:ssoadmin:TrustedTokenIssuer\n name: example\n properties:\n name: example\n instanceArn: ${example.arns[0]}\n trustedTokenIssuerType: OIDC_JWT\n trustedTokenIssuerConfiguration:\n oidcJwtConfiguration:\n claimAttributePath: email\n identityStoreAttributePath: emails.value\n issuerUrl: https://example.com\n jwksRetrievalOption: OPEN_ID_DISCOVERY\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Admin Trusted Token Issuer using the `id`. For example:\n\n```sh\n$ pulumi import aws:ssoadmin/trustedTokenIssuer:TrustedTokenIssuer example arn:aws:sso::012345678901:trustedTokenIssuer/ssoins-lu1ye3gew4mbc7ju/tti-2657c556-9707-11ee-b9d1-0242ac120002\n```\n", + "description": "Resource for managing an AWS SSO Admin Trusted Token Issuer.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleTrustedTokenIssuer = new aws.ssoadmin.TrustedTokenIssuer(\"example\", {\n name: \"example\",\n instanceArn: example.then(example =\u003e example.arns?.[0]),\n trustedTokenIssuerType: \"OIDC_JWT\",\n trustedTokenIssuerConfiguration: {\n oidcJwtConfiguration: {\n claimAttributePath: \"email\",\n identityStoreAttributePath: \"emails.value\",\n issuerUrl: \"https://example.com\",\n jwksRetrievalOption: \"OPEN_ID_DISCOVERY\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_trusted_token_issuer = aws.ssoadmin.TrustedTokenIssuer(\"example\",\n name=\"example\",\n instance_arn=example.arns[0],\n trusted_token_issuer_type=\"OIDC_JWT\",\n trusted_token_issuer_configuration={\n \"oidc_jwt_configuration\": {\n \"claim_attribute_path\": \"email\",\n \"identity_store_attribute_path\": \"emails.value\",\n \"issuer_url\": \"https://example.com\",\n \"jwks_retrieval_option\": \"OPEN_ID_DISCOVERY\",\n },\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleTrustedTokenIssuer = new Aws.SsoAdmin.TrustedTokenIssuer(\"example\", new()\n {\n Name = \"example\",\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n TrustedTokenIssuerType = \"OIDC_JWT\",\n TrustedTokenIssuerConfiguration = new Aws.SsoAdmin.Inputs.TrustedTokenIssuerTrustedTokenIssuerConfigurationArgs\n {\n OidcJwtConfiguration = new Aws.SsoAdmin.Inputs.TrustedTokenIssuerTrustedTokenIssuerConfigurationOidcJwtConfigurationArgs\n {\n ClaimAttributePath = \"email\",\n IdentityStoreAttributePath = \"emails.value\",\n IssuerUrl = \"https://example.com\",\n JwksRetrievalOption = \"OPEN_ID_DISCOVERY\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.NewTrustedTokenIssuer(ctx, \"example\", \u0026ssoadmin.TrustedTokenIssuerArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tInstanceArn: pulumi.String(example.Arns[0]),\n\t\t\tTrustedTokenIssuerType: pulumi.String(\"OIDC_JWT\"),\n\t\t\tTrustedTokenIssuerConfiguration: \u0026ssoadmin.TrustedTokenIssuerTrustedTokenIssuerConfigurationArgs{\n\t\t\t\tOidcJwtConfiguration: \u0026ssoadmin.TrustedTokenIssuerTrustedTokenIssuerConfigurationOidcJwtConfigurationArgs{\n\t\t\t\t\tClaimAttributePath: pulumi.String(\"email\"),\n\t\t\t\t\tIdentityStoreAttributePath: pulumi.String(\"emails.value\"),\n\t\t\t\t\tIssuerUrl: pulumi.String(\"https://example.com\"),\n\t\t\t\t\tJwksRetrievalOption: pulumi.String(\"OPEN_ID_DISCOVERY\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.TrustedTokenIssuer;\nimport com.pulumi.aws.ssoadmin.TrustedTokenIssuerArgs;\nimport com.pulumi.aws.ssoadmin.inputs.TrustedTokenIssuerTrustedTokenIssuerConfigurationArgs;\nimport com.pulumi.aws.ssoadmin.inputs.TrustedTokenIssuerTrustedTokenIssuerConfigurationOidcJwtConfigurationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n var exampleTrustedTokenIssuer = new TrustedTokenIssuer(\"exampleTrustedTokenIssuer\", TrustedTokenIssuerArgs.builder()\n .name(\"example\")\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .trustedTokenIssuerType(\"OIDC_JWT\")\n .trustedTokenIssuerConfiguration(TrustedTokenIssuerTrustedTokenIssuerConfigurationArgs.builder()\n .oidcJwtConfiguration(TrustedTokenIssuerTrustedTokenIssuerConfigurationOidcJwtConfigurationArgs.builder()\n .claimAttributePath(\"email\")\n .identityStoreAttributePath(\"emails.value\")\n .issuerUrl(\"https://example.com\")\n .jwksRetrievalOption(\"OPEN_ID_DISCOVERY\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleTrustedTokenIssuer:\n type: aws:ssoadmin:TrustedTokenIssuer\n name: example\n properties:\n name: example\n instanceArn: ${example.arns[0]}\n trustedTokenIssuerType: OIDC_JWT\n trustedTokenIssuerConfiguration:\n oidcJwtConfiguration:\n claimAttributePath: email\n identityStoreAttributePath: emails.value\n issuerUrl: https://example.com\n jwksRetrievalOption: OPEN_ID_DISCOVERY\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import SSO Admin Trusted Token Issuer using the `id`. For example:\n\n```sh\n$ pulumi import aws:ssoadmin/trustedTokenIssuer:TrustedTokenIssuer example arn:aws:sso::012345678901:trustedTokenIssuer/ssoins-lu1ye3gew4mbc7ju/tti-2657c556-9707-11ee-b9d1-0242ac120002\n```\n", "properties": { "arn": { "type": "string", @@ -370276,7 +370276,7 @@ } }, "aws:vpclattice/resourcePolicy:ResourcePolicy": { - "description": "Resource for managing an AWS VPC Lattice Resource Policy.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst example = new aws.vpclattice.ServiceNetwork(\"example\", {name: \"example-vpclattice-service-network\"});\nconst exampleResourcePolicy = new aws.vpclattice.ResourcePolicy(\"example\", {\n resourceArn: example.arn,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Sid: \"test-pol-principals-6\",\n Effect: \"Allow\",\n Principal: {\n AWS: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:root`),\n },\n Action: [\n \"vpc-lattice:CreateServiceNetworkVpcAssociation\",\n \"vpc-lattice:CreateServiceNetworkServiceAssociation\",\n \"vpc-lattice:GetServiceNetwork\",\n ],\n Resource: example.arn,\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\nexample = aws.vpclattice.ServiceNetwork(\"example\", name=\"example-vpclattice-service-network\")\nexample_resource_policy = aws.vpclattice.ResourcePolicy(\"example\",\n resource_arn=example.arn,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Sid\": \"test-pol-principals-6\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:root\",\n },\n \"Action\": [\n \"vpc-lattice:CreateServiceNetworkVpcAssociation\",\n \"vpc-lattice:CreateServiceNetworkServiceAssociation\",\n \"vpc-lattice:GetServiceNetwork\",\n ],\n \"Resource\": example.arn,\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var example = new Aws.VpcLattice.ServiceNetwork(\"example\", new()\n {\n Name = \"example-vpclattice-service-network\",\n });\n\n var exampleResourcePolicy = new Aws.VpcLattice.ResourcePolicy(\"example\", new()\n {\n ResourceArn = example.Arn,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"test-pol-principals-6\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = Output.Tuple(currentGetPartition, current).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var current = values.Item2;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\";\n }),\n },\n [\"Action\"] = new[]\n {\n \"vpc-lattice:CreateServiceNetworkVpcAssociation\",\n \"vpc-lattice:CreateServiceNetworkServiceAssociation\",\n \"vpc-lattice:GetServiceNetwork\",\n },\n [\"Resource\"] = example.Arn,\n },\n },\n })),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := vpclattice.NewServiceNetwork(ctx, \"example\", \u0026vpclattice.ServiceNetworkArgs{\n\t\t\tName: pulumi.String(\"example-vpclattice-service-network\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vpclattice.NewResourcePolicy(ctx, \"example\", \u0026vpclattice.ResourcePolicyArgs{\n\t\t\tResourceArn: example.Arn,\n\t\t\tPolicy: example.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Sid\": \"test-pol-principals-6\",\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:%v:iam::%v:root\", currentGetPartition.Partition, current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\"vpc-lattice:CreateServiceNetworkVpcAssociation\",\n\t\t\t\t\t\t\t\t\"vpc-lattice:CreateServiceNetworkServiceAssociation\",\n\t\t\t\t\t\t\t\t\"vpc-lattice:GetServiceNetwork\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": arn,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.vpclattice.ServiceNetwork;\nimport com.pulumi.aws.vpclattice.ServiceNetworkArgs;\nimport com.pulumi.aws.vpclattice.ResourcePolicy;\nimport com.pulumi.aws.vpclattice.ResourcePolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n var example = new ServiceNetwork(\"example\", ServiceNetworkArgs.builder()\n .name(\"example-vpclattice-service-network\")\n .build());\n\n var exampleResourcePolicy = new ResourcePolicy(\"exampleResourcePolicy\", ResourcePolicyArgs.builder()\n .resourceArn(example.arn())\n .policy(example.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"test-pol-principals-6\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:%s:iam::%s:root\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"vpc-lattice:CreateServiceNetworkVpcAssociation\", \n \"vpc-lattice:CreateServiceNetworkServiceAssociation\", \n \"vpc-lattice:GetServiceNetwork\"\n )),\n jsonProperty(\"Resource\", arn)\n )))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:vpclattice:ServiceNetwork\n properties:\n name: example-vpclattice-service-network\n exampleResourcePolicy:\n type: aws:vpclattice:ResourcePolicy\n name: example\n properties:\n resourceArn: ${example.arn}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Sid: test-pol-principals-6\n Effect: Allow\n Principal:\n AWS: arn:${currentGetPartition.partition}:iam::${current.accountId}:root\n Action:\n - vpc-lattice:CreateServiceNetworkVpcAssociation\n - vpc-lattice:CreateServiceNetworkServiceAssociation\n - vpc-lattice:GetServiceNetwork\n Resource: ${example.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPC Lattice Resource Policy using the `resource_arn`. For example:\n\n```sh\n$ pulumi import aws:vpclattice/resourcePolicy:ResourcePolicy example rft-8012925589\n```\n", + "description": "Resource for managing an AWS VPC Lattice Resource Policy.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst currentGetPartition = aws.getPartition({});\nconst example = new aws.vpclattice.ServiceNetwork(\"example\", {name: \"example-vpclattice-service-network\"});\nconst exampleResourcePolicy = new aws.vpclattice.ResourcePolicy(\"example\", {\n resourceArn: example.arn,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Sid: \"test-pol-principals-6\",\n Effect: \"Allow\",\n Principal: {\n AWS: Promise.all([currentGetPartition, current]).then(([currentGetPartition, current]) =\u003e `arn:${currentGetPartition.partition}:iam::${current.accountId}:root`),\n },\n Action: [\n \"vpc-lattice:CreateServiceNetworkVpcAssociation\",\n \"vpc-lattice:CreateServiceNetworkServiceAssociation\",\n \"vpc-lattice:GetServiceNetwork\",\n ],\n Resource: example.arn,\n }],\n }),\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ncurrent_get_partition = aws.get_partition()\nexample = aws.vpclattice.ServiceNetwork(\"example\", name=\"example-vpclattice-service-network\")\nexample_resource_policy = aws.vpclattice.ResourcePolicy(\"example\",\n resource_arn=example.arn,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Sid\": \"test-pol-principals-6\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": f\"arn:{current_get_partition.partition}:iam::{current.account_id}:root\",\n },\n \"Action\": [\n \"vpc-lattice:CreateServiceNetworkVpcAssociation\",\n \"vpc-lattice:CreateServiceNetworkServiceAssociation\",\n \"vpc-lattice:GetServiceNetwork\",\n ],\n \"Resource\": example.arn,\n }],\n }))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var currentGetPartition = Aws.GetPartition.Invoke();\n\n var example = new Aws.VpcLattice.ServiceNetwork(\"example\", new()\n {\n Name = \"example-vpclattice-service-network\",\n });\n\n var exampleResourcePolicy = new Aws.VpcLattice.ResourcePolicy(\"example\", new()\n {\n ResourceArn = example.Arn,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Sid\"] = \"test-pol-principals-6\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = Output.Tuple(currentGetPartition, current).Apply(values =\u003e\n {\n var currentGetPartition = values.Item1;\n var current = values.Item2;\n return $\"arn:{currentGetPartition.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\";\n }),\n },\n [\"Action\"] = new[]\n {\n \"vpc-lattice:CreateServiceNetworkVpcAssociation\",\n \"vpc-lattice:CreateServiceNetworkServiceAssociation\",\n \"vpc-lattice:GetServiceNetwork\",\n },\n [\"Resource\"] = example.Arn,\n },\n },\n })),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcurrentGetPartition, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := vpclattice.NewServiceNetwork(ctx, \"example\", \u0026vpclattice.ServiceNetworkArgs{\n\t\t\tName: pulumi.String(\"example-vpclattice-service-network\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = vpclattice.NewResourcePolicy(ctx, \"example\", \u0026vpclattice.ResourcePolicyArgs{\n\t\t\tResourceArn: example.Arn,\n\t\t\tPolicy: example.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Sid\": \"test-pol-principals-6\",\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"AWS\": fmt.Sprintf(\"arn:%v:iam::%v:root\", currentGetPartition.Partition, current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Action\": []string{\n\t\t\t\t\t\t\t\t\"vpc-lattice:CreateServiceNetworkVpcAssociation\",\n\t\t\t\t\t\t\t\t\"vpc-lattice:CreateServiceNetworkServiceAssociation\",\n\t\t\t\t\t\t\t\t\"vpc-lattice:GetServiceNetwork\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": arn,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.vpclattice.ServiceNetwork;\nimport com.pulumi.aws.vpclattice.ServiceNetworkArgs;\nimport com.pulumi.aws.vpclattice.ResourcePolicy;\nimport com.pulumi.aws.vpclattice.ResourcePolicyArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var currentGetPartition = AwsFunctions.getPartition();\n\n var example = new ServiceNetwork(\"example\", ServiceNetworkArgs.builder()\n .name(\"example-vpclattice-service-network\")\n .build());\n\n var exampleResourcePolicy = new ResourcePolicy(\"exampleResourcePolicy\", ResourcePolicyArgs.builder()\n .resourceArn(example.arn())\n .policy(example.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Sid\", \"test-pol-principals-6\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", String.format(\"arn:%s:iam::%s:root\", currentGetPartition.applyValue(getPartitionResult -\u003e getPartitionResult.partition()),current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n )),\n jsonProperty(\"Action\", jsonArray(\n \"vpc-lattice:CreateServiceNetworkVpcAssociation\", \n \"vpc-lattice:CreateServiceNetworkServiceAssociation\", \n \"vpc-lattice:GetServiceNetwork\"\n )),\n jsonProperty(\"Resource\", arn)\n )))\n ))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:vpclattice:ServiceNetwork\n properties:\n name: example-vpclattice-service-network\n exampleResourcePolicy:\n type: aws:vpclattice:ResourcePolicy\n name: example\n properties:\n resourceArn: ${example.arn}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Sid: test-pol-principals-6\n Effect: Allow\n Principal:\n AWS: arn:${currentGetPartition.partition}:iam::${current.accountId}:root\n Action:\n - vpc-lattice:CreateServiceNetworkVpcAssociation\n - vpc-lattice:CreateServiceNetworkServiceAssociation\n - vpc-lattice:GetServiceNetwork\n Resource: ${example.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n currentGetPartition:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import VPC Lattice Resource Policy using the `resource_arn`. For example:\n\n```sh\n$ pulumi import aws:vpclattice/resourcePolicy:ResourcePolicy example rft-8012925589\n```\n", "properties": { "policy": { "type": "string", @@ -372862,7 +372862,7 @@ } }, "aws:wafregional/webAclAssociation:WebAclAssociation": { - "description": "Manages an association with WAF Regional Web ACL.\n\n\u003e **Note:** An Application Load Balancer can only be associated with one WAF Regional WebACL.\n\n## Example Usage\n\n### Application Load Balancer Association\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ipset = new aws.wafregional.IpSet(\"ipset\", {\n name: \"tfIPSet\",\n ipSetDescriptors: [{\n type: \"IPV4\",\n value: \"192.0.7.0/24\",\n }],\n});\nconst foo = new aws.wafregional.Rule(\"foo\", {\n name: \"tfWAFRule\",\n metricName: \"tfWAFRule\",\n predicates: [{\n dataId: ipset.id,\n negated: false,\n type: \"IPMatch\",\n }],\n});\nconst fooWebAcl = new aws.wafregional.WebAcl(\"foo\", {\n name: \"foo\",\n metricName: \"foo\",\n defaultAction: {\n type: \"ALLOW\",\n },\n rules: [{\n action: {\n type: \"BLOCK\",\n },\n priority: 1,\n ruleId: foo.id,\n }],\n});\nconst fooVpc = new aws.ec2.Vpc(\"foo\", {cidrBlock: \"10.1.0.0/16\"});\nconst available = aws.getAvailabilityZones({});\nconst fooSubnet = new aws.ec2.Subnet(\"foo\", {\n vpcId: fooVpc.id,\n cidrBlock: \"10.1.1.0/24\",\n availabilityZone: available.then(available =\u003e available.names?.[0]),\n});\nconst bar = new aws.ec2.Subnet(\"bar\", {\n vpcId: fooVpc.id,\n cidrBlock: \"10.1.2.0/24\",\n availabilityZone: available.then(available =\u003e available.names?.[1]),\n});\nconst fooLoadBalancer = new aws.alb.LoadBalancer(\"foo\", {\n internal: true,\n subnets: [\n fooSubnet.id,\n bar.id,\n ],\n});\nconst fooWebAclAssociation = new aws.wafregional.WebAclAssociation(\"foo\", {\n resourceArn: fooLoadBalancer.arn,\n webAclId: fooWebAcl.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nipset = aws.wafregional.IpSet(\"ipset\",\n name=\"tfIPSet\",\n ip_set_descriptors=[{\n \"type\": \"IPV4\",\n \"value\": \"192.0.7.0/24\",\n }])\nfoo = aws.wafregional.Rule(\"foo\",\n name=\"tfWAFRule\",\n metric_name=\"tfWAFRule\",\n predicates=[{\n \"data_id\": ipset.id,\n \"negated\": False,\n \"type\": \"IPMatch\",\n }])\nfoo_web_acl = aws.wafregional.WebAcl(\"foo\",\n name=\"foo\",\n metric_name=\"foo\",\n default_action={\n \"type\": \"ALLOW\",\n },\n rules=[{\n \"action\": {\n \"type\": \"BLOCK\",\n },\n \"priority\": 1,\n \"rule_id\": foo.id,\n }])\nfoo_vpc = aws.ec2.Vpc(\"foo\", cidr_block=\"10.1.0.0/16\")\navailable = aws.get_availability_zones()\nfoo_subnet = aws.ec2.Subnet(\"foo\",\n vpc_id=foo_vpc.id,\n cidr_block=\"10.1.1.0/24\",\n availability_zone=available.names[0])\nbar = aws.ec2.Subnet(\"bar\",\n vpc_id=foo_vpc.id,\n cidr_block=\"10.1.2.0/24\",\n availability_zone=available.names[1])\nfoo_load_balancer = aws.alb.LoadBalancer(\"foo\",\n internal=True,\n subnets=[\n foo_subnet.id,\n bar.id,\n ])\nfoo_web_acl_association = aws.wafregional.WebAclAssociation(\"foo\",\n resource_arn=foo_load_balancer.arn,\n web_acl_id=foo_web_acl.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ipset = new Aws.WafRegional.IpSet(\"ipset\", new()\n {\n Name = \"tfIPSet\",\n IpSetDescriptors = new[]\n {\n new Aws.WafRegional.Inputs.IpSetIpSetDescriptorArgs\n {\n Type = \"IPV4\",\n Value = \"192.0.7.0/24\",\n },\n },\n });\n\n var foo = new Aws.WafRegional.Rule(\"foo\", new()\n {\n Name = \"tfWAFRule\",\n MetricName = \"tfWAFRule\",\n Predicates = new[]\n {\n new Aws.WafRegional.Inputs.RulePredicateArgs\n {\n DataId = ipset.Id,\n Negated = false,\n Type = \"IPMatch\",\n },\n },\n });\n\n var fooWebAcl = new Aws.WafRegional.WebAcl(\"foo\", new()\n {\n Name = \"foo\",\n MetricName = \"foo\",\n DefaultAction = new Aws.WafRegional.Inputs.WebAclDefaultActionArgs\n {\n Type = \"ALLOW\",\n },\n Rules = new[]\n {\n new Aws.WafRegional.Inputs.WebAclRuleArgs\n {\n Action = new Aws.WafRegional.Inputs.WebAclRuleActionArgs\n {\n Type = \"BLOCK\",\n },\n Priority = 1,\n RuleId = foo.Id,\n },\n },\n });\n\n var fooVpc = new Aws.Ec2.Vpc(\"foo\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var available = Aws.GetAvailabilityZones.Invoke();\n\n var fooSubnet = new Aws.Ec2.Subnet(\"foo\", new()\n {\n VpcId = fooVpc.Id,\n CidrBlock = \"10.1.1.0/24\",\n AvailabilityZone = available.Apply(getAvailabilityZonesResult =\u003e getAvailabilityZonesResult.Names[0]),\n });\n\n var bar = new Aws.Ec2.Subnet(\"bar\", new()\n {\n VpcId = fooVpc.Id,\n CidrBlock = \"10.1.2.0/24\",\n AvailabilityZone = available.Apply(getAvailabilityZonesResult =\u003e getAvailabilityZonesResult.Names[1]),\n });\n\n var fooLoadBalancer = new Aws.Alb.LoadBalancer(\"foo\", new()\n {\n Internal = true,\n Subnets = new[]\n {\n fooSubnet.Id,\n bar.Id,\n },\n });\n\n var fooWebAclAssociation = new Aws.WafRegional.WebAclAssociation(\"foo\", new()\n {\n ResourceArn = fooLoadBalancer.Arn,\n WebAclId = fooWebAcl.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/alb\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/wafregional\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tipset, err := wafregional.NewIpSet(ctx, \"ipset\", \u0026wafregional.IpSetArgs{\n\t\t\tName: pulumi.String(\"tfIPSet\"),\n\t\t\tIpSetDescriptors: wafregional.IpSetIpSetDescriptorArray{\n\t\t\t\t\u0026wafregional.IpSetIpSetDescriptorArgs{\n\t\t\t\t\tType: pulumi.String(\"IPV4\"),\n\t\t\t\t\tValue: pulumi.String(\"192.0.7.0/24\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfoo, err := wafregional.NewRule(ctx, \"foo\", \u0026wafregional.RuleArgs{\n\t\t\tName: pulumi.String(\"tfWAFRule\"),\n\t\t\tMetricName: pulumi.String(\"tfWAFRule\"),\n\t\t\tPredicates: wafregional.RulePredicateArray{\n\t\t\t\t\u0026wafregional.RulePredicateArgs{\n\t\t\t\t\tDataId: ipset.ID(),\n\t\t\t\t\tNegated: pulumi.Bool(false),\n\t\t\t\t\tType: pulumi.String(\"IPMatch\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooWebAcl, err := wafregional.NewWebAcl(ctx, \"foo\", \u0026wafregional.WebAclArgs{\n\t\t\tName: pulumi.String(\"foo\"),\n\t\t\tMetricName: pulumi.String(\"foo\"),\n\t\t\tDefaultAction: \u0026wafregional.WebAclDefaultActionArgs{\n\t\t\t\tType: pulumi.String(\"ALLOW\"),\n\t\t\t},\n\t\t\tRules: wafregional.WebAclRuleArray{\n\t\t\t\t\u0026wafregional.WebAclRuleArgs{\n\t\t\t\t\tAction: \u0026wafregional.WebAclRuleActionArgs{\n\t\t\t\t\t\tType: pulumi.String(\"BLOCK\"),\n\t\t\t\t\t},\n\t\t\t\t\tPriority: pulumi.Int(1),\n\t\t\t\t\tRuleId: foo.ID(),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooVpc, err := ec2.NewVpc(ctx, \"foo\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tavailable, err := aws.GetAvailabilityZones(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooSubnet, err := ec2.NewSubnet(ctx, \"foo\", \u0026ec2.SubnetArgs{\n\t\t\tVpcId: fooVpc.ID(),\n\t\t\tCidrBlock: pulumi.String(\"10.1.1.0/24\"),\n\t\t\tAvailabilityZone: pulumi.String(available.Names[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbar, err := ec2.NewSubnet(ctx, \"bar\", \u0026ec2.SubnetArgs{\n\t\t\tVpcId: fooVpc.ID(),\n\t\t\tCidrBlock: pulumi.String(\"10.1.2.0/24\"),\n\t\t\tAvailabilityZone: pulumi.String(available.Names[1]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooLoadBalancer, err := alb.NewLoadBalancer(ctx, \"foo\", \u0026alb.LoadBalancerArgs{\n\t\t\tInternal: pulumi.Bool(true),\n\t\t\tSubnets: pulumi.StringArray{\n\t\t\t\tfooSubnet.ID(),\n\t\t\t\tbar.ID(),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = wafregional.NewWebAclAssociation(ctx, \"foo\", \u0026wafregional.WebAclAssociationArgs{\n\t\t\tResourceArn: fooLoadBalancer.Arn,\n\t\t\tWebAclId: fooWebAcl.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.wafregional.IpSet;\nimport com.pulumi.aws.wafregional.IpSetArgs;\nimport com.pulumi.aws.wafregional.inputs.IpSetIpSetDescriptorArgs;\nimport com.pulumi.aws.wafregional.Rule;\nimport com.pulumi.aws.wafregional.RuleArgs;\nimport com.pulumi.aws.wafregional.inputs.RulePredicateArgs;\nimport com.pulumi.aws.wafregional.WebAcl;\nimport com.pulumi.aws.wafregional.WebAclArgs;\nimport com.pulumi.aws.wafregional.inputs.WebAclDefaultActionArgs;\nimport com.pulumi.aws.wafregional.inputs.WebAclRuleArgs;\nimport com.pulumi.aws.wafregional.inputs.WebAclRuleActionArgs;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetAvailabilityZonesArgs;\nimport com.pulumi.aws.ec2.Subnet;\nimport com.pulumi.aws.ec2.SubnetArgs;\nimport com.pulumi.aws.alb.LoadBalancer;\nimport com.pulumi.aws.alb.LoadBalancerArgs;\nimport com.pulumi.aws.wafregional.WebAclAssociation;\nimport com.pulumi.aws.wafregional.WebAclAssociationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ipset = new IpSet(\"ipset\", IpSetArgs.builder()\n .name(\"tfIPSet\")\n .ipSetDescriptors(IpSetIpSetDescriptorArgs.builder()\n .type(\"IPV4\")\n .value(\"192.0.7.0/24\")\n .build())\n .build());\n\n var foo = new Rule(\"foo\", RuleArgs.builder()\n .name(\"tfWAFRule\")\n .metricName(\"tfWAFRule\")\n .predicates(RulePredicateArgs.builder()\n .dataId(ipset.id())\n .negated(false)\n .type(\"IPMatch\")\n .build())\n .build());\n\n var fooWebAcl = new WebAcl(\"fooWebAcl\", WebAclArgs.builder()\n .name(\"foo\")\n .metricName(\"foo\")\n .defaultAction(WebAclDefaultActionArgs.builder()\n .type(\"ALLOW\")\n .build())\n .rules(WebAclRuleArgs.builder()\n .action(WebAclRuleActionArgs.builder()\n .type(\"BLOCK\")\n .build())\n .priority(1)\n .ruleId(foo.id())\n .build())\n .build());\n\n var fooVpc = new Vpc(\"fooVpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n final var available = AwsFunctions.getAvailabilityZones();\n\n var fooSubnet = new Subnet(\"fooSubnet\", SubnetArgs.builder()\n .vpcId(fooVpc.id())\n .cidrBlock(\"10.1.1.0/24\")\n .availabilityZone(available.applyValue(getAvailabilityZonesResult -\u003e getAvailabilityZonesResult.names()[0]))\n .build());\n\n var bar = new Subnet(\"bar\", SubnetArgs.builder()\n .vpcId(fooVpc.id())\n .cidrBlock(\"10.1.2.0/24\")\n .availabilityZone(available.applyValue(getAvailabilityZonesResult -\u003e getAvailabilityZonesResult.names()[1]))\n .build());\n\n var fooLoadBalancer = new LoadBalancer(\"fooLoadBalancer\", LoadBalancerArgs.builder()\n .internal(true)\n .subnets( \n fooSubnet.id(),\n bar.id())\n .build());\n\n var fooWebAclAssociation = new WebAclAssociation(\"fooWebAclAssociation\", WebAclAssociationArgs.builder()\n .resourceArn(fooLoadBalancer.arn())\n .webAclId(fooWebAcl.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ipset:\n type: aws:wafregional:IpSet\n properties:\n name: tfIPSet\n ipSetDescriptors:\n - type: IPV4\n value: 192.0.7.0/24\n foo:\n type: aws:wafregional:Rule\n properties:\n name: tfWAFRule\n metricName: tfWAFRule\n predicates:\n - dataId: ${ipset.id}\n negated: false\n type: IPMatch\n fooWebAcl:\n type: aws:wafregional:WebAcl\n name: foo\n properties:\n name: foo\n metricName: foo\n defaultAction:\n type: ALLOW\n rules:\n - action:\n type: BLOCK\n priority: 1\n ruleId: ${foo.id}\n fooVpc:\n type: aws:ec2:Vpc\n name: foo\n properties:\n cidrBlock: 10.1.0.0/16\n fooSubnet:\n type: aws:ec2:Subnet\n name: foo\n properties:\n vpcId: ${fooVpc.id}\n cidrBlock: 10.1.1.0/24\n availabilityZone: ${available.names[0]}\n bar:\n type: aws:ec2:Subnet\n properties:\n vpcId: ${fooVpc.id}\n cidrBlock: 10.1.2.0/24\n availabilityZone: ${available.names[1]}\n fooLoadBalancer:\n type: aws:alb:LoadBalancer\n name: foo\n properties:\n internal: true\n subnets:\n - ${fooSubnet.id}\n - ${bar.id}\n fooWebAclAssociation:\n type: aws:wafregional:WebAclAssociation\n name: foo\n properties:\n resourceArn: ${fooLoadBalancer.arn}\n webAclId: ${fooWebAcl.id}\nvariables:\n available:\n fn::invoke:\n Function: aws:getAvailabilityZones\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import WAF Regional Web ACL Association using their `web_acl_id:resource_arn`. For example:\n\n```sh\n$ pulumi import aws:wafregional/webAclAssociation:WebAclAssociation foo web_acl_id:resource_arn\n```\n", + "description": "Manages an association with WAF Regional Web ACL.\n\n\u003e **Note:** An Application Load Balancer can only be associated with one WAF Regional WebACL.\n\n## Example Usage\n\n### Application Load Balancer Association\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst ipset = new aws.wafregional.IpSet(\"ipset\", {\n name: \"tfIPSet\",\n ipSetDescriptors: [{\n type: \"IPV4\",\n value: \"192.0.7.0/24\",\n }],\n});\nconst foo = new aws.wafregional.Rule(\"foo\", {\n name: \"tfWAFRule\",\n metricName: \"tfWAFRule\",\n predicates: [{\n dataId: ipset.id,\n negated: false,\n type: \"IPMatch\",\n }],\n});\nconst fooWebAcl = new aws.wafregional.WebAcl(\"foo\", {\n name: \"foo\",\n metricName: \"foo\",\n defaultAction: {\n type: \"ALLOW\",\n },\n rules: [{\n action: {\n type: \"BLOCK\",\n },\n priority: 1,\n ruleId: foo.id,\n }],\n});\nconst fooVpc = new aws.ec2.Vpc(\"foo\", {cidrBlock: \"10.1.0.0/16\"});\nconst available = aws.getAvailabilityZones({});\nconst fooSubnet = new aws.ec2.Subnet(\"foo\", {\n vpcId: fooVpc.id,\n cidrBlock: \"10.1.1.0/24\",\n availabilityZone: available.then(available =\u003e available.names?.[0]),\n});\nconst bar = new aws.ec2.Subnet(\"bar\", {\n vpcId: fooVpc.id,\n cidrBlock: \"10.1.2.0/24\",\n availabilityZone: available.then(available =\u003e available.names?.[1]),\n});\nconst fooLoadBalancer = new aws.alb.LoadBalancer(\"foo\", {\n internal: true,\n subnets: [\n fooSubnet.id,\n bar.id,\n ],\n});\nconst fooWebAclAssociation = new aws.wafregional.WebAclAssociation(\"foo\", {\n resourceArn: fooLoadBalancer.arn,\n webAclId: fooWebAcl.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nipset = aws.wafregional.IpSet(\"ipset\",\n name=\"tfIPSet\",\n ip_set_descriptors=[{\n \"type\": \"IPV4\",\n \"value\": \"192.0.7.0/24\",\n }])\nfoo = aws.wafregional.Rule(\"foo\",\n name=\"tfWAFRule\",\n metric_name=\"tfWAFRule\",\n predicates=[{\n \"data_id\": ipset.id,\n \"negated\": False,\n \"type\": \"IPMatch\",\n }])\nfoo_web_acl = aws.wafregional.WebAcl(\"foo\",\n name=\"foo\",\n metric_name=\"foo\",\n default_action={\n \"type\": \"ALLOW\",\n },\n rules=[{\n \"action\": {\n \"type\": \"BLOCK\",\n },\n \"priority\": 1,\n \"rule_id\": foo.id,\n }])\nfoo_vpc = aws.ec2.Vpc(\"foo\", cidr_block=\"10.1.0.0/16\")\navailable = aws.get_availability_zones()\nfoo_subnet = aws.ec2.Subnet(\"foo\",\n vpc_id=foo_vpc.id,\n cidr_block=\"10.1.1.0/24\",\n availability_zone=available.names[0])\nbar = aws.ec2.Subnet(\"bar\",\n vpc_id=foo_vpc.id,\n cidr_block=\"10.1.2.0/24\",\n availability_zone=available.names[1])\nfoo_load_balancer = aws.alb.LoadBalancer(\"foo\",\n internal=True,\n subnets=[\n foo_subnet.id,\n bar.id,\n ])\nfoo_web_acl_association = aws.wafregional.WebAclAssociation(\"foo\",\n resource_arn=foo_load_balancer.arn,\n web_acl_id=foo_web_acl.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ipset = new Aws.WafRegional.IpSet(\"ipset\", new()\n {\n Name = \"tfIPSet\",\n IpSetDescriptors = new[]\n {\n new Aws.WafRegional.Inputs.IpSetIpSetDescriptorArgs\n {\n Type = \"IPV4\",\n Value = \"192.0.7.0/24\",\n },\n },\n });\n\n var foo = new Aws.WafRegional.Rule(\"foo\", new()\n {\n Name = \"tfWAFRule\",\n MetricName = \"tfWAFRule\",\n Predicates = new[]\n {\n new Aws.WafRegional.Inputs.RulePredicateArgs\n {\n DataId = ipset.Id,\n Negated = false,\n Type = \"IPMatch\",\n },\n },\n });\n\n var fooWebAcl = new Aws.WafRegional.WebAcl(\"foo\", new()\n {\n Name = \"foo\",\n MetricName = \"foo\",\n DefaultAction = new Aws.WafRegional.Inputs.WebAclDefaultActionArgs\n {\n Type = \"ALLOW\",\n },\n Rules = new[]\n {\n new Aws.WafRegional.Inputs.WebAclRuleArgs\n {\n Action = new Aws.WafRegional.Inputs.WebAclRuleActionArgs\n {\n Type = \"BLOCK\",\n },\n Priority = 1,\n RuleId = foo.Id,\n },\n },\n });\n\n var fooVpc = new Aws.Ec2.Vpc(\"foo\", new()\n {\n CidrBlock = \"10.1.0.0/16\",\n });\n\n var available = Aws.GetAvailabilityZones.Invoke();\n\n var fooSubnet = new Aws.Ec2.Subnet(\"foo\", new()\n {\n VpcId = fooVpc.Id,\n CidrBlock = \"10.1.1.0/24\",\n AvailabilityZone = available.Apply(getAvailabilityZonesResult =\u003e getAvailabilityZonesResult.Names[0]),\n });\n\n var bar = new Aws.Ec2.Subnet(\"bar\", new()\n {\n VpcId = fooVpc.Id,\n CidrBlock = \"10.1.2.0/24\",\n AvailabilityZone = available.Apply(getAvailabilityZonesResult =\u003e getAvailabilityZonesResult.Names[1]),\n });\n\n var fooLoadBalancer = new Aws.Alb.LoadBalancer(\"foo\", new()\n {\n Internal = true,\n Subnets = new[]\n {\n fooSubnet.Id,\n bar.Id,\n },\n });\n\n var fooWebAclAssociation = new Aws.WafRegional.WebAclAssociation(\"foo\", new()\n {\n ResourceArn = fooLoadBalancer.Arn,\n WebAclId = fooWebAcl.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/alb\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/wafregional\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tipset, err := wafregional.NewIpSet(ctx, \"ipset\", \u0026wafregional.IpSetArgs{\n\t\t\tName: pulumi.String(\"tfIPSet\"),\n\t\t\tIpSetDescriptors: wafregional.IpSetIpSetDescriptorArray{\n\t\t\t\t\u0026wafregional.IpSetIpSetDescriptorArgs{\n\t\t\t\t\tType: pulumi.String(\"IPV4\"),\n\t\t\t\t\tValue: pulumi.String(\"192.0.7.0/24\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfoo, err := wafregional.NewRule(ctx, \"foo\", \u0026wafregional.RuleArgs{\n\t\t\tName: pulumi.String(\"tfWAFRule\"),\n\t\t\tMetricName: pulumi.String(\"tfWAFRule\"),\n\t\t\tPredicates: wafregional.RulePredicateArray{\n\t\t\t\t\u0026wafregional.RulePredicateArgs{\n\t\t\t\t\tDataId: ipset.ID(),\n\t\t\t\t\tNegated: pulumi.Bool(false),\n\t\t\t\t\tType: pulumi.String(\"IPMatch\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooWebAcl, err := wafregional.NewWebAcl(ctx, \"foo\", \u0026wafregional.WebAclArgs{\n\t\t\tName: pulumi.String(\"foo\"),\n\t\t\tMetricName: pulumi.String(\"foo\"),\n\t\t\tDefaultAction: \u0026wafregional.WebAclDefaultActionArgs{\n\t\t\t\tType: pulumi.String(\"ALLOW\"),\n\t\t\t},\n\t\t\tRules: wafregional.WebAclRuleArray{\n\t\t\t\t\u0026wafregional.WebAclRuleArgs{\n\t\t\t\t\tAction: \u0026wafregional.WebAclRuleActionArgs{\n\t\t\t\t\t\tType: pulumi.String(\"BLOCK\"),\n\t\t\t\t\t},\n\t\t\t\t\tPriority: pulumi.Int(1),\n\t\t\t\t\tRuleId: foo.ID(),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooVpc, err := ec2.NewVpc(ctx, \"foo\", \u0026ec2.VpcArgs{\n\t\t\tCidrBlock: pulumi.String(\"10.1.0.0/16\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tavailable, err := aws.GetAvailabilityZones(ctx, \u0026aws.GetAvailabilityZonesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooSubnet, err := ec2.NewSubnet(ctx, \"foo\", \u0026ec2.SubnetArgs{\n\t\t\tVpcId: fooVpc.ID(),\n\t\t\tCidrBlock: pulumi.String(\"10.1.1.0/24\"),\n\t\t\tAvailabilityZone: pulumi.String(available.Names[0]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tbar, err := ec2.NewSubnet(ctx, \"bar\", \u0026ec2.SubnetArgs{\n\t\t\tVpcId: fooVpc.ID(),\n\t\t\tCidrBlock: pulumi.String(\"10.1.2.0/24\"),\n\t\t\tAvailabilityZone: pulumi.String(available.Names[1]),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfooLoadBalancer, err := alb.NewLoadBalancer(ctx, \"foo\", \u0026alb.LoadBalancerArgs{\n\t\t\tInternal: pulumi.Bool(true),\n\t\t\tSubnets: pulumi.StringArray{\n\t\t\t\tfooSubnet.ID(),\n\t\t\t\tbar.ID(),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = wafregional.NewWebAclAssociation(ctx, \"foo\", \u0026wafregional.WebAclAssociationArgs{\n\t\t\tResourceArn: fooLoadBalancer.Arn,\n\t\t\tWebAclId: fooWebAcl.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.wafregional.IpSet;\nimport com.pulumi.aws.wafregional.IpSetArgs;\nimport com.pulumi.aws.wafregional.inputs.IpSetIpSetDescriptorArgs;\nimport com.pulumi.aws.wafregional.Rule;\nimport com.pulumi.aws.wafregional.RuleArgs;\nimport com.pulumi.aws.wafregional.inputs.RulePredicateArgs;\nimport com.pulumi.aws.wafregional.WebAcl;\nimport com.pulumi.aws.wafregional.WebAclArgs;\nimport com.pulumi.aws.wafregional.inputs.WebAclDefaultActionArgs;\nimport com.pulumi.aws.wafregional.inputs.WebAclRuleArgs;\nimport com.pulumi.aws.wafregional.inputs.WebAclRuleActionArgs;\nimport com.pulumi.aws.ec2.Vpc;\nimport com.pulumi.aws.ec2.VpcArgs;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetAvailabilityZonesArgs;\nimport com.pulumi.aws.ec2.Subnet;\nimport com.pulumi.aws.ec2.SubnetArgs;\nimport com.pulumi.aws.alb.LoadBalancer;\nimport com.pulumi.aws.alb.LoadBalancerArgs;\nimport com.pulumi.aws.wafregional.WebAclAssociation;\nimport com.pulumi.aws.wafregional.WebAclAssociationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ipset = new IpSet(\"ipset\", IpSetArgs.builder()\n .name(\"tfIPSet\")\n .ipSetDescriptors(IpSetIpSetDescriptorArgs.builder()\n .type(\"IPV4\")\n .value(\"192.0.7.0/24\")\n .build())\n .build());\n\n var foo = new Rule(\"foo\", RuleArgs.builder()\n .name(\"tfWAFRule\")\n .metricName(\"tfWAFRule\")\n .predicates(RulePredicateArgs.builder()\n .dataId(ipset.id())\n .negated(false)\n .type(\"IPMatch\")\n .build())\n .build());\n\n var fooWebAcl = new WebAcl(\"fooWebAcl\", WebAclArgs.builder()\n .name(\"foo\")\n .metricName(\"foo\")\n .defaultAction(WebAclDefaultActionArgs.builder()\n .type(\"ALLOW\")\n .build())\n .rules(WebAclRuleArgs.builder()\n .action(WebAclRuleActionArgs.builder()\n .type(\"BLOCK\")\n .build())\n .priority(1)\n .ruleId(foo.id())\n .build())\n .build());\n\n var fooVpc = new Vpc(\"fooVpc\", VpcArgs.builder()\n .cidrBlock(\"10.1.0.0/16\")\n .build());\n\n final var available = AwsFunctions.getAvailabilityZones();\n\n var fooSubnet = new Subnet(\"fooSubnet\", SubnetArgs.builder()\n .vpcId(fooVpc.id())\n .cidrBlock(\"10.1.1.0/24\")\n .availabilityZone(available.applyValue(getAvailabilityZonesResult -\u003e getAvailabilityZonesResult.names()[0]))\n .build());\n\n var bar = new Subnet(\"bar\", SubnetArgs.builder()\n .vpcId(fooVpc.id())\n .cidrBlock(\"10.1.2.0/24\")\n .availabilityZone(available.applyValue(getAvailabilityZonesResult -\u003e getAvailabilityZonesResult.names()[1]))\n .build());\n\n var fooLoadBalancer = new LoadBalancer(\"fooLoadBalancer\", LoadBalancerArgs.builder()\n .internal(true)\n .subnets( \n fooSubnet.id(),\n bar.id())\n .build());\n\n var fooWebAclAssociation = new WebAclAssociation(\"fooWebAclAssociation\", WebAclAssociationArgs.builder()\n .resourceArn(fooLoadBalancer.arn())\n .webAclId(fooWebAcl.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ipset:\n type: aws:wafregional:IpSet\n properties:\n name: tfIPSet\n ipSetDescriptors:\n - type: IPV4\n value: 192.0.7.0/24\n foo:\n type: aws:wafregional:Rule\n properties:\n name: tfWAFRule\n metricName: tfWAFRule\n predicates:\n - dataId: ${ipset.id}\n negated: false\n type: IPMatch\n fooWebAcl:\n type: aws:wafregional:WebAcl\n name: foo\n properties:\n name: foo\n metricName: foo\n defaultAction:\n type: ALLOW\n rules:\n - action:\n type: BLOCK\n priority: 1\n ruleId: ${foo.id}\n fooVpc:\n type: aws:ec2:Vpc\n name: foo\n properties:\n cidrBlock: 10.1.0.0/16\n fooSubnet:\n type: aws:ec2:Subnet\n name: foo\n properties:\n vpcId: ${fooVpc.id}\n cidrBlock: 10.1.1.0/24\n availabilityZone: ${available.names[0]}\n bar:\n type: aws:ec2:Subnet\n properties:\n vpcId: ${fooVpc.id}\n cidrBlock: 10.1.2.0/24\n availabilityZone: ${available.names[1]}\n fooLoadBalancer:\n type: aws:alb:LoadBalancer\n name: foo\n properties:\n internal: true\n subnets:\n - ${fooSubnet.id}\n - ${bar.id}\n fooWebAclAssociation:\n type: aws:wafregional:WebAclAssociation\n name: foo\n properties:\n resourceArn: ${fooLoadBalancer.arn}\n webAclId: ${fooWebAcl.id}\nvariables:\n available:\n fn::invoke:\n Function: aws:getAvailabilityZones\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import WAF Regional Web ACL Association using their `web_acl_id:resource_arn`. For example:\n\n```sh\n$ pulumi import aws:wafregional/webAclAssociation:WebAclAssociation foo web_acl_id:resource_arn\n```\n", "properties": { "resourceArn": { "type": "string", @@ -374683,7 +374683,7 @@ } }, "aws:xray/encryptionConfig:EncryptionConfig": { - "description": "Creates and manages an AWS XRay Encryption Config.\n\n\u003e **NOTE:** Removing this resource from the provider has no effect to the encryption configuration within X-Ray.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.xray.EncryptionConfig(\"example\", {type: \"NONE\"});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.xray.EncryptionConfig(\"example\", type=\"NONE\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Xray.EncryptionConfig(\"example\", new()\n {\n Type = \"NONE\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/xray\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := xray.NewEncryptionConfig(ctx, \"example\", \u0026xray.EncryptionConfigArgs{\n\t\t\tType: pulumi.String(\"NONE\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.xray.EncryptionConfig;\nimport com.pulumi.aws.xray.EncryptionConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new EncryptionConfig(\"example\", EncryptionConfigArgs.builder()\n .type(\"NONE\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:xray:EncryptionConfig\n properties:\n type: NONE\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\n### With KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"Enable IAM User Permissions\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current.accountId}:root`],\n }],\n actions: [\"kms:*\"],\n resources: [\"*\"],\n }],\n}));\nconst exampleKey = new aws.kms.Key(\"example\", {\n description: \"Some Key\",\n deletionWindowInDays: 7,\n policy: example.then(example =\u003e example.json),\n});\nconst exampleEncryptionConfig = new aws.xray.EncryptionConfig(\"example\", {\n type: \"KMS\",\n keyId: exampleKey.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.iam.get_policy_document(statements=[{\n \"sid\": \"Enable IAM User Permissions\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n \"actions\": [\"kms:*\"],\n \"resources\": [\"*\"],\n}])\nexample_key = aws.kms.Key(\"example\",\n description=\"Some Key\",\n deletion_window_in_days=7,\n policy=example.json)\nexample_encryption_config = aws.xray.EncryptionConfig(\"example\",\n type=\"KMS\",\n key_id=example_key.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Enable IAM User Permissions\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var exampleKey = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"Some Key\",\n DeletionWindowInDays = 7,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleEncryptionConfig = new Aws.Xray.EncryptionConfig(\"example\", new()\n {\n Type = \"KMS\",\n KeyId = exampleKey.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/xray\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Enable IAM User Permissions\"),\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKey, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Some Key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = xray.NewEncryptionConfig(ctx, \"example\", \u0026xray.EncryptionConfigArgs{\n\t\t\tType: pulumi.String(\"KMS\"),\n\t\t\tKeyId: exampleKey.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.xray.EncryptionConfig;\nimport com.pulumi.aws.xray.EncryptionConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"Enable IAM User Permissions\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .actions(\"kms:*\")\n .resources(\"*\")\n .build())\n .build());\n\n var exampleKey = new Key(\"exampleKey\", KeyArgs.builder()\n .description(\"Some Key\")\n .deletionWindowInDays(7)\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleEncryptionConfig = new EncryptionConfig(\"exampleEncryptionConfig\", EncryptionConfigArgs.builder()\n .type(\"KMS\")\n .keyId(exampleKey.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleKey:\n type: aws:kms:Key\n name: example\n properties:\n description: Some Key\n deletionWindowInDays: 7\n policy: ${example.json}\n exampleEncryptionConfig:\n type: aws:xray:EncryptionConfig\n name: example\n properties:\n type: KMS\n keyId: ${exampleKey.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Enable IAM User Permissions\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n actions:\n - kms:*\n resources:\n - '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import XRay Encryption Config using the region name. For example:\n\n```sh\n$ pulumi import aws:xray/encryptionConfig:EncryptionConfig example us-west-2\n```\n", + "description": "Creates and manages an AWS XRay Encryption Config.\n\n\u003e **NOTE:** Removing this resource from the provider has no effect to the encryption configuration within X-Ray.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.xray.EncryptionConfig(\"example\", {type: \"NONE\"});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.xray.EncryptionConfig(\"example\", type=\"NONE\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.Xray.EncryptionConfig(\"example\", new()\n {\n Type = \"NONE\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/xray\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := xray.NewEncryptionConfig(ctx, \"example\", \u0026xray.EncryptionConfigArgs{\n\t\t\tType: pulumi.String(\"NONE\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.xray.EncryptionConfig;\nimport com.pulumi.aws.xray.EncryptionConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new EncryptionConfig(\"example\", EncryptionConfigArgs.builder()\n .type(\"NONE\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:xray:EncryptionConfig\n properties:\n type: NONE\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\n### With KMS Key\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"Enable IAM User Permissions\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [`arn:aws:iam::${current.accountId}:root`],\n }],\n actions: [\"kms:*\"],\n resources: [\"*\"],\n }],\n}));\nconst exampleKey = new aws.kms.Key(\"example\", {\n description: \"Some Key\",\n deletionWindowInDays: 7,\n policy: example.then(example =\u003e example.json),\n});\nconst exampleEncryptionConfig = new aws.xray.EncryptionConfig(\"example\", {\n type: \"KMS\",\n keyId: exampleKey.arn,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.iam.get_policy_document(statements=[{\n \"sid\": \"Enable IAM User Permissions\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [f\"arn:aws:iam::{current.account_id}:root\"],\n }],\n \"actions\": [\"kms:*\"],\n \"resources\": [\"*\"],\n}])\nexample_key = aws.kms.Key(\"example\",\n description=\"Some Key\",\n deletion_window_in_days=7,\n policy=example.json)\nexample_encryption_config = aws.xray.EncryptionConfig(\"example\",\n type=\"KMS\",\n key_id=example_key.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Enable IAM User Permissions\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n Actions = new[]\n {\n \"kms:*\",\n },\n Resources = new[]\n {\n \"*\",\n },\n },\n },\n });\n\n var exampleKey = new Aws.Kms.Key(\"example\", new()\n {\n Description = \"Some Key\",\n DeletionWindowInDays = 7,\n Policy = example.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var exampleEncryptionConfig = new Aws.Xray.EncryptionConfig(\"example\", new()\n {\n Type = \"KMS\",\n KeyId = exampleKey.Arn,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/xray\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Enable IAM User Permissions\"),\n\t\t\t\t\tEffect: pulumi.StringRef(\"Allow\"),\n\t\t\t\t\tPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tType: \"AWS\",\n\t\t\t\t\t\t\tIdentifiers: []string{\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"kms:*\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\t\"*\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleKey, err := kms.NewKey(ctx, \"example\", \u0026kms.KeyArgs{\n\t\t\tDescription: pulumi.String(\"Some Key\"),\n\t\t\tDeletionWindowInDays: pulumi.Int(7),\n\t\t\tPolicy: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = xray.NewEncryptionConfig(ctx, \"example\", \u0026xray.EncryptionConfigArgs{\n\t\t\tType: pulumi.String(\"KMS\"),\n\t\t\tKeyId: exampleKey.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.kms.Key;\nimport com.pulumi.aws.kms.KeyArgs;\nimport com.pulumi.aws.xray.EncryptionConfig;\nimport com.pulumi.aws.xray.EncryptionConfigArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"Enable IAM User Permissions\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .actions(\"kms:*\")\n .resources(\"*\")\n .build())\n .build());\n\n var exampleKey = new Key(\"exampleKey\", KeyArgs.builder()\n .description(\"Some Key\")\n .deletionWindowInDays(7)\n .policy(example.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json()))\n .build());\n\n var exampleEncryptionConfig = new EncryptionConfig(\"exampleEncryptionConfig\", EncryptionConfigArgs.builder()\n .type(\"KMS\")\n .keyId(exampleKey.arn())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleKey:\n type: aws:kms:Key\n name: example\n properties:\n description: Some Key\n deletionWindowInDays: 7\n policy: ${example.json}\n exampleEncryptionConfig:\n type: aws:xray:EncryptionConfig\n name: example\n properties:\n type: KMS\n keyId: ${exampleKey.arn}\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Enable IAM User Permissions\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - arn:aws:iam::${current.accountId}:root\n actions:\n - kms:*\n resources:\n - '*'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nUsing `pulumi import`, import XRay Encryption Config using the region name. For example:\n\n```sh\n$ pulumi import aws:xray/encryptionConfig:EncryptionConfig example us-west-2\n```\n", "properties": { "keyId": { "type": "string", @@ -375813,7 +375813,7 @@ } }, "aws:amp/getWorkspaces:getWorkspaces": { - "description": "Provides the aliases, ARNs, and workspace IDs of Amazon Prometheus workspaces.\n\n## Example Usage\n\nThe following example returns all of the workspaces in a region:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.amp.getWorkspaces({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.amp.get_workspaces()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Amp.GetWorkspaces.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := amp.GetWorkspaces(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.amp.AmpFunctions;\nimport com.pulumi.aws.amp.inputs.GetWorkspacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = AmpFunctions.getWorkspaces();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:amp:getWorkspaces\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example filters the workspaces by alias. Only the workspaces with\naliases that begin with the value of `alias_prefix` will be returned:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.amp.getWorkspaces({\n aliasPrefix: \"example\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.amp.get_workspaces(alias_prefix=\"example\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Amp.GetWorkspaces.Invoke(new()\n {\n AliasPrefix = \"example\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := amp.GetWorkspaces(ctx, \u0026amp.GetWorkspacesArgs{\n\t\t\tAliasPrefix: pulumi.StringRef(\"example\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.amp.AmpFunctions;\nimport com.pulumi.aws.amp.inputs.GetWorkspacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = AmpFunctions.getWorkspaces(GetWorkspacesArgs.builder()\n .aliasPrefix(\"example\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:amp:getWorkspaces\n Arguments:\n aliasPrefix: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides the aliases, ARNs, and workspace IDs of Amazon Prometheus workspaces.\n\n## Example Usage\n\nThe following example returns all of the workspaces in a region:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.amp.getWorkspaces({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.amp.get_workspaces()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Amp.GetWorkspaces.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := amp.GetWorkspaces(ctx, \u0026amp.GetWorkspacesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.amp.AmpFunctions;\nimport com.pulumi.aws.amp.inputs.GetWorkspacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = AmpFunctions.getWorkspaces();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:amp:getWorkspaces\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example filters the workspaces by alias. Only the workspaces with\naliases that begin with the value of `alias_prefix` will be returned:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.amp.getWorkspaces({\n aliasPrefix: \"example\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.amp.get_workspaces(alias_prefix=\"example\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Amp.GetWorkspaces.Invoke(new()\n {\n AliasPrefix = \"example\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := amp.GetWorkspaces(ctx, \u0026amp.GetWorkspacesArgs{\n\t\t\tAliasPrefix: pulumi.StringRef(\"example\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.amp.AmpFunctions;\nimport com.pulumi.aws.amp.inputs.GetWorkspacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = AmpFunctions.getWorkspaces(GetWorkspacesArgs.builder()\n .aliasPrefix(\"example\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:amp:getWorkspaces\n Arguments:\n aliasPrefix: example\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getWorkspaces.\n", "properties": { @@ -377328,7 +377328,7 @@ } }, "aws:appmesh/getMesh:getMesh": { - "description": "The App Mesh Mesh data source allows details of an App Mesh Mesh to be retrieved by its name and optionally the mesh_owner.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst simple = aws.appmesh.getMesh({\n name: \"simpleapp\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nsimple = aws.appmesh.get_mesh(name=\"simpleapp\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var simple = Aws.AppMesh.GetMesh.Invoke(new()\n {\n Name = \"simpleapp\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := appmesh.LookupMesh(ctx, \u0026appmesh.LookupMeshArgs{\n\t\t\tName: \"simpleapp\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appmesh.AppmeshFunctions;\nimport com.pulumi.aws.appmesh.inputs.GetMeshArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var simple = AppmeshFunctions.getMesh(GetMeshArgs.builder()\n .name(\"simpleapp\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n simple:\n fn::invoke:\n Function: aws:appmesh:getMesh\n Arguments:\n name: simpleapp\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst simple = current.then(current =\u003e aws.appmesh.getMesh({\n name: \"simpleapp\",\n meshOwner: current.accountId,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nsimple = aws.appmesh.get_mesh(name=\"simpleapp\",\n mesh_owner=current.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var simple = Aws.AppMesh.GetMesh.Invoke(new()\n {\n Name = \"simpleapp\",\n MeshOwner = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appmesh.LookupMesh(ctx, \u0026appmesh.LookupMeshArgs{\n\t\t\tName: \"simpleapp\",\n\t\t\tMeshOwner: pulumi.StringRef(current.AccountId),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.appmesh.AppmeshFunctions;\nimport com.pulumi.aws.appmesh.inputs.GetMeshArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var simple = AppmeshFunctions.getMesh(GetMeshArgs.builder()\n .name(\"simpleapp\")\n .meshOwner(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n simple:\n fn::invoke:\n Function: aws:appmesh:getMesh\n Arguments:\n name: simpleapp\n meshOwner: ${current.accountId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The App Mesh Mesh data source allows details of an App Mesh Mesh to be retrieved by its name and optionally the mesh_owner.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst simple = aws.appmesh.getMesh({\n name: \"simpleapp\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nsimple = aws.appmesh.get_mesh(name=\"simpleapp\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var simple = Aws.AppMesh.GetMesh.Invoke(new()\n {\n Name = \"simpleapp\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := appmesh.LookupMesh(ctx, \u0026appmesh.LookupMeshArgs{\n\t\t\tName: \"simpleapp\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appmesh.AppmeshFunctions;\nimport com.pulumi.aws.appmesh.inputs.GetMeshArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var simple = AppmeshFunctions.getMesh(GetMeshArgs.builder()\n .name(\"simpleapp\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n simple:\n fn::invoke:\n Function: aws:appmesh:getMesh\n Arguments:\n name: simpleapp\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst simple = current.then(current =\u003e aws.appmesh.getMesh({\n name: \"simpleapp\",\n meshOwner: current.accountId,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nsimple = aws.appmesh.get_mesh(name=\"simpleapp\",\n mesh_owner=current.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var simple = Aws.AppMesh.GetMesh.Invoke(new()\n {\n Name = \"simpleapp\",\n MeshOwner = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appmesh.LookupMesh(ctx, \u0026appmesh.LookupMeshArgs{\n\t\t\tName: \"simpleapp\",\n\t\t\tMeshOwner: pulumi.StringRef(current.AccountId),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.appmesh.AppmeshFunctions;\nimport com.pulumi.aws.appmesh.inputs.GetMeshArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var simple = AppmeshFunctions.getMesh(GetMeshArgs.builder()\n .name(\"simpleapp\")\n .meshOwner(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n simple:\n fn::invoke:\n Function: aws:appmesh:getMesh\n Arguments:\n name: simpleapp\n meshOwner: ${current.accountId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getMesh.\n", "properties": { @@ -377788,7 +377788,7 @@ } }, "aws:appmesh/getVirtualService:getVirtualService": { - "description": "The App Mesh Virtual Service data source allows details of an App Mesh Virtual Service to be retrieved by its name, mesh_name, and optionally the mesh_owner.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.appmesh.getVirtualService({\n name: \"example.mesh.local\",\n meshName: \"example-mesh\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.appmesh.get_virtual_service(name=\"example.mesh.local\",\n mesh_name=\"example-mesh\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.AppMesh.GetVirtualService.Invoke(new()\n {\n Name = \"example.mesh.local\",\n MeshName = \"example-mesh\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := appmesh.LookupVirtualService(ctx, \u0026appmesh.LookupVirtualServiceArgs{\n\t\t\tName: \"example.mesh.local\",\n\t\t\tMeshName: \"example-mesh\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appmesh.AppmeshFunctions;\nimport com.pulumi.aws.appmesh.inputs.GetVirtualServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = AppmeshFunctions.getVirtualService(GetVirtualServiceArgs.builder()\n .name(\"example.mesh.local\")\n .meshName(\"example-mesh\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:appmesh:getVirtualService\n Arguments:\n name: example.mesh.local\n meshName: example-mesh\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst test = current.then(current =\u003e aws.appmesh.getVirtualService({\n name: \"example.mesh.local\",\n meshName: \"example-mesh\",\n meshOwner: current.accountId,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ntest = aws.appmesh.get_virtual_service(name=\"example.mesh.local\",\n mesh_name=\"example-mesh\",\n mesh_owner=current.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var test = Aws.AppMesh.GetVirtualService.Invoke(new()\n {\n Name = \"example.mesh.local\",\n MeshName = \"example-mesh\",\n MeshOwner = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appmesh.LookupVirtualService(ctx, \u0026appmesh.LookupVirtualServiceArgs{\n\t\t\tName: \"example.mesh.local\",\n\t\t\tMeshName: \"example-mesh\",\n\t\t\tMeshOwner: pulumi.StringRef(current.AccountId),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.appmesh.AppmeshFunctions;\nimport com.pulumi.aws.appmesh.inputs.GetVirtualServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var test = AppmeshFunctions.getVirtualService(GetVirtualServiceArgs.builder()\n .name(\"example.mesh.local\")\n .meshName(\"example-mesh\")\n .meshOwner(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n test:\n fn::invoke:\n Function: aws:appmesh:getVirtualService\n Arguments:\n name: example.mesh.local\n meshName: example-mesh\n meshOwner: ${current.accountId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The App Mesh Virtual Service data source allows details of an App Mesh Virtual Service to be retrieved by its name, mesh_name, and optionally the mesh_owner.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.appmesh.getVirtualService({\n name: \"example.mesh.local\",\n meshName: \"example-mesh\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.appmesh.get_virtual_service(name=\"example.mesh.local\",\n mesh_name=\"example-mesh\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.AppMesh.GetVirtualService.Invoke(new()\n {\n Name = \"example.mesh.local\",\n MeshName = \"example-mesh\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := appmesh.LookupVirtualService(ctx, \u0026appmesh.LookupVirtualServiceArgs{\n\t\t\tName: \"example.mesh.local\",\n\t\t\tMeshName: \"example-mesh\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.appmesh.AppmeshFunctions;\nimport com.pulumi.aws.appmesh.inputs.GetVirtualServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = AppmeshFunctions.getVirtualService(GetVirtualServiceArgs.builder()\n .name(\"example.mesh.local\")\n .meshName(\"example-mesh\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:appmesh:getVirtualService\n Arguments:\n name: example.mesh.local\n meshName: example-mesh\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst test = current.then(current =\u003e aws.appmesh.getVirtualService({\n name: \"example.mesh.local\",\n meshName: \"example-mesh\",\n meshOwner: current.accountId,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ntest = aws.appmesh.get_virtual_service(name=\"example.mesh.local\",\n mesh_name=\"example-mesh\",\n mesh_owner=current.account_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var test = Aws.AppMesh.GetVirtualService.Invoke(new()\n {\n Name = \"example.mesh.local\",\n MeshName = \"example-mesh\",\n MeshOwner = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appmesh\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = appmesh.LookupVirtualService(ctx, \u0026appmesh.LookupVirtualServiceArgs{\n\t\t\tName: \"example.mesh.local\",\n\t\t\tMeshName: \"example-mesh\",\n\t\t\tMeshOwner: pulumi.StringRef(current.AccountId),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.appmesh.AppmeshFunctions;\nimport com.pulumi.aws.appmesh.inputs.GetVirtualServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var test = AppmeshFunctions.getVirtualService(GetVirtualServiceArgs.builder()\n .name(\"example.mesh.local\")\n .meshName(\"example-mesh\")\n .meshOwner(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n test:\n fn::invoke:\n Function: aws:appmesh:getVirtualService\n Arguments:\n name: example.mesh.local\n meshName: example-mesh\n meshOwner: ${current.accountId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getVirtualService.\n", "properties": { @@ -377881,7 +377881,7 @@ } }, "aws:apprunner/getHostedZoneId:getHostedZoneId": { - "description": "Use this data source to get the HostedZoneId of an AWS App Runner service deployed\nin a given region for the purpose of using it in an AWS Route53 Alias record.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.apprunner.getHostedZoneId({});\nconst www = new aws.route53.Record(\"www\", {\n zoneId: primary.zoneId,\n name: \"example.com\",\n type: aws.route53.RecordType.A,\n aliases: [{\n name: mainAwsApprunnerCustomDomainAssociation.dnsTarget,\n zoneId: main.then(main =\u003e main.id),\n evaluateTargetHealth: true,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.apprunner.get_hosted_zone_id()\nwww = aws.route53.Record(\"www\",\n zone_id=primary[\"zoneId\"],\n name=\"example.com\",\n type=aws.route53.RecordType.A,\n aliases=[{\n \"name\": main_aws_apprunner_custom_domain_association[\"dnsTarget\"],\n \"zone_id\": main.id,\n \"evaluate_target_health\": True,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.AppRunner.GetHostedZoneId.Invoke();\n\n var www = new Aws.Route53.Record(\"www\", new()\n {\n ZoneId = primary.ZoneId,\n Name = \"example.com\",\n Type = Aws.Route53.RecordType.A,\n Aliases = new[]\n {\n new Aws.Route53.Inputs.RecordAliasArgs\n {\n Name = mainAwsApprunnerCustomDomainAssociation.DnsTarget,\n ZoneId = main.Apply(getHostedZoneIdResult =\u003e getHostedZoneIdResult.Id),\n EvaluateTargetHealth = true,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apprunner\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := apprunner.GetHostedZoneId(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewRecord(ctx, \"www\", \u0026route53.RecordArgs{\n\t\t\tZoneId: pulumi.Any(primary.ZoneId),\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\tType: pulumi.String(route53.RecordTypeA),\n\t\t\tAliases: route53.RecordAliasArray{\n\t\t\t\t\u0026route53.RecordAliasArgs{\n\t\t\t\t\tName: pulumi.Any(mainAwsApprunnerCustomDomainAssociation.DnsTarget),\n\t\t\t\t\tZoneId: pulumi.String(main.Id),\n\t\t\t\t\tEvaluateTargetHealth: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.apprunner.ApprunnerFunctions;\nimport com.pulumi.aws.apprunner.inputs.GetHostedZoneIdArgs;\nimport com.pulumi.aws.route53.Record;\nimport com.pulumi.aws.route53.RecordArgs;\nimport com.pulumi.aws.route53.inputs.RecordAliasArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = ApprunnerFunctions.getHostedZoneId();\n\n var www = new Record(\"www\", RecordArgs.builder()\n .zoneId(primary.zoneId())\n .name(\"example.com\")\n .type(\"A\")\n .aliases(RecordAliasArgs.builder()\n .name(mainAwsApprunnerCustomDomainAssociation.dnsTarget())\n .zoneId(main.applyValue(getHostedZoneIdResult -\u003e getHostedZoneIdResult.id()))\n .evaluateTargetHealth(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n www:\n type: aws:route53:Record\n properties:\n zoneId: ${primary.zoneId}\n name: example.com\n type: A\n aliases:\n - name: ${mainAwsApprunnerCustomDomainAssociation.dnsTarget}\n zoneId: ${main.id}\n evaluateTargetHealth: true\nvariables:\n main:\n fn::invoke:\n Function: aws:apprunner:getHostedZoneId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the HostedZoneId of an AWS App Runner service deployed\nin a given region for the purpose of using it in an AWS Route53 Alias record.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.apprunner.getHostedZoneId({});\nconst www = new aws.route53.Record(\"www\", {\n zoneId: primary.zoneId,\n name: \"example.com\",\n type: aws.route53.RecordType.A,\n aliases: [{\n name: mainAwsApprunnerCustomDomainAssociation.dnsTarget,\n zoneId: main.then(main =\u003e main.id),\n evaluateTargetHealth: true,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.apprunner.get_hosted_zone_id()\nwww = aws.route53.Record(\"www\",\n zone_id=primary[\"zoneId\"],\n name=\"example.com\",\n type=aws.route53.RecordType.A,\n aliases=[{\n \"name\": main_aws_apprunner_custom_domain_association[\"dnsTarget\"],\n \"zone_id\": main.id,\n \"evaluate_target_health\": True,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.AppRunner.GetHostedZoneId.Invoke();\n\n var www = new Aws.Route53.Record(\"www\", new()\n {\n ZoneId = primary.ZoneId,\n Name = \"example.com\",\n Type = Aws.Route53.RecordType.A,\n Aliases = new[]\n {\n new Aws.Route53.Inputs.RecordAliasArgs\n {\n Name = mainAwsApprunnerCustomDomainAssociation.DnsTarget,\n ZoneId = main.Apply(getHostedZoneIdResult =\u003e getHostedZoneIdResult.Id),\n EvaluateTargetHealth = true,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apprunner\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := apprunner.GetHostedZoneId(ctx, \u0026apprunner.GetHostedZoneIdArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewRecord(ctx, \"www\", \u0026route53.RecordArgs{\n\t\t\tZoneId: pulumi.Any(primary.ZoneId),\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\tType: pulumi.String(route53.RecordTypeA),\n\t\t\tAliases: route53.RecordAliasArray{\n\t\t\t\t\u0026route53.RecordAliasArgs{\n\t\t\t\t\tName: pulumi.Any(mainAwsApprunnerCustomDomainAssociation.DnsTarget),\n\t\t\t\t\tZoneId: pulumi.String(main.Id),\n\t\t\t\t\tEvaluateTargetHealth: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.apprunner.ApprunnerFunctions;\nimport com.pulumi.aws.apprunner.inputs.GetHostedZoneIdArgs;\nimport com.pulumi.aws.route53.Record;\nimport com.pulumi.aws.route53.RecordArgs;\nimport com.pulumi.aws.route53.inputs.RecordAliasArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = ApprunnerFunctions.getHostedZoneId();\n\n var www = new Record(\"www\", RecordArgs.builder()\n .zoneId(primary.zoneId())\n .name(\"example.com\")\n .type(\"A\")\n .aliases(RecordAliasArgs.builder()\n .name(mainAwsApprunnerCustomDomainAssociation.dnsTarget())\n .zoneId(main.applyValue(getHostedZoneIdResult -\u003e getHostedZoneIdResult.id()))\n .evaluateTargetHealth(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n www:\n type: aws:route53:Record\n properties:\n zoneId: ${primary.zoneId}\n name: example.com\n type: A\n aliases:\n - name: ${mainAwsApprunnerCustomDomainAssociation.dnsTarget}\n zoneId: ${main.id}\n evaluateTargetHealth: true\nvariables:\n main:\n fn::invoke:\n Function: aws:apprunner:getHostedZoneId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getHostedZoneId.\n", "properties": { @@ -379410,7 +379410,7 @@ } }, "aws:bedrock/getCustomModels:getCustomModels": { - "description": "Returns a list of Amazon Bedrock custom models.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.bedrock.getCustomModels({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bedrock.get_custom_models()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.Bedrock.GetCustomModels.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bedrock.GetCustomModels(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.bedrock.BedrockFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = BedrockFunctions.getCustomModels();\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:bedrock:getCustomModels\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Returns a list of Amazon Bedrock custom models.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.bedrock.getCustomModels({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bedrock.get_custom_models()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.Bedrock.GetCustomModels.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrock\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bedrock.GetCustomModels(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.bedrock.BedrockFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = BedrockFunctions.getCustomModels();\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:bedrock:getCustomModels\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getCustomModels.\n", "properties": { @@ -379433,7 +379433,7 @@ } }, "aws:bedrockfoundation/getModel:getModel": { - "description": "Data source for managing an AWS Bedrock Foundation Model.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.bedrockfoundation.getModels({});\nconst testGetModel = test.then(test =\u003e aws.bedrockfoundation.getModel({\n modelId: test.modelSummaries?.[0]?.modelId,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bedrockfoundation.get_models()\ntest_get_model = aws.bedrockfoundation.get_model(model_id=test.model_summaries[0].model_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.BedrockFoundation.GetModels.Invoke();\n\n var testGetModel = Aws.BedrockFoundation.GetModel.Invoke(new()\n {\n ModelId = test.Apply(getModelsResult =\u003e getModelsResult.ModelSummaries[0]?.ModelId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrockfoundation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttest, err := bedrockfoundation.GetModels(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = bedrockfoundation.GetModel(ctx, \u0026bedrockfoundation.GetModelArgs{\n\t\t\tModelId: test.ModelSummaries[0].ModelId,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.bedrockfoundation.BedrockfoundationFunctions;\nimport com.pulumi.aws.bedrockfoundation.inputs.GetModelsArgs;\nimport com.pulumi.aws.bedrockfoundation.inputs.GetModelArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = BedrockfoundationFunctions.getModels();\n\n final var testGetModel = BedrockfoundationFunctions.getModel(GetModelArgs.builder()\n .modelId(test.applyValue(getModelsResult -\u003e getModelsResult.modelSummaries()[0].modelId()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:bedrockfoundation:getModels\n Arguments: {}\n testGetModel:\n fn::invoke:\n Function: aws:bedrockfoundation:getModel\n Arguments:\n modelId: ${test.modelSummaries[0].modelId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing an AWS Bedrock Foundation Model.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.bedrockfoundation.getModels({});\nconst testGetModel = test.then(test =\u003e aws.bedrockfoundation.getModel({\n modelId: test.modelSummaries?.[0]?.modelId,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bedrockfoundation.get_models()\ntest_get_model = aws.bedrockfoundation.get_model(model_id=test.model_summaries[0].model_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.BedrockFoundation.GetModels.Invoke();\n\n var testGetModel = Aws.BedrockFoundation.GetModel.Invoke(new()\n {\n ModelId = test.Apply(getModelsResult =\u003e getModelsResult.ModelSummaries[0]?.ModelId),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrockfoundation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\ttest, err := bedrockfoundation.GetModels(ctx, \u0026bedrockfoundation.GetModelsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = bedrockfoundation.GetModel(ctx, \u0026bedrockfoundation.GetModelArgs{\n\t\t\tModelId: test.ModelSummaries[0].ModelId,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.bedrockfoundation.BedrockfoundationFunctions;\nimport com.pulumi.aws.bedrockfoundation.inputs.GetModelsArgs;\nimport com.pulumi.aws.bedrockfoundation.inputs.GetModelArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = BedrockfoundationFunctions.getModels();\n\n final var testGetModel = BedrockfoundationFunctions.getModel(GetModelArgs.builder()\n .modelId(test.applyValue(getModelsResult -\u003e getModelsResult.modelSummaries()[0].modelId()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:bedrockfoundation:getModels\n Arguments: {}\n testGetModel:\n fn::invoke:\n Function: aws:bedrockfoundation:getModel\n Arguments:\n modelId: ${test.modelSummaries[0].modelId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getModel.\n", "properties": { @@ -379517,7 +379517,7 @@ } }, "aws:bedrockfoundation/getModels:getModels": { - "description": "Data source for managing AWS Bedrock Foundation Models.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.bedrockfoundation.getModels({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bedrockfoundation.get_models()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.BedrockFoundation.GetModels.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrockfoundation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bedrockfoundation.GetModels(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.bedrockfoundation.BedrockfoundationFunctions;\nimport com.pulumi.aws.bedrockfoundation.inputs.GetModelsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = BedrockfoundationFunctions.getModels();\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:bedrockfoundation:getModels\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Filter by Inference Type\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.bedrockfoundation.getModels({\n byInferenceType: \"ON_DEMAND\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bedrockfoundation.get_models(by_inference_type=\"ON_DEMAND\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.BedrockFoundation.GetModels.Invoke(new()\n {\n ByInferenceType = \"ON_DEMAND\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrockfoundation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bedrockfoundation.GetModels(ctx, \u0026bedrockfoundation.GetModelsArgs{\n\t\t\tByInferenceType: pulumi.StringRef(\"ON_DEMAND\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.bedrockfoundation.BedrockfoundationFunctions;\nimport com.pulumi.aws.bedrockfoundation.inputs.GetModelsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = BedrockfoundationFunctions.getModels(GetModelsArgs.builder()\n .byInferenceType(\"ON_DEMAND\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:bedrockfoundation:getModels\n Arguments:\n byInferenceType: ON_DEMAND\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing AWS Bedrock Foundation Models.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.bedrockfoundation.getModels({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bedrockfoundation.get_models()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.BedrockFoundation.GetModels.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrockfoundation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bedrockfoundation.GetModels(ctx, \u0026bedrockfoundation.GetModelsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.bedrockfoundation.BedrockfoundationFunctions;\nimport com.pulumi.aws.bedrockfoundation.inputs.GetModelsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = BedrockfoundationFunctions.getModels();\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:bedrockfoundation:getModels\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Filter by Inference Type\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.bedrockfoundation.getModels({\n byInferenceType: \"ON_DEMAND\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.bedrockfoundation.get_models(by_inference_type=\"ON_DEMAND\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.BedrockFoundation.GetModels.Invoke(new()\n {\n ByInferenceType = \"ON_DEMAND\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/bedrockfoundation\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := bedrockfoundation.GetModels(ctx, \u0026bedrockfoundation.GetModelsArgs{\n\t\t\tByInferenceType: pulumi.StringRef(\"ON_DEMAND\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.bedrockfoundation.BedrockfoundationFunctions;\nimport com.pulumi.aws.bedrockfoundation.inputs.GetModelsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = BedrockfoundationFunctions.getModels(GetModelsArgs.builder()\n .byInferenceType(\"ON_DEMAND\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:bedrockfoundation:getModels\n Arguments:\n byInferenceType: ON_DEMAND\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getModels.\n", "properties": { @@ -380328,7 +380328,7 @@ } }, "aws:cloudfront/getLogDeliveryCanonicalUserId:getLogDeliveryCanonicalUserId": { - "description": "The CloudFront Log Delivery Canonical User ID data source allows access to the [canonical user ID](http://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html) of the AWS `awslogsdelivery` account for CloudFront bucket logging.\nSee the [Amazon CloudFront Developer Guide](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) for more information.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.cloudfront.getLogDeliveryCanonicalUserId({});\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {bucket: \"example\"});\nconst exampleBucketAclV2 = new aws.s3.BucketAclV2(\"example\", {\n bucket: exampleBucketV2.id,\n accessControlPolicy: {\n grants: [{\n grantee: {\n id: example.then(example =\u003e example.id),\n type: \"CanonicalUser\",\n },\n permission: \"FULL_CONTROL\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudfront.get_log_delivery_canonical_user_id()\nexample_bucket_v2 = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_bucket_acl_v2 = aws.s3.BucketAclV2(\"example\",\n bucket=example_bucket_v2.id,\n access_control_policy={\n \"grants\": [{\n \"grantee\": {\n \"id\": example.id,\n \"type\": \"CanonicalUser\",\n },\n \"permission\": \"FULL_CONTROL\",\n }],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.CloudFront.GetLogDeliveryCanonicalUserId.Invoke();\n\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var exampleBucketAclV2 = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = exampleBucketV2.Id,\n AccessControlPolicy = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyArgs\n {\n Grants = new[]\n {\n new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantArgs\n {\n Grantee = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantGranteeArgs\n {\n Id = example.Apply(getLogDeliveryCanonicalUserIdResult =\u003e getLogDeliveryCanonicalUserIdResult.Id),\n Type = \"CanonicalUser\",\n },\n Permission = \"FULL_CONTROL\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudfront.GetLogDeliveryCanonicalUserId(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: exampleBucketV2.ID(),\n\t\t\tAccessControlPolicy: \u0026s3.BucketAclV2AccessControlPolicyArgs{\n\t\t\t\tGrants: s3.BucketAclV2AccessControlPolicyGrantArray{\n\t\t\t\t\t\u0026s3.BucketAclV2AccessControlPolicyGrantArgs{\n\t\t\t\t\t\tGrantee: \u0026s3.BucketAclV2AccessControlPolicyGrantGranteeArgs{\n\t\t\t\t\t\t\tId: pulumi.String(example.Id),\n\t\t\t\t\t\t\tType: pulumi.String(\"CanonicalUser\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPermission: pulumi.String(\"FULL_CONTROL\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudfront.CloudfrontFunctions;\nimport com.pulumi.aws.cloudfront.inputs.GetLogDeliveryCanonicalUserIdArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.inputs.BucketAclV2AccessControlPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = CloudfrontFunctions.getLogDeliveryCanonicalUserId();\n\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"example\")\n .build());\n\n var exampleBucketAclV2 = new BucketAclV2(\"exampleBucketAclV2\", BucketAclV2Args.builder()\n .bucket(exampleBucketV2.id())\n .accessControlPolicy(BucketAclV2AccessControlPolicyArgs.builder()\n .grants(BucketAclV2AccessControlPolicyGrantArgs.builder()\n .grantee(BucketAclV2AccessControlPolicyGrantGranteeArgs.builder()\n .id(example.applyValue(getLogDeliveryCanonicalUserIdResult -\u003e getLogDeliveryCanonicalUserIdResult.id()))\n .type(\"CanonicalUser\")\n .build())\n .permission(\"FULL_CONTROL\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: example\n exampleBucketAclV2:\n type: aws:s3:BucketAclV2\n name: example\n properties:\n bucket: ${exampleBucketV2.id}\n accessControlPolicy:\n grants:\n - grantee:\n id: ${example.id}\n type: CanonicalUser\n permission: FULL_CONTROL\nvariables:\n example:\n fn::invoke:\n Function: aws:cloudfront:getLogDeliveryCanonicalUserId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The CloudFront Log Delivery Canonical User ID data source allows access to the [canonical user ID](http://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html) of the AWS `awslogsdelivery` account for CloudFront bucket logging.\nSee the [Amazon CloudFront Developer Guide](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) for more information.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.cloudfront.getLogDeliveryCanonicalUserId({});\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {bucket: \"example\"});\nconst exampleBucketAclV2 = new aws.s3.BucketAclV2(\"example\", {\n bucket: exampleBucketV2.id,\n accessControlPolicy: {\n grants: [{\n grantee: {\n id: example.then(example =\u003e example.id),\n type: \"CanonicalUser\",\n },\n permission: \"FULL_CONTROL\",\n }],\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudfront.get_log_delivery_canonical_user_id()\nexample_bucket_v2 = aws.s3.BucketV2(\"example\", bucket=\"example\")\nexample_bucket_acl_v2 = aws.s3.BucketAclV2(\"example\",\n bucket=example_bucket_v2.id,\n access_control_policy={\n \"grants\": [{\n \"grantee\": {\n \"id\": example.id,\n \"type\": \"CanonicalUser\",\n },\n \"permission\": \"FULL_CONTROL\",\n }],\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.CloudFront.GetLogDeliveryCanonicalUserId.Invoke();\n\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"example\",\n });\n\n var exampleBucketAclV2 = new Aws.S3.BucketAclV2(\"example\", new()\n {\n Bucket = exampleBucketV2.Id,\n AccessControlPolicy = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyArgs\n {\n Grants = new[]\n {\n new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantArgs\n {\n Grantee = new Aws.S3.Inputs.BucketAclV2AccessControlPolicyGrantGranteeArgs\n {\n Id = example.Apply(getLogDeliveryCanonicalUserIdResult =\u003e getLogDeliveryCanonicalUserIdResult.Id),\n Type = \"CanonicalUser\",\n },\n Permission = \"FULL_CONTROL\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudfront.GetLogDeliveryCanonicalUserId(ctx, \u0026cloudfront.GetLogDeliveryCanonicalUserIdArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = s3.NewBucketAclV2(ctx, \"example\", \u0026s3.BucketAclV2Args{\n\t\t\tBucket: exampleBucketV2.ID(),\n\t\t\tAccessControlPolicy: \u0026s3.BucketAclV2AccessControlPolicyArgs{\n\t\t\t\tGrants: s3.BucketAclV2AccessControlPolicyGrantArray{\n\t\t\t\t\t\u0026s3.BucketAclV2AccessControlPolicyGrantArgs{\n\t\t\t\t\t\tGrantee: \u0026s3.BucketAclV2AccessControlPolicyGrantGranteeArgs{\n\t\t\t\t\t\t\tId: pulumi.String(example.Id),\n\t\t\t\t\t\t\tType: pulumi.String(\"CanonicalUser\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPermission: pulumi.String(\"FULL_CONTROL\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudfront.CloudfrontFunctions;\nimport com.pulumi.aws.cloudfront.inputs.GetLogDeliveryCanonicalUserIdArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.s3.inputs.BucketAclV2AccessControlPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = CloudfrontFunctions.getLogDeliveryCanonicalUserId();\n\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"example\")\n .build());\n\n var exampleBucketAclV2 = new BucketAclV2(\"exampleBucketAclV2\", BucketAclV2Args.builder()\n .bucket(exampleBucketV2.id())\n .accessControlPolicy(BucketAclV2AccessControlPolicyArgs.builder()\n .grants(BucketAclV2AccessControlPolicyGrantArgs.builder()\n .grantee(BucketAclV2AccessControlPolicyGrantGranteeArgs.builder()\n .id(example.applyValue(getLogDeliveryCanonicalUserIdResult -\u003e getLogDeliveryCanonicalUserIdResult.id()))\n .type(\"CanonicalUser\")\n .build())\n .permission(\"FULL_CONTROL\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: example\n exampleBucketAclV2:\n type: aws:s3:BucketAclV2\n name: example\n properties:\n bucket: ${exampleBucketV2.id}\n accessControlPolicy:\n grants:\n - grantee:\n id: ${example.id}\n type: CanonicalUser\n permission: FULL_CONTROL\nvariables:\n example:\n fn::invoke:\n Function: aws:cloudfront:getLogDeliveryCanonicalUserId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getLogDeliveryCanonicalUserId.\n", "properties": { @@ -380415,7 +380415,7 @@ } }, "aws:cloudfront/getOriginAccessIdentities:getOriginAccessIdentities": { - "description": "Use this data source to get ARNs, ids and S3 canonical user IDs of Amazon CloudFront origin access identities.\n\n## Example Usage\n\n### All origin access identities in the account\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.cloudfront.getOriginAccessIdentities({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudfront.get_origin_access_identities()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.CloudFront.GetOriginAccessIdentities.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudfront.GetOriginAccessIdentities(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudfront.CloudfrontFunctions;\nimport com.pulumi.aws.cloudfront.inputs.GetOriginAccessIdentitiesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = CloudfrontFunctions.getOriginAccessIdentities();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:cloudfront:getOriginAccessIdentities\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Origin access identities filtered by comment/name\n\nOrigin access identities whose comments are `example-comment1`, `example-comment2`\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.cloudfront.getOriginAccessIdentities({\n comments: [\n \"example-comment1\",\n \"example-comment2\",\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudfront.get_origin_access_identities(comments=[\n \"example-comment1\",\n \"example-comment2\",\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.CloudFront.GetOriginAccessIdentities.Invoke(new()\n {\n Comments = new[]\n {\n \"example-comment1\",\n \"example-comment2\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudfront.GetOriginAccessIdentities(ctx, \u0026cloudfront.GetOriginAccessIdentitiesArgs{\n\t\t\tComments: []string{\n\t\t\t\t\"example-comment1\",\n\t\t\t\t\"example-comment2\",\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudfront.CloudfrontFunctions;\nimport com.pulumi.aws.cloudfront.inputs.GetOriginAccessIdentitiesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = CloudfrontFunctions.getOriginAccessIdentities(GetOriginAccessIdentitiesArgs.builder()\n .comments( \n \"example-comment1\",\n \"example-comment2\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:cloudfront:getOriginAccessIdentities\n Arguments:\n comments:\n - example-comment1\n - example-comment2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get ARNs, ids and S3 canonical user IDs of Amazon CloudFront origin access identities.\n\n## Example Usage\n\n### All origin access identities in the account\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.cloudfront.getOriginAccessIdentities({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudfront.get_origin_access_identities()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.CloudFront.GetOriginAccessIdentities.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudfront.GetOriginAccessIdentities(ctx, \u0026cloudfront.GetOriginAccessIdentitiesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudfront.CloudfrontFunctions;\nimport com.pulumi.aws.cloudfront.inputs.GetOriginAccessIdentitiesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = CloudfrontFunctions.getOriginAccessIdentities();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:cloudfront:getOriginAccessIdentities\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Origin access identities filtered by comment/name\n\nOrigin access identities whose comments are `example-comment1`, `example-comment2`\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.cloudfront.getOriginAccessIdentities({\n comments: [\n \"example-comment1\",\n \"example-comment2\",\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudfront.get_origin_access_identities(comments=[\n \"example-comment1\",\n \"example-comment2\",\n])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.CloudFront.GetOriginAccessIdentities.Invoke(new()\n {\n Comments = new[]\n {\n \"example-comment1\",\n \"example-comment2\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cloudfront.GetOriginAccessIdentities(ctx, \u0026cloudfront.GetOriginAccessIdentitiesArgs{\n\t\t\tComments: []string{\n\t\t\t\t\"example-comment1\",\n\t\t\t\t\"example-comment2\",\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudfront.CloudfrontFunctions;\nimport com.pulumi.aws.cloudfront.inputs.GetOriginAccessIdentitiesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = CloudfrontFunctions.getOriginAccessIdentities(GetOriginAccessIdentitiesArgs.builder()\n .comments( \n \"example-comment1\",\n \"example-comment2\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:cloudfront:getOriginAccessIdentities\n Arguments:\n comments:\n - example-comment1\n - example-comment2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getOriginAccessIdentities.\n", "properties": { @@ -380806,7 +380806,7 @@ } }, "aws:cloudtrail/getServiceAccount:getServiceAccount": { - "description": "Use this data source to get the Account ID of the [AWS CloudTrail Service Account](http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html)\nin a given region for the purpose of allowing CloudTrail to store trail data in S3.\n\n\u003e **Note:** AWS documentation [states that](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-s3-bucket-policy-for-cloudtrail.html#troubleshooting-s3-bucket-policy) a [service principal name](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services) should be used instead of an AWS account ID in any relevant IAM policy.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.cloudtrail.getServiceAccount({});\nconst bucket = new aws.s3.BucketV2(\"bucket\", {\n bucket: \"tf-cloudtrail-logging-test-bucket\",\n forceDestroy: true,\n});\nconst allowCloudtrailLogging = pulumi.all([main, bucket.arn, main, bucket.arn]).apply(([main, bucketArn, main1, bucketArn1]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n sid: \"Put bucket policy needed for trails\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main.arn],\n }],\n actions: [\"s3:PutObject\"],\n resources: [`${bucketArn}/*`],\n },\n {\n sid: \"Get bucket policy needed for trails\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main1.arn],\n }],\n actions: [\"s3:GetBucketAcl\"],\n resources: [bucketArn1],\n },\n ],\n}));\nconst allowCloudtrailLoggingBucketPolicy = new aws.s3.BucketPolicy(\"allow_cloudtrail_logging\", {\n bucket: bucket.id,\n policy: allowCloudtrailLogging.apply(allowCloudtrailLogging =\u003e allowCloudtrailLogging.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.cloudtrail.get_service_account()\nbucket = aws.s3.BucketV2(\"bucket\",\n bucket=\"tf-cloudtrail-logging-test-bucket\",\n force_destroy=True)\nallow_cloudtrail_logging = pulumi.Output.all(\n bucketArn=bucket.arn,\n bucketArn1=bucket.arn\n).apply(lambda resolved_outputs: aws.iam.get_policy_document_output(statements=[\n {\n \"sid\": \"Put bucket policy needed for trails\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [f\"{resolved_outputs['bucketArn']}/*\"],\n },\n {\n \"sid\": \"Get bucket policy needed for trails\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:GetBucketAcl\"],\n \"resources\": [resolved_outputs['bucketArn1']],\n },\n]))\n\nallow_cloudtrail_logging_bucket_policy = aws.s3.BucketPolicy(\"allow_cloudtrail_logging\",\n bucket=bucket.id,\n policy=allow_cloudtrail_logging.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.CloudTrail.GetServiceAccount.Invoke();\n\n var bucket = new Aws.S3.BucketV2(\"bucket\", new()\n {\n Bucket = \"tf-cloudtrail-logging-test-bucket\",\n ForceDestroy = true,\n });\n\n var allowCloudtrailLogging = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Put bucket policy needed for trails\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{bucket.Arn}/*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Get bucket policy needed for trails\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:GetBucketAcl\",\n },\n Resources = new[]\n {\n bucket.Arn,\n },\n },\n },\n });\n\n var allowCloudtrailLoggingBucketPolicy = new Aws.S3.BucketPolicy(\"allow_cloudtrail_logging\", new()\n {\n Bucket = bucket.Id,\n Policy = allowCloudtrailLogging.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nmain, err := cloudtrail.GetServiceAccount(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nbucket, err := s3.NewBucketV2(ctx, \"bucket\", \u0026s3.BucketV2Args{\nBucket: pulumi.String(\"tf-cloudtrail-logging-test-bucket\"),\nForceDestroy: pulumi.Bool(true),\n})\nif err != nil {\nreturn err\n}\nallowCloudtrailLogging := pulumi.All(bucket.Arn,bucket.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) {\nbucketArn := _args[0].(string)\nbucketArn1 := _args[1].(string)\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nSid: \"Put bucket policy needed for trails\",\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:PutObject\",\n},\nResources: []string{\nfmt.Sprintf(\"%v/*\", bucketArn),\n},\n},\n{\nSid: \"Get bucket policy needed for trails\",\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:GetBucketAcl\",\n},\nResources: []string{\nbucketArn1,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = s3.NewBucketPolicy(ctx, \"allow_cloudtrail_logging\", \u0026s3.BucketPolicyArgs{\nBucket: bucket.ID(),\nPolicy: pulumi.String(allowCloudtrailLogging.ApplyT(func(allowCloudtrailLogging iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026allowCloudtrailLogging.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudtrail.CloudtrailFunctions;\nimport com.pulumi.aws.cloudtrail.inputs.GetServiceAccountArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = CloudtrailFunctions.getServiceAccount();\n\n var bucket = new BucketV2(\"bucket\", BucketV2Args.builder()\n .bucket(\"tf-cloudtrail-logging-test-bucket\")\n .forceDestroy(true)\n .build());\n\n final var allowCloudtrailLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Put bucket policy needed for trails\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:PutObject\")\n .resources(bucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Get bucket policy needed for trails\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:GetBucketAcl\")\n .resources(bucket.arn())\n .build())\n .build());\n\n var allowCloudtrailLoggingBucketPolicy = new BucketPolicy(\"allowCloudtrailLoggingBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(bucket.id())\n .policy(allowCloudtrailLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(allowCloudtrailLogging -\u003e allowCloudtrailLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bucket:\n type: aws:s3:BucketV2\n properties:\n bucket: tf-cloudtrail-logging-test-bucket\n forceDestroy: true\n allowCloudtrailLoggingBucketPolicy:\n type: aws:s3:BucketPolicy\n name: allow_cloudtrail_logging\n properties:\n bucket: ${bucket.id}\n policy: ${allowCloudtrailLogging.json}\nvariables:\n main:\n fn::invoke:\n Function: aws:cloudtrail:getServiceAccount\n Arguments: {}\n allowCloudtrailLogging:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Put bucket policy needed for trails\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:PutObject\n resources:\n - ${bucket.arn}/*\n - sid: Get bucket policy needed for trails\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:GetBucketAcl\n resources:\n - ${bucket.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the Account ID of the [AWS CloudTrail Service Account](http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html)\nin a given region for the purpose of allowing CloudTrail to store trail data in S3.\n\n\u003e **Note:** AWS documentation [states that](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create-s3-bucket-policy-for-cloudtrail.html#troubleshooting-s3-bucket-policy) a [service principal name](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services) should be used instead of an AWS account ID in any relevant IAM policy.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.cloudtrail.getServiceAccount({});\nconst bucket = new aws.s3.BucketV2(\"bucket\", {\n bucket: \"tf-cloudtrail-logging-test-bucket\",\n forceDestroy: true,\n});\nconst allowCloudtrailLogging = pulumi.all([main, bucket.arn, main, bucket.arn]).apply(([main, bucketArn, main1, bucketArn1]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n sid: \"Put bucket policy needed for trails\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main.arn],\n }],\n actions: [\"s3:PutObject\"],\n resources: [`${bucketArn}/*`],\n },\n {\n sid: \"Get bucket policy needed for trails\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main1.arn],\n }],\n actions: [\"s3:GetBucketAcl\"],\n resources: [bucketArn1],\n },\n ],\n}));\nconst allowCloudtrailLoggingBucketPolicy = new aws.s3.BucketPolicy(\"allow_cloudtrail_logging\", {\n bucket: bucket.id,\n policy: allowCloudtrailLogging.apply(allowCloudtrailLogging =\u003e allowCloudtrailLogging.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.cloudtrail.get_service_account()\nbucket = aws.s3.BucketV2(\"bucket\",\n bucket=\"tf-cloudtrail-logging-test-bucket\",\n force_destroy=True)\nallow_cloudtrail_logging = pulumi.Output.all(\n bucketArn=bucket.arn,\n bucketArn1=bucket.arn\n).apply(lambda resolved_outputs: aws.iam.get_policy_document_output(statements=[\n {\n \"sid\": \"Put bucket policy needed for trails\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [f\"{resolved_outputs['bucketArn']}/*\"],\n },\n {\n \"sid\": \"Get bucket policy needed for trails\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:GetBucketAcl\"],\n \"resources\": [resolved_outputs['bucketArn1']],\n },\n]))\n\nallow_cloudtrail_logging_bucket_policy = aws.s3.BucketPolicy(\"allow_cloudtrail_logging\",\n bucket=bucket.id,\n policy=allow_cloudtrail_logging.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.CloudTrail.GetServiceAccount.Invoke();\n\n var bucket = new Aws.S3.BucketV2(\"bucket\", new()\n {\n Bucket = \"tf-cloudtrail-logging-test-bucket\",\n ForceDestroy = true,\n });\n\n var allowCloudtrailLogging = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Put bucket policy needed for trails\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{bucket.Arn}/*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Get bucket policy needed for trails\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:GetBucketAcl\",\n },\n Resources = new[]\n {\n bucket.Arn,\n },\n },\n },\n });\n\n var allowCloudtrailLoggingBucketPolicy = new Aws.S3.BucketPolicy(\"allow_cloudtrail_logging\", new()\n {\n Bucket = bucket.Id,\n Policy = allowCloudtrailLogging.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudtrail\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nmain, err := cloudtrail.GetServiceAccount(ctx, \u0026cloudtrail.GetServiceAccountArgs{\n}, nil);\nif err != nil {\nreturn err\n}\nbucket, err := s3.NewBucketV2(ctx, \"bucket\", \u0026s3.BucketV2Args{\nBucket: pulumi.String(\"tf-cloudtrail-logging-test-bucket\"),\nForceDestroy: pulumi.Bool(true),\n})\nif err != nil {\nreturn err\n}\nallowCloudtrailLogging := pulumi.All(bucket.Arn,bucket.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) {\nbucketArn := _args[0].(string)\nbucketArn1 := _args[1].(string)\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nSid: \"Put bucket policy needed for trails\",\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:PutObject\",\n},\nResources: []string{\nfmt.Sprintf(\"%v/*\", bucketArn),\n},\n},\n{\nSid: \"Get bucket policy needed for trails\",\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:GetBucketAcl\",\n},\nResources: []string{\nbucketArn1,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = s3.NewBucketPolicy(ctx, \"allow_cloudtrail_logging\", \u0026s3.BucketPolicyArgs{\nBucket: bucket.ID(),\nPolicy: pulumi.String(allowCloudtrailLogging.ApplyT(func(allowCloudtrailLogging iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026allowCloudtrailLogging.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudtrail.CloudtrailFunctions;\nimport com.pulumi.aws.cloudtrail.inputs.GetServiceAccountArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = CloudtrailFunctions.getServiceAccount();\n\n var bucket = new BucketV2(\"bucket\", BucketV2Args.builder()\n .bucket(\"tf-cloudtrail-logging-test-bucket\")\n .forceDestroy(true)\n .build());\n\n final var allowCloudtrailLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Put bucket policy needed for trails\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:PutObject\")\n .resources(bucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Get bucket policy needed for trails\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:GetBucketAcl\")\n .resources(bucket.arn())\n .build())\n .build());\n\n var allowCloudtrailLoggingBucketPolicy = new BucketPolicy(\"allowCloudtrailLoggingBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(bucket.id())\n .policy(allowCloudtrailLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(allowCloudtrailLogging -\u003e allowCloudtrailLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bucket:\n type: aws:s3:BucketV2\n properties:\n bucket: tf-cloudtrail-logging-test-bucket\n forceDestroy: true\n allowCloudtrailLoggingBucketPolicy:\n type: aws:s3:BucketPolicy\n name: allow_cloudtrail_logging\n properties:\n bucket: ${bucket.id}\n policy: ${allowCloudtrailLogging.json}\nvariables:\n main:\n fn::invoke:\n Function: aws:cloudtrail:getServiceAccount\n Arguments: {}\n allowCloudtrailLogging:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Put bucket policy needed for trails\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:PutObject\n resources:\n - ${bucket.arn}/*\n - sid: Get bucket policy needed for trails\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:GetBucketAcl\n resources:\n - ${bucket.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getServiceAccount.\n", "properties": { @@ -380981,7 +380981,7 @@ } }, "aws:cloudwatch/getLogDataProtectionPolicyDocument:getLogDataProtectionPolicyDocument": { - "description": "Generates a CloudWatch Log Group Data Protection Policy document in JSON format for use with the `aws.cloudwatch.LogDataProtectionPolicy` resource.\n\n\u003e For more information about data protection policies, see the [Help protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.cloudwatch.getLogDataProtectionPolicyDocument({\n name: \"Example\",\n statements: [\n {\n sid: \"Audit\",\n dataIdentifiers: [\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n ],\n operation: {\n audit: {\n findingsDestination: {\n cloudwatchLogs: {\n logGroup: audit.name,\n },\n firehose: {\n deliveryStream: auditAwsKinesisFirehoseDeliveryStream.name,\n },\n s3: {\n bucket: auditAwsS3Bucket.bucket,\n },\n },\n },\n },\n },\n {\n sid: \"Deidentify\",\n dataIdentifiers: [\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n ],\n operation: {\n deidentify: {\n maskConfig: {},\n },\n },\n },\n ],\n});\nconst exampleLogDataProtectionPolicy = new aws.cloudwatch.LogDataProtectionPolicy(\"example\", {\n logGroupName: exampleAwsCloudwatchLogGroup.name,\n policyDocument: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.get_log_data_protection_policy_document(name=\"Example\",\n statements=[\n {\n \"sid\": \"Audit\",\n \"data_identifiers\": [\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n ],\n \"operation\": {\n \"audit\": {\n \"findings_destination\": {\n \"cloudwatch_logs\": {\n \"log_group\": audit[\"name\"],\n },\n \"firehose\": {\n \"delivery_stream\": audit_aws_kinesis_firehose_delivery_stream[\"name\"],\n },\n \"s3\": {\n \"bucket\": audit_aws_s3_bucket[\"bucket\"],\n },\n },\n },\n },\n },\n {\n \"sid\": \"Deidentify\",\n \"data_identifiers\": [\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n ],\n \"operation\": {\n \"deidentify\": {\n \"mask_config\": {},\n },\n },\n },\n ])\nexample_log_data_protection_policy = aws.cloudwatch.LogDataProtectionPolicy(\"example\",\n log_group_name=example_aws_cloudwatch_log_group[\"name\"],\n policy_document=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.CloudWatch.GetLogDataProtectionPolicyDocument.Invoke(new()\n {\n Name = \"Example\",\n Statements = new[]\n {\n new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementInputArgs\n {\n Sid = \"Audit\",\n DataIdentifiers = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n },\n Operation = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationInputArgs\n {\n Audit = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditInputArgs\n {\n FindingsDestination = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationInputArgs\n {\n CloudwatchLogs = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationCloudwatchLogsInputArgs\n {\n LogGroup = audit.Name,\n },\n Firehose = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationFirehoseInputArgs\n {\n DeliveryStream = auditAwsKinesisFirehoseDeliveryStream.Name,\n },\n S3 = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationS3InputArgs\n {\n Bucket = auditAwsS3Bucket.Bucket,\n },\n },\n },\n },\n },\n new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementInputArgs\n {\n Sid = \"Deidentify\",\n DataIdentifiers = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n },\n Operation = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationInputArgs\n {\n Deidentify = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationDeidentifyInputArgs\n {\n MaskConfig = null,\n },\n },\n },\n },\n });\n\n var exampleLogDataProtectionPolicy = new Aws.CloudWatch.LogDataProtectionPolicy(\"example\", new()\n {\n LogGroupName = exampleAwsCloudwatchLogGroup.Name,\n PolicyDocument = example.Apply(getLogDataProtectionPolicyDocumentResult =\u003e getLogDataProtectionPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudwatch.GetLogDataProtectionPolicyDocument(ctx, \u0026cloudwatch.GetLogDataProtectionPolicyDocumentArgs{\n\t\t\tName: \"Example\",\n\t\t\tStatements: []cloudwatch.GetLogDataProtectionPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Audit\"),\n\t\t\t\t\tDataIdentifiers: []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n\t\t\t\t\t},\n\t\t\t\t\tOperation: {\n\t\t\t\t\t\tAudit: {\n\t\t\t\t\t\t\tFindingsDestination: {\n\t\t\t\t\t\t\t\tCloudwatchLogs: {\n\t\t\t\t\t\t\t\t\tLogGroup: audit.Name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tFirehose: {\n\t\t\t\t\t\t\t\t\tDeliveryStream: auditAwsKinesisFirehoseDeliveryStream.Name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tS3: {\n\t\t\t\t\t\t\t\t\tBucket: auditAwsS3Bucket.Bucket,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Deidentify\"),\n\t\t\t\t\tDataIdentifiers: []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n\t\t\t\t\t},\n\t\t\t\t\tOperation: {\n\t\t\t\t\t\tDeidentify: {\n\t\t\t\t\t\t\tMaskConfig: nil,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewLogDataProtectionPolicy(ctx, \"example\", \u0026cloudwatch.LogDataProtectionPolicyArgs{\n\t\t\tLogGroupName: pulumi.Any(exampleAwsCloudwatchLogGroup.Name),\n\t\t\tPolicyDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.CloudwatchFunctions;\nimport com.pulumi.aws.cloudwatch.inputs.GetLogDataProtectionPolicyDocumentArgs;\nimport com.pulumi.aws.cloudwatch.LogDataProtectionPolicy;\nimport com.pulumi.aws.cloudwatch.LogDataProtectionPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = CloudwatchFunctions.getLogDataProtectionPolicyDocument(GetLogDataProtectionPolicyDocumentArgs.builder()\n .name(\"Example\")\n .statements( \n GetLogDataProtectionPolicyDocumentStatementArgs.builder()\n .sid(\"Audit\")\n .dataIdentifiers( \n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\")\n .operation(GetLogDataProtectionPolicyDocumentStatementOperationArgs.builder()\n .audit(GetLogDataProtectionPolicyDocumentStatementOperationAuditArgs.builder()\n .findingsDestination(GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationArgs.builder()\n .cloudwatchLogs(GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationCloudwatchLogsArgs.builder()\n .logGroup(audit.name())\n .build())\n .firehose(GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationFirehoseArgs.builder()\n .deliveryStream(auditAwsKinesisFirehoseDeliveryStream.name())\n .build())\n .s3(GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationS3Args.builder()\n .bucket(auditAwsS3Bucket.bucket())\n .build())\n .build())\n .build())\n .build())\n .build(),\n GetLogDataProtectionPolicyDocumentStatementArgs.builder()\n .sid(\"Deidentify\")\n .dataIdentifiers( \n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\")\n .operation(GetLogDataProtectionPolicyDocumentStatementOperationArgs.builder()\n .deidentify(GetLogDataProtectionPolicyDocumentStatementOperationDeidentifyArgs.builder()\n .maskConfig()\n .build())\n .build())\n .build())\n .build());\n\n var exampleLogDataProtectionPolicy = new LogDataProtectionPolicy(\"exampleLogDataProtectionPolicy\", LogDataProtectionPolicyArgs.builder()\n .logGroupName(exampleAwsCloudwatchLogGroup.name())\n .policyDocument(example.applyValue(getLogDataProtectionPolicyDocumentResult -\u003e getLogDataProtectionPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleLogDataProtectionPolicy:\n type: aws:cloudwatch:LogDataProtectionPolicy\n name: example\n properties:\n logGroupName: ${exampleAwsCloudwatchLogGroup.name}\n policyDocument: ${example.json}\nvariables:\n example:\n fn::invoke:\n Function: aws:cloudwatch:getLogDataProtectionPolicyDocument\n Arguments:\n name: Example\n statements:\n - sid: Audit\n dataIdentifiers:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n - arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\n operation:\n audit:\n findingsDestination:\n cloudwatchLogs:\n logGroup: ${audit.name}\n firehose:\n deliveryStream: ${auditAwsKinesisFirehoseDeliveryStream.name}\n s3:\n bucket: ${auditAwsS3Bucket.bucket}\n - sid: Deidentify\n dataIdentifiers:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n - arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\n operation:\n deidentify:\n maskConfig: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Generates a CloudWatch Log Group Data Protection Policy document in JSON format for use with the `aws.cloudwatch.LogDataProtectionPolicy` resource.\n\n\u003e For more information about data protection policies, see the [Help protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.cloudwatch.getLogDataProtectionPolicyDocument({\n name: \"Example\",\n statements: [\n {\n sid: \"Audit\",\n dataIdentifiers: [\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n ],\n operation: {\n audit: {\n findingsDestination: {\n cloudwatchLogs: {\n logGroup: audit.name,\n },\n firehose: {\n deliveryStream: auditAwsKinesisFirehoseDeliveryStream.name,\n },\n s3: {\n bucket: auditAwsS3Bucket.bucket,\n },\n },\n },\n },\n },\n {\n sid: \"Deidentify\",\n dataIdentifiers: [\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n ],\n operation: {\n deidentify: {\n maskConfig: {},\n },\n },\n },\n ],\n});\nconst exampleLogDataProtectionPolicy = new aws.cloudwatch.LogDataProtectionPolicy(\"example\", {\n logGroupName: exampleAwsCloudwatchLogGroup.name,\n policyDocument: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.cloudwatch.get_log_data_protection_policy_document(name=\"Example\",\n statements=[\n {\n \"sid\": \"Audit\",\n \"data_identifiers\": [\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n ],\n \"operation\": {\n \"audit\": {\n \"findings_destination\": {\n \"cloudwatch_logs\": {\n \"log_group\": audit[\"name\"],\n },\n \"firehose\": {\n \"delivery_stream\": audit_aws_kinesis_firehose_delivery_stream[\"name\"],\n },\n \"s3\": {\n \"bucket\": audit_aws_s3_bucket[\"bucket\"],\n },\n },\n },\n },\n },\n {\n \"sid\": \"Deidentify\",\n \"data_identifiers\": [\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n ],\n \"operation\": {\n \"deidentify\": {\n \"mask_config\": {},\n },\n },\n },\n ])\nexample_log_data_protection_policy = aws.cloudwatch.LogDataProtectionPolicy(\"example\",\n log_group_name=example_aws_cloudwatch_log_group[\"name\"],\n policy_document=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.CloudWatch.GetLogDataProtectionPolicyDocument.Invoke(new()\n {\n Name = \"Example\",\n Statements = new[]\n {\n new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementInputArgs\n {\n Sid = \"Audit\",\n DataIdentifiers = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n },\n Operation = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationInputArgs\n {\n Audit = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditInputArgs\n {\n FindingsDestination = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationInputArgs\n {\n CloudwatchLogs = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationCloudwatchLogsInputArgs\n {\n LogGroup = audit.Name,\n },\n Firehose = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationFirehoseInputArgs\n {\n DeliveryStream = auditAwsKinesisFirehoseDeliveryStream.Name,\n },\n S3 = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationS3InputArgs\n {\n Bucket = auditAwsS3Bucket.Bucket,\n },\n },\n },\n },\n },\n new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementInputArgs\n {\n Sid = \"Deidentify\",\n DataIdentifiers = new[]\n {\n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n },\n Operation = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationInputArgs\n {\n Deidentify = new Aws.CloudWatch.Inputs.GetLogDataProtectionPolicyDocumentStatementOperationDeidentifyInputArgs\n {\n MaskConfig = null,\n },\n },\n },\n },\n });\n\n var exampleLogDataProtectionPolicy = new Aws.CloudWatch.LogDataProtectionPolicy(\"example\", new()\n {\n LogGroupName = exampleAwsCloudwatchLogGroup.Name,\n PolicyDocument = example.Apply(getLogDataProtectionPolicyDocumentResult =\u003e getLogDataProtectionPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := cloudwatch.GetLogDataProtectionPolicyDocument(ctx, \u0026cloudwatch.GetLogDataProtectionPolicyDocumentArgs{\n\t\t\tName: \"Example\",\n\t\t\tStatements: []cloudwatch.GetLogDataProtectionPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Audit\"),\n\t\t\t\t\tDataIdentifiers: []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n\t\t\t\t\t},\n\t\t\t\t\tOperation: {\n\t\t\t\t\t\tAudit: {\n\t\t\t\t\t\t\tFindingsDestination: {\n\t\t\t\t\t\t\t\tCloudwatchLogs: {\n\t\t\t\t\t\t\t\t\tLogGroup: audit.Name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tFirehose: {\n\t\t\t\t\t\t\t\t\tDeliveryStream: auditAwsKinesisFirehoseDeliveryStream.Name,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tS3: {\n\t\t\t\t\t\t\t\t\tBucket: auditAwsS3Bucket.Bucket,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"Deidentify\"),\n\t\t\t\t\tDataIdentifiers: []string{\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n\t\t\t\t\t\t\"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\",\n\t\t\t\t\t},\n\t\t\t\t\tOperation: {\n\t\t\t\t\t\tDeidentify: {\n\t\t\t\t\t\t\tMaskConfig: {},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cloudwatch.NewLogDataProtectionPolicy(ctx, \"example\", \u0026cloudwatch.LogDataProtectionPolicyArgs{\n\t\t\tLogGroupName: pulumi.Any(exampleAwsCloudwatchLogGroup.Name),\n\t\t\tPolicyDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.cloudwatch.CloudwatchFunctions;\nimport com.pulumi.aws.cloudwatch.inputs.GetLogDataProtectionPolicyDocumentArgs;\nimport com.pulumi.aws.cloudwatch.LogDataProtectionPolicy;\nimport com.pulumi.aws.cloudwatch.LogDataProtectionPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = CloudwatchFunctions.getLogDataProtectionPolicyDocument(GetLogDataProtectionPolicyDocumentArgs.builder()\n .name(\"Example\")\n .statements( \n GetLogDataProtectionPolicyDocumentStatementArgs.builder()\n .sid(\"Audit\")\n .dataIdentifiers( \n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\")\n .operation(GetLogDataProtectionPolicyDocumentStatementOperationArgs.builder()\n .audit(GetLogDataProtectionPolicyDocumentStatementOperationAuditArgs.builder()\n .findingsDestination(GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationArgs.builder()\n .cloudwatchLogs(GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationCloudwatchLogsArgs.builder()\n .logGroup(audit.name())\n .build())\n .firehose(GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationFirehoseArgs.builder()\n .deliveryStream(auditAwsKinesisFirehoseDeliveryStream.name())\n .build())\n .s3(GetLogDataProtectionPolicyDocumentStatementOperationAuditFindingsDestinationS3Args.builder()\n .bucket(auditAwsS3Bucket.bucket())\n .build())\n .build())\n .build())\n .build())\n .build(),\n GetLogDataProtectionPolicyDocumentStatementArgs.builder()\n .sid(\"Deidentify\")\n .dataIdentifiers( \n \"arn:aws:dataprotection::aws:data-identifier/EmailAddress\",\n \"arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\")\n .operation(GetLogDataProtectionPolicyDocumentStatementOperationArgs.builder()\n .deidentify(GetLogDataProtectionPolicyDocumentStatementOperationDeidentifyArgs.builder()\n .maskConfig()\n .build())\n .build())\n .build())\n .build());\n\n var exampleLogDataProtectionPolicy = new LogDataProtectionPolicy(\"exampleLogDataProtectionPolicy\", LogDataProtectionPolicyArgs.builder()\n .logGroupName(exampleAwsCloudwatchLogGroup.name())\n .policyDocument(example.applyValue(getLogDataProtectionPolicyDocumentResult -\u003e getLogDataProtectionPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleLogDataProtectionPolicy:\n type: aws:cloudwatch:LogDataProtectionPolicy\n name: example\n properties:\n logGroupName: ${exampleAwsCloudwatchLogGroup.name}\n policyDocument: ${example.json}\nvariables:\n example:\n fn::invoke:\n Function: aws:cloudwatch:getLogDataProtectionPolicyDocument\n Arguments:\n name: Example\n statements:\n - sid: Audit\n dataIdentifiers:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n - arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\n operation:\n audit:\n findingsDestination:\n cloudwatchLogs:\n logGroup: ${audit.name}\n firehose:\n deliveryStream: ${auditAwsKinesisFirehoseDeliveryStream.name}\n s3:\n bucket: ${auditAwsS3Bucket.bucket}\n - sid: Deidentify\n dataIdentifiers:\n - arn:aws:dataprotection::aws:data-identifier/EmailAddress\n - arn:aws:dataprotection::aws:data-identifier/DriversLicense-US\n operation:\n deidentify:\n maskConfig: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getLogDataProtectionPolicyDocument.\n", "properties": { @@ -384551,7 +384551,7 @@ } }, "aws:directconnect/getLocations:getLocations": { - "description": "Retrieve information about the AWS Direct Connect locations in the current AWS Region.\nThese are the locations that can be specified when configuring `aws.directconnect.Connection` or `aws.directconnect.LinkAggregationGroup` resources.\n\n\u003e **Note:** This data source is different from the `aws.directconnect.getLocation` data source which retrieves information about a specific AWS Direct Connect location in the current AWS Region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst available = aws.directconnect.getLocations({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\navailable = aws.directconnect.get_locations()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var available = Aws.DirectConnect.GetLocations.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := directconnect.GetLocations(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.directconnect.DirectconnectFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var available = DirectconnectFunctions.getLocations();\n\n }\n}\n```\n```yaml\nvariables:\n available:\n fn::invoke:\n Function: aws:directconnect:getLocations\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Retrieve information about the AWS Direct Connect locations in the current AWS Region.\nThese are the locations that can be specified when configuring `aws.directconnect.Connection` or `aws.directconnect.LinkAggregationGroup` resources.\n\n\u003e **Note:** This data source is different from the `aws.directconnect.getLocation` data source which retrieves information about a specific AWS Direct Connect location in the current AWS Region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst available = aws.directconnect.getLocations({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\navailable = aws.directconnect.get_locations()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var available = Aws.DirectConnect.GetLocations.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := directconnect.GetLocations(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.directconnect.DirectconnectFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var available = DirectconnectFunctions.getLocations();\n\n }\n}\n```\n```yaml\nvariables:\n available:\n fn::invoke:\n Function: aws:directconnect:getLocations\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getLocations.\n", "properties": { @@ -385693,7 +385693,7 @@ } }, "aws:ebs/getDefaultKmsKey:getDefaultKmsKey": { - "description": "Use this data source to get the default EBS encryption KMS key in the current region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.ebs.getDefaultKmsKey({});\nconst example = new aws.ebs.Volume(\"example\", {\n availabilityZone: \"us-west-2a\",\n encrypted: true,\n kmsKeyId: current.then(current =\u003e current.keyArn),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.ebs.get_default_kms_key()\nexample = aws.ebs.Volume(\"example\",\n availability_zone=\"us-west-2a\",\n encrypted=True,\n kms_key_id=current.key_arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Ebs.GetDefaultKmsKey.Invoke();\n\n var example = new Aws.Ebs.Volume(\"example\", new()\n {\n AvailabilityZone = \"us-west-2a\",\n Encrypted = true,\n KmsKeyId = current.Apply(getDefaultKmsKeyResult =\u003e getDefaultKmsKeyResult.KeyArn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ebs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := ebs.LookupDefaultKmsKey(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ebs.NewVolume(ctx, \"example\", \u0026ebs.VolumeArgs{\n\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\n\t\t\tEncrypted: pulumi.Bool(true),\n\t\t\tKmsKeyId: pulumi.String(current.KeyArn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ebs.EbsFunctions;\nimport com.pulumi.aws.ebs.Volume;\nimport com.pulumi.aws.ebs.VolumeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = EbsFunctions.getDefaultKmsKey();\n\n var example = new Volume(\"example\", VolumeArgs.builder()\n .availabilityZone(\"us-west-2a\")\n .encrypted(true)\n .kmsKeyId(current.applyValue(getDefaultKmsKeyResult -\u003e getDefaultKmsKeyResult.keyArn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ebs:Volume\n properties:\n availabilityZone: us-west-2a\n encrypted: true\n kmsKeyId: ${current.keyArn}\nvariables:\n current:\n fn::invoke:\n Function: aws:ebs:getDefaultKmsKey\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the default EBS encryption KMS key in the current region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.ebs.getDefaultKmsKey({});\nconst example = new aws.ebs.Volume(\"example\", {\n availabilityZone: \"us-west-2a\",\n encrypted: true,\n kmsKeyId: current.then(current =\u003e current.keyArn),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.ebs.get_default_kms_key()\nexample = aws.ebs.Volume(\"example\",\n availability_zone=\"us-west-2a\",\n encrypted=True,\n kms_key_id=current.key_arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Ebs.GetDefaultKmsKey.Invoke();\n\n var example = new Aws.Ebs.Volume(\"example\", new()\n {\n AvailabilityZone = \"us-west-2a\",\n Encrypted = true,\n KmsKeyId = current.Apply(getDefaultKmsKeyResult =\u003e getDefaultKmsKeyResult.KeyArn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ebs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := ebs.LookupDefaultKmsKey(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ebs.NewVolume(ctx, \"example\", \u0026ebs.VolumeArgs{\n\t\t\tAvailabilityZone: pulumi.String(\"us-west-2a\"),\n\t\t\tEncrypted: pulumi.Bool(true),\n\t\t\tKmsKeyId: pulumi.String(current.KeyArn),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ebs.EbsFunctions;\nimport com.pulumi.aws.ebs.Volume;\nimport com.pulumi.aws.ebs.VolumeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = EbsFunctions.getDefaultKmsKey();\n\n var example = new Volume(\"example\", VolumeArgs.builder()\n .availabilityZone(\"us-west-2a\")\n .encrypted(true)\n .kmsKeyId(current.applyValue(getDefaultKmsKeyResult -\u003e getDefaultKmsKeyResult.keyArn()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:ebs:Volume\n properties:\n availabilityZone: us-west-2a\n encrypted: true\n kmsKeyId: ${current.keyArn}\nvariables:\n current:\n fn::invoke:\n Function: aws:ebs:getDefaultKmsKey\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getDefaultKmsKey.\n", "properties": { @@ -385770,7 +385770,7 @@ } }, "aws:ebs/getEncryptionByDefault:getEncryptionByDefault": { - "description": "Provides a way to check whether default EBS encryption is enabled for your AWS account in the current AWS region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.ebs.getEncryptionByDefault({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.ebs.get_encryption_by_default()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Ebs.GetEncryptionByDefault.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ebs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ebs.LookupEncryptionByDefault(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ebs.EbsFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = EbsFunctions.getEncryptionByDefault();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:ebs:getEncryptionByDefault\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides a way to check whether default EBS encryption is enabled for your AWS account in the current AWS region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.ebs.getEncryptionByDefault({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.ebs.get_encryption_by_default()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Ebs.GetEncryptionByDefault.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ebs\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ebs.LookupEncryptionByDefault(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ebs.EbsFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = EbsFunctions.getEncryptionByDefault();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:ebs:getEncryptionByDefault\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getEncryptionByDefault.\n", "properties": { @@ -388779,7 +388779,7 @@ } }, "aws:ec2/getLocalGatewayRouteTables:getLocalGatewayRouteTables": { - "description": "Provides information for multiple EC2 Local Gateway Route Tables, such as their identifiers.\n\n## Example Usage\n\nThe following shows outputting all Local Gateway Route Table Ids.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const foo = await aws.ec2.getLocalGatewayRouteTables({});\n return {\n foo: foo.ids,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.get_local_gateway_route_tables()\npulumi.export(\"foo\", foo.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foo = Aws.Ec2.GetLocalGatewayRouteTables.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"foo\"] = foo.Apply(getLocalGatewayRouteTablesResult =\u003e getLocalGatewayRouteTablesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tfoo, err := ec2.GetLocalGatewayRouteTables(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"foo\", foo.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetLocalGatewayRouteTablesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var foo = Ec2Functions.getLocalGatewayRouteTables();\n\n ctx.export(\"foo\", foo.applyValue(getLocalGatewayRouteTablesResult -\u003e getLocalGatewayRouteTablesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n foo:\n fn::invoke:\n Function: aws:ec2:getLocalGatewayRouteTables\n Arguments: {}\noutputs:\n foo: ${foo.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides information for multiple EC2 Local Gateway Route Tables, such as their identifiers.\n\n## Example Usage\n\nThe following shows outputting all Local Gateway Route Table Ids.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const foo = await aws.ec2.getLocalGatewayRouteTables({});\n return {\n foo: foo.ids,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfoo = aws.ec2.get_local_gateway_route_tables()\npulumi.export(\"foo\", foo.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foo = Aws.Ec2.GetLocalGatewayRouteTables.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"foo\"] = foo.Apply(getLocalGatewayRouteTablesResult =\u003e getLocalGatewayRouteTablesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tfoo, err := ec2.GetLocalGatewayRouteTables(ctx, \u0026ec2.GetLocalGatewayRouteTablesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"foo\", foo.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetLocalGatewayRouteTablesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var foo = Ec2Functions.getLocalGatewayRouteTables();\n\n ctx.export(\"foo\", foo.applyValue(getLocalGatewayRouteTablesResult -\u003e getLocalGatewayRouteTablesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n foo:\n fn::invoke:\n Function: aws:ec2:getLocalGatewayRouteTables\n Arguments: {}\noutputs:\n foo: ${foo.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getLocalGatewayRouteTables.\n", "properties": { @@ -388993,7 +388993,7 @@ } }, "aws:ec2/getLocalGatewayVirtualInterfaceGroups:getLocalGatewayVirtualInterfaceGroups": { - "description": "Provides details about multiple EC2 Local Gateway Virtual Interface Groups, such as identifiers. More information can be found in the [Outposts User Guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#routing).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst all = aws.ec2.getLocalGatewayVirtualInterfaceGroups({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nall = aws.ec2.get_local_gateway_virtual_interface_groups()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var all = Aws.Ec2.GetLocalGatewayVirtualInterfaceGroups.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.GetLocalGatewayVirtualInterfaceGroups(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetLocalGatewayVirtualInterfaceGroupsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var all = Ec2Functions.getLocalGatewayVirtualInterfaceGroups();\n\n }\n}\n```\n```yaml\nvariables:\n all:\n fn::invoke:\n Function: aws:ec2:getLocalGatewayVirtualInterfaceGroups\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides details about multiple EC2 Local Gateway Virtual Interface Groups, such as identifiers. More information can be found in the [Outposts User Guide](https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#routing).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst all = aws.ec2.getLocalGatewayVirtualInterfaceGroups({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nall = aws.ec2.get_local_gateway_virtual_interface_groups()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var all = Aws.Ec2.GetLocalGatewayVirtualInterfaceGroups.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.GetLocalGatewayVirtualInterfaceGroups(ctx, \u0026ec2.GetLocalGatewayVirtualInterfaceGroupsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetLocalGatewayVirtualInterfaceGroupsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var all = Ec2Functions.getLocalGatewayVirtualInterfaceGroups();\n\n }\n}\n```\n```yaml\nvariables:\n all:\n fn::invoke:\n Function: aws:ec2:getLocalGatewayVirtualInterfaceGroups\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getLocalGatewayVirtualInterfaceGroups.\n", "properties": { @@ -389114,7 +389114,7 @@ } }, "aws:ec2/getManagedPrefixList:getManagedPrefixList": { - "description": "`aws.ec2.ManagedPrefixList` provides details about a specific AWS prefix list or\ncustomer-managed prefix list in the current region.\n\n## Example Usage\n\n### Find the regional DynamoDB prefix list\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = current.then(current =\u003e aws.ec2.getManagedPrefixList({\n name: `com.amazonaws.${current.name}.dynamodb`,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.get_managed_prefix_list(name=f\"com.amazonaws.{current.name}.dynamodb\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = Aws.Ec2.GetManagedPrefixList.Invoke(new()\n {\n Name = $\"com.amazonaws.{current.Apply(getRegionResult =\u003e getRegionResult.Name)}.dynamodb\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.LookupManagedPrefixList(ctx, \u0026ec2.LookupManagedPrefixListArgs{\n\t\t\tName: pulumi.StringRef(fmt.Sprintf(\"com.amazonaws.%v.dynamodb\", current.Name)),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetManagedPrefixListArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var example = Ec2Functions.getManagedPrefixList(GetManagedPrefixListArgs.builder()\n .name(String.format(\"com.amazonaws.%s.dynamodb\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:ec2:getManagedPrefixList\n Arguments:\n name: com.amazonaws.${current.name}.dynamodb\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Find a managed prefix list using filters\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ec2.getManagedPrefixList({\n filters: [{\n name: \"prefix-list-name\",\n values: [\"my-prefix-list\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_managed_prefix_list(filters=[{\n \"name\": \"prefix-list-name\",\n \"values\": [\"my-prefix-list\"],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetManagedPrefixList.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetManagedPrefixListFilterInputArgs\n {\n Name = \"prefix-list-name\",\n Values = new[]\n {\n \"my-prefix-list\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.LookupManagedPrefixList(ctx, \u0026ec2.LookupManagedPrefixListArgs{\n\t\t\tFilters: []ec2.GetManagedPrefixListFilter{\n\t\t\t\t{\n\t\t\t\t\tName: \"prefix-list-name\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\"my-prefix-list\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetManagedPrefixListArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getManagedPrefixList(GetManagedPrefixListArgs.builder()\n .filters(GetManagedPrefixListFilterArgs.builder()\n .name(\"prefix-list-name\")\n .values(\"my-prefix-list\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getManagedPrefixList\n Arguments:\n filters:\n - name: prefix-list-name\n values:\n - my-prefix-list\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "`aws.ec2.ManagedPrefixList` provides details about a specific AWS prefix list or\ncustomer-managed prefix list in the current region.\n\n## Example Usage\n\n### Find the regional DynamoDB prefix list\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = current.then(current =\u003e aws.ec2.getManagedPrefixList({\n name: `com.amazonaws.${current.name}.dynamodb`,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.ec2.get_managed_prefix_list(name=f\"com.amazonaws.{current.name}.dynamodb\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = Aws.Ec2.GetManagedPrefixList.Invoke(new()\n {\n Name = $\"com.amazonaws.{current.Apply(getRegionResult =\u003e getRegionResult.Name)}.dynamodb\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.LookupManagedPrefixList(ctx, \u0026ec2.LookupManagedPrefixListArgs{\n\t\t\tName: pulumi.StringRef(fmt.Sprintf(\"com.amazonaws.%v.dynamodb\", current.Name)),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetManagedPrefixListArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var example = Ec2Functions.getManagedPrefixList(GetManagedPrefixListArgs.builder()\n .name(String.format(\"com.amazonaws.%s.dynamodb\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:ec2:getManagedPrefixList\n Arguments:\n name: com.amazonaws.${current.name}.dynamodb\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Find a managed prefix list using filters\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ec2.getManagedPrefixList({\n filters: [{\n name: \"prefix-list-name\",\n values: [\"my-prefix-list\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_managed_prefix_list(filters=[{\n \"name\": \"prefix-list-name\",\n \"values\": [\"my-prefix-list\"],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetManagedPrefixList.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetManagedPrefixListFilterInputArgs\n {\n Name = \"prefix-list-name\",\n Values = new[]\n {\n \"my-prefix-list\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.LookupManagedPrefixList(ctx, \u0026ec2.LookupManagedPrefixListArgs{\n\t\t\tFilters: []ec2.GetManagedPrefixListFilter{\n\t\t\t\t{\n\t\t\t\t\tName: \"prefix-list-name\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\"my-prefix-list\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetManagedPrefixListArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getManagedPrefixList(GetManagedPrefixListArgs.builder()\n .filters(GetManagedPrefixListFilterArgs.builder()\n .name(\"prefix-list-name\")\n .values(\"my-prefix-list\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getManagedPrefixList\n Arguments:\n filters:\n - name: prefix-list-name\n values:\n - my-prefix-list\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getManagedPrefixList.\n", "properties": { @@ -389907,7 +389907,7 @@ } }, "aws:ec2/getNetworkInterfaces:getNetworkInterfaces": { - "description": "## Example Usage\n\nThe following shows outputting all network interface ids in a region.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.ec2.getNetworkInterfaces({});\n return {\n example: example.ids,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_network_interfaces()\npulumi.export(\"example\", example.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetNetworkInterfaces.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getNetworkInterfacesResult =\u003e getNetworkInterfacesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ec2.GetNetworkInterfaces(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", example.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetNetworkInterfacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getNetworkInterfaces();\n\n ctx.export(\"example\", example.applyValue(getNetworkInterfacesResult -\u003e getNetworkInterfacesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getNetworkInterfaces\n Arguments: {}\noutputs:\n example: ${example.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example retrieves a list of all network interface ids with a custom tag of `Name` set to a value of `test`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ec2.getNetworkInterfaces({\n tags: {\n Name: \"test\",\n },\n});\nexport const example1 = example.then(example =\u003e example.ids);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_network_interfaces(tags={\n \"Name\": \"test\",\n})\npulumi.export(\"example1\", example.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetNetworkInterfaces.Invoke(new()\n {\n Tags = \n {\n { \"Name\", \"test\" },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example1\"] = example.Apply(getNetworkInterfacesResult =\u003e getNetworkInterfacesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ec2.GetNetworkInterfaces(ctx, \u0026ec2.GetNetworkInterfacesArgs{\n\t\t\tTags: map[string]interface{}{\n\t\t\t\t\"Name\": \"test\",\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example1\", example.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetNetworkInterfacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getNetworkInterfaces(GetNetworkInterfacesArgs.builder()\n .tags(Map.of(\"Name\", \"test\"))\n .build());\n\n ctx.export(\"example1\", example.applyValue(getNetworkInterfacesResult -\u003e getNetworkInterfacesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getNetworkInterfaces\n Arguments:\n tags:\n Name: test\noutputs:\n example1: ${example.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example retrieves a network interface ids which associated\nwith specific subnet.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.ec2.getNetworkInterfaces({\n filters: [{\n name: \"subnet-id\",\n values: [test.id],\n }],\n });\n return {\n example: example.ids,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_network_interfaces(filters=[{\n \"name\": \"subnet-id\",\n \"values\": [test[\"id\"]],\n}])\npulumi.export(\"example\", example.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetNetworkInterfaces.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetNetworkInterfacesFilterInputArgs\n {\n Name = \"subnet-id\",\n Values = new[]\n {\n test.Id,\n },\n },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getNetworkInterfacesResult =\u003e getNetworkInterfacesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := ec2.GetNetworkInterfaces(ctx, \u0026ec2.GetNetworkInterfacesArgs{\nFilters: []ec2.GetNetworkInterfacesFilter{\n{\nName: \"subnet-id\",\nValues: interface{}{\ntest.Id,\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nctx.Export(\"example\", example.Ids)\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetNetworkInterfacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getNetworkInterfaces(GetNetworkInterfacesArgs.builder()\n .filters(GetNetworkInterfacesFilterArgs.builder()\n .name(\"subnet-id\")\n .values(test.id())\n .build())\n .build());\n\n ctx.export(\"example\", example.applyValue(getNetworkInterfacesResult -\u003e getNetworkInterfacesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getNetworkInterfaces\n Arguments:\n filters:\n - name: subnet-id\n values:\n - ${test.id}\noutputs:\n example: ${example.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## Example Usage\n\nThe following shows outputting all network interface ids in a region.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.ec2.getNetworkInterfaces({});\n return {\n example: example.ids,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_network_interfaces()\npulumi.export(\"example\", example.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetNetworkInterfaces.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getNetworkInterfacesResult =\u003e getNetworkInterfacesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ec2.GetNetworkInterfaces(ctx, \u0026ec2.GetNetworkInterfacesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", example.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetNetworkInterfacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getNetworkInterfaces();\n\n ctx.export(\"example\", example.applyValue(getNetworkInterfacesResult -\u003e getNetworkInterfacesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getNetworkInterfaces\n Arguments: {}\noutputs:\n example: ${example.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example retrieves a list of all network interface ids with a custom tag of `Name` set to a value of `test`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ec2.getNetworkInterfaces({\n tags: {\n Name: \"test\",\n },\n});\nexport const example1 = example.then(example =\u003e example.ids);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_network_interfaces(tags={\n \"Name\": \"test\",\n})\npulumi.export(\"example1\", example.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetNetworkInterfaces.Invoke(new()\n {\n Tags = \n {\n { \"Name\", \"test\" },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example1\"] = example.Apply(getNetworkInterfacesResult =\u003e getNetworkInterfacesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ec2.GetNetworkInterfaces(ctx, \u0026ec2.GetNetworkInterfacesArgs{\n\t\t\tTags: map[string]interface{}{\n\t\t\t\t\"Name\": \"test\",\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example1\", example.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetNetworkInterfacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getNetworkInterfaces(GetNetworkInterfacesArgs.builder()\n .tags(Map.of(\"Name\", \"test\"))\n .build());\n\n ctx.export(\"example1\", example.applyValue(getNetworkInterfacesResult -\u003e getNetworkInterfacesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getNetworkInterfaces\n Arguments:\n tags:\n Name: test\noutputs:\n example1: ${example.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nThe following example retrieves a network interface ids which associated\nwith specific subnet.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.ec2.getNetworkInterfaces({\n filters: [{\n name: \"subnet-id\",\n values: [test.id],\n }],\n });\n return {\n example: example.ids,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_network_interfaces(filters=[{\n \"name\": \"subnet-id\",\n \"values\": [test[\"id\"]],\n}])\npulumi.export(\"example\", example.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetNetworkInterfaces.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetNetworkInterfacesFilterInputArgs\n {\n Name = \"subnet-id\",\n Values = new[]\n {\n test.Id,\n },\n },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getNetworkInterfacesResult =\u003e getNetworkInterfacesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := ec2.GetNetworkInterfaces(ctx, \u0026ec2.GetNetworkInterfacesArgs{\nFilters: []ec2.GetNetworkInterfacesFilter{\n{\nName: \"subnet-id\",\nValues: interface{}{\ntest.Id,\n},\n},\n},\n}, nil);\nif err != nil {\nreturn err\n}\nctx.Export(\"example\", example.Ids)\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetNetworkInterfacesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getNetworkInterfaces(GetNetworkInterfacesArgs.builder()\n .filters(GetNetworkInterfacesFilterArgs.builder()\n .name(\"subnet-id\")\n .values(test.id())\n .build())\n .build());\n\n ctx.export(\"example\", example.applyValue(getNetworkInterfacesResult -\u003e getNetworkInterfacesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getNetworkInterfaces\n Arguments:\n filters:\n - name: subnet-id\n values:\n - ${test.id}\noutputs:\n example: ${example.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getNetworkInterfaces.\n", "properties": { @@ -390098,7 +390098,7 @@ } }, "aws:ec2/getPublicIpv4Pools:getPublicIpv4Pools": { - "description": "Data source for getting information about AWS EC2 Public IPv4 Pools.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// Returns all public IPv4 pools.\nconst example = aws.ec2.getPublicIpv4Pools({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# Returns all public IPv4 pools.\nexample = aws.ec2.get_public_ipv4_pools()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Returns all public IPv4 pools.\n var example = Aws.Ec2.GetPublicIpv4Pools.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// Returns all public IPv4 pools.\n\t\t_, err := ec2.GetPublicIpv4Pools(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetPublicIpv4PoolsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Returns all public IPv4 pools.\n final var example = Ec2Functions.getPublicIpv4Pools();\n\n }\n}\n```\n```yaml\nvariables:\n # Returns all public IPv4 pools.\n example:\n fn::invoke:\n Function: aws:ec2:getPublicIpv4Pools\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Usage with Filter\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ec2.getPublicIpv4Pools({\n filters: [{\n name: \"tag-key\",\n values: [\"ExampleTagKey\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_public_ipv4_pools(filters=[{\n \"name\": \"tag-key\",\n \"values\": [\"ExampleTagKey\"],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetPublicIpv4Pools.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetPublicIpv4PoolsFilterInputArgs\n {\n Name = \"tag-key\",\n Values = new[]\n {\n \"ExampleTagKey\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.GetPublicIpv4Pools(ctx, \u0026ec2.GetPublicIpv4PoolsArgs{\n\t\t\tFilters: []ec2.GetPublicIpv4PoolsFilter{\n\t\t\t\t{\n\t\t\t\t\tName: \"tag-key\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\"ExampleTagKey\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetPublicIpv4PoolsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getPublicIpv4Pools(GetPublicIpv4PoolsArgs.builder()\n .filters(GetPublicIpv4PoolsFilterArgs.builder()\n .name(\"tag-key\")\n .values(\"ExampleTagKey\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getPublicIpv4Pools\n Arguments:\n filters:\n - name: tag-key\n values:\n - ExampleTagKey\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for getting information about AWS EC2 Public IPv4 Pools.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// Returns all public IPv4 pools.\nconst example = aws.ec2.getPublicIpv4Pools({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# Returns all public IPv4 pools.\nexample = aws.ec2.get_public_ipv4_pools()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Returns all public IPv4 pools.\n var example = Aws.Ec2.GetPublicIpv4Pools.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// Returns all public IPv4 pools.\n\t\t_, err := ec2.GetPublicIpv4Pools(ctx, \u0026ec2.GetPublicIpv4PoolsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetPublicIpv4PoolsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Returns all public IPv4 pools.\n final var example = Ec2Functions.getPublicIpv4Pools();\n\n }\n}\n```\n```yaml\nvariables:\n # Returns all public IPv4 pools.\n example:\n fn::invoke:\n Function: aws:ec2:getPublicIpv4Pools\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Usage with Filter\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ec2.getPublicIpv4Pools({\n filters: [{\n name: \"tag-key\",\n values: [\"ExampleTagKey\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_public_ipv4_pools(filters=[{\n \"name\": \"tag-key\",\n \"values\": [\"ExampleTagKey\"],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetPublicIpv4Pools.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2.Inputs.GetPublicIpv4PoolsFilterInputArgs\n {\n Name = \"tag-key\",\n Values = new[]\n {\n \"ExampleTagKey\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.GetPublicIpv4Pools(ctx, \u0026ec2.GetPublicIpv4PoolsArgs{\n\t\t\tFilters: []ec2.GetPublicIpv4PoolsFilter{\n\t\t\t\t{\n\t\t\t\t\tName: \"tag-key\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\"ExampleTagKey\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetPublicIpv4PoolsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getPublicIpv4Pools(GetPublicIpv4PoolsArgs.builder()\n .filters(GetPublicIpv4PoolsFilterArgs.builder()\n .name(\"tag-key\")\n .values(\"ExampleTagKey\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getPublicIpv4Pools\n Arguments:\n filters:\n - name: tag-key\n values:\n - ExampleTagKey\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getPublicIpv4Pools.\n", "properties": { @@ -390617,7 +390617,7 @@ } }, "aws:ec2/getSerialConsoleAccess:getSerialConsoleAccess": { - "description": "Provides a way to check whether serial console access is enabled for your AWS account in the current AWS region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.ec2.getSerialConsoleAccess({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.ec2.get_serial_console_access()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Ec2.GetSerialConsoleAccess.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.LookupSerialConsoleAccess(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = Ec2Functions.getSerialConsoleAccess();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:ec2:getSerialConsoleAccess\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides a way to check whether serial console access is enabled for your AWS account in the current AWS region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.ec2.getSerialConsoleAccess({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.ec2.get_serial_console_access()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Ec2.GetSerialConsoleAccess.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2.LookupSerialConsoleAccess(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = Ec2Functions.getSerialConsoleAccess();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:ec2:getSerialConsoleAccess\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getSerialConsoleAccess.\n", "properties": { @@ -390937,7 +390937,7 @@ } }, "aws:ec2/getTransitGatewayRouteTables:getTransitGatewayRouteTables": { - "description": "Provides information for multiple EC2 Transit Gateway Route Tables, such as their identifiers.\n\n## Example Usage\n\nThe following shows outputting all Transit Gateway Route Table Ids.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.ec2.getTransitGatewayRouteTables({});\n return {\n example: example.ids,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_transit_gateway_route_tables()\npulumi.export(\"example\", example.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetTransitGatewayRouteTables.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getTransitGatewayRouteTablesResult =\u003e getTransitGatewayRouteTablesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ec2.GetTransitGatewayRouteTables(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", example.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetTransitGatewayRouteTablesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getTransitGatewayRouteTables();\n\n ctx.export(\"example\", example.applyValue(getTransitGatewayRouteTablesResult -\u003e getTransitGatewayRouteTablesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getTransitGatewayRouteTables\n Arguments: {}\noutputs:\n example: ${example.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides information for multiple EC2 Transit Gateway Route Tables, such as their identifiers.\n\n## Example Usage\n\nThe following shows outputting all Transit Gateway Route Table Ids.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.ec2.getTransitGatewayRouteTables({});\n return {\n example: example.ids,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ec2.get_transit_gateway_route_tables()\npulumi.export(\"example\", example.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ec2.GetTransitGatewayRouteTables.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getTransitGatewayRouteTablesResult =\u003e getTransitGatewayRouteTablesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ec2.GetTransitGatewayRouteTables(ctx, \u0026ec2.GetTransitGatewayRouteTablesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", example.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2.Ec2Functions;\nimport com.pulumi.aws.ec2.inputs.GetTransitGatewayRouteTablesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Ec2Functions.getTransitGatewayRouteTables();\n\n ctx.export(\"example\", example.applyValue(getTransitGatewayRouteTablesResult -\u003e getTransitGatewayRouteTablesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ec2:getTransitGatewayRouteTables\n Arguments: {}\noutputs:\n example: ${example.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getTransitGatewayRouteTables.\n", "properties": { @@ -393171,7 +393171,7 @@ } }, "aws:ec2transitgateway/getPeeringAttachments:getPeeringAttachments": { - "description": "Get information on EC2 Transit Gateway Peering Attachments.\n\n## Example Usage\n\n### All Resources\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.ec2transitgateway.getPeeringAttachments({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ec2transitgateway.get_peering_attachments()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.Ec2TransitGateway.GetPeeringAttachments.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2transitgateway.GetPeeringAttachments(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;\nimport com.pulumi.aws.ec2transitgateway.inputs.GetPeeringAttachmentsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = Ec2transitgatewayFunctions.getPeeringAttachments();\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:ec2transitgateway:getPeeringAttachments\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### By Filter\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst filtered = aws.ec2transitgateway.getPeeringAttachments({\n filters: [{\n name: \"state\",\n values: [\"pendingAcceptance\"],\n }],\n});\nconst unit = .map(__index =\u003e (aws.ec2transitgateway.getPeeringAttachment({\n id: _arg0_.ids[__index],\n})));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfiltered = aws.ec2transitgateway.get_peering_attachments(filters=[{\n \"name\": \"state\",\n \"values\": [\"pendingAcceptance\"],\n}])\nunit = [aws.ec2transitgateway.get_peering_attachment(id=filtered.ids[__index]) for __index in range(len(filtered.ids))]\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var filtered = Aws.Ec2TransitGateway.GetPeeringAttachments.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2TransitGateway.Inputs.GetPeeringAttachmentsFilterInputArgs\n {\n Name = \"state\",\n Values = new[]\n {\n \"pendingAcceptance\",\n },\n },\n },\n });\n\n var unit = ;\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Get information on EC2 Transit Gateway Peering Attachments.\n\n## Example Usage\n\n### All Resources\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.ec2transitgateway.getPeeringAttachments({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.ec2transitgateway.get_peering_attachments()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.Ec2TransitGateway.GetPeeringAttachments.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ec2transitgateway.GetPeeringAttachments(ctx, \u0026ec2transitgateway.GetPeeringAttachmentsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;\nimport com.pulumi.aws.ec2transitgateway.inputs.GetPeeringAttachmentsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = Ec2transitgatewayFunctions.getPeeringAttachments();\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:ec2transitgateway:getPeeringAttachments\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### By Filter\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst filtered = aws.ec2transitgateway.getPeeringAttachments({\n filters: [{\n name: \"state\",\n values: [\"pendingAcceptance\"],\n }],\n});\nconst unit = .map(__index =\u003e (aws.ec2transitgateway.getPeeringAttachment({\n id: _arg0_.ids[__index],\n})));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nfiltered = aws.ec2transitgateway.get_peering_attachments(filters=[{\n \"name\": \"state\",\n \"values\": [\"pendingAcceptance\"],\n}])\nunit = [aws.ec2transitgateway.get_peering_attachment(id=filtered.ids[__index]) for __index in range(len(filtered.ids))]\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var filtered = Aws.Ec2TransitGateway.GetPeeringAttachments.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.Ec2TransitGateway.Inputs.GetPeeringAttachmentsFilterInputArgs\n {\n Name = \"state\",\n Values = new[]\n {\n \"pendingAcceptance\",\n },\n },\n },\n });\n\n var unit = ;\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getPeeringAttachments.\n", "properties": { @@ -393783,7 +393783,7 @@ } }, "aws:ecr/getAuthorizationToken:getAuthorizationToken": { - "description": "The ECR Authorization Token data source allows the authorization token, proxy endpoint, token expiration date, user name and password to be retrieved for an ECR repository.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst token = aws.ecr.getAuthorizationToken({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntoken = aws.ecr.get_authorization_token()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var token = Aws.Ecr.GetAuthorizationToken.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecr.GetAuthorizationToken(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecr.EcrFunctions;\nimport com.pulumi.aws.ecr.inputs.GetAuthorizationTokenArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var token = EcrFunctions.getAuthorizationToken();\n\n }\n}\n```\n```yaml\nvariables:\n token:\n fn::invoke:\n Function: aws:ecr:getAuthorizationToken\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The ECR Authorization Token data source allows the authorization token, proxy endpoint, token expiration date, user name and password to be retrieved for an ECR repository.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst token = aws.ecr.getAuthorizationToken({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntoken = aws.ecr.get_authorization_token()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var token = Aws.Ecr.GetAuthorizationToken.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecr.GetAuthorizationToken(ctx, \u0026ecr.GetAuthorizationTokenArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecr.EcrFunctions;\nimport com.pulumi.aws.ecr.inputs.GetAuthorizationTokenArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var token = EcrFunctions.getAuthorizationToken();\n\n }\n}\n```\n```yaml\nvariables:\n token:\n fn::invoke:\n Function: aws:ecr:getAuthorizationToken\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getAuthorizationToken.\n", "properties": { @@ -394056,7 +394056,7 @@ } }, "aws:ecr/getRepositories:getRepositories": { - "description": "Data source for providing information on AWS ECR (Elastic Container Registry) Repositories.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ecr.getRepositories({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ecr.get_repositories()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ecr.GetRepositories.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecr.GetRepositories(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecr.EcrFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = EcrFunctions.getRepositories();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ecr:getRepositories\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for providing information on AWS ECR (Elastic Container Registry) Repositories.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ecr.getRepositories({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ecr.get_repositories()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Ecr.GetRepositories.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecr.GetRepositories(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecr.EcrFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = EcrFunctions.getRepositories();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ecr:getRepositories\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getRepositories.\n", "properties": { @@ -394270,7 +394270,7 @@ } }, "aws:ecrpublic/getAuthorizationToken:getAuthorizationToken": { - "description": "The Public ECR Authorization Token data source allows the authorization token, token expiration date, user name, and password to be retrieved for a Public ECR repository.\n\n\u003e **NOTE:** This data source can only be used in the `us-east-1` region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst token = aws.ecrpublic.getAuthorizationToken({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntoken = aws.ecrpublic.get_authorization_token()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var token = Aws.EcrPublic.GetAuthorizationToken.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecrpublic\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecrpublic.GetAuthorizationToken(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecrpublic.EcrpublicFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var token = EcrpublicFunctions.getAuthorizationToken();\n\n }\n}\n```\n```yaml\nvariables:\n token:\n fn::invoke:\n Function: aws:ecrpublic:getAuthorizationToken\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The Public ECR Authorization Token data source allows the authorization token, token expiration date, user name, and password to be retrieved for a Public ECR repository.\n\n\u003e **NOTE:** This data source can only be used in the `us-east-1` region.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst token = aws.ecrpublic.getAuthorizationToken({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntoken = aws.ecrpublic.get_authorization_token()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var token = Aws.EcrPublic.GetAuthorizationToken.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecrpublic\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ecrpublic.GetAuthorizationToken(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecrpublic.EcrpublicFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var token = EcrpublicFunctions.getAuthorizationToken();\n\n }\n}\n```\n```yaml\nvariables:\n token:\n fn::invoke:\n Function: aws:ecrpublic:getAuthorizationToken\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getAuthorizationToken.\n", "properties": { @@ -396402,7 +396402,7 @@ } }, "aws:elasticbeanstalk/getHostedZone:getHostedZone": { - "description": "Use this data source to get the ID of an [elastic beanstalk hosted zone](http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.elasticbeanstalk.getHostedZone({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.elasticbeanstalk.get_hosted_zone()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.ElasticBeanstalk.GetHostedZone.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticbeanstalk\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticbeanstalk.GetHostedZone(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticbeanstalk.ElasticbeanstalkFunctions;\nimport com.pulumi.aws.elasticbeanstalk.inputs.GetHostedZoneArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = ElasticbeanstalkFunctions.getHostedZone();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:elasticbeanstalk:getHostedZone\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the ID of an [elastic beanstalk hosted zone](http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region).\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.elasticbeanstalk.getHostedZone({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.elasticbeanstalk.get_hosted_zone()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.ElasticBeanstalk.GetHostedZone.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticbeanstalk\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := elasticbeanstalk.GetHostedZone(ctx, \u0026elasticbeanstalk.GetHostedZoneArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elasticbeanstalk.ElasticbeanstalkFunctions;\nimport com.pulumi.aws.elasticbeanstalk.inputs.GetHostedZoneArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = ElasticbeanstalkFunctions.getHostedZone();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:elasticbeanstalk:getHostedZone\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getHostedZone.\n", "properties": { @@ -396658,7 +396658,7 @@ } }, "aws:elb/getHostedZoneId:getHostedZoneId": { - "description": "Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId\nin a given region for the purpose of using in an AWS Route53 Alias.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.elb.getHostedZoneId({});\nconst www = new aws.route53.Record(\"www\", {\n zoneId: primary.zoneId,\n name: \"example.com\",\n type: aws.route53.RecordType.A,\n aliases: [{\n name: mainAwsElb.dnsName,\n zoneId: main.then(main =\u003e main.id),\n evaluateTargetHealth: true,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.elb.get_hosted_zone_id()\nwww = aws.route53.Record(\"www\",\n zone_id=primary[\"zoneId\"],\n name=\"example.com\",\n type=aws.route53.RecordType.A,\n aliases=[{\n \"name\": main_aws_elb[\"dnsName\"],\n \"zone_id\": main.id,\n \"evaluate_target_health\": True,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.Elb.GetHostedZoneId.Invoke();\n\n var www = new Aws.Route53.Record(\"www\", new()\n {\n ZoneId = primary.ZoneId,\n Name = \"example.com\",\n Type = Aws.Route53.RecordType.A,\n Aliases = new[]\n {\n new Aws.Route53.Inputs.RecordAliasArgs\n {\n Name = mainAwsElb.DnsName,\n ZoneId = main.Apply(getHostedZoneIdResult =\u003e getHostedZoneIdResult.Id),\n EvaluateTargetHealth = true,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := elb.GetHostedZoneId(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewRecord(ctx, \"www\", \u0026route53.RecordArgs{\n\t\t\tZoneId: pulumi.Any(primary.ZoneId),\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\tType: pulumi.String(route53.RecordTypeA),\n\t\t\tAliases: route53.RecordAliasArray{\n\t\t\t\t\u0026route53.RecordAliasArgs{\n\t\t\t\t\tName: pulumi.Any(mainAwsElb.DnsName),\n\t\t\t\t\tZoneId: pulumi.String(main.Id),\n\t\t\t\t\tEvaluateTargetHealth: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elb.ElbFunctions;\nimport com.pulumi.aws.elb.inputs.GetHostedZoneIdArgs;\nimport com.pulumi.aws.route53.Record;\nimport com.pulumi.aws.route53.RecordArgs;\nimport com.pulumi.aws.route53.inputs.RecordAliasArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = ElbFunctions.getHostedZoneId();\n\n var www = new Record(\"www\", RecordArgs.builder()\n .zoneId(primary.zoneId())\n .name(\"example.com\")\n .type(\"A\")\n .aliases(RecordAliasArgs.builder()\n .name(mainAwsElb.dnsName())\n .zoneId(main.applyValue(getHostedZoneIdResult -\u003e getHostedZoneIdResult.id()))\n .evaluateTargetHealth(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n www:\n type: aws:route53:Record\n properties:\n zoneId: ${primary.zoneId}\n name: example.com\n type: A\n aliases:\n - name: ${mainAwsElb.dnsName}\n zoneId: ${main.id}\n evaluateTargetHealth: true\nvariables:\n main:\n fn::invoke:\n Function: aws:elb:getHostedZoneId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId\nin a given region for the purpose of using in an AWS Route53 Alias.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.elb.getHostedZoneId({});\nconst www = new aws.route53.Record(\"www\", {\n zoneId: primary.zoneId,\n name: \"example.com\",\n type: aws.route53.RecordType.A,\n aliases: [{\n name: mainAwsElb.dnsName,\n zoneId: main.then(main =\u003e main.id),\n evaluateTargetHealth: true,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.elb.get_hosted_zone_id()\nwww = aws.route53.Record(\"www\",\n zone_id=primary[\"zoneId\"],\n name=\"example.com\",\n type=aws.route53.RecordType.A,\n aliases=[{\n \"name\": main_aws_elb[\"dnsName\"],\n \"zone_id\": main.id,\n \"evaluate_target_health\": True,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.Elb.GetHostedZoneId.Invoke();\n\n var www = new Aws.Route53.Record(\"www\", new()\n {\n ZoneId = primary.ZoneId,\n Name = \"example.com\",\n Type = Aws.Route53.RecordType.A,\n Aliases = new[]\n {\n new Aws.Route53.Inputs.RecordAliasArgs\n {\n Name = mainAwsElb.DnsName,\n ZoneId = main.Apply(getHostedZoneIdResult =\u003e getHostedZoneIdResult.Id),\n EvaluateTargetHealth = true,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := elb.GetHostedZoneId(ctx, \u0026elb.GetHostedZoneIdArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewRecord(ctx, \"www\", \u0026route53.RecordArgs{\n\t\t\tZoneId: pulumi.Any(primary.ZoneId),\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\tType: pulumi.String(route53.RecordTypeA),\n\t\t\tAliases: route53.RecordAliasArray{\n\t\t\t\t\u0026route53.RecordAliasArgs{\n\t\t\t\t\tName: pulumi.Any(mainAwsElb.DnsName),\n\t\t\t\t\tZoneId: pulumi.String(main.Id),\n\t\t\t\t\tEvaluateTargetHealth: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elb.ElbFunctions;\nimport com.pulumi.aws.elb.inputs.GetHostedZoneIdArgs;\nimport com.pulumi.aws.route53.Record;\nimport com.pulumi.aws.route53.RecordArgs;\nimport com.pulumi.aws.route53.inputs.RecordAliasArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = ElbFunctions.getHostedZoneId();\n\n var www = new Record(\"www\", RecordArgs.builder()\n .zoneId(primary.zoneId())\n .name(\"example.com\")\n .type(\"A\")\n .aliases(RecordAliasArgs.builder()\n .name(mainAwsElb.dnsName())\n .zoneId(main.applyValue(getHostedZoneIdResult -\u003e getHostedZoneIdResult.id()))\n .evaluateTargetHealth(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n www:\n type: aws:route53:Record\n properties:\n zoneId: ${primary.zoneId}\n name: example.com\n type: A\n aliases:\n - name: ${mainAwsElb.dnsName}\n zoneId: ${main.id}\n evaluateTargetHealth: true\nvariables:\n main:\n fn::invoke:\n Function: aws:elb:getHostedZoneId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getHostedZoneId.\n", "properties": { @@ -396820,7 +396820,7 @@ } }, "aws:elb/getServiceAccount:getServiceAccount": { - "description": "Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy)\nin a given region for the purpose of permitting in S3 bucket policy.\n\n\u003e **Note:** For AWS Regions opened since Jakarta (`ap-southeast-3`) in December 2021, AWS [documents that](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) a [service principal name](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services) should be used instead of an AWS account ID in any relevant IAM policy.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.elb.getServiceAccount({});\nconst elbLogs = new aws.s3.BucketV2(\"elb_logs\", {bucket: \"my-elb-tf-test-bucket\"});\nconst elbLogsAcl = new aws.s3.BucketAclV2(\"elb_logs_acl\", {\n bucket: elbLogs.id,\n acl: \"private\",\n});\nconst allowElbLogging = pulumi.all([main, elbLogs.arn]).apply(([main, arn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main.arn],\n }],\n actions: [\"s3:PutObject\"],\n resources: [`${arn}/AWSLogs/*`],\n }],\n}));\nconst allowElbLoggingBucketPolicy = new aws.s3.BucketPolicy(\"allow_elb_logging\", {\n bucket: elbLogs.id,\n policy: allowElbLogging.apply(allowElbLogging =\u003e allowElbLogging.json),\n});\nconst bar = new aws.elb.LoadBalancer(\"bar\", {\n name: \"my-foobar-elb\",\n availabilityZones: [\"us-west-2a\"],\n accessLogs: {\n bucket: elbLogs.id,\n interval: 5,\n },\n listeners: [{\n instancePort: 8000,\n instanceProtocol: \"http\",\n lbPort: 80,\n lbProtocol: \"http\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.elb.get_service_account()\nelb_logs = aws.s3.BucketV2(\"elb_logs\", bucket=\"my-elb-tf-test-bucket\")\nelb_logs_acl = aws.s3.BucketAclV2(\"elb_logs_acl\",\n bucket=elb_logs.id,\n acl=\"private\")\nallow_elb_logging = elb_logs.arn.apply(lambda arn: aws.iam.get_policy_document_output(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [f\"{arn}/AWSLogs/*\"],\n}]))\nallow_elb_logging_bucket_policy = aws.s3.BucketPolicy(\"allow_elb_logging\",\n bucket=elb_logs.id,\n policy=allow_elb_logging.json)\nbar = aws.elb.LoadBalancer(\"bar\",\n name=\"my-foobar-elb\",\n availability_zones=[\"us-west-2a\"],\n access_logs={\n \"bucket\": elb_logs.id,\n \"interval\": 5,\n },\n listeners=[{\n \"instance_port\": 8000,\n \"instance_protocol\": \"http\",\n \"lb_port\": 80,\n \"lb_protocol\": \"http\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.Elb.GetServiceAccount.Invoke();\n\n var elbLogs = new Aws.S3.BucketV2(\"elb_logs\", new()\n {\n Bucket = \"my-elb-tf-test-bucket\",\n });\n\n var elbLogsAcl = new Aws.S3.BucketAclV2(\"elb_logs_acl\", new()\n {\n Bucket = elbLogs.Id,\n Acl = \"private\",\n });\n\n var allowElbLogging = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{elbLogs.Arn}/AWSLogs/*\",\n },\n },\n },\n });\n\n var allowElbLoggingBucketPolicy = new Aws.S3.BucketPolicy(\"allow_elb_logging\", new()\n {\n Bucket = elbLogs.Id,\n Policy = allowElbLogging.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var bar = new Aws.Elb.LoadBalancer(\"bar\", new()\n {\n Name = \"my-foobar-elb\",\n AvailabilityZones = new[]\n {\n \"us-west-2a\",\n },\n AccessLogs = new Aws.Elb.Inputs.LoadBalancerAccessLogsArgs\n {\n Bucket = elbLogs.Id,\n Interval = 5,\n },\n Listeners = new[]\n {\n new Aws.Elb.Inputs.LoadBalancerListenerArgs\n {\n InstancePort = 8000,\n InstanceProtocol = \"http\",\n LbPort = 80,\n LbProtocol = \"http\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nmain, err := elb.GetServiceAccount(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nelbLogs, err := s3.NewBucketV2(ctx, \"elb_logs\", \u0026s3.BucketV2Args{\nBucket: pulumi.String(\"my-elb-tf-test-bucket\"),\n})\nif err != nil {\nreturn err\n}\n_, err = s3.NewBucketAclV2(ctx, \"elb_logs_acl\", \u0026s3.BucketAclV2Args{\nBucket: elbLogs.ID(),\nAcl: pulumi.String(\"private\"),\n})\nif err != nil {\nreturn err\n}\nallowElbLogging := elbLogs.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) {\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:PutObject\",\n},\nResources: []string{\nfmt.Sprintf(\"%v/AWSLogs/*\", arn),\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = s3.NewBucketPolicy(ctx, \"allow_elb_logging\", \u0026s3.BucketPolicyArgs{\nBucket: elbLogs.ID(),\nPolicy: pulumi.String(allowElbLogging.ApplyT(func(allowElbLogging iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026allowElbLogging.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\n_, err = elb.NewLoadBalancer(ctx, \"bar\", \u0026elb.LoadBalancerArgs{\nName: pulumi.String(\"my-foobar-elb\"),\nAvailabilityZones: pulumi.StringArray{\npulumi.String(\"us-west-2a\"),\n},\nAccessLogs: \u0026elb.LoadBalancerAccessLogsArgs{\nBucket: elbLogs.ID(),\nInterval: pulumi.Int(5),\n},\nListeners: elb.LoadBalancerListenerArray{\n\u0026elb.LoadBalancerListenerArgs{\nInstancePort: pulumi.Int(8000),\nInstanceProtocol: pulumi.String(\"http\"),\nLbPort: pulumi.Int(80),\nLbProtocol: pulumi.String(\"http\"),\n},\n},\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elb.ElbFunctions;\nimport com.pulumi.aws.elb.inputs.GetServiceAccountArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport com.pulumi.aws.elb.LoadBalancer;\nimport com.pulumi.aws.elb.LoadBalancerArgs;\nimport com.pulumi.aws.elb.inputs.LoadBalancerAccessLogsArgs;\nimport com.pulumi.aws.elb.inputs.LoadBalancerListenerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = ElbFunctions.getServiceAccount();\n\n var elbLogs = new BucketV2(\"elbLogs\", BucketV2Args.builder()\n .bucket(\"my-elb-tf-test-bucket\")\n .build());\n\n var elbLogsAcl = new BucketAclV2(\"elbLogsAcl\", BucketAclV2Args.builder()\n .bucket(elbLogs.id())\n .acl(\"private\")\n .build());\n\n final var allowElbLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:PutObject\")\n .resources(elbLogs.arn().applyValue(arn -\u003e String.format(\"%s/AWSLogs/*\", arn)))\n .build())\n .build());\n\n var allowElbLoggingBucketPolicy = new BucketPolicy(\"allowElbLoggingBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(elbLogs.id())\n .policy(allowElbLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(allowElbLogging -\u003e allowElbLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var bar = new LoadBalancer(\"bar\", LoadBalancerArgs.builder()\n .name(\"my-foobar-elb\")\n .availabilityZones(\"us-west-2a\")\n .accessLogs(LoadBalancerAccessLogsArgs.builder()\n .bucket(elbLogs.id())\n .interval(5)\n .build())\n .listeners(LoadBalancerListenerArgs.builder()\n .instancePort(8000)\n .instanceProtocol(\"http\")\n .lbPort(80)\n .lbProtocol(\"http\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n elbLogs:\n type: aws:s3:BucketV2\n name: elb_logs\n properties:\n bucket: my-elb-tf-test-bucket\n elbLogsAcl:\n type: aws:s3:BucketAclV2\n name: elb_logs_acl\n properties:\n bucket: ${elbLogs.id}\n acl: private\n allowElbLoggingBucketPolicy:\n type: aws:s3:BucketPolicy\n name: allow_elb_logging\n properties:\n bucket: ${elbLogs.id}\n policy: ${allowElbLogging.json}\n bar:\n type: aws:elb:LoadBalancer\n properties:\n name: my-foobar-elb\n availabilityZones:\n - us-west-2a\n accessLogs:\n bucket: ${elbLogs.id}\n interval: 5\n listeners:\n - instancePort: 8000\n instanceProtocol: http\n lbPort: 80\n lbProtocol: http\nvariables:\n main:\n fn::invoke:\n Function: aws:elb:getServiceAccount\n Arguments: {}\n allowElbLogging:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:PutObject\n resources:\n - ${elbLogs.arn}/AWSLogs/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the Account ID of the [AWS Elastic Load Balancing Service Account](http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy)\nin a given region for the purpose of permitting in S3 bucket policy.\n\n\u003e **Note:** For AWS Regions opened since Jakarta (`ap-southeast-3`) in December 2021, AWS [documents that](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy) a [service principal name](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services) should be used instead of an AWS account ID in any relevant IAM policy.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.elb.getServiceAccount({});\nconst elbLogs = new aws.s3.BucketV2(\"elb_logs\", {bucket: \"my-elb-tf-test-bucket\"});\nconst elbLogsAcl = new aws.s3.BucketAclV2(\"elb_logs_acl\", {\n bucket: elbLogs.id,\n acl: \"private\",\n});\nconst allowElbLogging = pulumi.all([main, elbLogs.arn]).apply(([main, arn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main.arn],\n }],\n actions: [\"s3:PutObject\"],\n resources: [`${arn}/AWSLogs/*`],\n }],\n}));\nconst allowElbLoggingBucketPolicy = new aws.s3.BucketPolicy(\"allow_elb_logging\", {\n bucket: elbLogs.id,\n policy: allowElbLogging.apply(allowElbLogging =\u003e allowElbLogging.json),\n});\nconst bar = new aws.elb.LoadBalancer(\"bar\", {\n name: \"my-foobar-elb\",\n availabilityZones: [\"us-west-2a\"],\n accessLogs: {\n bucket: elbLogs.id,\n interval: 5,\n },\n listeners: [{\n instancePort: 8000,\n instanceProtocol: \"http\",\n lbPort: 80,\n lbProtocol: \"http\",\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.elb.get_service_account()\nelb_logs = aws.s3.BucketV2(\"elb_logs\", bucket=\"my-elb-tf-test-bucket\")\nelb_logs_acl = aws.s3.BucketAclV2(\"elb_logs_acl\",\n bucket=elb_logs.id,\n acl=\"private\")\nallow_elb_logging = elb_logs.arn.apply(lambda arn: aws.iam.get_policy_document_output(statements=[{\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [f\"{arn}/AWSLogs/*\"],\n}]))\nallow_elb_logging_bucket_policy = aws.s3.BucketPolicy(\"allow_elb_logging\",\n bucket=elb_logs.id,\n policy=allow_elb_logging.json)\nbar = aws.elb.LoadBalancer(\"bar\",\n name=\"my-foobar-elb\",\n availability_zones=[\"us-west-2a\"],\n access_logs={\n \"bucket\": elb_logs.id,\n \"interval\": 5,\n },\n listeners=[{\n \"instance_port\": 8000,\n \"instance_protocol\": \"http\",\n \"lb_port\": 80,\n \"lb_protocol\": \"http\",\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.Elb.GetServiceAccount.Invoke();\n\n var elbLogs = new Aws.S3.BucketV2(\"elb_logs\", new()\n {\n Bucket = \"my-elb-tf-test-bucket\",\n });\n\n var elbLogsAcl = new Aws.S3.BucketAclV2(\"elb_logs_acl\", new()\n {\n Bucket = elbLogs.Id,\n Acl = \"private\",\n });\n\n var allowElbLogging = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{elbLogs.Arn}/AWSLogs/*\",\n },\n },\n },\n });\n\n var allowElbLoggingBucketPolicy = new Aws.S3.BucketPolicy(\"allow_elb_logging\", new()\n {\n Bucket = elbLogs.Id,\n Policy = allowElbLogging.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n var bar = new Aws.Elb.LoadBalancer(\"bar\", new()\n {\n Name = \"my-foobar-elb\",\n AvailabilityZones = new[]\n {\n \"us-west-2a\",\n },\n AccessLogs = new Aws.Elb.Inputs.LoadBalancerAccessLogsArgs\n {\n Bucket = elbLogs.Id,\n Interval = 5,\n },\n Listeners = new[]\n {\n new Aws.Elb.Inputs.LoadBalancerListenerArgs\n {\n InstancePort = 8000,\n InstanceProtocol = \"http\",\n LbPort = 80,\n LbProtocol = \"http\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nmain, err := elb.GetServiceAccount(ctx, \u0026elb.GetServiceAccountArgs{\n}, nil);\nif err != nil {\nreturn err\n}\nelbLogs, err := s3.NewBucketV2(ctx, \"elb_logs\", \u0026s3.BucketV2Args{\nBucket: pulumi.String(\"my-elb-tf-test-bucket\"),\n})\nif err != nil {\nreturn err\n}\n_, err = s3.NewBucketAclV2(ctx, \"elb_logs_acl\", \u0026s3.BucketAclV2Args{\nBucket: elbLogs.ID(),\nAcl: pulumi.String(\"private\"),\n})\nif err != nil {\nreturn err\n}\nallowElbLogging := elbLogs.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) {\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:PutObject\",\n},\nResources: []string{\nfmt.Sprintf(\"%v/AWSLogs/*\", arn),\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = s3.NewBucketPolicy(ctx, \"allow_elb_logging\", \u0026s3.BucketPolicyArgs{\nBucket: elbLogs.ID(),\nPolicy: pulumi.String(allowElbLogging.ApplyT(func(allowElbLogging iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026allowElbLogging.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\n_, err = elb.NewLoadBalancer(ctx, \"bar\", \u0026elb.LoadBalancerArgs{\nName: pulumi.String(\"my-foobar-elb\"),\nAvailabilityZones: pulumi.StringArray{\npulumi.String(\"us-west-2a\"),\n},\nAccessLogs: \u0026elb.LoadBalancerAccessLogsArgs{\nBucket: elbLogs.ID(),\nInterval: pulumi.Int(5),\n},\nListeners: elb.LoadBalancerListenerArray{\n\u0026elb.LoadBalancerListenerArgs{\nInstancePort: pulumi.Int(8000),\nInstanceProtocol: pulumi.String(\"http\"),\nLbPort: pulumi.Int(80),\nLbProtocol: pulumi.String(\"http\"),\n},\n},\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.elb.ElbFunctions;\nimport com.pulumi.aws.elb.inputs.GetServiceAccountArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport com.pulumi.aws.elb.LoadBalancer;\nimport com.pulumi.aws.elb.LoadBalancerArgs;\nimport com.pulumi.aws.elb.inputs.LoadBalancerAccessLogsArgs;\nimport com.pulumi.aws.elb.inputs.LoadBalancerListenerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = ElbFunctions.getServiceAccount();\n\n var elbLogs = new BucketV2(\"elbLogs\", BucketV2Args.builder()\n .bucket(\"my-elb-tf-test-bucket\")\n .build());\n\n var elbLogsAcl = new BucketAclV2(\"elbLogsAcl\", BucketAclV2Args.builder()\n .bucket(elbLogs.id())\n .acl(\"private\")\n .build());\n\n final var allowElbLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:PutObject\")\n .resources(elbLogs.arn().applyValue(arn -\u003e String.format(\"%s/AWSLogs/*\", arn)))\n .build())\n .build());\n\n var allowElbLoggingBucketPolicy = new BucketPolicy(\"allowElbLoggingBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(elbLogs.id())\n .policy(allowElbLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(allowElbLogging -\u003e allowElbLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n var bar = new LoadBalancer(\"bar\", LoadBalancerArgs.builder()\n .name(\"my-foobar-elb\")\n .availabilityZones(\"us-west-2a\")\n .accessLogs(LoadBalancerAccessLogsArgs.builder()\n .bucket(elbLogs.id())\n .interval(5)\n .build())\n .listeners(LoadBalancerListenerArgs.builder()\n .instancePort(8000)\n .instanceProtocol(\"http\")\n .lbPort(80)\n .lbProtocol(\"http\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n elbLogs:\n type: aws:s3:BucketV2\n name: elb_logs\n properties:\n bucket: my-elb-tf-test-bucket\n elbLogsAcl:\n type: aws:s3:BucketAclV2\n name: elb_logs_acl\n properties:\n bucket: ${elbLogs.id}\n acl: private\n allowElbLoggingBucketPolicy:\n type: aws:s3:BucketPolicy\n name: allow_elb_logging\n properties:\n bucket: ${elbLogs.id}\n policy: ${allowElbLogging.json}\n bar:\n type: aws:elb:LoadBalancer\n properties:\n name: my-foobar-elb\n availabilityZones:\n - us-west-2a\n accessLogs:\n bucket: ${elbLogs.id}\n interval: 5\n listeners:\n - instancePort: 8000\n instanceProtocol: http\n lbPort: 80\n lbProtocol: http\nvariables:\n main:\n fn::invoke:\n Function: aws:elb:getServiceAccount\n Arguments: {}\n allowElbLogging:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:PutObject\n resources:\n - ${elbLogs.arn}/AWSLogs/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getServiceAccount.\n", "properties": { @@ -398307,7 +398307,7 @@ } }, "aws:guardduty/getDetector:getDetector": { - "description": "Retrieve information about a GuardDuty detector.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.guardduty.getDetector({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.guardduty.get_detector()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.GuardDuty.GetDetector.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/guardduty\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := guardduty.LookupDetector(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.guardduty.GuarddutyFunctions;\nimport com.pulumi.aws.guardduty.inputs.GetDetectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = GuarddutyFunctions.getDetector();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:guardduty:getDetector\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Retrieve information about a GuardDuty detector.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.guardduty.getDetector({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.guardduty.get_detector()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.GuardDuty.GetDetector.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/guardduty\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := guardduty.LookupDetector(ctx, \u0026guardduty.LookupDetectorArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.guardduty.GuarddutyFunctions;\nimport com.pulumi.aws.guardduty.inputs.GetDetectorArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = GuarddutyFunctions.getDetector();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:guardduty:getDetector\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getDetector.\n", "properties": { @@ -398441,7 +398441,7 @@ } }, "aws:iam/getAccountAlias:getAccountAlias": { - "description": "The IAM Account Alias data source allows access to the account alias\nfor the effective account in which this provider is working.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.iam.getAccountAlias({});\nexport const accountAlias = current.then(current =\u003e current.accountAlias);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.iam.get_account_alias()\npulumi.export(\"accountAlias\", current.account_alias)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Iam.GetAccountAlias.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"accountAlias\"] = current.Apply(getAccountAliasResult =\u003e getAccountAliasResult.AccountAlias),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := iam.LookupAccountAlias(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"accountAlias\", current.AccountAlias)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = IamFunctions.getAccountAlias();\n\n ctx.export(\"accountAlias\", current.applyValue(getAccountAliasResult -\u003e getAccountAliasResult.accountAlias()));\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:iam:getAccountAlias\n Arguments: {}\noutputs:\n accountAlias: ${current.accountAlias}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The IAM Account Alias data source allows access to the account alias\nfor the effective account in which this provider is working.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.iam.getAccountAlias({});\nexport const accountAlias = current.then(current =\u003e current.accountAlias);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.iam.get_account_alias()\npulumi.export(\"accountAlias\", current.account_alias)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.Iam.GetAccountAlias.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"accountAlias\"] = current.Apply(getAccountAliasResult =\u003e getAccountAliasResult.AccountAlias),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := iam.LookupAccountAlias(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"accountAlias\", current.AccountAlias)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = IamFunctions.getAccountAlias();\n\n ctx.export(\"accountAlias\", current.applyValue(getAccountAliasResult -\u003e getAccountAliasResult.accountAlias()));\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:iam:getAccountAlias\n Arguments: {}\noutputs:\n accountAlias: ${current.accountAlias}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getAccountAlias.\n", "properties": { @@ -398894,7 +398894,7 @@ } }, "aws:iam/getPrincipalPolicySimulation:getPrincipalPolicySimulation": { - "description": "Runs a simulation of the IAM policies of a particular principal against a given hypothetical request.\n\nYou can use this data source in conjunction with\nPreconditions and Postconditions so that your configuration can test either whether it should have sufficient access to do its own work, or whether policies your configuration declares itself are sufficient for their intended use elsewhere.\n\n\u003e **Note:** Correctly using this data source requires familiarity with various details of AWS Identity and Access Management, and how various AWS services integrate with it. For general information on the AWS IAM policy simulator, see [Testing IAM policies with the IAM policy simulator](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html). This data source wraps the `iam:SimulatePrincipalPolicy` API action described on that page.\n\n## Example Usage\n\n### Self Access-checking Example\n\nThe following example raises an error if the credentials passed to the AWS provider do not have access to perform the three actions `s3:GetObject`, `s3:PutObject`, and `s3:DeleteObject` on the S3 bucket with the given ARN.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst s3ObjectAccess = current.then(current =\u003e aws.iam.getPrincipalPolicySimulation({\n actionNames: [\n \"s3:GetObject\",\n \"s3:PutObject\",\n \"s3:DeleteObject\",\n ],\n policySourceArn: current.arn,\n resourceArns: [\"arn:aws:s3:::my-test-bucket\"],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ns3_object_access = aws.iam.get_principal_policy_simulation(action_names=[\n \"s3:GetObject\",\n \"s3:PutObject\",\n \"s3:DeleteObject\",\n ],\n policy_source_arn=current.arn,\n resource_arns=[\"arn:aws:s3:::my-test-bucket\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var s3ObjectAccess = Aws.Iam.GetPrincipalPolicySimulation.Invoke(new()\n {\n ActionNames = new[]\n {\n \"s3:GetObject\",\n \"s3:PutObject\",\n \"s3:DeleteObject\",\n },\n PolicySourceArn = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n ResourceArns = new[]\n {\n \"arn:aws:s3:::my-test-bucket\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.LookupPrincipalPolicySimulation(ctx, \u0026iam.LookupPrincipalPolicySimulationArgs{\n\t\t\tActionNames: []string{\n\t\t\t\t\"s3:GetObject\",\n\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\"s3:DeleteObject\",\n\t\t\t},\n\t\t\tPolicySourceArn: current.Arn,\n\t\t\tResourceArns: []string{\n\t\t\t\t\"arn:aws:s3:::my-test-bucket\",\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPrincipalPolicySimulationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var s3ObjectAccess = IamFunctions.getPrincipalPolicySimulation(GetPrincipalPolicySimulationArgs.builder()\n .actionNames( \n \"s3:GetObject\",\n \"s3:PutObject\",\n \"s3:DeleteObject\")\n .policySourceArn(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .resourceArns(\"arn:aws:s3:::my-test-bucket\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n s3ObjectAccess:\n fn::invoke:\n Function: aws:iam:getPrincipalPolicySimulation\n Arguments:\n actionNames:\n - s3:GetObject\n - s3:PutObject\n - s3:DeleteObject\n policySourceArn: ${current.arn}\n resourceArns:\n - arn:aws:s3:::my-test-bucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nIf you intend to use this data source to quickly raise an error when the given credentials are insufficient then you must use `depends_on` inside any resource which would require those credentials, to ensure that the policy check will run first:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketObject(\"example\", {bucket: \"my-test-bucket\"}, {\n dependsOn: [s3ObjectAccess],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketObject(\"example\", bucket=\"my-test-bucket\",\nopts = pulumi.ResourceOptions(depends_on=[s3_object_access]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketObject(\"example\", new()\n {\n Bucket = \"my-test-bucket\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n s3ObjectAccess,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketObject(ctx, \"example\", \u0026s3.BucketObjectArgs{\n\t\t\tBucket: pulumi.Any(\"my-test-bucket\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\ts3ObjectAccess,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketObject;\nimport com.pulumi.aws.s3.BucketObjectArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketObject(\"example\", BucketObjectArgs.builder()\n .bucket(\"my-test-bucket\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(s3ObjectAccess)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketObject\n properties:\n bucket: my-test-bucket\n options:\n dependson:\n - ${s3ObjectAccess}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Testing the Effect of a Declared Policy\n\nThe following example declares an S3 bucket and a user that should have access to the bucket, and then uses `aws.iam.getPrincipalPolicySimulation` to verify that the user does indeed have access to perform needed operations against the bucket.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.iam.User(\"example\", {name: \"example\"});\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {bucket: \"my-test-bucket\"});\nconst s3Access = new aws.iam.UserPolicy(\"s3_access\", {\n name: \"example_s3_access\",\n user: example.name,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"s3:GetObject\",\n Effect: \"Allow\",\n Resource: exampleBucketV2.arn,\n }],\n }),\n});\nconst accountAccess = new aws.s3.BucketPolicy(\"account_access\", {\n bucket: exampleBucketV2.bucket,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"s3:*\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e current.accountId),\n },\n Resource: [\n exampleBucketV2.arn,\n pulumi.interpolate`${exampleBucketV2.arn}/*`,\n ],\n }],\n }),\n});\nconst s3ObjectAccess = aws.iam.getPrincipalPolicySimulationOutput({\n actionNames: [\"s3:GetObject\"],\n policySourceArn: example.arn,\n resourceArns: [exampleBucketV2.arn],\n resourcePolicyJson: accountAccess.policy,\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.iam.User(\"example\", name=\"example\")\nexample_bucket_v2 = aws.s3.BucketV2(\"example\", bucket=\"my-test-bucket\")\ns3_access = aws.iam.UserPolicy(\"s3_access\",\n name=\"example_s3_access\",\n user=example.name,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"s3:GetObject\",\n \"Effect\": \"Allow\",\n \"Resource\": example_bucket_v2.arn,\n }],\n }))\naccount_access = aws.s3.BucketPolicy(\"account_access\",\n bucket=example_bucket_v2.bucket,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"s3:*\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": current.account_id,\n },\n \"Resource\": [\n example_bucket_v2.arn,\n example_bucket_v2.arn.apply(lambda arn: f\"{arn}/*\"),\n ],\n }],\n }))\ns3_object_access = aws.iam.get_principal_policy_simulation_output(action_names=[\"s3:GetObject\"],\n policy_source_arn=example.arn,\n resource_arns=[example_bucket_v2.arn],\n resource_policy_json=account_access.policy)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Iam.User(\"example\", new()\n {\n Name = \"example\",\n });\n\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-test-bucket\",\n });\n\n var s3Access = new Aws.Iam.UserPolicy(\"s3_access\", new()\n {\n Name = \"example_s3_access\",\n User = example.Name,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"s3:GetObject\",\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = exampleBucketV2.Arn,\n },\n },\n })),\n });\n\n var accountAccess = new Aws.S3.BucketPolicy(\"account_access\", new()\n {\n Bucket = exampleBucketV2.Bucket,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"s3:*\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"Resource\"] = new[]\n {\n exampleBucketV2.Arn,\n exampleBucketV2.Arn.Apply(arn =\u003e $\"{arn}/*\"),\n },\n },\n },\n })),\n });\n\n var s3ObjectAccess = Aws.Iam.GetPrincipalPolicySimulation.Invoke(new()\n {\n ActionNames = new[]\n {\n \"s3:GetObject\",\n },\n PolicySourceArn = example.Arn,\n ResourceArns = new[]\n {\n exampleBucketV2.Arn,\n },\n ResourcePolicyJson = accountAccess.Policy,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.NewUser(ctx, \"example\", \u0026iam.UserArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-test-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewUserPolicy(ctx, \"s3_access\", \u0026iam.UserPolicyArgs{\n\t\t\tName: pulumi.String(\"example_s3_access\"),\n\t\t\tUser: example.Name,\n\t\t\tPolicy: exampleBucketV2.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Action\": \"s3:GetObject\",\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Resource\": arn,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\taccountAccess, err := s3.NewBucketPolicy(ctx, \"account_access\", \u0026s3.BucketPolicyArgs{\n\t\t\tBucket: exampleBucketV2.Bucket,\n\t\t\tPolicy: pulumi.All(exampleBucketV2.Arn, exampleBucketV2.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\texampleBucketV2Arn := _args[0].(string)\n\t\t\t\texampleBucketV2Arn1 := _args[1].(string)\n\t\t\t\tvar _zero string\n\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Action\": \"s3:*\",\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"AWS\": current.AccountId,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\texampleBucketV2Arn,\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"%v/*\", exampleBucketV2Arn1),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\treturn json1, nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_ = iam.LookupPrincipalPolicySimulationOutput(ctx, iam.GetPrincipalPolicySimulationOutputArgs{\n\t\t\tActionNames: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"s3:GetObject\"),\n\t\t\t},\n\t\t\tPolicySourceArn: example.Arn,\n\t\t\tResourceArns: pulumi.StringArray{\n\t\t\t\texampleBucketV2.Arn,\n\t\t\t},\n\t\t\tResourcePolicyJson: accountAccess.Policy,\n\t\t}, nil)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.User;\nimport com.pulumi.aws.iam.UserArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.iam.UserPolicy;\nimport com.pulumi.aws.iam.UserPolicyArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPrincipalPolicySimulationArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new User(\"example\", UserArgs.builder()\n .name(\"example\")\n .build());\n\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"my-test-bucket\")\n .build());\n\n var s3Access = new UserPolicy(\"s3Access\", UserPolicyArgs.builder()\n .name(\"example_s3_access\")\n .user(example.name())\n .policy(exampleBucketV2.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", \"s3:GetObject\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", arn)\n )))\n ))))\n .build());\n\n var accountAccess = new BucketPolicy(\"accountAccess\", BucketPolicyArgs.builder()\n .bucket(exampleBucketV2.bucket())\n .policy(Output.tuple(exampleBucketV2.arn(), exampleBucketV2.arn()).applyValue(values -\u003e {\n var exampleBucketV2Arn = values.t1;\n var exampleBucketV2Arn1 = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", \"s3:*\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n )),\n jsonProperty(\"Resource\", jsonArray(\n exampleBucketV2Arn, \n String.format(\"%s/*\", exampleBucketV2Arn1)\n ))\n )))\n ));\n }))\n .build());\n\n final var s3ObjectAccess = IamFunctions.getPrincipalPolicySimulation(GetPrincipalPolicySimulationArgs.builder()\n .actionNames(\"s3:GetObject\")\n .policySourceArn(example.arn())\n .resourceArns(exampleBucketV2.arn())\n .resourcePolicyJson(accountAccess.policy())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:User\n properties:\n name: example\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: my-test-bucket\n s3Access:\n type: aws:iam:UserPolicy\n name: s3_access\n properties:\n name: example_s3_access\n user: ${example.name}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: s3:GetObject\n Effect: Allow\n Resource: ${exampleBucketV2.arn}\n accountAccess:\n type: aws:s3:BucketPolicy\n name: account_access\n properties:\n bucket: ${exampleBucketV2.bucket}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: s3:*\n Effect: Allow\n Principal:\n AWS: ${current.accountId}\n Resource:\n - ${exampleBucketV2.arn}\n - ${exampleBucketV2.arn}/*\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n s3ObjectAccess:\n fn::invoke:\n Function: aws:iam:getPrincipalPolicySimulation\n Arguments:\n actionNames:\n - s3:GetObject\n policySourceArn: ${example.arn}\n resourceArns:\n - ${exampleBucketV2.arn}\n resourcePolicyJson: ${accountAccess.policy}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nWhen using `aws.iam.getPrincipalPolicySimulation` to test the effect of a policy declared elsewhere in the same configuration, it's important to use `depends_on` to make sure that the needed policy has been fully created or updated before running the simulation.\n", + "description": "Runs a simulation of the IAM policies of a particular principal against a given hypothetical request.\n\nYou can use this data source in conjunction with\nPreconditions and Postconditions so that your configuration can test either whether it should have sufficient access to do its own work, or whether policies your configuration declares itself are sufficient for their intended use elsewhere.\n\n\u003e **Note:** Correctly using this data source requires familiarity with various details of AWS Identity and Access Management, and how various AWS services integrate with it. For general information on the AWS IAM policy simulator, see [Testing IAM policies with the IAM policy simulator](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html). This data source wraps the `iam:SimulatePrincipalPolicy` API action described on that page.\n\n## Example Usage\n\n### Self Access-checking Example\n\nThe following example raises an error if the credentials passed to the AWS provider do not have access to perform the three actions `s3:GetObject`, `s3:PutObject`, and `s3:DeleteObject` on the S3 bucket with the given ARN.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst s3ObjectAccess = current.then(current =\u003e aws.iam.getPrincipalPolicySimulation({\n actionNames: [\n \"s3:GetObject\",\n \"s3:PutObject\",\n \"s3:DeleteObject\",\n ],\n policySourceArn: current.arn,\n resourceArns: [\"arn:aws:s3:::my-test-bucket\"],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ns3_object_access = aws.iam.get_principal_policy_simulation(action_names=[\n \"s3:GetObject\",\n \"s3:PutObject\",\n \"s3:DeleteObject\",\n ],\n policy_source_arn=current.arn,\n resource_arns=[\"arn:aws:s3:::my-test-bucket\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var s3ObjectAccess = Aws.Iam.GetPrincipalPolicySimulation.Invoke(new()\n {\n ActionNames = new[]\n {\n \"s3:GetObject\",\n \"s3:PutObject\",\n \"s3:DeleteObject\",\n },\n PolicySourceArn = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n ResourceArns = new[]\n {\n \"arn:aws:s3:::my-test-bucket\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.LookupPrincipalPolicySimulation(ctx, \u0026iam.LookupPrincipalPolicySimulationArgs{\n\t\t\tActionNames: []string{\n\t\t\t\t\"s3:GetObject\",\n\t\t\t\t\"s3:PutObject\",\n\t\t\t\t\"s3:DeleteObject\",\n\t\t\t},\n\t\t\tPolicySourceArn: current.Arn,\n\t\t\tResourceArns: []string{\n\t\t\t\t\"arn:aws:s3:::my-test-bucket\",\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPrincipalPolicySimulationArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var s3ObjectAccess = IamFunctions.getPrincipalPolicySimulation(GetPrincipalPolicySimulationArgs.builder()\n .actionNames( \n \"s3:GetObject\",\n \"s3:PutObject\",\n \"s3:DeleteObject\")\n .policySourceArn(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .resourceArns(\"arn:aws:s3:::my-test-bucket\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n s3ObjectAccess:\n fn::invoke:\n Function: aws:iam:getPrincipalPolicySimulation\n Arguments:\n actionNames:\n - s3:GetObject\n - s3:PutObject\n - s3:DeleteObject\n policySourceArn: ${current.arn}\n resourceArns:\n - arn:aws:s3:::my-test-bucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nIf you intend to use this data source to quickly raise an error when the given credentials are insufficient then you must use `depends_on` inside any resource which would require those credentials, to ensure that the policy check will run first:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = new aws.s3.BucketObject(\"example\", {bucket: \"my-test-bucket\"}, {\n dependsOn: [s3ObjectAccess],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.BucketObject(\"example\", bucket=\"my-test-bucket\",\nopts = pulumi.ResourceOptions(depends_on=[s3_object_access]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Aws.S3.BucketObject(\"example\", new()\n {\n Bucket = \"my-test-bucket\",\n }, new CustomResourceOptions\n {\n DependsOn =\n {\n s3ObjectAccess,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.NewBucketObject(ctx, \"example\", \u0026s3.BucketObjectArgs{\n\t\t\tBucket: pulumi.Any(\"my-test-bucket\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\ts3ObjectAccess,\n\t\t}))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.BucketObject;\nimport com.pulumi.aws.s3.BucketObjectArgs;\nimport com.pulumi.resources.CustomResourceOptions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new BucketObject(\"example\", BucketObjectArgs.builder()\n .bucket(\"my-test-bucket\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(s3ObjectAccess)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:s3:BucketObject\n properties:\n bucket: my-test-bucket\n options:\n dependson:\n - ${s3ObjectAccess}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Testing the Effect of a Declared Policy\n\nThe following example declares an S3 bucket and a user that should have access to the bucket, and then uses `aws.iam.getPrincipalPolicySimulation` to verify that the user does indeed have access to perform needed operations against the bucket.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = new aws.iam.User(\"example\", {name: \"example\"});\nconst exampleBucketV2 = new aws.s3.BucketV2(\"example\", {bucket: \"my-test-bucket\"});\nconst s3Access = new aws.iam.UserPolicy(\"s3_access\", {\n name: \"example_s3_access\",\n user: example.name,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"s3:GetObject\",\n Effect: \"Allow\",\n Resource: exampleBucketV2.arn,\n }],\n }),\n});\nconst accountAccess = new aws.s3.BucketPolicy(\"account_access\", {\n bucket: exampleBucketV2.bucket,\n policy: pulumi.jsonStringify({\n Version: \"2012-10-17\",\n Statement: [{\n Action: \"s3:*\",\n Effect: \"Allow\",\n Principal: {\n AWS: current.then(current =\u003e current.accountId),\n },\n Resource: [\n exampleBucketV2.arn,\n pulumi.interpolate`${exampleBucketV2.arn}/*`,\n ],\n }],\n }),\n});\nconst s3ObjectAccess = aws.iam.getPrincipalPolicySimulationOutput({\n actionNames: [\"s3:GetObject\"],\n policySourceArn: example.arn,\n resourceArns: [exampleBucketV2.arn],\n resourcePolicyJson: accountAccess.policy,\n});\n```\n```python\nimport pulumi\nimport json\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.iam.User(\"example\", name=\"example\")\nexample_bucket_v2 = aws.s3.BucketV2(\"example\", bucket=\"my-test-bucket\")\ns3_access = aws.iam.UserPolicy(\"s3_access\",\n name=\"example_s3_access\",\n user=example.name,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"s3:GetObject\",\n \"Effect\": \"Allow\",\n \"Resource\": example_bucket_v2.arn,\n }],\n }))\naccount_access = aws.s3.BucketPolicy(\"account_access\",\n bucket=example_bucket_v2.bucket,\n policy=pulumi.Output.json_dumps({\n \"Version\": \"2012-10-17\",\n \"Statement\": [{\n \"Action\": \"s3:*\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": current.account_id,\n },\n \"Resource\": [\n example_bucket_v2.arn,\n example_bucket_v2.arn.apply(lambda arn: f\"{arn}/*\"),\n ],\n }],\n }))\ns3_object_access = aws.iam.get_principal_policy_simulation_output(action_names=[\"s3:GetObject\"],\n policy_source_arn=example.arn,\n resource_arns=[example_bucket_v2.arn],\n resource_policy_json=account_access.policy)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.Json;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = new Aws.Iam.User(\"example\", new()\n {\n Name = \"example\",\n });\n\n var exampleBucketV2 = new Aws.S3.BucketV2(\"example\", new()\n {\n Bucket = \"my-test-bucket\",\n });\n\n var s3Access = new Aws.Iam.UserPolicy(\"s3_access\", new()\n {\n Name = \"example_s3_access\",\n User = example.Name,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"s3:GetObject\",\n [\"Effect\"] = \"Allow\",\n [\"Resource\"] = exampleBucketV2.Arn,\n },\n },\n })),\n });\n\n var accountAccess = new Aws.S3.BucketPolicy(\"account_access\", new()\n {\n Bucket = exampleBucketV2.Bucket,\n Policy = Output.JsonSerialize(Output.Create(new Dictionary\u003cstring, object?\u003e\n {\n [\"Version\"] = \"2012-10-17\",\n [\"Statement\"] = new[]\n {\n new Dictionary\u003cstring, object?\u003e\n {\n [\"Action\"] = \"s3:*\",\n [\"Effect\"] = \"Allow\",\n [\"Principal\"] = new Dictionary\u003cstring, object?\u003e\n {\n [\"AWS\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n },\n [\"Resource\"] = new[]\n {\n exampleBucketV2.Arn,\n exampleBucketV2.Arn.Apply(arn =\u003e $\"{arn}/*\"),\n },\n },\n },\n })),\n });\n\n var s3ObjectAccess = Aws.Iam.GetPrincipalPolicySimulation.Invoke(new()\n {\n ActionNames = new[]\n {\n \"s3:GetObject\",\n },\n PolicySourceArn = example.Arn,\n ResourceArns = new[]\n {\n exampleBucketV2.Arn,\n },\n ResourcePolicyJson = accountAccess.Policy,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := iam.NewUser(ctx, \"example\", \u0026iam.UserArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleBucketV2, err := s3.NewBucketV2(ctx, \"example\", \u0026s3.BucketV2Args{\n\t\t\tBucket: pulumi.String(\"my-test-bucket\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.NewUserPolicy(ctx, \"s3_access\", \u0026iam.UserPolicyArgs{\n\t\t\tName: pulumi.String(\"example_s3_access\"),\n\t\t\tUser: example.Name,\n\t\t\tPolicy: exampleBucketV2.Arn.ApplyT(func(arn string) (pulumi.String, error) {\n\t\t\t\tvar _zero pulumi.String\n\t\t\t\ttmpJSON0, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Action\": \"s3:GetObject\",\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Resource\": arn,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson0 := string(tmpJSON0)\n\t\t\t\treturn pulumi.String(json0), nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\taccountAccess, err := s3.NewBucketPolicy(ctx, \"account_access\", \u0026s3.BucketPolicyArgs{\n\t\t\tBucket: exampleBucketV2.Bucket,\n\t\t\tPolicy: pulumi.All(exampleBucketV2.Arn, exampleBucketV2.Arn).ApplyT(func(_args []interface{}) (string, error) {\n\t\t\t\texampleBucketV2Arn := _args[0].(string)\n\t\t\t\texampleBucketV2Arn1 := _args[1].(string)\n\t\t\t\tvar _zero string\n\t\t\t\ttmpJSON1, err := json.Marshal(map[string]interface{}{\n\t\t\t\t\t\"Version\": \"2012-10-17\",\n\t\t\t\t\t\"Statement\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"Action\": \"s3:*\",\n\t\t\t\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\t\t\t\"Principal\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"AWS\": current.AccountId,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"Resource\": []string{\n\t\t\t\t\t\t\t\texampleBucketV2Arn,\n\t\t\t\t\t\t\t\tfmt.Sprintf(\"%v/*\", exampleBucketV2Arn1),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn _zero, err\n\t\t\t\t}\n\t\t\t\tjson1 := string(tmpJSON1)\n\t\t\t\treturn json1, nil\n\t\t\t}).(pulumi.StringOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_ = iam.LookupPrincipalPolicySimulationOutput(ctx, iam.GetPrincipalPolicySimulationOutputArgs{\n\t\t\tActionNames: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"s3:GetObject\"),\n\t\t\t},\n\t\t\tPolicySourceArn: example.Arn,\n\t\t\tResourceArns: pulumi.StringArray{\n\t\t\t\texampleBucketV2.Arn,\n\t\t\t},\n\t\t\tResourcePolicyJson: accountAccess.Policy,\n\t\t}, nil)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.User;\nimport com.pulumi.aws.iam.UserArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.iam.UserPolicy;\nimport com.pulumi.aws.iam.UserPolicyArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPrincipalPolicySimulationArgs;\nimport static com.pulumi.codegen.internal.Serialization.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n var example = new User(\"example\", UserArgs.builder()\n .name(\"example\")\n .build());\n\n var exampleBucketV2 = new BucketV2(\"exampleBucketV2\", BucketV2Args.builder()\n .bucket(\"my-test-bucket\")\n .build());\n\n var s3Access = new UserPolicy(\"s3Access\", UserPolicyArgs.builder()\n .name(\"example_s3_access\")\n .user(example.name())\n .policy(exampleBucketV2.arn().applyValue(arn -\u003e serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", \"s3:GetObject\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Resource\", arn)\n )))\n ))))\n .build());\n\n var accountAccess = new BucketPolicy(\"accountAccess\", BucketPolicyArgs.builder()\n .bucket(exampleBucketV2.bucket())\n .policy(Output.tuple(exampleBucketV2.arn(), exampleBucketV2.arn()).applyValue(values -\u003e {\n var exampleBucketV2Arn = values.t1;\n var exampleBucketV2Arn1 = values.t2;\n return serializeJson(\n jsonObject(\n jsonProperty(\"Version\", \"2012-10-17\"),\n jsonProperty(\"Statement\", jsonArray(jsonObject(\n jsonProperty(\"Action\", \"s3:*\"),\n jsonProperty(\"Effect\", \"Allow\"),\n jsonProperty(\"Principal\", jsonObject(\n jsonProperty(\"AWS\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()))\n )),\n jsonProperty(\"Resource\", jsonArray(\n exampleBucketV2Arn, \n String.format(\"%s/*\", exampleBucketV2Arn1)\n ))\n )))\n ));\n }))\n .build());\n\n final var s3ObjectAccess = IamFunctions.getPrincipalPolicySimulation(GetPrincipalPolicySimulationArgs.builder()\n .actionNames(\"s3:GetObject\")\n .policySourceArn(example.arn())\n .resourceArns(exampleBucketV2.arn())\n .resourcePolicyJson(accountAccess.policy())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: aws:iam:User\n properties:\n name: example\n exampleBucketV2:\n type: aws:s3:BucketV2\n name: example\n properties:\n bucket: my-test-bucket\n s3Access:\n type: aws:iam:UserPolicy\n name: s3_access\n properties:\n name: example_s3_access\n user: ${example.name}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: s3:GetObject\n Effect: Allow\n Resource: ${exampleBucketV2.arn}\n accountAccess:\n type: aws:s3:BucketPolicy\n name: account_access\n properties:\n bucket: ${exampleBucketV2.bucket}\n policy:\n fn::toJSON:\n Version: 2012-10-17\n Statement:\n - Action: s3:*\n Effect: Allow\n Principal:\n AWS: ${current.accountId}\n Resource:\n - ${exampleBucketV2.arn}\n - ${exampleBucketV2.arn}/*\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n s3ObjectAccess:\n fn::invoke:\n Function: aws:iam:getPrincipalPolicySimulation\n Arguments:\n actionNames:\n - s3:GetObject\n policySourceArn: ${example.arn}\n resourceArns:\n - ${exampleBucketV2.arn}\n resourcePolicyJson: ${accountAccess.policy}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nWhen using `aws.iam.getPrincipalPolicySimulation` to test the effect of a policy declared elsewhere in the same configuration, it's important to use `depends_on` to make sure that the needed policy has been fully created or updated before running the simulation.\n", "inputs": { "description": "A collection of arguments for invoking getPrincipalPolicySimulation.\n", "properties": { @@ -399130,7 +399130,7 @@ } }, "aws:iam/getRoles:getRoles": { - "description": "Use this data source to get the ARNs and Names of IAM Roles.\n\n## Example Usage\n\n### All roles in an account\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles();\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Roles filtered by name regex\n\nRoles whose role-name contains `project`\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({\n nameRegex: \".*project.*\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles(name_regex=\".*project.*\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke(new()\n {\n NameRegex = \".*project.*\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, \u0026iam.GetRolesArgs{\n\t\t\tNameRegex: pulumi.StringRef(\".*project.*\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles(GetRolesArgs.builder()\n .nameRegex(\".*project.*\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments:\n nameRegex: .*project.*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Roles filtered by path prefix\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({\n pathPrefix: \"/custom-path\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles(path_prefix=\"/custom-path\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke(new()\n {\n PathPrefix = \"/custom-path\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, \u0026iam.GetRolesArgs{\n\t\t\tPathPrefix: pulumi.StringRef(\"/custom-path\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles(GetRolesArgs.builder()\n .pathPrefix(\"/custom-path\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments:\n pathPrefix: /custom-path\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Roles provisioned by AWS SSO\n\nRoles in the account filtered by path prefix\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({\n pathPrefix: \"/aws-reserved/sso.amazonaws.com/\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles(path_prefix=\"/aws-reserved/sso.amazonaws.com/\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke(new()\n {\n PathPrefix = \"/aws-reserved/sso.amazonaws.com/\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, \u0026iam.GetRolesArgs{\n\t\t\tPathPrefix: pulumi.StringRef(\"/aws-reserved/sso.amazonaws.com/\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles(GetRolesArgs.builder()\n .pathPrefix(\"/aws-reserved/sso.amazonaws.com/\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments:\n pathPrefix: /aws-reserved/sso.amazonaws.com/\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nSpecific role in the account filtered by name regex and path prefix\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({\n nameRegex: \"AWSReservedSSO_permission_set_name_.*\",\n pathPrefix: \"/aws-reserved/sso.amazonaws.com/\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles(name_regex=\"AWSReservedSSO_permission_set_name_.*\",\n path_prefix=\"/aws-reserved/sso.amazonaws.com/\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke(new()\n {\n NameRegex = \"AWSReservedSSO_permission_set_name_.*\",\n PathPrefix = \"/aws-reserved/sso.amazonaws.com/\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, \u0026iam.GetRolesArgs{\n\t\t\tNameRegex: pulumi.StringRef(\"AWSReservedSSO_permission_set_name_.*\"),\n\t\t\tPathPrefix: pulumi.StringRef(\"/aws-reserved/sso.amazonaws.com/\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles(GetRolesArgs.builder()\n .nameRegex(\"AWSReservedSSO_permission_set_name_.*\")\n .pathPrefix(\"/aws-reserved/sso.amazonaws.com/\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments:\n nameRegex: AWSReservedSSO_permission_set_name_.*\n pathPrefix: /aws-reserved/sso.amazonaws.com/\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n", + "description": "Use this data source to get the ARNs and Names of IAM Roles.\n\n## Example Usage\n\n### All roles in an account\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, \u0026iam.GetRolesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles();\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Roles filtered by name regex\n\nRoles whose role-name contains `project`\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({\n nameRegex: \".*project.*\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles(name_regex=\".*project.*\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke(new()\n {\n NameRegex = \".*project.*\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, \u0026iam.GetRolesArgs{\n\t\t\tNameRegex: pulumi.StringRef(\".*project.*\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles(GetRolesArgs.builder()\n .nameRegex(\".*project.*\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments:\n nameRegex: .*project.*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Roles filtered by path prefix\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({\n pathPrefix: \"/custom-path\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles(path_prefix=\"/custom-path\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke(new()\n {\n PathPrefix = \"/custom-path\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, \u0026iam.GetRolesArgs{\n\t\t\tPathPrefix: pulumi.StringRef(\"/custom-path\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles(GetRolesArgs.builder()\n .pathPrefix(\"/custom-path\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments:\n pathPrefix: /custom-path\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Roles provisioned by AWS SSO\n\nRoles in the account filtered by path prefix\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({\n pathPrefix: \"/aws-reserved/sso.amazonaws.com/\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles(path_prefix=\"/aws-reserved/sso.amazonaws.com/\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke(new()\n {\n PathPrefix = \"/aws-reserved/sso.amazonaws.com/\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, \u0026iam.GetRolesArgs{\n\t\t\tPathPrefix: pulumi.StringRef(\"/aws-reserved/sso.amazonaws.com/\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles(GetRolesArgs.builder()\n .pathPrefix(\"/aws-reserved/sso.amazonaws.com/\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments:\n pathPrefix: /aws-reserved/sso.amazonaws.com/\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nSpecific role in the account filtered by name regex and path prefix\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst roles = aws.iam.getRoles({\n nameRegex: \"AWSReservedSSO_permission_set_name_.*\",\n pathPrefix: \"/aws-reserved/sso.amazonaws.com/\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nroles = aws.iam.get_roles(name_regex=\"AWSReservedSSO_permission_set_name_.*\",\n path_prefix=\"/aws-reserved/sso.amazonaws.com/\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roles = Aws.Iam.GetRoles.Invoke(new()\n {\n NameRegex = \"AWSReservedSSO_permission_set_name_.*\",\n PathPrefix = \"/aws-reserved/sso.amazonaws.com/\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetRoles(ctx, \u0026iam.GetRolesArgs{\n\t\t\tNameRegex: pulumi.StringRef(\"AWSReservedSSO_permission_set_name_.*\"),\n\t\t\tPathPrefix: pulumi.StringRef(\"/aws-reserved/sso.amazonaws.com/\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetRolesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var roles = IamFunctions.getRoles(GetRolesArgs.builder()\n .nameRegex(\"AWSReservedSSO_permission_set_name_.*\")\n .pathPrefix(\"/aws-reserved/sso.amazonaws.com/\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n roles:\n fn::invoke:\n Function: aws:iam:getRoles\n Arguments:\n nameRegex: AWSReservedSSO_permission_set_name_.*\n pathPrefix: /aws-reserved/sso.amazonaws.com/\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n", "inputs": { "description": "A collection of arguments for invoking getRoles.\n", "properties": { @@ -399331,7 +399331,7 @@ } }, "aws:iam/getSessionContext:getSessionContext": { - "description": "This data source provides information on the IAM source role of an STS assumed role. For non-role ARNs, this data source simply passes the ARN through in `issuer_arn`.\n\nFor some AWS resources, multiple types of principals are allowed in the same argument (e.g., IAM users and IAM roles). However, these arguments often do not allow assumed-role (i.e., STS, temporary credential) principals. Given an STS ARN, this data source provides the ARN for the source IAM role.\n\n## Example Usage\n\n### Basic Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.iam.getSessionContext({\n arn: \"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.iam.get_session_context(arn=\"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Iam.GetSessionContext.Invoke(new()\n {\n Arn = \"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetSessionContext(ctx, \u0026iam.GetSessionContextArgs{\n\t\t\tArn: \"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetSessionContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = IamFunctions.getSessionContext(GetSessionContextArgs.builder()\n .arn(\"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getSessionContext\n Arguments:\n arn: arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Find the Runner's Source Role\n\nCombined with `aws.getCallerIdentity`, you can get the current user's source IAM role ARN (`issuer_arn`) if you're using an assumed role. If you're not using an assumed role, the caller's (e.g., an IAM user's) ARN will simply be passed through. In environments where both IAM users and individuals using assumed roles need to apply the same configurations, this data source enables seamless use.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = current.then(current =\u003e aws.iam.getSessionContext({\n arn: current.arn,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.iam.get_session_context(arn=current.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.Iam.GetSessionContext.Invoke(new()\n {\n Arn = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.GetSessionContext(ctx, \u0026iam.GetSessionContextArgs{\n\t\t\tArn: current.Arn,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetSessionContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = IamFunctions.getSessionContext(GetSessionContextArgs.builder()\n .arn(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getSessionContext\n Arguments:\n arn: ${current.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "This data source provides information on the IAM source role of an STS assumed role. For non-role ARNs, this data source simply passes the ARN through in `issuer_arn`.\n\nFor some AWS resources, multiple types of principals are allowed in the same argument (e.g., IAM users and IAM roles). However, these arguments often do not allow assumed-role (i.e., STS, temporary credential) principals. Given an STS ARN, this data source provides the ARN for the source IAM role.\n\n## Example Usage\n\n### Basic Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.iam.getSessionContext({\n arn: \"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.iam.get_session_context(arn=\"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Iam.GetSessionContext.Invoke(new()\n {\n Arn = \"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetSessionContext(ctx, \u0026iam.GetSessionContextArgs{\n\t\t\tArn: \"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetSessionContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = IamFunctions.getSessionContext(GetSessionContextArgs.builder()\n .arn(\"arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:iam:getSessionContext\n Arguments:\n arn: arn:aws:sts::123456789012:assumed-role/Audien-Heaven/MatyNoyes\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Find the Runner's Source Role\n\nCombined with `aws.getCallerIdentity`, you can get the current user's source IAM role ARN (`issuer_arn`) if you're using an assumed role. If you're not using an assumed role, the caller's (e.g., an IAM user's) ARN will simply be passed through. In environments where both IAM users and individuals using assumed roles need to apply the same configurations, this data source enables seamless use.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst example = current.then(current =\u003e aws.iam.getSessionContext({\n arn: current.arn,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\nexample = aws.iam.get_session_context(arn=current.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var example = Aws.Iam.GetSessionContext.Invoke(new()\n {\n Arn = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.GetSessionContext(ctx, \u0026iam.GetSessionContextArgs{\n\t\t\tArn: current.Arn,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetSessionContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var example = IamFunctions.getSessionContext(GetSessionContextArgs.builder()\n .arn(current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:iam:getSessionContext\n Arguments:\n arn: ${current.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getSessionContext.\n", "properties": { @@ -399519,7 +399519,7 @@ } }, "aws:iam/getUsers:getUsers": { - "description": "Use this data source to get the ARNs and Names of IAM Users.\n\n## Example Usage\n\n### All users in an account\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst users = aws.iam.getUsers({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nusers = aws.iam.get_users()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var users = Aws.Iam.GetUsers.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetUsers(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetUsersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var users = IamFunctions.getUsers();\n\n }\n}\n```\n```yaml\nvariables:\n users:\n fn::invoke:\n Function: aws:iam:getUsers\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Users filtered by name regex\n\nUsers whose username contains `abc`\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst users = aws.iam.getUsers({\n nameRegex: \".*abc.*\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nusers = aws.iam.get_users(name_regex=\".*abc.*\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var users = Aws.Iam.GetUsers.Invoke(new()\n {\n NameRegex = \".*abc.*\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetUsers(ctx, \u0026iam.GetUsersArgs{\n\t\t\tNameRegex: pulumi.StringRef(\".*abc.*\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetUsersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var users = IamFunctions.getUsers(GetUsersArgs.builder()\n .nameRegex(\".*abc.*\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n users:\n fn::invoke:\n Function: aws:iam:getUsers\n Arguments:\n nameRegex: .*abc.*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Users filtered by path prefix\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst users = aws.iam.getUsers({\n pathPrefix: \"/custom-path\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nusers = aws.iam.get_users(path_prefix=\"/custom-path\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var users = Aws.Iam.GetUsers.Invoke(new()\n {\n PathPrefix = \"/custom-path\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetUsers(ctx, \u0026iam.GetUsersArgs{\n\t\t\tPathPrefix: pulumi.StringRef(\"/custom-path\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetUsersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var users = IamFunctions.getUsers(GetUsersArgs.builder()\n .pathPrefix(\"/custom-path\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n users:\n fn::invoke:\n Function: aws:iam:getUsers\n Arguments:\n pathPrefix: /custom-path\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the ARNs and Names of IAM Users.\n\n## Example Usage\n\n### All users in an account\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst users = aws.iam.getUsers({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nusers = aws.iam.get_users()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var users = Aws.Iam.GetUsers.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetUsers(ctx, \u0026iam.GetUsersArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetUsersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var users = IamFunctions.getUsers();\n\n }\n}\n```\n```yaml\nvariables:\n users:\n fn::invoke:\n Function: aws:iam:getUsers\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Users filtered by name regex\n\nUsers whose username contains `abc`\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst users = aws.iam.getUsers({\n nameRegex: \".*abc.*\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nusers = aws.iam.get_users(name_regex=\".*abc.*\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var users = Aws.Iam.GetUsers.Invoke(new()\n {\n NameRegex = \".*abc.*\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetUsers(ctx, \u0026iam.GetUsersArgs{\n\t\t\tNameRegex: pulumi.StringRef(\".*abc.*\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetUsersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var users = IamFunctions.getUsers(GetUsersArgs.builder()\n .nameRegex(\".*abc.*\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n users:\n fn::invoke:\n Function: aws:iam:getUsers\n Arguments:\n nameRegex: .*abc.*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Users filtered by path prefix\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst users = aws.iam.getUsers({\n pathPrefix: \"/custom-path\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nusers = aws.iam.get_users(path_prefix=\"/custom-path\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var users = Aws.Iam.GetUsers.Invoke(new()\n {\n PathPrefix = \"/custom-path\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := iam.GetUsers(ctx, \u0026iam.GetUsersArgs{\n\t\t\tPathPrefix: pulumi.StringRef(\"/custom-path\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetUsersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var users = IamFunctions.getUsers(GetUsersArgs.builder()\n .pathPrefix(\"/custom-path\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n users:\n fn::invoke:\n Function: aws:iam:getUsers\n Arguments:\n pathPrefix: /custom-path\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getUsers.\n", "properties": { @@ -399571,7 +399571,7 @@ } }, "aws:identitystore/getGroup:getGroup": { - "description": "Use this data source to get an Identity Store Group.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetGroup = example.then(example =\u003e aws.identitystore.getGroup({\n identityStoreId: example.identityStoreIds?.[0],\n alternateIdentifier: {\n uniqueAttribute: {\n attributePath: \"DisplayName\",\n attributeValue: \"ExampleGroup\",\n },\n },\n}));\nexport const groupId = exampleGetGroup.then(exampleGetGroup =\u003e exampleGetGroup.groupId);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_group = aws.identitystore.get_group(identity_store_id=example.identity_store_ids[0],\n alternate_identifier={\n \"unique_attribute\": {\n \"attribute_path\": \"DisplayName\",\n \"attribute_value\": \"ExampleGroup\",\n },\n })\npulumi.export(\"groupId\", example_get_group.group_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetGroup = Aws.IdentityStore.GetGroup.Invoke(new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n AlternateIdentifier = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierInputArgs\n {\n UniqueAttribute = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierUniqueAttributeInputArgs\n {\n AttributePath = \"DisplayName\",\n AttributeValue = \"ExampleGroup\",\n },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"groupId\"] = exampleGetGroup.Apply(getGroupResult =\u003e getGroupResult.GroupId),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetGroup, err := identitystore.LookupGroup(ctx, \u0026identitystore.LookupGroupArgs{\n\t\t\tIdentityStoreId: example.IdentityStoreIds[0],\n\t\t\tAlternateIdentifier: identitystore.GetGroupAlternateIdentifier{\n\t\t\t\tUniqueAttribute: identitystore.GetGroupAlternateIdentifierUniqueAttribute{\n\t\t\t\t\tAttributePath: \"DisplayName\",\n\t\t\t\t\tAttributeValue: \"ExampleGroup\",\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"groupId\", exampleGetGroup.GroupId)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.identitystore.IdentitystoreFunctions;\nimport com.pulumi.aws.identitystore.inputs.GetGroupArgs;\nimport com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierArgs;\nimport com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierUniqueAttributeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetGroup = IdentitystoreFunctions.getGroup(GetGroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .alternateIdentifier(GetGroupAlternateIdentifierArgs.builder()\n .uniqueAttribute(GetGroupAlternateIdentifierUniqueAttributeArgs.builder()\n .attributePath(\"DisplayName\")\n .attributeValue(\"ExampleGroup\")\n .build())\n .build())\n .build());\n\n ctx.export(\"groupId\", exampleGetGroup.applyValue(getGroupResult -\u003e getGroupResult.groupId()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetGroup:\n fn::invoke:\n Function: aws:identitystore:getGroup\n Arguments:\n identityStoreId: ${example.identityStoreIds[0]}\n alternateIdentifier:\n uniqueAttribute:\n attributePath: DisplayName\n attributeValue: ExampleGroup\noutputs:\n groupId: ${exampleGetGroup.groupId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get an Identity Store Group.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetGroup = example.then(example =\u003e aws.identitystore.getGroup({\n identityStoreId: example.identityStoreIds?.[0],\n alternateIdentifier: {\n uniqueAttribute: {\n attributePath: \"DisplayName\",\n attributeValue: \"ExampleGroup\",\n },\n },\n}));\nexport const groupId = exampleGetGroup.then(exampleGetGroup =\u003e exampleGetGroup.groupId);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_group = aws.identitystore.get_group(identity_store_id=example.identity_store_ids[0],\n alternate_identifier={\n \"unique_attribute\": {\n \"attribute_path\": \"DisplayName\",\n \"attribute_value\": \"ExampleGroup\",\n },\n })\npulumi.export(\"groupId\", example_get_group.group_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetGroup = Aws.IdentityStore.GetGroup.Invoke(new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n AlternateIdentifier = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierInputArgs\n {\n UniqueAttribute = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierUniqueAttributeInputArgs\n {\n AttributePath = \"DisplayName\",\n AttributeValue = \"ExampleGroup\",\n },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"groupId\"] = exampleGetGroup.Apply(getGroupResult =\u003e getGroupResult.GroupId),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetGroup, err := identitystore.LookupGroup(ctx, \u0026identitystore.LookupGroupArgs{\n\t\t\tIdentityStoreId: example.IdentityStoreIds[0],\n\t\t\tAlternateIdentifier: identitystore.GetGroupAlternateIdentifier{\n\t\t\t\tUniqueAttribute: identitystore.GetGroupAlternateIdentifierUniqueAttribute{\n\t\t\t\t\tAttributePath: \"DisplayName\",\n\t\t\t\t\tAttributeValue: \"ExampleGroup\",\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"groupId\", exampleGetGroup.GroupId)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.identitystore.IdentitystoreFunctions;\nimport com.pulumi.aws.identitystore.inputs.GetGroupArgs;\nimport com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierArgs;\nimport com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierUniqueAttributeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetGroup = IdentitystoreFunctions.getGroup(GetGroupArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .alternateIdentifier(GetGroupAlternateIdentifierArgs.builder()\n .uniqueAttribute(GetGroupAlternateIdentifierUniqueAttributeArgs.builder()\n .attributePath(\"DisplayName\")\n .attributeValue(\"ExampleGroup\")\n .build())\n .build())\n .build());\n\n ctx.export(\"groupId\", exampleGetGroup.applyValue(getGroupResult -\u003e getGroupResult.groupId()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetGroup:\n fn::invoke:\n Function: aws:identitystore:getGroup\n Arguments:\n identityStoreId: ${example.identityStoreIds[0]}\n alternateIdentifier:\n uniqueAttribute:\n attributePath: DisplayName\n attributeValue: ExampleGroup\noutputs:\n groupId: ${exampleGetGroup.groupId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getGroup.\n", "properties": { @@ -399646,7 +399646,7 @@ } }, "aws:identitystore/getGroups:getGroups": { - "description": "Data source for managing an AWS SSO Identity Store Groups.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetGroups = example.then(example =\u003e aws.identitystore.getGroups({\n identityStoreId: example.identityStoreIds?.[0],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_groups = aws.identitystore.get_groups(identity_store_id=example.identity_store_ids[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetGroups = Aws.IdentityStore.GetGroups.Invoke(new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = identitystore.GetGroups(ctx, \u0026identitystore.GetGroupsArgs{\n\t\t\tIdentityStoreId: example.IdentityStoreIds[0],\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.identitystore.IdentitystoreFunctions;\nimport com.pulumi.aws.identitystore.inputs.GetGroupsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetGroups = IdentitystoreFunctions.getGroups(GetGroupsArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetGroups:\n fn::invoke:\n Function: aws:identitystore:getGroups\n Arguments:\n identityStoreId: ${example.identityStoreIds[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing an AWS SSO Identity Store Groups.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetGroups = example.then(example =\u003e aws.identitystore.getGroups({\n identityStoreId: example.identityStoreIds?.[0],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_groups = aws.identitystore.get_groups(identity_store_id=example.identity_store_ids[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetGroups = Aws.IdentityStore.GetGroups.Invoke(new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = identitystore.GetGroups(ctx, \u0026identitystore.GetGroupsArgs{\n\t\t\tIdentityStoreId: example.IdentityStoreIds[0],\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.identitystore.IdentitystoreFunctions;\nimport com.pulumi.aws.identitystore.inputs.GetGroupsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetGroups = IdentitystoreFunctions.getGroups(GetGroupsArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetGroups:\n fn::invoke:\n Function: aws:identitystore:getGroups\n Arguments:\n identityStoreId: ${example.identityStoreIds[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getGroups.\n", "properties": { @@ -399687,7 +399687,7 @@ } }, "aws:identitystore/getUser:getUser": { - "description": "Use this data source to get an Identity Store User.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetUser = example.then(example =\u003e aws.identitystore.getUser({\n identityStoreId: example.identityStoreIds?.[0],\n alternateIdentifier: {\n uniqueAttribute: {\n attributePath: \"UserName\",\n attributeValue: \"ExampleUser\",\n },\n },\n}));\nexport const userId = exampleGetUser.then(exampleGetUser =\u003e exampleGetUser.userId);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_user = aws.identitystore.get_user(identity_store_id=example.identity_store_ids[0],\n alternate_identifier={\n \"unique_attribute\": {\n \"attribute_path\": \"UserName\",\n \"attribute_value\": \"ExampleUser\",\n },\n })\npulumi.export(\"userId\", example_get_user.user_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetUser = Aws.IdentityStore.GetUser.Invoke(new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n AlternateIdentifier = new Aws.IdentityStore.Inputs.GetUserAlternateIdentifierInputArgs\n {\n UniqueAttribute = new Aws.IdentityStore.Inputs.GetUserAlternateIdentifierUniqueAttributeInputArgs\n {\n AttributePath = \"UserName\",\n AttributeValue = \"ExampleUser\",\n },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"userId\"] = exampleGetUser.Apply(getUserResult =\u003e getUserResult.UserId),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetUser, err := identitystore.LookupUser(ctx, \u0026identitystore.LookupUserArgs{\n\t\t\tIdentityStoreId: example.IdentityStoreIds[0],\n\t\t\tAlternateIdentifier: identitystore.GetUserAlternateIdentifier{\n\t\t\t\tUniqueAttribute: identitystore.GetUserAlternateIdentifierUniqueAttribute{\n\t\t\t\t\tAttributePath: \"UserName\",\n\t\t\t\t\tAttributeValue: \"ExampleUser\",\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"userId\", exampleGetUser.UserId)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.identitystore.IdentitystoreFunctions;\nimport com.pulumi.aws.identitystore.inputs.GetUserArgs;\nimport com.pulumi.aws.identitystore.inputs.GetUserAlternateIdentifierArgs;\nimport com.pulumi.aws.identitystore.inputs.GetUserAlternateIdentifierUniqueAttributeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetUser = IdentitystoreFunctions.getUser(GetUserArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .alternateIdentifier(GetUserAlternateIdentifierArgs.builder()\n .uniqueAttribute(GetUserAlternateIdentifierUniqueAttributeArgs.builder()\n .attributePath(\"UserName\")\n .attributeValue(\"ExampleUser\")\n .build())\n .build())\n .build());\n\n ctx.export(\"userId\", exampleGetUser.applyValue(getUserResult -\u003e getUserResult.userId()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetUser:\n fn::invoke:\n Function: aws:identitystore:getUser\n Arguments:\n identityStoreId: ${example.identityStoreIds[0]}\n alternateIdentifier:\n uniqueAttribute:\n attributePath: UserName\n attributeValue: ExampleUser\noutputs:\n userId: ${exampleGetUser.userId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get an Identity Store User.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetUser = example.then(example =\u003e aws.identitystore.getUser({\n identityStoreId: example.identityStoreIds?.[0],\n alternateIdentifier: {\n uniqueAttribute: {\n attributePath: \"UserName\",\n attributeValue: \"ExampleUser\",\n },\n },\n}));\nexport const userId = exampleGetUser.then(exampleGetUser =\u003e exampleGetUser.userId);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_user = aws.identitystore.get_user(identity_store_id=example.identity_store_ids[0],\n alternate_identifier={\n \"unique_attribute\": {\n \"attribute_path\": \"UserName\",\n \"attribute_value\": \"ExampleUser\",\n },\n })\npulumi.export(\"userId\", example_get_user.user_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetUser = Aws.IdentityStore.GetUser.Invoke(new()\n {\n IdentityStoreId = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n AlternateIdentifier = new Aws.IdentityStore.Inputs.GetUserAlternateIdentifierInputArgs\n {\n UniqueAttribute = new Aws.IdentityStore.Inputs.GetUserAlternateIdentifierUniqueAttributeInputArgs\n {\n AttributePath = \"UserName\",\n AttributeValue = \"ExampleUser\",\n },\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"userId\"] = exampleGetUser.Apply(getUserResult =\u003e getUserResult.UserId),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetUser, err := identitystore.LookupUser(ctx, \u0026identitystore.LookupUserArgs{\n\t\t\tIdentityStoreId: example.IdentityStoreIds[0],\n\t\t\tAlternateIdentifier: identitystore.GetUserAlternateIdentifier{\n\t\t\t\tUniqueAttribute: identitystore.GetUserAlternateIdentifierUniqueAttribute{\n\t\t\t\t\tAttributePath: \"UserName\",\n\t\t\t\t\tAttributeValue: \"ExampleUser\",\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"userId\", exampleGetUser.UserId)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.identitystore.IdentitystoreFunctions;\nimport com.pulumi.aws.identitystore.inputs.GetUserArgs;\nimport com.pulumi.aws.identitystore.inputs.GetUserAlternateIdentifierArgs;\nimport com.pulumi.aws.identitystore.inputs.GetUserAlternateIdentifierUniqueAttributeArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetUser = IdentitystoreFunctions.getUser(GetUserArgs.builder()\n .identityStoreId(example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]))\n .alternateIdentifier(GetUserAlternateIdentifierArgs.builder()\n .uniqueAttribute(GetUserAlternateIdentifierUniqueAttributeArgs.builder()\n .attributePath(\"UserName\")\n .attributeValue(\"ExampleUser\")\n .build())\n .build())\n .build());\n\n ctx.export(\"userId\", exampleGetUser.applyValue(getUserResult -\u003e getUserResult.userId()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetUser:\n fn::invoke:\n Function: aws:identitystore:getUser\n Arguments:\n identityStoreId: ${example.identityStoreIds[0]}\n alternateIdentifier:\n uniqueAttribute:\n attributePath: UserName\n attributeValue: ExampleUser\noutputs:\n userId: ${exampleGetUser.userId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getUser.\n", "properties": { @@ -401249,7 +401249,7 @@ } }, "aws:index/getBillingServiceAccount:getBillingServiceAccount": { - "description": "Use this data source to get the Account ID of the [AWS Billing and Cost Management Service Account](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2) for the purpose of permitting in S3 bucket policy.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.getBillingServiceAccount({});\nconst billingLogs = new aws.s3.BucketV2(\"billing_logs\", {bucket: \"my-billing-tf-test-bucket\"});\nconst billingLogsAcl = new aws.s3.BucketAclV2(\"billing_logs_acl\", {\n bucket: billingLogs.id,\n acl: \"private\",\n});\nconst allowBillingLogging = pulumi.all([main, billingLogs.arn, main, billingLogs.arn]).apply(([main, billingLogsArn, main1, billingLogsArn1]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main.arn],\n }],\n actions: [\n \"s3:GetBucketAcl\",\n \"s3:GetBucketPolicy\",\n ],\n resources: [billingLogsArn],\n },\n {\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main1.arn],\n }],\n actions: [\"s3:PutObject\"],\n resources: [`${billingLogsArn1}/*`],\n },\n ],\n}));\nconst allowBillingLoggingBucketPolicy = new aws.s3.BucketPolicy(\"allow_billing_logging\", {\n bucket: billingLogs.id,\n policy: allowBillingLogging.apply(allowBillingLogging =\u003e allowBillingLogging.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.get_billing_service_account()\nbilling_logs = aws.s3.BucketV2(\"billing_logs\", bucket=\"my-billing-tf-test-bucket\")\nbilling_logs_acl = aws.s3.BucketAclV2(\"billing_logs_acl\",\n bucket=billing_logs.id,\n acl=\"private\")\nallow_billing_logging = pulumi.Output.all(\n billingLogsArn=billing_logs.arn,\n billingLogsArn1=billing_logs.arn\n).apply(lambda resolved_outputs: aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\n \"s3:GetBucketAcl\",\n \"s3:GetBucketPolicy\",\n ],\n \"resources\": [resolved_outputs['billingLogsArn']],\n },\n {\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [f\"{resolved_outputs['billingLogsArn1']}/*\"],\n },\n]))\n\nallow_billing_logging_bucket_policy = aws.s3.BucketPolicy(\"allow_billing_logging\",\n bucket=billing_logs.id,\n policy=allow_billing_logging.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.GetBillingServiceAccount.Invoke();\n\n var billingLogs = new Aws.S3.BucketV2(\"billing_logs\", new()\n {\n Bucket = \"my-billing-tf-test-bucket\",\n });\n\n var billingLogsAcl = new Aws.S3.BucketAclV2(\"billing_logs_acl\", new()\n {\n Bucket = billingLogs.Id,\n Acl = \"private\",\n });\n\n var allowBillingLogging = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getBillingServiceAccountResult =\u003e getBillingServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:GetBucketAcl\",\n \"s3:GetBucketPolicy\",\n },\n Resources = new[]\n {\n billingLogs.Arn,\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getBillingServiceAccountResult =\u003e getBillingServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{billingLogs.Arn}/*\",\n },\n },\n },\n });\n\n var allowBillingLoggingBucketPolicy = new Aws.S3.BucketPolicy(\"allow_billing_logging\", new()\n {\n Bucket = billingLogs.Id,\n Policy = allowBillingLogging.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nmain, err := aws.GetBillingServiceAccount(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nbillingLogs, err := s3.NewBucketV2(ctx, \"billing_logs\", \u0026s3.BucketV2Args{\nBucket: pulumi.String(\"my-billing-tf-test-bucket\"),\n})\nif err != nil {\nreturn err\n}\n_, err = s3.NewBucketAclV2(ctx, \"billing_logs_acl\", \u0026s3.BucketAclV2Args{\nBucket: billingLogs.ID(),\nAcl: pulumi.String(\"private\"),\n})\nif err != nil {\nreturn err\n}\nallowBillingLogging := pulumi.All(billingLogs.Arn,billingLogs.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) {\nbillingLogsArn := _args[0].(string)\nbillingLogsArn1 := _args[1].(string)\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:GetBucketAcl\",\n\"s3:GetBucketPolicy\",\n},\nResources: []string{\nbillingLogsArn,\n},\n},\n{\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:PutObject\",\n},\nResources: []string{\nfmt.Sprintf(\"%v/*\", billingLogsArn1),\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = s3.NewBucketPolicy(ctx, \"allow_billing_logging\", \u0026s3.BucketPolicyArgs{\nBucket: billingLogs.ID(),\nPolicy: pulumi.String(allowBillingLogging.ApplyT(func(allowBillingLogging iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026allowBillingLogging.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetBillingServiceAccountArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = AwsFunctions.getBillingServiceAccount();\n\n var billingLogs = new BucketV2(\"billingLogs\", BucketV2Args.builder()\n .bucket(\"my-billing-tf-test-bucket\")\n .build());\n\n var billingLogsAcl = new BucketAclV2(\"billingLogsAcl\", BucketAclV2Args.builder()\n .bucket(billingLogs.id())\n .acl(\"private\")\n .build());\n\n final var allowBillingLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getBillingServiceAccountResult -\u003e getBillingServiceAccountResult.arn()))\n .build())\n .actions( \n \"s3:GetBucketAcl\",\n \"s3:GetBucketPolicy\")\n .resources(billingLogs.arn())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getBillingServiceAccountResult -\u003e getBillingServiceAccountResult.arn()))\n .build())\n .actions(\"s3:PutObject\")\n .resources(billingLogs.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build())\n .build());\n\n var allowBillingLoggingBucketPolicy = new BucketPolicy(\"allowBillingLoggingBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(billingLogs.id())\n .policy(allowBillingLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(allowBillingLogging -\u003e allowBillingLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n billingLogs:\n type: aws:s3:BucketV2\n name: billing_logs\n properties:\n bucket: my-billing-tf-test-bucket\n billingLogsAcl:\n type: aws:s3:BucketAclV2\n name: billing_logs_acl\n properties:\n bucket: ${billingLogs.id}\n acl: private\n allowBillingLoggingBucketPolicy:\n type: aws:s3:BucketPolicy\n name: allow_billing_logging\n properties:\n bucket: ${billingLogs.id}\n policy: ${allowBillingLogging.json}\nvariables:\n main:\n fn::invoke:\n Function: aws:getBillingServiceAccount\n Arguments: {}\n allowBillingLogging:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:GetBucketAcl\n - s3:GetBucketPolicy\n resources:\n - ${billingLogs.arn}\n - effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:PutObject\n resources:\n - ${billingLogs.arn}/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the Account ID of the [AWS Billing and Cost Management Service Account](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-getting-started.html#step-2) for the purpose of permitting in S3 bucket policy.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.getBillingServiceAccount({});\nconst billingLogs = new aws.s3.BucketV2(\"billing_logs\", {bucket: \"my-billing-tf-test-bucket\"});\nconst billingLogsAcl = new aws.s3.BucketAclV2(\"billing_logs_acl\", {\n bucket: billingLogs.id,\n acl: \"private\",\n});\nconst allowBillingLogging = pulumi.all([main, billingLogs.arn, main, billingLogs.arn]).apply(([main, billingLogsArn, main1, billingLogsArn1]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main.arn],\n }],\n actions: [\n \"s3:GetBucketAcl\",\n \"s3:GetBucketPolicy\",\n ],\n resources: [billingLogsArn],\n },\n {\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main1.arn],\n }],\n actions: [\"s3:PutObject\"],\n resources: [`${billingLogsArn1}/*`],\n },\n ],\n}));\nconst allowBillingLoggingBucketPolicy = new aws.s3.BucketPolicy(\"allow_billing_logging\", {\n bucket: billingLogs.id,\n policy: allowBillingLogging.apply(allowBillingLogging =\u003e allowBillingLogging.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.get_billing_service_account()\nbilling_logs = aws.s3.BucketV2(\"billing_logs\", bucket=\"my-billing-tf-test-bucket\")\nbilling_logs_acl = aws.s3.BucketAclV2(\"billing_logs_acl\",\n bucket=billing_logs.id,\n acl=\"private\")\nallow_billing_logging = pulumi.Output.all(\n billingLogsArn=billing_logs.arn,\n billingLogsArn1=billing_logs.arn\n).apply(lambda resolved_outputs: aws.iam.get_policy_document_output(statements=[\n {\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\n \"s3:GetBucketAcl\",\n \"s3:GetBucketPolicy\",\n ],\n \"resources\": [resolved_outputs['billingLogsArn']],\n },\n {\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [f\"{resolved_outputs['billingLogsArn1']}/*\"],\n },\n]))\n\nallow_billing_logging_bucket_policy = aws.s3.BucketPolicy(\"allow_billing_logging\",\n bucket=billing_logs.id,\n policy=allow_billing_logging.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.GetBillingServiceAccount.Invoke();\n\n var billingLogs = new Aws.S3.BucketV2(\"billing_logs\", new()\n {\n Bucket = \"my-billing-tf-test-bucket\",\n });\n\n var billingLogsAcl = new Aws.S3.BucketAclV2(\"billing_logs_acl\", new()\n {\n Bucket = billingLogs.Id,\n Acl = \"private\",\n });\n\n var allowBillingLogging = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getBillingServiceAccountResult =\u003e getBillingServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:GetBucketAcl\",\n \"s3:GetBucketPolicy\",\n },\n Resources = new[]\n {\n billingLogs.Arn,\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getBillingServiceAccountResult =\u003e getBillingServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{billingLogs.Arn}/*\",\n },\n },\n },\n });\n\n var allowBillingLoggingBucketPolicy = new Aws.S3.BucketPolicy(\"allow_billing_logging\", new()\n {\n Bucket = billingLogs.Id,\n Policy = allowBillingLogging.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nmain, err := aws.GetBillingServiceAccount(ctx, \u0026aws.GetBillingServiceAccountArgs{\n}, nil);\nif err != nil {\nreturn err\n}\nbillingLogs, err := s3.NewBucketV2(ctx, \"billing_logs\", \u0026s3.BucketV2Args{\nBucket: pulumi.String(\"my-billing-tf-test-bucket\"),\n})\nif err != nil {\nreturn err\n}\n_, err = s3.NewBucketAclV2(ctx, \"billing_logs_acl\", \u0026s3.BucketAclV2Args{\nBucket: billingLogs.ID(),\nAcl: pulumi.String(\"private\"),\n})\nif err != nil {\nreturn err\n}\nallowBillingLogging := pulumi.All(billingLogs.Arn,billingLogs.Arn).ApplyT(func(_args []interface{}) (iam.GetPolicyDocumentResult, error) {\nbillingLogsArn := _args[0].(string)\nbillingLogsArn1 := _args[1].(string)\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:GetBucketAcl\",\n\"s3:GetBucketPolicy\",\n},\nResources: []string{\nbillingLogsArn,\n},\n},\n{\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:PutObject\",\n},\nResources: []string{\nfmt.Sprintf(\"%v/*\", billingLogsArn1),\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = s3.NewBucketPolicy(ctx, \"allow_billing_logging\", \u0026s3.BucketPolicyArgs{\nBucket: billingLogs.ID(),\nPolicy: pulumi.String(allowBillingLogging.ApplyT(func(allowBillingLogging iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026allowBillingLogging.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetBillingServiceAccountArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.s3.BucketAclV2;\nimport com.pulumi.aws.s3.BucketAclV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = AwsFunctions.getBillingServiceAccount();\n\n var billingLogs = new BucketV2(\"billingLogs\", BucketV2Args.builder()\n .bucket(\"my-billing-tf-test-bucket\")\n .build());\n\n var billingLogsAcl = new BucketAclV2(\"billingLogsAcl\", BucketAclV2Args.builder()\n .bucket(billingLogs.id())\n .acl(\"private\")\n .build());\n\n final var allowBillingLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getBillingServiceAccountResult -\u003e getBillingServiceAccountResult.arn()))\n .build())\n .actions( \n \"s3:GetBucketAcl\",\n \"s3:GetBucketPolicy\")\n .resources(billingLogs.arn())\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getBillingServiceAccountResult -\u003e getBillingServiceAccountResult.arn()))\n .build())\n .actions(\"s3:PutObject\")\n .resources(billingLogs.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build())\n .build());\n\n var allowBillingLoggingBucketPolicy = new BucketPolicy(\"allowBillingLoggingBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(billingLogs.id())\n .policy(allowBillingLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(allowBillingLogging -\u003e allowBillingLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n billingLogs:\n type: aws:s3:BucketV2\n name: billing_logs\n properties:\n bucket: my-billing-tf-test-bucket\n billingLogsAcl:\n type: aws:s3:BucketAclV2\n name: billing_logs_acl\n properties:\n bucket: ${billingLogs.id}\n acl: private\n allowBillingLoggingBucketPolicy:\n type: aws:s3:BucketPolicy\n name: allow_billing_logging\n properties:\n bucket: ${billingLogs.id}\n policy: ${allowBillingLogging.json}\nvariables:\n main:\n fn::invoke:\n Function: aws:getBillingServiceAccount\n Arguments: {}\n allowBillingLogging:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:GetBucketAcl\n - s3:GetBucketPolicy\n resources:\n - ${billingLogs.arn}\n - effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:PutObject\n resources:\n - ${billingLogs.arn}/*\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getBillingServiceAccount.\n", "properties": { @@ -401280,7 +401280,7 @@ } }, "aws:index/getCallerIdentity:getCallerIdentity": { - "description": "Use this data source to get the access to the effective Account ID, User ID, and ARN in\nwhich this provider is authorized.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nexport const accountId = current.then(current =\u003e current.accountId);\nexport const callerArn = current.then(current =\u003e current.arn);\nexport const callerUser = current.then(current =\u003e current.userId);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\npulumi.export(\"accountId\", current.account_id)\npulumi.export(\"callerArn\", current.arn)\npulumi.export(\"callerUser\", current.user_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"accountId\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n [\"callerArn\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n [\"callerUser\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.UserId),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"accountId\", current.AccountId)\n\t\tctx.Export(\"callerArn\", current.Arn)\n\t\tctx.Export(\"callerUser\", current.UserId)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n ctx.export(\"accountId\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()));\n ctx.export(\"callerArn\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()));\n ctx.export(\"callerUser\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.userId()));\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\noutputs:\n accountId: ${current.accountId}\n callerArn: ${current.arn}\n callerUser: ${current.userId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the access to the effective Account ID, User ID, and ARN in\nwhich this provider is authorized.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nexport const accountId = current.then(current =\u003e current.accountId);\nexport const callerArn = current.then(current =\u003e current.arn);\nexport const callerUser = current.then(current =\u003e current.userId);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\npulumi.export(\"accountId\", current.account_id)\npulumi.export(\"callerArn\", current.arn)\npulumi.export(\"callerUser\", current.user_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"accountId\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId),\n [\"callerArn\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.Arn),\n [\"callerUser\"] = current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.UserId),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"accountId\", current.AccountId)\n\t\tctx.Export(\"callerArn\", current.Arn)\n\t\tctx.Export(\"callerUser\", current.UserId)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n ctx.export(\"accountId\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId()));\n ctx.export(\"callerArn\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.arn()));\n ctx.export(\"callerUser\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.userId()));\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\noutputs:\n accountId: ${current.accountId}\n callerArn: ${current.arn}\n callerUser: ${current.userId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getCallerIdentity.\n", "properties": { @@ -401321,7 +401321,7 @@ } }, "aws:index/getDefaultTags:getDefaultTags": { - "description": "Use this data source to get the default tags configured on the provider.\n\nWith this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.getDefaultTags({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.get_default_tags()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.GetDefaultTags.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetDefaultTags(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetDefaultTagsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = AwsFunctions.getDefaultTags();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:getDefaultTags\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Dynamically Apply Default Tags to Auto Scaling Group\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.getDefaultTags({});\nconst exampleGroup = new aws.autoscaling.Group(\"example\", {tags: .map(entry =\u003e ({\n key: entry.key,\n value: entry.value,\n propagateAtLaunch: true,\n}))});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.get_default_tags()\nexample_group = aws.autoscaling.Group(\"example\", tags=[{\n \"key\": entry[\"key\"],\n \"value\": entry[\"value\"],\n \"propagate_at_launch\": True,\n} for entry in [{\"key\": k, \"value\": v} for k, v in example.tags]])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.GetDefaultTags.Invoke();\n\n var exampleGroup = new Aws.AutoScaling.Group(\"example\", new()\n {\n Tags = ,\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the default tags configured on the provider.\n\nWith this data source, you can apply default tags to resources not _directly_ managed by a resource, such as the instances underneath an Auto Scaling group or the volumes created for an EC2 instance.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.getDefaultTags({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.get_default_tags()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.GetDefaultTags.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetDefaultTags(ctx, \u0026aws.GetDefaultTagsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetDefaultTagsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = AwsFunctions.getDefaultTags();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:getDefaultTags\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Dynamically Apply Default Tags to Auto Scaling Group\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.getDefaultTags({});\nconst exampleGroup = new aws.autoscaling.Group(\"example\", {tags: .map(entry =\u003e ({\n key: entry.key,\n value: entry.value,\n propagateAtLaunch: true,\n}))});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.get_default_tags()\nexample_group = aws.autoscaling.Group(\"example\", tags=[{\n \"key\": entry[\"key\"],\n \"value\": entry[\"value\"],\n \"propagate_at_launch\": True,\n} for entry in [{\"key\": k, \"value\": v} for k, v in example.tags]])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.GetDefaultTags.Invoke();\n\n var exampleGroup = new Aws.AutoScaling.Group(\"example\", new()\n {\n Tags = ,\n });\n\n});\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getDefaultTags.\n", "properties": { @@ -401440,7 +401440,7 @@ } }, "aws:index/getPartition:getPartition": { - "description": "Use this data source to lookup information about the current AWS partition in\nwhich the provider is working.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getPartition({});\nconst s3Policy = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"1\",\n actions: [\"s3:ListBucket\"],\n resources: [`arn:${current.partition}:s3:::my-bucket`],\n }],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_partition()\ns3_policy = aws.iam.get_policy_document(statements=[{\n \"sid\": \"1\",\n \"actions\": [\"s3:ListBucket\"],\n \"resources\": [f\"arn:{current.partition}:s3:::my-bucket\"],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetPartition.Invoke();\n\n var s3Policy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"1\",\n Actions = new[]\n {\n \"s3:ListBucket\",\n },\n Resources = new[]\n {\n $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:s3:::my-bucket\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetPartition(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"1\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListBucket\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:%v:s3:::my-bucket\", current.Partition),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getPartition();\n\n final var s3Policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"1\")\n .actions(\"s3:ListBucket\")\n .resources(String.format(\"arn:%s:s3:::my-bucket\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n s3Policy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: '1'\n actions:\n - s3:ListBucket\n resources:\n - arn:${current.partition}:s3:::my-bucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to lookup information about the current AWS partition in\nwhich the provider is working.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getPartition({});\nconst s3Policy = current.then(current =\u003e aws.iam.getPolicyDocument({\n statements: [{\n sid: \"1\",\n actions: [\"s3:ListBucket\"],\n resources: [`arn:${current.partition}:s3:::my-bucket`],\n }],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_partition()\ns3_policy = aws.iam.get_policy_document(statements=[{\n \"sid\": \"1\",\n \"actions\": [\"s3:ListBucket\"],\n \"resources\": [f\"arn:{current.partition}:s3:::my-bucket\"],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetPartition.Invoke();\n\n var s3Policy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"1\",\n Actions = new[]\n {\n \"s3:ListBucket\",\n },\n Resources = new[]\n {\n $\"arn:{current.Apply(getPartitionResult =\u003e getPartitionResult.Partition)}:s3:::my-bucket\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetPartition(ctx, \u0026aws.GetPartitionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = iam.GetPolicyDocument(ctx, \u0026iam.GetPolicyDocumentArgs{\n\t\t\tStatements: []iam.GetPolicyDocumentStatement{\n\t\t\t\t{\n\t\t\t\t\tSid: pulumi.StringRef(\"1\"),\n\t\t\t\t\tActions: []string{\n\t\t\t\t\t\t\"s3:ListBucket\",\n\t\t\t\t\t},\n\t\t\t\t\tResources: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:%v:s3:::my-bucket\", current.Partition),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetPartitionArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getPartition();\n\n final var s3Policy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .sid(\"1\")\n .actions(\"s3:ListBucket\")\n .resources(String.format(\"arn:%s:s3:::my-bucket\", current.applyValue(getPartitionResult -\u003e getPartitionResult.partition())))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getPartition\n Arguments: {}\n s3Policy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: '1'\n actions:\n - s3:ListBucket\n resources:\n - arn:${current.partition}:s3:::my-bucket\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getPartition.\n", "properties": { @@ -401481,7 +401481,7 @@ } }, "aws:index/getRegion:getRegion": { - "description": "`aws.getRegion` provides details about a specific AWS region.\n\nAs well as validating a given region name this resource can be used to\ndiscover the name of the region configured within the provider. The latter\ncan be useful in a child module which is inheriting an AWS provider\nconfiguration from its parent module.\n\n## Example Usage\n\nThe following example shows how the resource might be used to obtain\nthe name of the AWS region configured on the provider.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "`aws.getRegion` provides details about a specific AWS region.\n\nAs well as validating a given region name this resource can be used to\ndiscover the name of the region configured within the provider. The latter\ncan be useful in a child module which is inheriting an AWS provider\nconfiguration from its parent module.\n\n## Example Usage\n\nThe following example shows how the resource might be used to obtain\nthe name of the AWS region configured on the provider.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getRegion.\n", "properties": { @@ -401528,7 +401528,7 @@ } }, "aws:index/getRegions:getRegions": { - "description": "Provides information about AWS Regions. Can be used to filter regions i.e., by Opt-In status or only regions enabled for current account. To get details like endpoint and description of each region the data source can be combined with the `aws.getRegion` data source.\n\n## Example Usage\n\nEnabled AWS Regions:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegions({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_regions()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegions.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegions(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegions();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nAll the regions regardless of the availability\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegions({\n allRegions: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_regions(all_regions=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegions.Invoke(new()\n {\n AllRegions = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegions(ctx, \u0026aws.GetRegionsArgs{\n\t\t\tAllRegions: pulumi.BoolRef(true),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()\n .allRegions(true)\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegions\n Arguments:\n allRegions: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nTo see regions that are filtered by `\"not-opted-in\"`, the `all_regions` argument needs to be set to `true` or no results will be returned.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegions({\n allRegions: true,\n filters: [{\n name: \"opt-in-status\",\n values: [\"not-opted-in\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_regions(all_regions=True,\n filters=[{\n \"name\": \"opt-in-status\",\n \"values\": [\"not-opted-in\"],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegions.Invoke(new()\n {\n AllRegions = true,\n Filters = new[]\n {\n new Aws.Inputs.GetRegionsFilterInputArgs\n {\n Name = \"opt-in-status\",\n Values = new[]\n {\n \"not-opted-in\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegions(ctx, \u0026aws.GetRegionsArgs{\n\t\t\tAllRegions: pulumi.BoolRef(true),\n\t\t\tFilters: []aws.GetRegionsFilter{\n\t\t\t\t{\n\t\t\t\t\tName: \"opt-in-status\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\"not-opted-in\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()\n .allRegions(true)\n .filters(GetRegionsFilterArgs.builder()\n .name(\"opt-in-status\")\n .values(\"not-opted-in\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegions\n Arguments:\n allRegions: true\n filters:\n - name: opt-in-status\n values:\n - not-opted-in\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides information about AWS Regions. Can be used to filter regions i.e., by Opt-In status or only regions enabled for current account. To get details like endpoint and description of each region the data source can be combined with the `aws.getRegion` data source.\n\n## Example Usage\n\nEnabled AWS Regions:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegions({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_regions()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegions.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegions(ctx, \u0026aws.GetRegionsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegions();\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nAll the regions regardless of the availability\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegions({\n allRegions: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_regions(all_regions=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegions.Invoke(new()\n {\n AllRegions = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegions(ctx, \u0026aws.GetRegionsArgs{\n\t\t\tAllRegions: pulumi.BoolRef(true),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()\n .allRegions(true)\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegions\n Arguments:\n allRegions: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nTo see regions that are filtered by `\"not-opted-in\"`, the `all_regions` argument needs to be set to `true` or no results will be returned.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegions({\n allRegions: true,\n filters: [{\n name: \"opt-in-status\",\n values: [\"not-opted-in\"],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_regions(all_regions=True,\n filters=[{\n \"name\": \"opt-in-status\",\n \"values\": [\"not-opted-in\"],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegions.Invoke(new()\n {\n AllRegions = true,\n Filters = new[]\n {\n new Aws.Inputs.GetRegionsFilterInputArgs\n {\n Name = \"opt-in-status\",\n Values = new[]\n {\n \"not-opted-in\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetRegions(ctx, \u0026aws.GetRegionsArgs{\n\t\t\tAllRegions: pulumi.BoolRef(true),\n\t\t\tFilters: []aws.GetRegionsFilter{\n\t\t\t\t{\n\t\t\t\t\tName: \"opt-in-status\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\"not-opted-in\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegions(GetRegionsArgs.builder()\n .allRegions(true)\n .filters(GetRegionsFilterArgs.builder()\n .name(\"opt-in-status\")\n .values(\"not-opted-in\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegions\n Arguments:\n allRegions: true\n filters:\n - name: opt-in-status\n values:\n - not-opted-in\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getRegions.\n", "properties": { @@ -401582,7 +401582,7 @@ } }, "aws:index/getService:getService": { - "description": "Use this data source to compose and decompose AWS service DNS names.\n\n## Example Usage\n\n### Get Service DNS Name\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst test = current.then(current =\u003e aws.getService({\n region: current.name,\n serviceId: \"ec2\",\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ntest = aws.get_service(region=current.name,\n service_id=\"ec2\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var test = Aws.GetService.Invoke(new()\n {\n Region = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n ServiceId = \"ec2\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = aws.GetService(ctx, \u0026aws.GetServiceArgs{\n\t\t\tRegion: pulumi.StringRef(current.Name),\n\t\t\tServiceId: pulumi.StringRef(\"ec2\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var test = AwsFunctions.getService(GetServiceArgs.builder()\n .region(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .serviceId(\"ec2\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n test:\n fn::invoke:\n Function: aws:getService\n Arguments:\n region: ${current.name}\n serviceId: ec2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Use Service Reverse DNS Name to Get Components\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst s3 = aws.getService({\n reverseDnsName: \"cn.com.amazonaws.cn-north-1.s3\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ns3 = aws.get_service(reverse_dns_name=\"cn.com.amazonaws.cn-north-1.s3\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var s3 = Aws.GetService.Invoke(new()\n {\n ReverseDnsName = \"cn.com.amazonaws.cn-north-1.s3\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetService(ctx, \u0026aws.GetServiceArgs{\n\t\t\tReverseDnsName: pulumi.StringRef(\"cn.com.amazonaws.cn-north-1.s3\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var s3 = AwsFunctions.getService(GetServiceArgs.builder()\n .reverseDnsName(\"cn.com.amazonaws.cn-north-1.s3\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n s3:\n fn::invoke:\n Function: aws:getService\n Arguments:\n reverseDnsName: cn.com.amazonaws.cn-north-1.s3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Determine Regional Support for a Service\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst s3 = aws.getService({\n reverseDnsName: \"com.amazonaws.us-gov-west-1.waf\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ns3 = aws.get_service(reverse_dns_name=\"com.amazonaws.us-gov-west-1.waf\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var s3 = Aws.GetService.Invoke(new()\n {\n ReverseDnsName = \"com.amazonaws.us-gov-west-1.waf\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetService(ctx, \u0026aws.GetServiceArgs{\n\t\t\tReverseDnsName: pulumi.StringRef(\"com.amazonaws.us-gov-west-1.waf\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var s3 = AwsFunctions.getService(GetServiceArgs.builder()\n .reverseDnsName(\"com.amazonaws.us-gov-west-1.waf\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n s3:\n fn::invoke:\n Function: aws:getService\n Arguments:\n reverseDnsName: com.amazonaws.us-gov-west-1.waf\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to compose and decompose AWS service DNS names.\n\n## Example Usage\n\n### Get Service DNS Name\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst test = current.then(current =\u003e aws.getService({\n region: current.name,\n serviceId: \"ec2\",\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\ntest = aws.get_service(region=current.name,\n service_id=\"ec2\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var test = Aws.GetService.Invoke(new()\n {\n Region = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n ServiceId = \"ec2\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = aws.GetService(ctx, \u0026aws.GetServiceArgs{\n\t\t\tRegion: pulumi.StringRef(current.Name),\n\t\t\tServiceId: pulumi.StringRef(\"ec2\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.inputs.GetServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var test = AwsFunctions.getService(GetServiceArgs.builder()\n .region(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .serviceId(\"ec2\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n test:\n fn::invoke:\n Function: aws:getService\n Arguments:\n region: ${current.name}\n serviceId: ec2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Use Service Reverse DNS Name to Get Components\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst s3 = aws.getService({\n reverseDnsName: \"cn.com.amazonaws.cn-north-1.s3\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ns3 = aws.get_service(reverse_dns_name=\"cn.com.amazonaws.cn-north-1.s3\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var s3 = Aws.GetService.Invoke(new()\n {\n ReverseDnsName = \"cn.com.amazonaws.cn-north-1.s3\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetService(ctx, \u0026aws.GetServiceArgs{\n\t\t\tReverseDnsName: pulumi.StringRef(\"cn.com.amazonaws.cn-north-1.s3\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var s3 = AwsFunctions.getService(GetServiceArgs.builder()\n .reverseDnsName(\"cn.com.amazonaws.cn-north-1.s3\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n s3:\n fn::invoke:\n Function: aws:getService\n Arguments:\n reverseDnsName: cn.com.amazonaws.cn-north-1.s3\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Determine Regional Support for a Service\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst s3 = aws.getService({\n reverseDnsName: \"com.amazonaws.us-gov-west-1.waf\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ns3 = aws.get_service(reverse_dns_name=\"com.amazonaws.us-gov-west-1.waf\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var s3 = Aws.GetService.Invoke(new()\n {\n ReverseDnsName = \"com.amazonaws.us-gov-west-1.waf\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := aws.GetService(ctx, \u0026aws.GetServiceArgs{\n\t\t\tReverseDnsName: pulumi.StringRef(\"com.amazonaws.us-gov-west-1.waf\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetServiceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var s3 = AwsFunctions.getService(GetServiceArgs.builder()\n .reverseDnsName(\"com.amazonaws.us-gov-west-1.waf\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n s3:\n fn::invoke:\n Function: aws:getService\n Arguments:\n reverseDnsName: com.amazonaws.us-gov-west-1.waf\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getService.\n", "properties": { @@ -401707,7 +401707,7 @@ } }, "aws:inspector/getRulesPackages:getRulesPackages": { - "description": "The Amazon Inspector Classic Rules Packages data source allows access to the list of AWS\nInspector Rules Packages which can be used by Amazon Inspector Classic within the region\nconfigured in the provider.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// Declare the data source\nconst rules = aws.inspector.getRulesPackages({});\n// e.g., Use in aws_inspector_assessment_template\nconst group = new aws.inspector.ResourceGroup(\"group\", {tags: {\n test: \"test\",\n}});\nconst assessment = new aws.inspector.AssessmentTarget(\"assessment\", {\n name: \"test\",\n resourceGroupArn: group.arn,\n});\nconst assessmentAssessmentTemplate = new aws.inspector.AssessmentTemplate(\"assessment\", {\n name: \"Test\",\n targetArn: assessment.arn,\n duration: 60,\n rulesPackageArns: rules.then(rules =\u003e rules.arns),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# Declare the data source\nrules = aws.inspector.get_rules_packages()\n# e.g., Use in aws_inspector_assessment_template\ngroup = aws.inspector.ResourceGroup(\"group\", tags={\n \"test\": \"test\",\n})\nassessment = aws.inspector.AssessmentTarget(\"assessment\",\n name=\"test\",\n resource_group_arn=group.arn)\nassessment_assessment_template = aws.inspector.AssessmentTemplate(\"assessment\",\n name=\"Test\",\n target_arn=assessment.arn,\n duration=60,\n rules_package_arns=rules.arns)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Declare the data source\n var rules = Aws.Inspector.GetRulesPackages.Invoke();\n\n // e.g., Use in aws_inspector_assessment_template\n var @group = new Aws.Inspector.ResourceGroup(\"group\", new()\n {\n Tags = \n {\n { \"test\", \"test\" },\n },\n });\n\n var assessment = new Aws.Inspector.AssessmentTarget(\"assessment\", new()\n {\n Name = \"test\",\n ResourceGroupArn = @group.Arn,\n });\n\n var assessmentAssessmentTemplate = new Aws.Inspector.AssessmentTemplate(\"assessment\", new()\n {\n Name = \"Test\",\n TargetArn = assessment.Arn,\n Duration = 60,\n RulesPackageArns = rules.Apply(getRulesPackagesResult =\u003e getRulesPackagesResult.Arns),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// Declare the data source\n\t\trules, err := inspector.GetRulesPackages(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// e.g., Use in aws_inspector_assessment_template\n\t\tgroup, err := inspector.NewResourceGroup(ctx, \"group\", \u0026inspector.ResourceGroupArgs{\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"test\": pulumi.String(\"test\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tassessment, err := inspector.NewAssessmentTarget(ctx, \"assessment\", \u0026inspector.AssessmentTargetArgs{\n\t\t\tName: pulumi.String(\"test\"),\n\t\t\tResourceGroupArn: group.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = inspector.NewAssessmentTemplate(ctx, \"assessment\", \u0026inspector.AssessmentTemplateArgs{\n\t\t\tName: pulumi.String(\"Test\"),\n\t\t\tTargetArn: assessment.Arn,\n\t\t\tDuration: pulumi.Int(60),\n\t\t\tRulesPackageArns: interface{}(rules.Arns),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.inspector.InspectorFunctions;\nimport com.pulumi.aws.inspector.ResourceGroup;\nimport com.pulumi.aws.inspector.ResourceGroupArgs;\nimport com.pulumi.aws.inspector.AssessmentTarget;\nimport com.pulumi.aws.inspector.AssessmentTargetArgs;\nimport com.pulumi.aws.inspector.AssessmentTemplate;\nimport com.pulumi.aws.inspector.AssessmentTemplateArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Declare the data source\n final var rules = InspectorFunctions.getRulesPackages();\n\n // e.g., Use in aws_inspector_assessment_template\n var group = new ResourceGroup(\"group\", ResourceGroupArgs.builder()\n .tags(Map.of(\"test\", \"test\"))\n .build());\n\n var assessment = new AssessmentTarget(\"assessment\", AssessmentTargetArgs.builder()\n .name(\"test\")\n .resourceGroupArn(group.arn())\n .build());\n\n var assessmentAssessmentTemplate = new AssessmentTemplate(\"assessmentAssessmentTemplate\", AssessmentTemplateArgs.builder()\n .name(\"Test\")\n .targetArn(assessment.arn())\n .duration(\"60\")\n .rulesPackageArns(rules.applyValue(getRulesPackagesResult -\u003e getRulesPackagesResult.arns()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # e.g., Use in aws_inspector_assessment_template\n group:\n type: aws:inspector:ResourceGroup\n properties:\n tags:\n test: test\n assessment:\n type: aws:inspector:AssessmentTarget\n properties:\n name: test\n resourceGroupArn: ${group.arn}\n assessmentAssessmentTemplate:\n type: aws:inspector:AssessmentTemplate\n name: assessment\n properties:\n name: Test\n targetArn: ${assessment.arn}\n duration: '60'\n rulesPackageArns: ${rules.arns}\nvariables:\n # Declare the data source\n rules:\n fn::invoke:\n Function: aws:inspector:getRulesPackages\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The Amazon Inspector Classic Rules Packages data source allows access to the list of AWS\nInspector Rules Packages which can be used by Amazon Inspector Classic within the region\nconfigured in the provider.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\n// Declare the data source\nconst rules = aws.inspector.getRulesPackages({});\n// e.g., Use in aws_inspector_assessment_template\nconst group = new aws.inspector.ResourceGroup(\"group\", {tags: {\n test: \"test\",\n}});\nconst assessment = new aws.inspector.AssessmentTarget(\"assessment\", {\n name: \"test\",\n resourceGroupArn: group.arn,\n});\nconst assessmentAssessmentTemplate = new aws.inspector.AssessmentTemplate(\"assessment\", {\n name: \"Test\",\n targetArn: assessment.arn,\n duration: 60,\n rulesPackageArns: rules.then(rules =\u003e rules.arns),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\n# Declare the data source\nrules = aws.inspector.get_rules_packages()\n# e.g., Use in aws_inspector_assessment_template\ngroup = aws.inspector.ResourceGroup(\"group\", tags={\n \"test\": \"test\",\n})\nassessment = aws.inspector.AssessmentTarget(\"assessment\",\n name=\"test\",\n resource_group_arn=group.arn)\nassessment_assessment_template = aws.inspector.AssessmentTemplate(\"assessment\",\n name=\"Test\",\n target_arn=assessment.arn,\n duration=60,\n rules_package_arns=rules.arns)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Declare the data source\n var rules = Aws.Inspector.GetRulesPackages.Invoke();\n\n // e.g., Use in aws_inspector_assessment_template\n var @group = new Aws.Inspector.ResourceGroup(\"group\", new()\n {\n Tags = \n {\n { \"test\", \"test\" },\n },\n });\n\n var assessment = new Aws.Inspector.AssessmentTarget(\"assessment\", new()\n {\n Name = \"test\",\n ResourceGroupArn = @group.Arn,\n });\n\n var assessmentAssessmentTemplate = new Aws.Inspector.AssessmentTemplate(\"assessment\", new()\n {\n Name = \"Test\",\n TargetArn = assessment.Arn,\n Duration = 60,\n RulesPackageArns = rules.Apply(getRulesPackagesResult =\u003e getRulesPackagesResult.Arns),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t// Declare the data source\n\t\trules, err := inspector.GetRulesPackages(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// e.g., Use in aws_inspector_assessment_template\n\t\tgroup, err := inspector.NewResourceGroup(ctx, \"group\", \u0026inspector.ResourceGroupArgs{\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"test\": pulumi.String(\"test\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tassessment, err := inspector.NewAssessmentTarget(ctx, \"assessment\", \u0026inspector.AssessmentTargetArgs{\n\t\t\tName: pulumi.String(\"test\"),\n\t\t\tResourceGroupArn: group.Arn,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = inspector.NewAssessmentTemplate(ctx, \"assessment\", \u0026inspector.AssessmentTemplateArgs{\n\t\t\tName: pulumi.String(\"Test\"),\n\t\t\tTargetArn: assessment.Arn,\n\t\t\tDuration: pulumi.Int(60),\n\t\t\tRulesPackageArns: interface{}(rules.Arns),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.inspector.InspectorFunctions;\nimport com.pulumi.aws.inspector.ResourceGroup;\nimport com.pulumi.aws.inspector.ResourceGroupArgs;\nimport com.pulumi.aws.inspector.AssessmentTarget;\nimport com.pulumi.aws.inspector.AssessmentTargetArgs;\nimport com.pulumi.aws.inspector.AssessmentTemplate;\nimport com.pulumi.aws.inspector.AssessmentTemplateArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n // Declare the data source\n final var rules = InspectorFunctions.getRulesPackages();\n\n // e.g., Use in aws_inspector_assessment_template\n var group = new ResourceGroup(\"group\", ResourceGroupArgs.builder()\n .tags(Map.of(\"test\", \"test\"))\n .build());\n\n var assessment = new AssessmentTarget(\"assessment\", AssessmentTargetArgs.builder()\n .name(\"test\")\n .resourceGroupArn(group.arn())\n .build());\n\n var assessmentAssessmentTemplate = new AssessmentTemplate(\"assessmentAssessmentTemplate\", AssessmentTemplateArgs.builder()\n .name(\"Test\")\n .targetArn(assessment.arn())\n .duration(\"60\")\n .rulesPackageArns(rules.applyValue(getRulesPackagesResult -\u003e getRulesPackagesResult.arns()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # e.g., Use in aws_inspector_assessment_template\n group:\n type: aws:inspector:ResourceGroup\n properties:\n tags:\n test: test\n assessment:\n type: aws:inspector:AssessmentTarget\n properties:\n name: test\n resourceGroupArn: ${group.arn}\n assessmentAssessmentTemplate:\n type: aws:inspector:AssessmentTemplate\n name: assessment\n properties:\n name: Test\n targetArn: ${assessment.arn}\n duration: '60'\n rulesPackageArns: ${rules.arns}\nvariables:\n # Declare the data source\n rules:\n fn::invoke:\n Function: aws:inspector:getRulesPackages\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getRulesPackages.\n", "properties": { @@ -401765,7 +401765,7 @@ } }, "aws:iot/getRegistrationCode:getRegistrationCode": { - "description": "Gets a registration code used to register a CA certificate with AWS IoT.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as tls from \"@pulumi/tls\";\n\nconst example = aws.iot.getRegistrationCode({});\nconst verification = new tls.PrivateKey(\"verification\", {algorithm: \"RSA\"});\nconst verificationCertRequest = new tls.CertRequest(\"verification\", {\n keyAlgorithm: \"RSA\",\n privateKeyPem: verification.privateKeyPem,\n subject: {\n commonName: example.then(example =\u003e example.registrationCode),\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_tls as tls\n\nexample = aws.iot.get_registration_code()\nverification = tls.PrivateKey(\"verification\", algorithm=\"RSA\")\nverification_cert_request = tls.CertRequest(\"verification\",\n key_algorithm=\"RSA\",\n private_key_pem=verification.private_key_pem,\n subject={\n \"common_name\": example.registration_code,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Tls = Pulumi.Tls;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Iot.GetRegistrationCode.Invoke();\n\n var verification = new Tls.PrivateKey(\"verification\", new()\n {\n Algorithm = \"RSA\",\n });\n\n var verificationCertRequest = new Tls.CertRequest(\"verification\", new()\n {\n KeyAlgorithm = \"RSA\",\n PrivateKeyPem = verification.PrivateKeyPem,\n Subject = new Tls.Inputs.CertRequestSubjectArgs\n {\n CommonName = example.Apply(getRegistrationCodeResult =\u003e getRegistrationCodeResult.RegistrationCode),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot\"\n\t\"github.com/pulumi/pulumi-tls/sdk/v4/go/tls\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := iot.GetRegistrationCode(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tverification, err := tls.NewPrivateKey(ctx, \"verification\", \u0026tls.PrivateKeyArgs{\n\t\t\tAlgorithm: pulumi.String(\"RSA\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = tls.NewCertRequest(ctx, \"verification\", \u0026tls.CertRequestArgs{\n\t\t\tKeyAlgorithm: pulumi.String(\"RSA\"),\n\t\t\tPrivateKeyPem: verification.PrivateKeyPem,\n\t\t\tSubject: \u0026tls.CertRequestSubjectArgs{\n\t\t\t\tCommonName: pulumi.String(example.RegistrationCode),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iot.IotFunctions;\nimport com.pulumi.tls.PrivateKey;\nimport com.pulumi.tls.PrivateKeyArgs;\nimport com.pulumi.tls.CertRequest;\nimport com.pulumi.tls.CertRequestArgs;\nimport com.pulumi.tls.inputs.CertRequestSubjectArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = IotFunctions.getRegistrationCode();\n\n var verification = new PrivateKey(\"verification\", PrivateKeyArgs.builder()\n .algorithm(\"RSA\")\n .build());\n\n var verificationCertRequest = new CertRequest(\"verificationCertRequest\", CertRequestArgs.builder()\n .keyAlgorithm(\"RSA\")\n .privateKeyPem(verification.privateKeyPem())\n .subject(CertRequestSubjectArgs.builder()\n .commonName(example.applyValue(getRegistrationCodeResult -\u003e getRegistrationCodeResult.registrationCode()))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n verification:\n type: tls:PrivateKey\n properties:\n algorithm: RSA\n verificationCertRequest:\n type: tls:CertRequest\n name: verification\n properties:\n keyAlgorithm: RSA\n privateKeyPem: ${verification.privateKeyPem}\n subject:\n commonName: ${example.registrationCode}\nvariables:\n example:\n fn::invoke:\n Function: aws:iot:getRegistrationCode\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Gets a registration code used to register a CA certificate with AWS IoT.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as tls from \"@pulumi/tls\";\n\nconst example = aws.iot.getRegistrationCode({});\nconst verification = new tls.PrivateKey(\"verification\", {algorithm: \"RSA\"});\nconst verificationCertRequest = new tls.CertRequest(\"verification\", {\n keyAlgorithm: \"RSA\",\n privateKeyPem: verification.privateKeyPem,\n subject: {\n commonName: example.then(example =\u003e example.registrationCode),\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_tls as tls\n\nexample = aws.iot.get_registration_code()\nverification = tls.PrivateKey(\"verification\", algorithm=\"RSA\")\nverification_cert_request = tls.CertRequest(\"verification\",\n key_algorithm=\"RSA\",\n private_key_pem=verification.private_key_pem,\n subject={\n \"common_name\": example.registration_code,\n })\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Tls = Pulumi.Tls;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Iot.GetRegistrationCode.Invoke();\n\n var verification = new Tls.PrivateKey(\"verification\", new()\n {\n Algorithm = \"RSA\",\n });\n\n var verificationCertRequest = new Tls.CertRequest(\"verification\", new()\n {\n KeyAlgorithm = \"RSA\",\n PrivateKeyPem = verification.PrivateKeyPem,\n Subject = new Tls.Inputs.CertRequestSubjectArgs\n {\n CommonName = example.Apply(getRegistrationCodeResult =\u003e getRegistrationCodeResult.RegistrationCode),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot\"\n\t\"github.com/pulumi/pulumi-tls/sdk/v4/go/tls\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := iot.GetRegistrationCode(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tverification, err := tls.NewPrivateKey(ctx, \"verification\", \u0026tls.PrivateKeyArgs{\n\t\t\tAlgorithm: pulumi.String(\"RSA\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = tls.NewCertRequest(ctx, \"verification\", \u0026tls.CertRequestArgs{\n\t\t\tKeyAlgorithm: pulumi.String(\"RSA\"),\n\t\t\tPrivateKeyPem: verification.PrivateKeyPem,\n\t\t\tSubject: \u0026tls.CertRequestSubjectArgs{\n\t\t\t\tCommonName: pulumi.String(example.RegistrationCode),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iot.IotFunctions;\nimport com.pulumi.tls.PrivateKey;\nimport com.pulumi.tls.PrivateKeyArgs;\nimport com.pulumi.tls.CertRequest;\nimport com.pulumi.tls.CertRequestArgs;\nimport com.pulumi.tls.inputs.CertRequestSubjectArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = IotFunctions.getRegistrationCode();\n\n var verification = new PrivateKey(\"verification\", PrivateKeyArgs.builder()\n .algorithm(\"RSA\")\n .build());\n\n var verificationCertRequest = new CertRequest(\"verificationCertRequest\", CertRequestArgs.builder()\n .keyAlgorithm(\"RSA\")\n .privateKeyPem(verification.privateKeyPem())\n .subject(CertRequestSubjectArgs.builder()\n .commonName(example.applyValue(getRegistrationCodeResult -\u003e getRegistrationCodeResult.registrationCode()))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n verification:\n type: tls:PrivateKey\n properties:\n algorithm: RSA\n verificationCertRequest:\n type: tls:CertRequest\n name: verification\n properties:\n keyAlgorithm: RSA\n privateKeyPem: ${verification.privateKeyPem}\n subject:\n commonName: ${example.registrationCode}\nvariables:\n example:\n fn::invoke:\n Function: aws:iot:getRegistrationCode\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getRegistrationCode.\n", "properties": { @@ -403819,7 +403819,7 @@ } }, "aws:lambda/getFunctions:getFunctions": { - "description": "Data resource to get a list of Lambda Functions.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst all = aws.lambda.getFunctions({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nall = aws.lambda.get_functions()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var all = Aws.Lambda.GetFunctions.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lambda.GetFunctions(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lambda.LambdaFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var all = LambdaFunctions.getFunctions();\n\n }\n}\n```\n```yaml\nvariables:\n all:\n fn::invoke:\n Function: aws:lambda:getFunctions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data resource to get a list of Lambda Functions.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst all = aws.lambda.getFunctions({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nall = aws.lambda.get_functions()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var all = Aws.Lambda.GetFunctions.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := lambda.GetFunctions(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lambda.LambdaFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var all = LambdaFunctions.getFunctions();\n\n }\n}\n```\n```yaml\nvariables:\n all:\n fn::invoke:\n Function: aws:lambda:getFunctions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getFunctions.\n", "properties": { @@ -404028,7 +404028,7 @@ } }, "aws:lb/getHostedZoneId:getHostedZoneId": { - "description": "Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing (ELB) in a given region for the purpose of using in an AWS Route53 Alias. Specify the ELB type (`network` or `application`) to return the relevant the associated HostedZoneId. Ref: [ELB service endpoints](https://docs.aws.amazon.com/general/latest/gr/elb.html#elb_region)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.lb.getHostedZoneId({});\nconst www = new aws.route53.Record(\"www\", {\n zoneId: primary.zoneId,\n name: \"example.com\",\n type: aws.route53.RecordType.A,\n aliases: [{\n name: mainAwsLb.dnsName,\n zoneId: main.then(main =\u003e main.id),\n evaluateTargetHealth: true,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.lb.get_hosted_zone_id()\nwww = aws.route53.Record(\"www\",\n zone_id=primary[\"zoneId\"],\n name=\"example.com\",\n type=aws.route53.RecordType.A,\n aliases=[{\n \"name\": main_aws_lb[\"dnsName\"],\n \"zone_id\": main.id,\n \"evaluate_target_health\": True,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.LB.GetHostedZoneId.Invoke();\n\n var www = new Aws.Route53.Record(\"www\", new()\n {\n ZoneId = primary.ZoneId,\n Name = \"example.com\",\n Type = Aws.Route53.RecordType.A,\n Aliases = new[]\n {\n new Aws.Route53.Inputs.RecordAliasArgs\n {\n Name = mainAwsLb.DnsName,\n ZoneId = main.Apply(getHostedZoneIdResult =\u003e getHostedZoneIdResult.Id),\n EvaluateTargetHealth = true,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := lb.GetHostedZoneId(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewRecord(ctx, \"www\", \u0026route53.RecordArgs{\n\t\t\tZoneId: pulumi.Any(primary.ZoneId),\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\tType: pulumi.String(route53.RecordTypeA),\n\t\t\tAliases: route53.RecordAliasArray{\n\t\t\t\t\u0026route53.RecordAliasArgs{\n\t\t\t\t\tName: pulumi.Any(mainAwsLb.DnsName),\n\t\t\t\t\tZoneId: pulumi.String(main.Id),\n\t\t\t\t\tEvaluateTargetHealth: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lb.LbFunctions;\nimport com.pulumi.aws.lb.inputs.GetHostedZoneIdArgs;\nimport com.pulumi.aws.route53.Record;\nimport com.pulumi.aws.route53.RecordArgs;\nimport com.pulumi.aws.route53.inputs.RecordAliasArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = LbFunctions.getHostedZoneId();\n\n var www = new Record(\"www\", RecordArgs.builder()\n .zoneId(primary.zoneId())\n .name(\"example.com\")\n .type(\"A\")\n .aliases(RecordAliasArgs.builder()\n .name(mainAwsLb.dnsName())\n .zoneId(main.applyValue(getHostedZoneIdResult -\u003e getHostedZoneIdResult.id()))\n .evaluateTargetHealth(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n www:\n type: aws:route53:Record\n properties:\n zoneId: ${primary.zoneId}\n name: example.com\n type: A\n aliases:\n - name: ${mainAwsLb.dnsName}\n zoneId: ${main.id}\n evaluateTargetHealth: true\nvariables:\n main:\n fn::invoke:\n Function: aws:lb:getHostedZoneId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing (ELB) in a given region for the purpose of using in an AWS Route53 Alias. Specify the ELB type (`network` or `application`) to return the relevant the associated HostedZoneId. Ref: [ELB service endpoints](https://docs.aws.amazon.com/general/latest/gr/elb.html#elb_region)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.lb.getHostedZoneId({});\nconst www = new aws.route53.Record(\"www\", {\n zoneId: primary.zoneId,\n name: \"example.com\",\n type: aws.route53.RecordType.A,\n aliases: [{\n name: mainAwsLb.dnsName,\n zoneId: main.then(main =\u003e main.id),\n evaluateTargetHealth: true,\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.lb.get_hosted_zone_id()\nwww = aws.route53.Record(\"www\",\n zone_id=primary[\"zoneId\"],\n name=\"example.com\",\n type=aws.route53.RecordType.A,\n aliases=[{\n \"name\": main_aws_lb[\"dnsName\"],\n \"zone_id\": main.id,\n \"evaluate_target_health\": True,\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.LB.GetHostedZoneId.Invoke();\n\n var www = new Aws.Route53.Record(\"www\", new()\n {\n ZoneId = primary.ZoneId,\n Name = \"example.com\",\n Type = Aws.Route53.RecordType.A,\n Aliases = new[]\n {\n new Aws.Route53.Inputs.RecordAliasArgs\n {\n Name = mainAwsLb.DnsName,\n ZoneId = main.Apply(getHostedZoneIdResult =\u003e getHostedZoneIdResult.Id),\n EvaluateTargetHealth = true,\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tmain, err := lb.GetHostedZoneId(ctx, \u0026lb.GetHostedZoneIdArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewRecord(ctx, \"www\", \u0026route53.RecordArgs{\n\t\t\tZoneId: pulumi.Any(primary.ZoneId),\n\t\t\tName: pulumi.String(\"example.com\"),\n\t\t\tType: pulumi.String(route53.RecordTypeA),\n\t\t\tAliases: route53.RecordAliasArray{\n\t\t\t\t\u0026route53.RecordAliasArgs{\n\t\t\t\t\tName: pulumi.Any(mainAwsLb.DnsName),\n\t\t\t\t\tZoneId: pulumi.String(main.Id),\n\t\t\t\t\tEvaluateTargetHealth: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.lb.LbFunctions;\nimport com.pulumi.aws.lb.inputs.GetHostedZoneIdArgs;\nimport com.pulumi.aws.route53.Record;\nimport com.pulumi.aws.route53.RecordArgs;\nimport com.pulumi.aws.route53.inputs.RecordAliasArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = LbFunctions.getHostedZoneId();\n\n var www = new Record(\"www\", RecordArgs.builder()\n .zoneId(primary.zoneId())\n .name(\"example.com\")\n .type(\"A\")\n .aliases(RecordAliasArgs.builder()\n .name(mainAwsLb.dnsName())\n .zoneId(main.applyValue(getHostedZoneIdResult -\u003e getHostedZoneIdResult.id()))\n .evaluateTargetHealth(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n www:\n type: aws:route53:Record\n properties:\n zoneId: ${primary.zoneId}\n name: example.com\n type: A\n aliases:\n - name: ${mainAwsLb.dnsName}\n zoneId: ${main.id}\n evaluateTargetHealth: true\nvariables:\n main:\n fn::invoke:\n Function: aws:lb:getHostedZoneId\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getHostedZoneId.\n", "properties": { @@ -404869,7 +404869,7 @@ } }, "aws:licensemanager/getLicenseGrants:getLicenseGrants": { - "description": "This resource can be used to get a set of license grant ARNs matching a filter.\n\n## Example Usage\n\nThe following shows getting all license grant ARNs granted to your account.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst test = current.then(current =\u003e aws.licensemanager.getLicenseGrants({\n filters: [{\n name: \"GranteePrincipalARN\",\n values: [`arn:aws:iam::${current.accountId}:root`],\n }],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ntest = aws.licensemanager.get_license_grants(filters=[{\n \"name\": \"GranteePrincipalARN\",\n \"values\": [f\"arn:aws:iam::{current.account_id}:root\"],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var test = Aws.LicenseManager.GetLicenseGrants.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.LicenseManager.Inputs.GetLicenseGrantsFilterInputArgs\n {\n Name = \"GranteePrincipalARN\",\n Values = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/licensemanager\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = licensemanager.GetLicenseGrants(ctx, \u0026licensemanager.GetLicenseGrantsArgs{\n\t\t\tFilters: []licensemanager.GetLicenseGrantsFilter{\n\t\t\t\t{\n\t\t\t\t\tName: \"GranteePrincipalARN\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.licensemanager.LicensemanagerFunctions;\nimport com.pulumi.aws.licensemanager.inputs.GetLicenseGrantsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var test = LicensemanagerFunctions.getLicenseGrants(GetLicenseGrantsArgs.builder()\n .filters(GetLicenseGrantsFilterArgs.builder()\n .name(\"GranteePrincipalARN\")\n .values(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n test:\n fn::invoke:\n Function: aws:licensemanager:getLicenseGrants\n Arguments:\n filters:\n - name: GranteePrincipalARN\n values:\n - arn:aws:iam::${current.accountId}:root\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "This resource can be used to get a set of license grant ARNs matching a filter.\n\n## Example Usage\n\nThe following shows getting all license grant ARNs granted to your account.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getCallerIdentity({});\nconst test = current.then(current =\u003e aws.licensemanager.getLicenseGrants({\n filters: [{\n name: \"GranteePrincipalARN\",\n values: [`arn:aws:iam::${current.accountId}:root`],\n }],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_caller_identity()\ntest = aws.licensemanager.get_license_grants(filters=[{\n \"name\": \"GranteePrincipalARN\",\n \"values\": [f\"arn:aws:iam::{current.account_id}:root\"],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetCallerIdentity.Invoke();\n\n var test = Aws.LicenseManager.GetLicenseGrants.Invoke(new()\n {\n Filters = new[]\n {\n new Aws.LicenseManager.Inputs.GetLicenseGrantsFilterInputArgs\n {\n Name = \"GranteePrincipalARN\",\n Values = new[]\n {\n $\"arn:aws:iam::{current.Apply(getCallerIdentityResult =\u003e getCallerIdentityResult.AccountId)}:root\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/licensemanager\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetCallerIdentity(ctx, \u0026aws.GetCallerIdentityArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = licensemanager.GetLicenseGrants(ctx, \u0026licensemanager.GetLicenseGrantsArgs{\n\t\t\tFilters: []licensemanager.GetLicenseGrantsFilter{\n\t\t\t\t{\n\t\t\t\t\tName: \"GranteePrincipalARN\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\tfmt.Sprintf(\"arn:aws:iam::%v:root\", current.AccountId),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetCallerIdentityArgs;\nimport com.pulumi.aws.licensemanager.LicensemanagerFunctions;\nimport com.pulumi.aws.licensemanager.inputs.GetLicenseGrantsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getCallerIdentity();\n\n final var test = LicensemanagerFunctions.getLicenseGrants(GetLicenseGrantsArgs.builder()\n .filters(GetLicenseGrantsFilterArgs.builder()\n .name(\"GranteePrincipalARN\")\n .values(String.format(\"arn:aws:iam::%s:root\", current.applyValue(getCallerIdentityResult -\u003e getCallerIdentityResult.accountId())))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:getCallerIdentity\n Arguments: {}\n test:\n fn::invoke:\n Function: aws:licensemanager:getLicenseGrants\n Arguments:\n filters:\n - name: GranteePrincipalARN\n values:\n - arn:aws:iam::${current.accountId}:root\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getLicenseGrants.\n", "properties": { @@ -406436,7 +406436,7 @@ } }, "aws:mq/getInstanceTypeOfferings:getInstanceTypeOfferings": { - "description": "Provides information about a MQ Broker Instance Offerings.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst empty = aws.mq.getInstanceTypeOfferings({});\nconst engine = aws.mq.getInstanceTypeOfferings({\n engineType: \"ACTIVEMQ\",\n});\nconst storage = aws.mq.getInstanceTypeOfferings({\n storageType: \"EBS\",\n});\nconst instance = aws.mq.getInstanceTypeOfferings({\n hostInstanceType: \"mq.m5.large\",\n});\nconst all = aws.mq.getInstanceTypeOfferings({\n hostInstanceType: \"mq.m5.large\",\n storageType: \"EBS\",\n engineType: \"ACTIVEMQ\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nempty = aws.mq.get_instance_type_offerings()\nengine = aws.mq.get_instance_type_offerings(engine_type=\"ACTIVEMQ\")\nstorage = aws.mq.get_instance_type_offerings(storage_type=\"EBS\")\ninstance = aws.mq.get_instance_type_offerings(host_instance_type=\"mq.m5.large\")\nall = aws.mq.get_instance_type_offerings(host_instance_type=\"mq.m5.large\",\n storage_type=\"EBS\",\n engine_type=\"ACTIVEMQ\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var empty = Aws.Mq.GetInstanceTypeOfferings.Invoke();\n\n var engine = Aws.Mq.GetInstanceTypeOfferings.Invoke(new()\n {\n EngineType = \"ACTIVEMQ\",\n });\n\n var storage = Aws.Mq.GetInstanceTypeOfferings.Invoke(new()\n {\n StorageType = \"EBS\",\n });\n\n var instance = Aws.Mq.GetInstanceTypeOfferings.Invoke(new()\n {\n HostInstanceType = \"mq.m5.large\",\n });\n\n var all = Aws.Mq.GetInstanceTypeOfferings.Invoke(new()\n {\n HostInstanceType = \"mq.m5.large\",\n StorageType = \"EBS\",\n EngineType = \"ACTIVEMQ\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/mq\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := mq.GetInstanceTypeOfferings(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = mq.GetInstanceTypeOfferings(ctx, \u0026mq.GetInstanceTypeOfferingsArgs{\n\t\t\tEngineType: pulumi.StringRef(\"ACTIVEMQ\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = mq.GetInstanceTypeOfferings(ctx, \u0026mq.GetInstanceTypeOfferingsArgs{\n\t\t\tStorageType: pulumi.StringRef(\"EBS\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = mq.GetInstanceTypeOfferings(ctx, \u0026mq.GetInstanceTypeOfferingsArgs{\n\t\t\tHostInstanceType: pulumi.StringRef(\"mq.m5.large\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = mq.GetInstanceTypeOfferings(ctx, \u0026mq.GetInstanceTypeOfferingsArgs{\n\t\t\tHostInstanceType: pulumi.StringRef(\"mq.m5.large\"),\n\t\t\tStorageType: pulumi.StringRef(\"EBS\"),\n\t\t\tEngineType: pulumi.StringRef(\"ACTIVEMQ\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.mq.MqFunctions;\nimport com.pulumi.aws.mq.inputs.GetInstanceTypeOfferingsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var empty = MqFunctions.getInstanceTypeOfferings();\n\n final var engine = MqFunctions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()\n .engineType(\"ACTIVEMQ\")\n .build());\n\n final var storage = MqFunctions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()\n .storageType(\"EBS\")\n .build());\n\n final var instance = MqFunctions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()\n .hostInstanceType(\"mq.m5.large\")\n .build());\n\n final var all = MqFunctions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()\n .hostInstanceType(\"mq.m5.large\")\n .storageType(\"EBS\")\n .engineType(\"ACTIVEMQ\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n empty:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments: {}\n engine:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments:\n engineType: ACTIVEMQ\n storage:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments:\n storageType: EBS\n instance:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments:\n hostInstanceType: mq.m5.large\n all:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments:\n hostInstanceType: mq.m5.large\n storageType: EBS\n engineType: ACTIVEMQ\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides information about a MQ Broker Instance Offerings.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst empty = aws.mq.getInstanceTypeOfferings({});\nconst engine = aws.mq.getInstanceTypeOfferings({\n engineType: \"ACTIVEMQ\",\n});\nconst storage = aws.mq.getInstanceTypeOfferings({\n storageType: \"EBS\",\n});\nconst instance = aws.mq.getInstanceTypeOfferings({\n hostInstanceType: \"mq.m5.large\",\n});\nconst all = aws.mq.getInstanceTypeOfferings({\n hostInstanceType: \"mq.m5.large\",\n storageType: \"EBS\",\n engineType: \"ACTIVEMQ\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nempty = aws.mq.get_instance_type_offerings()\nengine = aws.mq.get_instance_type_offerings(engine_type=\"ACTIVEMQ\")\nstorage = aws.mq.get_instance_type_offerings(storage_type=\"EBS\")\ninstance = aws.mq.get_instance_type_offerings(host_instance_type=\"mq.m5.large\")\nall = aws.mq.get_instance_type_offerings(host_instance_type=\"mq.m5.large\",\n storage_type=\"EBS\",\n engine_type=\"ACTIVEMQ\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var empty = Aws.Mq.GetInstanceTypeOfferings.Invoke();\n\n var engine = Aws.Mq.GetInstanceTypeOfferings.Invoke(new()\n {\n EngineType = \"ACTIVEMQ\",\n });\n\n var storage = Aws.Mq.GetInstanceTypeOfferings.Invoke(new()\n {\n StorageType = \"EBS\",\n });\n\n var instance = Aws.Mq.GetInstanceTypeOfferings.Invoke(new()\n {\n HostInstanceType = \"mq.m5.large\",\n });\n\n var all = Aws.Mq.GetInstanceTypeOfferings.Invoke(new()\n {\n HostInstanceType = \"mq.m5.large\",\n StorageType = \"EBS\",\n EngineType = \"ACTIVEMQ\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/mq\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := mq.GetInstanceTypeOfferings(ctx, \u0026mq.GetInstanceTypeOfferingsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = mq.GetInstanceTypeOfferings(ctx, \u0026mq.GetInstanceTypeOfferingsArgs{\n\t\t\tEngineType: pulumi.StringRef(\"ACTIVEMQ\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = mq.GetInstanceTypeOfferings(ctx, \u0026mq.GetInstanceTypeOfferingsArgs{\n\t\t\tStorageType: pulumi.StringRef(\"EBS\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = mq.GetInstanceTypeOfferings(ctx, \u0026mq.GetInstanceTypeOfferingsArgs{\n\t\t\tHostInstanceType: pulumi.StringRef(\"mq.m5.large\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = mq.GetInstanceTypeOfferings(ctx, \u0026mq.GetInstanceTypeOfferingsArgs{\n\t\t\tHostInstanceType: pulumi.StringRef(\"mq.m5.large\"),\n\t\t\tStorageType: pulumi.StringRef(\"EBS\"),\n\t\t\tEngineType: pulumi.StringRef(\"ACTIVEMQ\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.mq.MqFunctions;\nimport com.pulumi.aws.mq.inputs.GetInstanceTypeOfferingsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var empty = MqFunctions.getInstanceTypeOfferings();\n\n final var engine = MqFunctions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()\n .engineType(\"ACTIVEMQ\")\n .build());\n\n final var storage = MqFunctions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()\n .storageType(\"EBS\")\n .build());\n\n final var instance = MqFunctions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()\n .hostInstanceType(\"mq.m5.large\")\n .build());\n\n final var all = MqFunctions.getInstanceTypeOfferings(GetInstanceTypeOfferingsArgs.builder()\n .hostInstanceType(\"mq.m5.large\")\n .storageType(\"EBS\")\n .engineType(\"ACTIVEMQ\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n empty:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments: {}\n engine:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments:\n engineType: ACTIVEMQ\n storage:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments:\n storageType: EBS\n instance:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments:\n hostInstanceType: mq.m5.large\n all:\n fn::invoke:\n Function: aws:mq:getInstanceTypeOfferings\n Arguments:\n hostInstanceType: mq.m5.large\n storageType: EBS\n engineType: ACTIVEMQ\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getInstanceTypeOfferings.\n", "properties": { @@ -408498,7 +408498,7 @@ } }, "aws:oam/getLinks:getLinks": { - "description": "Data source for managing an AWS CloudWatch Observability Access Manager Links.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.oam.getLinks({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.oam.get_links()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Oam.GetLinks.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/oam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := oam.GetLinks(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.oam.OamFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OamFunctions.getLinks();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:oam:getLinks\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing an AWS CloudWatch Observability Access Manager Links.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.oam.getLinks({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.oam.get_links()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Oam.GetLinks.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/oam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := oam.GetLinks(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.oam.OamFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OamFunctions.getLinks();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:oam:getLinks\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getLinks.\n", "properties": { @@ -408585,7 +408585,7 @@ } }, "aws:oam/getSinks:getSinks": { - "description": "Data source for managing an AWS CloudWatch Observability Access Manager Sinks.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.oam.getSinks({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.oam.get_sinks()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Oam.GetSinks.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/oam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := oam.GetSinks(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.oam.OamFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OamFunctions.getSinks();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:oam:getSinks\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing an AWS CloudWatch Observability Access Manager Sinks.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.oam.getSinks({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.oam.get_sinks()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Oam.GetSinks.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/oam\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := oam.GetSinks(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.oam.OamFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OamFunctions.getSinks();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:oam:getSinks\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getSinks.\n", "properties": { @@ -409319,7 +409319,7 @@ } }, "aws:organizations/getOrganization:getOrganization": { - "description": "Get information about the organization that the user's account belongs to\n\n## Example Usage\n\n### List all account IDs for the organization\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.organizations.getOrganization({});\nexport const accountIds = example.then(example =\u003e example.accounts.map(__item =\u003e __item.id));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.organizations.get_organization()\npulumi.export(\"accountIds\", [__item.id for __item in example.accounts])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Organizations.GetOrganization.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"accountIds\"] = example.Apply(getOrganizationResult =\u003e getOrganizationResult.Accounts).Select(__item =\u003e __item.Id).ToList(),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := organizations.LookupOrganization(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nctx.Export(\"accountIds\", pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:3,11-33)))\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OrganizationsFunctions.getOrganization();\n\n ctx.export(\"accountIds\", example.applyValue(getOrganizationResult -\u003e getOrganizationResult.accounts()).stream().map(element -\u003e element.id()).collect(toList()));\n }\n}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SNS topic that can be interacted by the organization only\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.organizations.getOrganization({});\nconst snsTopic = new aws.sns.Topic(\"sns_topic\", {name: \"my-sns-topic\"});\nconst snsTopicPolicy = pulumi.all([example, snsTopic.arn]).apply(([example, arn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n effect: \"Allow\",\n actions: [\n \"SNS:Subscribe\",\n \"SNS:Publish\",\n ],\n conditions: [{\n test: \"StringEquals\",\n variable: \"aws:PrincipalOrgID\",\n values: [example.id],\n }],\n principals: [{\n type: \"AWS\",\n identifiers: [\"*\"],\n }],\n resources: [arn],\n }],\n}));\nconst snsTopicPolicyTopicPolicy = new aws.sns.TopicPolicy(\"sns_topic_policy\", {\n arn: snsTopic.arn,\n policy: snsTopicPolicy.apply(snsTopicPolicy =\u003e snsTopicPolicy.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.organizations.get_organization()\nsns_topic = aws.sns.Topic(\"sns_topic\", name=\"my-sns-topic\")\nsns_topic_policy = sns_topic.arn.apply(lambda arn: aws.iam.get_policy_document_output(statements=[{\n \"effect\": \"Allow\",\n \"actions\": [\n \"SNS:Subscribe\",\n \"SNS:Publish\",\n ],\n \"conditions\": [{\n \"test\": \"StringEquals\",\n \"variable\": \"aws:PrincipalOrgID\",\n \"values\": [example.id],\n }],\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [\"*\"],\n }],\n \"resources\": [arn],\n}]))\nsns_topic_policy_topic_policy = aws.sns.TopicPolicy(\"sns_topic_policy\",\n arn=sns_topic.arn,\n policy=sns_topic_policy.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Organizations.GetOrganization.Invoke();\n\n var snsTopic = new Aws.Sns.Topic(\"sns_topic\", new()\n {\n Name = \"my-sns-topic\",\n });\n\n var snsTopicPolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"SNS:Subscribe\",\n \"SNS:Publish\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"aws:PrincipalOrgID\",\n Values = new[]\n {\n example.Apply(getOrganizationResult =\u003e getOrganizationResult.Id),\n },\n },\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n \"*\",\n },\n },\n },\n Resources = new[]\n {\n snsTopic.Arn,\n },\n },\n },\n });\n\n var snsTopicPolicyTopicPolicy = new Aws.Sns.TopicPolicy(\"sns_topic_policy\", new()\n {\n Arn = snsTopic.Arn,\n Policy = snsTopicPolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := organizations.LookupOrganization(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nsnsTopic, err := sns.NewTopic(ctx, \"sns_topic\", \u0026sns.TopicArgs{\nName: pulumi.String(\"my-sns-topic\"),\n})\nif err != nil {\nreturn err\n}\nsnsTopicPolicy := snsTopic.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) {\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: \"Allow\",\nActions: []string{\n\"SNS:Subscribe\",\n\"SNS:Publish\",\n},\nConditions: []iam.GetPolicyDocumentStatementCondition{\n{\nTest: \"StringEquals\",\nVariable: \"aws:PrincipalOrgID\",\nValues: interface{}{\nexample.Id,\n},\n},\n},\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: []string{\n\"*\",\n},\n},\n},\nResources: interface{}{\narn,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = sns.NewTopicPolicy(ctx, \"sns_topic_policy\", \u0026sns.TopicPolicyArgs{\nArn: snsTopic.Arn,\nPolicy: pulumi.String(snsTopicPolicy.ApplyT(func(snsTopicPolicy iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026snsTopicPolicy.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.sns.TopicPolicy;\nimport com.pulumi.aws.sns.TopicPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OrganizationsFunctions.getOrganization();\n\n var snsTopic = new Topic(\"snsTopic\", TopicArgs.builder()\n .name(\"my-sns-topic\")\n .build());\n\n final var snsTopicPolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"SNS:Subscribe\",\n \"SNS:Publish\")\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"aws:PrincipalOrgID\")\n .values(example.applyValue(getOrganizationResult -\u003e getOrganizationResult.id()))\n .build())\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(\"*\")\n .build())\n .resources(snsTopic.arn())\n .build())\n .build());\n\n var snsTopicPolicyTopicPolicy = new TopicPolicy(\"snsTopicPolicyTopicPolicy\", TopicPolicyArgs.builder()\n .arn(snsTopic.arn())\n .policy(snsTopicPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(snsTopicPolicy -\u003e snsTopicPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n snsTopic:\n type: aws:sns:Topic\n name: sns_topic\n properties:\n name: my-sns-topic\n snsTopicPolicyTopicPolicy:\n type: aws:sns:TopicPolicy\n name: sns_topic_policy\n properties:\n arn: ${snsTopic.arn}\n policy: ${snsTopicPolicy.json}\nvariables:\n example:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n snsTopicPolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - SNS:Subscribe\n - SNS:Publish\n conditions:\n - test: StringEquals\n variable: aws:PrincipalOrgID\n values:\n - ${example.id}\n principals:\n - type: AWS\n identifiers:\n - '*'\n resources:\n - ${snsTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Get information about the organization that the user's account belongs to\n\n## Example Usage\n\n### List all account IDs for the organization\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.organizations.getOrganization({});\nexport const accountIds = example.then(example =\u003e example.accounts.map(__item =\u003e __item.id));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.organizations.get_organization()\npulumi.export(\"accountIds\", [__item.id for __item in example.accounts])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Organizations.GetOrganization.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"accountIds\"] = example.Apply(getOrganizationResult =\u003e getOrganizationResult.Accounts).Select(__item =\u003e __item.Id).ToList(),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := organizations.LookupOrganization(ctx, map[string]interface{}{\n}, nil);\nif err != nil {\nreturn err\n}\nctx.Export(\"accountIds\", pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:3,11-33)))\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OrganizationsFunctions.getOrganization();\n\n ctx.export(\"accountIds\", example.applyValue(getOrganizationResult -\u003e getOrganizationResult.accounts()).stream().map(element -\u003e element.id()).collect(toList()));\n }\n}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### SNS topic that can be interacted by the organization only\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.organizations.getOrganization({});\nconst snsTopic = new aws.sns.Topic(\"sns_topic\", {name: \"my-sns-topic\"});\nconst snsTopicPolicy = pulumi.all([example, snsTopic.arn]).apply(([example, arn]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [{\n effect: \"Allow\",\n actions: [\n \"SNS:Subscribe\",\n \"SNS:Publish\",\n ],\n conditions: [{\n test: \"StringEquals\",\n variable: \"aws:PrincipalOrgID\",\n values: [example.id],\n }],\n principals: [{\n type: \"AWS\",\n identifiers: [\"*\"],\n }],\n resources: [arn],\n }],\n}));\nconst snsTopicPolicyTopicPolicy = new aws.sns.TopicPolicy(\"sns_topic_policy\", {\n arn: snsTopic.arn,\n policy: snsTopicPolicy.apply(snsTopicPolicy =\u003e snsTopicPolicy.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.organizations.get_organization()\nsns_topic = aws.sns.Topic(\"sns_topic\", name=\"my-sns-topic\")\nsns_topic_policy = sns_topic.arn.apply(lambda arn: aws.iam.get_policy_document_output(statements=[{\n \"effect\": \"Allow\",\n \"actions\": [\n \"SNS:Subscribe\",\n \"SNS:Publish\",\n ],\n \"conditions\": [{\n \"test\": \"StringEquals\",\n \"variable\": \"aws:PrincipalOrgID\",\n \"values\": [example.id],\n }],\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [\"*\"],\n }],\n \"resources\": [arn],\n}]))\nsns_topic_policy_topic_policy = aws.sns.TopicPolicy(\"sns_topic_policy\",\n arn=sns_topic.arn,\n policy=sns_topic_policy.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Organizations.GetOrganization.Invoke();\n\n var snsTopic = new Aws.Sns.Topic(\"sns_topic\", new()\n {\n Name = \"my-sns-topic\",\n });\n\n var snsTopicPolicy = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Effect = \"Allow\",\n Actions = new[]\n {\n \"SNS:Subscribe\",\n \"SNS:Publish\",\n },\n Conditions = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs\n {\n Test = \"StringEquals\",\n Variable = \"aws:PrincipalOrgID\",\n Values = new[]\n {\n example.Apply(getOrganizationResult =\u003e getOrganizationResult.Id),\n },\n },\n },\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n \"*\",\n },\n },\n },\n Resources = new[]\n {\n snsTopic.Arn,\n },\n },\n },\n });\n\n var snsTopicPolicyTopicPolicy = new Aws.Sns.TopicPolicy(\"sns_topic_policy\", new()\n {\n Arn = snsTopic.Arn,\n Policy = snsTopicPolicy.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nexample, err := organizations.LookupOrganization(ctx, map[string]interface{}{\n}, nil);\nif err != nil {\nreturn err\n}\nsnsTopic, err := sns.NewTopic(ctx, \"sns_topic\", \u0026sns.TopicArgs{\nName: pulumi.String(\"my-sns-topic\"),\n})\nif err != nil {\nreturn err\n}\nsnsTopicPolicy := snsTopic.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) {\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nEffect: \"Allow\",\nActions: []string{\n\"SNS:Subscribe\",\n\"SNS:Publish\",\n},\nConditions: []iam.GetPolicyDocumentStatementCondition{\n{\nTest: \"StringEquals\",\nVariable: \"aws:PrincipalOrgID\",\nValues: interface{}{\nexample.Id,\n},\n},\n},\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: []string{\n\"*\",\n},\n},\n},\nResources: interface{}{\narn,\n},\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = sns.NewTopicPolicy(ctx, \"sns_topic_policy\", \u0026sns.TopicPolicyArgs{\nArn: snsTopic.Arn,\nPolicy: pulumi.String(snsTopicPolicy.ApplyT(func(snsTopicPolicy iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026snsTopicPolicy.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.sns.Topic;\nimport com.pulumi.aws.sns.TopicArgs;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.sns.TopicPolicy;\nimport com.pulumi.aws.sns.TopicPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = OrganizationsFunctions.getOrganization();\n\n var snsTopic = new Topic(\"snsTopic\", TopicArgs.builder()\n .name(\"my-sns-topic\")\n .build());\n\n final var snsTopicPolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements(GetPolicyDocumentStatementArgs.builder()\n .effect(\"Allow\")\n .actions( \n \"SNS:Subscribe\",\n \"SNS:Publish\")\n .conditions(GetPolicyDocumentStatementConditionArgs.builder()\n .test(\"StringEquals\")\n .variable(\"aws:PrincipalOrgID\")\n .values(example.applyValue(getOrganizationResult -\u003e getOrganizationResult.id()))\n .build())\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(\"*\")\n .build())\n .resources(snsTopic.arn())\n .build())\n .build());\n\n var snsTopicPolicyTopicPolicy = new TopicPolicy(\"snsTopicPolicyTopicPolicy\", TopicPolicyArgs.builder()\n .arn(snsTopic.arn())\n .policy(snsTopicPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(snsTopicPolicy -\u003e snsTopicPolicy.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n snsTopic:\n type: aws:sns:Topic\n name: sns_topic\n properties:\n name: my-sns-topic\n snsTopicPolicyTopicPolicy:\n type: aws:sns:TopicPolicy\n name: sns_topic_policy\n properties:\n arn: ${snsTopic.arn}\n policy: ${snsTopicPolicy.json}\nvariables:\n example:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n snsTopicPolicy:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - effect: Allow\n actions:\n - SNS:Subscribe\n - SNS:Publish\n conditions:\n - test: StringEquals\n variable: aws:PrincipalOrgID\n values:\n - ${example.id}\n principals:\n - type: AWS\n identifiers:\n - '*'\n resources:\n - ${snsTopic.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getOrganization.\n", "properties": { @@ -409405,7 +409405,7 @@ } }, "aws:organizations/getOrganizationalUnit:getOrganizationalUnit": { - "description": "Data source for getting an AWS Organizations Organizational Unit.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst ou = org.then(org =\u003e aws.organizations.getOrganizationalUnit({\n parentId: org.roots?.[0]?.id,\n name: \"dev\",\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\nou = aws.organizations.get_organizational_unit(parent_id=org.roots[0].id,\n name=\"dev\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var ou = Aws.Organizations.GetOrganizationalUnit.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n Name = \"dev\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.LookupOrganizationalUnit(ctx, \u0026organizations.LookupOrganizationalUnitArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t\tName: \"dev\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var ou = OrganizationsFunctions.getOrganizationalUnit(GetOrganizationalUnitArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .name(\"dev\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n ou:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnit\n Arguments:\n parentId: ${org.roots[0].id}\n name: dev\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for getting an AWS Organizations Organizational Unit.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst ou = org.then(org =\u003e aws.organizations.getOrganizationalUnit({\n parentId: org.roots?.[0]?.id,\n name: \"dev\",\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\nou = aws.organizations.get_organizational_unit(parent_id=org.roots[0].id,\n name=\"dev\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var ou = Aws.Organizations.GetOrganizationalUnit.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n Name = \"dev\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.LookupOrganizationalUnit(ctx, \u0026organizations.LookupOrganizationalUnitArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t\tName: \"dev\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var ou = OrganizationsFunctions.getOrganizationalUnit(GetOrganizationalUnitArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .name(\"dev\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n ou:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnit\n Arguments:\n parentId: ${org.roots[0].id}\n name: dev\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getOrganizationalUnit.\n", "properties": { @@ -409452,7 +409452,7 @@ } }, "aws:organizations/getOrganizationalUnitChildAccounts:getOrganizationalUnitChildAccounts": { - "description": "Get all direct child accounts under a parent organizational unit. This only provides immediate children, not all children.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst accounts = org.then(org =\u003e aws.organizations.getOrganizationalUnitChildAccounts({\n parentId: org.roots?.[0]?.id,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\naccounts = aws.organizations.get_organizational_unit_child_accounts(parent_id=org.roots[0].id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var accounts = Aws.Organizations.GetOrganizationalUnitChildAccounts.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.GetOrganizationalUnitChildAccounts(ctx, \u0026organizations.GetOrganizationalUnitChildAccountsArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitChildAccountsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var accounts = OrganizationsFunctions.getOrganizationalUnitChildAccounts(GetOrganizationalUnitChildAccountsArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n accounts:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnitChildAccounts\n Arguments:\n parentId: ${org.roots[0].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Get all direct child accounts under a parent organizational unit. This only provides immediate children, not all children.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst accounts = org.then(org =\u003e aws.organizations.getOrganizationalUnitChildAccounts({\n parentId: org.roots?.[0]?.id,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\naccounts = aws.organizations.get_organizational_unit_child_accounts(parent_id=org.roots[0].id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var accounts = Aws.Organizations.GetOrganizationalUnitChildAccounts.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.GetOrganizationalUnitChildAccounts(ctx, \u0026organizations.GetOrganizationalUnitChildAccountsArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitChildAccountsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var accounts = OrganizationsFunctions.getOrganizationalUnitChildAccounts(GetOrganizationalUnitChildAccountsArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n accounts:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnitChildAccounts\n Arguments:\n parentId: ${org.roots[0].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getOrganizationalUnitChildAccounts.\n", "properties": { @@ -409493,7 +409493,7 @@ } }, "aws:organizations/getOrganizationalUnitDescendantAccounts:getOrganizationalUnitDescendantAccounts": { - "description": "Get all direct child accounts under a parent organizational unit. This provides all children.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst accounts = org.then(org =\u003e aws.organizations.getOrganizationalUnitDescendantAccounts({\n parentId: org.roots?.[0]?.id,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\naccounts = aws.organizations.get_organizational_unit_descendant_accounts(parent_id=org.roots[0].id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var accounts = Aws.Organizations.GetOrganizationalUnitDescendantAccounts.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.GetOrganizationalUnitDescendantAccounts(ctx, \u0026organizations.GetOrganizationalUnitDescendantAccountsArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitDescendantAccountsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var accounts = OrganizationsFunctions.getOrganizationalUnitDescendantAccounts(GetOrganizationalUnitDescendantAccountsArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n accounts:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnitDescendantAccounts\n Arguments:\n parentId: ${org.roots[0].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Get all direct child accounts under a parent organizational unit. This provides all children.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst accounts = org.then(org =\u003e aws.organizations.getOrganizationalUnitDescendantAccounts({\n parentId: org.roots?.[0]?.id,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\naccounts = aws.organizations.get_organizational_unit_descendant_accounts(parent_id=org.roots[0].id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var accounts = Aws.Organizations.GetOrganizationalUnitDescendantAccounts.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.GetOrganizationalUnitDescendantAccounts(ctx, \u0026organizations.GetOrganizationalUnitDescendantAccountsArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitDescendantAccountsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var accounts = OrganizationsFunctions.getOrganizationalUnitDescendantAccounts(GetOrganizationalUnitDescendantAccountsArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n accounts:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnitDescendantAccounts\n Arguments:\n parentId: ${org.roots[0].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getOrganizationalUnitDescendantAccounts.\n", "properties": { @@ -409534,7 +409534,7 @@ } }, "aws:organizations/getOrganizationalUnitDescendantOrganizationalUnits:getOrganizationalUnitDescendantOrganizationalUnits": { - "description": "Get all direct child organizational units under a parent organizational unit. This provides all children.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst ous = org.then(org =\u003e aws.organizations.getOrganizationalUnitDescendantOrganizationalUnits({\n parentId: org.roots?.[0]?.id,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\nous = aws.organizations.get_organizational_unit_descendant_organizational_units(parent_id=org.roots[0].id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var ous = Aws.Organizations.GetOrganizationalUnitDescendantOrganizationalUnits.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.GetOrganizationalUnitDescendantOrganizationalUnits(ctx, \u0026organizations.GetOrganizationalUnitDescendantOrganizationalUnitsArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitDescendantOrganizationalUnitsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var ous = OrganizationsFunctions.getOrganizationalUnitDescendantOrganizationalUnits(GetOrganizationalUnitDescendantOrganizationalUnitsArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n ous:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnitDescendantOrganizationalUnits\n Arguments:\n parentId: ${org.roots[0].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Get all direct child organizational units under a parent organizational unit. This provides all children.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst ous = org.then(org =\u003e aws.organizations.getOrganizationalUnitDescendantOrganizationalUnits({\n parentId: org.roots?.[0]?.id,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\nous = aws.organizations.get_organizational_unit_descendant_organizational_units(parent_id=org.roots[0].id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var ous = Aws.Organizations.GetOrganizationalUnitDescendantOrganizationalUnits.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.GetOrganizationalUnitDescendantOrganizationalUnits(ctx, \u0026organizations.GetOrganizationalUnitDescendantOrganizationalUnitsArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitDescendantOrganizationalUnitsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var ous = OrganizationsFunctions.getOrganizationalUnitDescendantOrganizationalUnits(GetOrganizationalUnitDescendantOrganizationalUnitsArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n ous:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnitDescendantOrganizationalUnits\n Arguments:\n parentId: ${org.roots[0].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getOrganizationalUnitDescendantOrganizationalUnits.\n", "properties": { @@ -409575,7 +409575,7 @@ } }, "aws:organizations/getOrganizationalUnits:getOrganizationalUnits": { - "description": "Get all direct child organizational units under a parent organizational unit. This only provides immediate children, not all children.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst ou = org.then(org =\u003e aws.organizations.getOrganizationalUnits({\n parentId: org.roots?.[0]?.id,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\nou = aws.organizations.get_organizational_units(parent_id=org.roots[0].id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var ou = Aws.Organizations.GetOrganizationalUnits.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.GetOrganizationalUnits(ctx, \u0026organizations.GetOrganizationalUnitsArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var ou = OrganizationsFunctions.getOrganizationalUnits(GetOrganizationalUnitsArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n ou:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnits\n Arguments:\n parentId: ${org.roots[0].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Get all direct child organizational units under a parent organizational unit. This only provides immediate children, not all children.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst org = aws.organizations.getOrganization({});\nconst ou = org.then(org =\u003e aws.organizations.getOrganizationalUnits({\n parentId: org.roots?.[0]?.id,\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\norg = aws.organizations.get_organization()\nou = aws.organizations.get_organizational_units(parent_id=org.roots[0].id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var org = Aws.Organizations.GetOrganization.Invoke();\n\n var ou = Aws.Organizations.GetOrganizationalUnits.Invoke(new()\n {\n ParentId = org.Apply(getOrganizationResult =\u003e getOrganizationResult.Roots[0]?.Id),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\torg, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = organizations.GetOrganizationalUnits(ctx, \u0026organizations.GetOrganizationalUnitsArgs{\n\t\t\tParentId: org.Roots[0].Id,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.organizations.OrganizationsFunctions;\nimport com.pulumi.aws.organizations.inputs.GetOrganizationalUnitsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var org = OrganizationsFunctions.getOrganization();\n\n final var ou = OrganizationsFunctions.getOrganizationalUnits(GetOrganizationalUnitsArgs.builder()\n .parentId(org.applyValue(getOrganizationResult -\u003e getOrganizationResult.roots()[0].id()))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n org:\n fn::invoke:\n Function: aws:organizations:getOrganization\n Arguments: {}\n ou:\n fn::invoke:\n Function: aws:organizations:getOrganizationalUnits\n Arguments:\n parentId: ${org.roots[0].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getOrganizationalUnits.\n", "properties": { @@ -410253,7 +410253,7 @@ } }, "aws:outposts/getSites:getSites": { - "description": "Provides details about multiple Outposts Sites.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst all = aws.outposts.getSites({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nall = aws.outposts.get_sites()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var all = Aws.Outposts.GetSites.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/outposts\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := outposts.GetSites(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.outposts.OutpostsFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var all = OutpostsFunctions.getSites();\n\n }\n}\n```\n```yaml\nvariables:\n all:\n fn::invoke:\n Function: aws:outposts:getSites\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides details about multiple Outposts Sites.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst all = aws.outposts.getSites({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nall = aws.outposts.get_sites()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var all = Aws.Outposts.GetSites.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/outposts\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := outposts.GetSites(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.outposts.OutpostsFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var all = OutpostsFunctions.getSites();\n\n }\n}\n```\n```yaml\nvariables:\n all:\n fn::invoke:\n Function: aws:outposts:getSites\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getSites.\n", "properties": { @@ -410277,7 +410277,7 @@ } }, "aws:polly/getVoices:getVoices": { - "description": "Data source for managing an AWS Polly Voices.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.polly.getVoices({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.polly.get_voices()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Polly.GetVoices.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/polly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := polly.GetVoices(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.polly.PollyFunctions;\nimport com.pulumi.aws.polly.inputs.GetVoicesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = PollyFunctions.getVoices();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:polly:getVoices\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Language Code\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.polly.getVoices({\n languageCode: \"en-GB\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.polly.get_voices(language_code=\"en-GB\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Polly.GetVoices.Invoke(new()\n {\n LanguageCode = \"en-GB\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/polly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := polly.GetVoices(ctx, \u0026polly.GetVoicesArgs{\n\t\t\tLanguageCode: pulumi.StringRef(\"en-GB\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.polly.PollyFunctions;\nimport com.pulumi.aws.polly.inputs.GetVoicesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = PollyFunctions.getVoices(GetVoicesArgs.builder()\n .languageCode(\"en-GB\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:polly:getVoices\n Arguments:\n languageCode: en-GB\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing an AWS Polly Voices.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.polly.getVoices({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.polly.get_voices()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Polly.GetVoices.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/polly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := polly.GetVoices(ctx, \u0026polly.GetVoicesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.polly.PollyFunctions;\nimport com.pulumi.aws.polly.inputs.GetVoicesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = PollyFunctions.getVoices();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:polly:getVoices\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### With Language Code\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.polly.getVoices({\n languageCode: \"en-GB\",\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.polly.get_voices(language_code=\"en-GB\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Polly.GetVoices.Invoke(new()\n {\n LanguageCode = \"en-GB\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/polly\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := polly.GetVoices(ctx, \u0026polly.GetVoicesArgs{\n\t\t\tLanguageCode: pulumi.StringRef(\"en-GB\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.polly.PollyFunctions;\nimport com.pulumi.aws.polly.inputs.GetVoicesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = PollyFunctions.getVoices(GetVoicesArgs.builder()\n .languageCode(\"en-GB\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:polly:getVoices\n Arguments:\n languageCode: en-GB\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getVoices.\n", "properties": { @@ -411873,7 +411873,7 @@ } }, "aws:rds/getEventCategories:getEventCategories": { - "description": "## Example Usage\n\nList the event categories of all the RDS resources.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.rds.getEventCategories({});\n return {\n example: example.eventCategories,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.rds.get_event_categories()\npulumi.export(\"example\", example.event_categories)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Rds.GetEventCategories.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getEventCategoriesResult =\u003e getEventCategoriesResult.EventCategories),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := rds.GetEventCategories(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", example.EventCategories)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.rds.RdsFunctions;\nimport com.pulumi.aws.rds.inputs.GetEventCategoriesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = RdsFunctions.getEventCategories();\n\n ctx.export(\"example\", example.applyValue(getEventCategoriesResult -\u003e getEventCategoriesResult.eventCategories()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:rds:getEventCategories\n Arguments: {}\noutputs:\n example: ${example.eventCategories}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nList the event categories specific to the RDS resource `db-snapshot`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.rds.getEventCategories({\n sourceType: \"db-snapshot\",\n });\n return {\n example: example.eventCategories,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.rds.get_event_categories(source_type=\"db-snapshot\")\npulumi.export(\"example\", example.event_categories)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Rds.GetEventCategories.Invoke(new()\n {\n SourceType = \"db-snapshot\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getEventCategoriesResult =\u003e getEventCategoriesResult.EventCategories),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := rds.GetEventCategories(ctx, \u0026rds.GetEventCategoriesArgs{\n\t\t\tSourceType: pulumi.StringRef(\"db-snapshot\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", example.EventCategories)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.rds.RdsFunctions;\nimport com.pulumi.aws.rds.inputs.GetEventCategoriesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = RdsFunctions.getEventCategories(GetEventCategoriesArgs.builder()\n .sourceType(\"db-snapshot\")\n .build());\n\n ctx.export(\"example\", example.applyValue(getEventCategoriesResult -\u003e getEventCategoriesResult.eventCategories()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:rds:getEventCategories\n Arguments:\n sourceType: db-snapshot\noutputs:\n example: ${example.eventCategories}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "## Example Usage\n\nList the event categories of all the RDS resources.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.rds.getEventCategories({});\n return {\n example: example.eventCategories,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.rds.get_event_categories()\npulumi.export(\"example\", example.event_categories)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Rds.GetEventCategories.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getEventCategoriesResult =\u003e getEventCategoriesResult.EventCategories),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := rds.GetEventCategories(ctx, \u0026rds.GetEventCategoriesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", example.EventCategories)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.rds.RdsFunctions;\nimport com.pulumi.aws.rds.inputs.GetEventCategoriesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = RdsFunctions.getEventCategories();\n\n ctx.export(\"example\", example.applyValue(getEventCategoriesResult -\u003e getEventCategoriesResult.eventCategories()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:rds:getEventCategories\n Arguments: {}\noutputs:\n example: ${example.eventCategories}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nList the event categories specific to the RDS resource `db-snapshot`.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nexport = async () =\u003e {\n const example = await aws.rds.getEventCategories({\n sourceType: \"db-snapshot\",\n });\n return {\n example: example.eventCategories,\n };\n}\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.rds.get_event_categories(source_type=\"db-snapshot\")\npulumi.export(\"example\", example.event_categories)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Rds.GetEventCategories.Invoke(new()\n {\n SourceType = \"db-snapshot\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = example.Apply(getEventCategoriesResult =\u003e getEventCategoriesResult.EventCategories),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := rds.GetEventCategories(ctx, \u0026rds.GetEventCategoriesArgs{\n\t\t\tSourceType: pulumi.StringRef(\"db-snapshot\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", example.EventCategories)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.rds.RdsFunctions;\nimport com.pulumi.aws.rds.inputs.GetEventCategoriesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = RdsFunctions.getEventCategories(GetEventCategoriesArgs.builder()\n .sourceType(\"db-snapshot\")\n .build());\n\n ctx.export(\"example\", example.applyValue(getEventCategoriesResult -\u003e getEventCategoriesResult.eventCategories()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:rds:getEventCategories\n Arguments:\n sourceType: db-snapshot\noutputs:\n example: ${example.eventCategories}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getEventCategories.\n", "properties": { @@ -413314,7 +413314,7 @@ } }, "aws:redshift/getDataShares:getDataShares": { - "description": "Data source for managing AWS Redshift Data Shares.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.redshift.getDataShares({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.redshift.get_data_shares()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.RedShift.GetDataShares.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := redshift.GetDataShares(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.redshift.RedshiftFunctions;\nimport com.pulumi.aws.redshift.inputs.GetDataSharesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = RedshiftFunctions.getDataShares();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:redshift:getDataShares\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing AWS Redshift Data Shares.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.redshift.getDataShares({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.redshift.get_data_shares()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.RedShift.GetDataShares.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := redshift.GetDataShares(ctx, \u0026redshift.GetDataSharesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.redshift.RedshiftFunctions;\nimport com.pulumi.aws.redshift.inputs.GetDataSharesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = RedshiftFunctions.getDataShares();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:redshift:getDataShares\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getDataShares.\n", "properties": { @@ -413472,7 +413472,7 @@ } }, "aws:redshift/getServiceAccount:getServiceAccount": { - "description": "Use this data source to get the Account ID of the [AWS Redshift Service Account](http://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-enable-logging)\nin a given region for the purpose of allowing Redshift to store audit data in S3.\n\n\u003e **Note:** AWS documentation [states that](https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-bucket-permissions) a [service principal name](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services) should be used instead of an AWS account ID in any relevant IAM policy.\nThe `aws.redshift.getServiceAccount` data source has been deprecated and will be removed in a future version.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.redshift.getServiceAccount({});\nconst bucket = new aws.s3.BucketV2(\"bucket\", {\n bucket: \"tf-redshift-logging-test-bucket\",\n forceDestroy: true,\n});\nconst allowAuditLogging = pulumi.all([main, bucket.arn, main]).apply(([main, arn, main1]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n sid: \"Put bucket policy needed for audit logging\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main.arn],\n }],\n actions: [\"s3:PutObject\"],\n resources: [`${arn}/*`],\n },\n {\n sid: \"Get bucket policy needed for audit logging\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main1.arn],\n }],\n actions: [\"s3:GetBucketAcl\"],\n resources: bucketAwsS3Bucket.arn,\n },\n ],\n}));\nconst allowAuditLoggingBucketPolicy = new aws.s3.BucketPolicy(\"allow_audit_logging\", {\n bucket: bucket.id,\n policy: allowAuditLogging.apply(allowAuditLogging =\u003e allowAuditLogging.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.redshift.get_service_account()\nbucket = aws.s3.BucketV2(\"bucket\",\n bucket=\"tf-redshift-logging-test-bucket\",\n force_destroy=True)\nallow_audit_logging = bucket.arn.apply(lambda arn: aws.iam.get_policy_document_output(statements=[\n {\n \"sid\": \"Put bucket policy needed for audit logging\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [f\"{arn}/*\"],\n },\n {\n \"sid\": \"Get bucket policy needed for audit logging\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:GetBucketAcl\"],\n \"resources\": bucket_aws_s3_bucket[\"arn\"],\n },\n]))\nallow_audit_logging_bucket_policy = aws.s3.BucketPolicy(\"allow_audit_logging\",\n bucket=bucket.id,\n policy=allow_audit_logging.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.RedShift.GetServiceAccount.Invoke();\n\n var bucket = new Aws.S3.BucketV2(\"bucket\", new()\n {\n Bucket = \"tf-redshift-logging-test-bucket\",\n ForceDestroy = true,\n });\n\n var allowAuditLogging = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Put bucket policy needed for audit logging\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{bucket.Arn}/*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Get bucket policy needed for audit logging\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:GetBucketAcl\",\n },\n Resources = bucketAwsS3Bucket.Arn,\n },\n },\n });\n\n var allowAuditLoggingBucketPolicy = new Aws.S3.BucketPolicy(\"allow_audit_logging\", new()\n {\n Bucket = bucket.Id,\n Policy = allowAuditLogging.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nmain, err := redshift.GetServiceAccount(ctx, nil, nil);\nif err != nil {\nreturn err\n}\nbucket, err := s3.NewBucketV2(ctx, \"bucket\", \u0026s3.BucketV2Args{\nBucket: pulumi.String(\"tf-redshift-logging-test-bucket\"),\nForceDestroy: pulumi.Bool(true),\n})\nif err != nil {\nreturn err\n}\nallowAuditLogging := bucket.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) {\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nSid: \"Put bucket policy needed for audit logging\",\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:PutObject\",\n},\nResources: []string{\nfmt.Sprintf(\"%v/*\", arn),\n},\n},\n{\nSid: \"Get bucket policy needed for audit logging\",\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:GetBucketAcl\",\n},\nResources: bucketAwsS3Bucket.Arn,\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = s3.NewBucketPolicy(ctx, \"allow_audit_logging\", \u0026s3.BucketPolicyArgs{\nBucket: bucket.ID(),\nPolicy: pulumi.String(allowAuditLogging.ApplyT(func(allowAuditLogging iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026allowAuditLogging.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.redshift.RedshiftFunctions;\nimport com.pulumi.aws.redshift.inputs.GetServiceAccountArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = RedshiftFunctions.getServiceAccount();\n\n var bucket = new BucketV2(\"bucket\", BucketV2Args.builder()\n .bucket(\"tf-redshift-logging-test-bucket\")\n .forceDestroy(true)\n .build());\n\n final var allowAuditLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Put bucket policy needed for audit logging\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:PutObject\")\n .resources(bucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Get bucket policy needed for audit logging\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:GetBucketAcl\")\n .resources(bucketAwsS3Bucket.arn())\n .build())\n .build());\n\n var allowAuditLoggingBucketPolicy = new BucketPolicy(\"allowAuditLoggingBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(bucket.id())\n .policy(allowAuditLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(allowAuditLogging -\u003e allowAuditLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bucket:\n type: aws:s3:BucketV2\n properties:\n bucket: tf-redshift-logging-test-bucket\n forceDestroy: true\n allowAuditLoggingBucketPolicy:\n type: aws:s3:BucketPolicy\n name: allow_audit_logging\n properties:\n bucket: ${bucket.id}\n policy: ${allowAuditLogging.json}\nvariables:\n main:\n fn::invoke:\n Function: aws:redshift:getServiceAccount\n Arguments: {}\n allowAuditLogging:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Put bucket policy needed for audit logging\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:PutObject\n resources:\n - ${bucket.arn}/*\n - sid: Get bucket policy needed for audit logging\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:GetBucketAcl\n resources: ${bucketAwsS3Bucket.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get the Account ID of the [AWS Redshift Service Account](http://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-enable-logging)\nin a given region for the purpose of allowing Redshift to store audit data in S3.\n\n\u003e **Note:** AWS documentation [states that](https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-bucket-permissions) a [service principal name](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services) should be used instead of an AWS account ID in any relevant IAM policy.\nThe `aws.redshift.getServiceAccount` data source has been deprecated and will be removed in a future version.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.redshift.getServiceAccount({});\nconst bucket = new aws.s3.BucketV2(\"bucket\", {\n bucket: \"tf-redshift-logging-test-bucket\",\n forceDestroy: true,\n});\nconst allowAuditLogging = pulumi.all([main, bucket.arn, main]).apply(([main, arn, main1]) =\u003e aws.iam.getPolicyDocumentOutput({\n statements: [\n {\n sid: \"Put bucket policy needed for audit logging\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main.arn],\n }],\n actions: [\"s3:PutObject\"],\n resources: [`${arn}/*`],\n },\n {\n sid: \"Get bucket policy needed for audit logging\",\n effect: \"Allow\",\n principals: [{\n type: \"AWS\",\n identifiers: [main1.arn],\n }],\n actions: [\"s3:GetBucketAcl\"],\n resources: bucketAwsS3Bucket.arn,\n },\n ],\n}));\nconst allowAuditLoggingBucketPolicy = new aws.s3.BucketPolicy(\"allow_audit_logging\", {\n bucket: bucket.id,\n policy: allowAuditLogging.apply(allowAuditLogging =\u003e allowAuditLogging.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.redshift.get_service_account()\nbucket = aws.s3.BucketV2(\"bucket\",\n bucket=\"tf-redshift-logging-test-bucket\",\n force_destroy=True)\nallow_audit_logging = bucket.arn.apply(lambda arn: aws.iam.get_policy_document_output(statements=[\n {\n \"sid\": \"Put bucket policy needed for audit logging\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:PutObject\"],\n \"resources\": [f\"{arn}/*\"],\n },\n {\n \"sid\": \"Get bucket policy needed for audit logging\",\n \"effect\": \"Allow\",\n \"principals\": [{\n \"type\": \"AWS\",\n \"identifiers\": [main.arn],\n }],\n \"actions\": [\"s3:GetBucketAcl\"],\n \"resources\": bucket_aws_s3_bucket[\"arn\"],\n },\n]))\nallow_audit_logging_bucket_policy = aws.s3.BucketPolicy(\"allow_audit_logging\",\n bucket=bucket.id,\n policy=allow_audit_logging.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.RedShift.GetServiceAccount.Invoke();\n\n var bucket = new Aws.S3.BucketV2(\"bucket\", new()\n {\n Bucket = \"tf-redshift-logging-test-bucket\",\n ForceDestroy = true,\n });\n\n var allowAuditLogging = Aws.Iam.GetPolicyDocument.Invoke(new()\n {\n Statements = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Put bucket policy needed for audit logging\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:PutObject\",\n },\n Resources = new[]\n {\n $\"{bucket.Arn}/*\",\n },\n },\n new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs\n {\n Sid = \"Get bucket policy needed for audit logging\",\n Effect = \"Allow\",\n Principals = new[]\n {\n new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs\n {\n Type = \"AWS\",\n Identifiers = new[]\n {\n main.Apply(getServiceAccountResult =\u003e getServiceAccountResult.Arn),\n },\n },\n },\n Actions = new[]\n {\n \"s3:GetBucketAcl\",\n },\n Resources = bucketAwsS3Bucket.Arn,\n },\n },\n });\n\n var allowAuditLoggingBucketPolicy = new Aws.S3.BucketPolicy(\"allow_audit_logging\", new()\n {\n Bucket = bucket.Id,\n Policy = allowAuditLogging.Apply(getPolicyDocumentResult =\u003e getPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\nmain, err := redshift.GetServiceAccount(ctx, \u0026redshift.GetServiceAccountArgs{\n}, nil);\nif err != nil {\nreturn err\n}\nbucket, err := s3.NewBucketV2(ctx, \"bucket\", \u0026s3.BucketV2Args{\nBucket: pulumi.String(\"tf-redshift-logging-test-bucket\"),\nForceDestroy: pulumi.Bool(true),\n})\nif err != nil {\nreturn err\n}\nallowAuditLogging := bucket.Arn.ApplyT(func(arn string) (iam.GetPolicyDocumentResult, error) {\nreturn iam.GetPolicyDocumentResult(interface{}(iam.GetPolicyDocumentOutput(ctx, iam.GetPolicyDocumentOutputArgs{\nStatements: []iam.GetPolicyDocumentStatement{\n{\nSid: \"Put bucket policy needed for audit logging\",\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:PutObject\",\n},\nResources: []string{\nfmt.Sprintf(\"%v/*\", arn),\n},\n},\n{\nSid: \"Get bucket policy needed for audit logging\",\nEffect: \"Allow\",\nPrincipals: []iam.GetPolicyDocumentStatementPrincipal{\n{\nType: \"AWS\",\nIdentifiers: interface{}{\nmain.Arn,\n},\n},\n},\nActions: []string{\n\"s3:GetBucketAcl\",\n},\nResources: bucketAwsS3Bucket.Arn,\n},\n},\n}, nil))), nil\n}).(iam.GetPolicyDocumentResultOutput)\n_, err = s3.NewBucketPolicy(ctx, \"allow_audit_logging\", \u0026s3.BucketPolicyArgs{\nBucket: bucket.ID(),\nPolicy: pulumi.String(allowAuditLogging.ApplyT(func(allowAuditLogging iam.GetPolicyDocumentResult) (*string, error) {\nreturn \u0026allowAuditLogging.Json, nil\n}).(pulumi.StringPtrOutput)),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.redshift.RedshiftFunctions;\nimport com.pulumi.aws.redshift.inputs.GetServiceAccountArgs;\nimport com.pulumi.aws.s3.BucketV2;\nimport com.pulumi.aws.s3.BucketV2Args;\nimport com.pulumi.aws.iam.IamFunctions;\nimport com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;\nimport com.pulumi.aws.s3.BucketPolicy;\nimport com.pulumi.aws.s3.BucketPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = RedshiftFunctions.getServiceAccount();\n\n var bucket = new BucketV2(\"bucket\", BucketV2Args.builder()\n .bucket(\"tf-redshift-logging-test-bucket\")\n .forceDestroy(true)\n .build());\n\n final var allowAuditLogging = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()\n .statements( \n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Put bucket policy needed for audit logging\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:PutObject\")\n .resources(bucket.arn().applyValue(arn -\u003e String.format(\"%s/*\", arn)))\n .build(),\n GetPolicyDocumentStatementArgs.builder()\n .sid(\"Get bucket policy needed for audit logging\")\n .effect(\"Allow\")\n .principals(GetPolicyDocumentStatementPrincipalArgs.builder()\n .type(\"AWS\")\n .identifiers(main.applyValue(getServiceAccountResult -\u003e getServiceAccountResult.arn()))\n .build())\n .actions(\"s3:GetBucketAcl\")\n .resources(bucketAwsS3Bucket.arn())\n .build())\n .build());\n\n var allowAuditLoggingBucketPolicy = new BucketPolicy(\"allowAuditLoggingBucketPolicy\", BucketPolicyArgs.builder()\n .bucket(bucket.id())\n .policy(allowAuditLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult).applyValue(allowAuditLogging -\u003e allowAuditLogging.applyValue(getPolicyDocumentResult -\u003e getPolicyDocumentResult.json())))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bucket:\n type: aws:s3:BucketV2\n properties:\n bucket: tf-redshift-logging-test-bucket\n forceDestroy: true\n allowAuditLoggingBucketPolicy:\n type: aws:s3:BucketPolicy\n name: allow_audit_logging\n properties:\n bucket: ${bucket.id}\n policy: ${allowAuditLogging.json}\nvariables:\n main:\n fn::invoke:\n Function: aws:redshift:getServiceAccount\n Arguments: {}\n allowAuditLogging:\n fn::invoke:\n Function: aws:iam:getPolicyDocument\n Arguments:\n statements:\n - sid: Put bucket policy needed for audit logging\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:PutObject\n resources:\n - ${bucket.arn}/*\n - sid: Get bucket policy needed for audit logging\n effect: Allow\n principals:\n - type: AWS\n identifiers:\n - ${main.arn}\n actions:\n - s3:GetBucketAcl\n resources: ${bucketAwsS3Bucket.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getServiceAccount.\n", "properties": { @@ -413852,7 +413852,7 @@ } }, "aws:resourcegroupstaggingapi/getResources:getResources": { - "description": "Provides details about resource tagging.\n\n## Example Usage\n\n### Get All Resource Tag Mappings\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.resourcegroupstaggingapi.getResources({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.resourcegroupstaggingapi.get_resources()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.ResourceGroupsTaggingApi.GetResources.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroupstaggingapi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := resourcegroupstaggingapi.GetResources(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.resourcegroupstaggingapi.ResourcegroupstaggingapiFunctions;\nimport com.pulumi.aws.resourcegroupstaggingapi.inputs.GetResourcesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = ResourcegroupstaggingapiFunctions.getResources();\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:resourcegroupstaggingapi:getResources\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Filter By Tag Key and Value\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.resourcegroupstaggingapi.getResources({\n tagFilters: [{\n key: \"tag-key\",\n values: [\n \"tag-value-1\",\n \"tag-value-2\",\n ],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.resourcegroupstaggingapi.get_resources(tag_filters=[{\n \"key\": \"tag-key\",\n \"values\": [\n \"tag-value-1\",\n \"tag-value-2\",\n ],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.ResourceGroupsTaggingApi.GetResources.Invoke(new()\n {\n TagFilters = new[]\n {\n new Aws.ResourceGroupsTaggingApi.Inputs.GetResourcesTagFilterInputArgs\n {\n Key = \"tag-key\",\n Values = new[]\n {\n \"tag-value-1\",\n \"tag-value-2\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroupstaggingapi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := resourcegroupstaggingapi.GetResources(ctx, \u0026resourcegroupstaggingapi.GetResourcesArgs{\n\t\t\tTagFilters: []resourcegroupstaggingapi.GetResourcesTagFilter{\n\t\t\t\t{\n\t\t\t\t\tKey: \"tag-key\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\"tag-value-1\",\n\t\t\t\t\t\t\"tag-value-2\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.resourcegroupstaggingapi.ResourcegroupstaggingapiFunctions;\nimport com.pulumi.aws.resourcegroupstaggingapi.inputs.GetResourcesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = ResourcegroupstaggingapiFunctions.getResources(GetResourcesArgs.builder()\n .tagFilters(GetResourcesTagFilterArgs.builder()\n .key(\"tag-key\")\n .values( \n \"tag-value-1\",\n \"tag-value-2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:resourcegroupstaggingapi:getResources\n Arguments:\n tagFilters:\n - key: tag-key\n values:\n - tag-value-1\n - tag-value-2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Filter By Resource Type\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.resourcegroupstaggingapi.getResources({\n resourceTypeFilters: [\"ec2:instance\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.resourcegroupstaggingapi.get_resources(resource_type_filters=[\"ec2:instance\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.ResourceGroupsTaggingApi.GetResources.Invoke(new()\n {\n ResourceTypeFilters = new[]\n {\n \"ec2:instance\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroupstaggingapi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := resourcegroupstaggingapi.GetResources(ctx, \u0026resourcegroupstaggingapi.GetResourcesArgs{\n\t\t\tResourceTypeFilters: []string{\n\t\t\t\t\"ec2:instance\",\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.resourcegroupstaggingapi.ResourcegroupstaggingapiFunctions;\nimport com.pulumi.aws.resourcegroupstaggingapi.inputs.GetResourcesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = ResourcegroupstaggingapiFunctions.getResources(GetResourcesArgs.builder()\n .resourceTypeFilters(\"ec2:instance\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:resourcegroupstaggingapi:getResources\n Arguments:\n resourceTypeFilters:\n - ec2:instance\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Provides details about resource tagging.\n\n## Example Usage\n\n### Get All Resource Tag Mappings\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.resourcegroupstaggingapi.getResources({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.resourcegroupstaggingapi.get_resources()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.ResourceGroupsTaggingApi.GetResources.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroupstaggingapi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := resourcegroupstaggingapi.GetResources(ctx, \u0026resourcegroupstaggingapi.GetResourcesArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.resourcegroupstaggingapi.ResourcegroupstaggingapiFunctions;\nimport com.pulumi.aws.resourcegroupstaggingapi.inputs.GetResourcesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = ResourcegroupstaggingapiFunctions.getResources();\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:resourcegroupstaggingapi:getResources\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Filter By Tag Key and Value\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.resourcegroupstaggingapi.getResources({\n tagFilters: [{\n key: \"tag-key\",\n values: [\n \"tag-value-1\",\n \"tag-value-2\",\n ],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.resourcegroupstaggingapi.get_resources(tag_filters=[{\n \"key\": \"tag-key\",\n \"values\": [\n \"tag-value-1\",\n \"tag-value-2\",\n ],\n}])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.ResourceGroupsTaggingApi.GetResources.Invoke(new()\n {\n TagFilters = new[]\n {\n new Aws.ResourceGroupsTaggingApi.Inputs.GetResourcesTagFilterInputArgs\n {\n Key = \"tag-key\",\n Values = new[]\n {\n \"tag-value-1\",\n \"tag-value-2\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroupstaggingapi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := resourcegroupstaggingapi.GetResources(ctx, \u0026resourcegroupstaggingapi.GetResourcesArgs{\n\t\t\tTagFilters: []resourcegroupstaggingapi.GetResourcesTagFilter{\n\t\t\t\t{\n\t\t\t\t\tKey: \"tag-key\",\n\t\t\t\t\tValues: []string{\n\t\t\t\t\t\t\"tag-value-1\",\n\t\t\t\t\t\t\"tag-value-2\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.resourcegroupstaggingapi.ResourcegroupstaggingapiFunctions;\nimport com.pulumi.aws.resourcegroupstaggingapi.inputs.GetResourcesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = ResourcegroupstaggingapiFunctions.getResources(GetResourcesArgs.builder()\n .tagFilters(GetResourcesTagFilterArgs.builder()\n .key(\"tag-key\")\n .values( \n \"tag-value-1\",\n \"tag-value-2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:resourcegroupstaggingapi:getResources\n Arguments:\n tagFilters:\n - key: tag-key\n values:\n - tag-value-1\n - tag-value-2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Filter By Resource Type\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst test = aws.resourcegroupstaggingapi.getResources({\n resourceTypeFilters: [\"ec2:instance\"],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ntest = aws.resourcegroupstaggingapi.get_resources(resource_type_filters=[\"ec2:instance\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = Aws.ResourceGroupsTaggingApi.GetResources.Invoke(new()\n {\n ResourceTypeFilters = new[]\n {\n \"ec2:instance\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourcegroupstaggingapi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := resourcegroupstaggingapi.GetResources(ctx, \u0026resourcegroupstaggingapi.GetResourcesArgs{\n\t\t\tResourceTypeFilters: []string{\n\t\t\t\t\"ec2:instance\",\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.resourcegroupstaggingapi.ResourcegroupstaggingapiFunctions;\nimport com.pulumi.aws.resourcegroupstaggingapi.inputs.GetResourcesArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var test = ResourcegroupstaggingapiFunctions.getResources(GetResourcesArgs.builder()\n .resourceTypeFilters(\"ec2:instance\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n test:\n fn::invoke:\n Function: aws:resourcegroupstaggingapi:getResources\n Arguments:\n resourceTypeFilters:\n - ec2:instance\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getResources.\n", "properties": { @@ -414613,7 +414613,7 @@ } }, "aws:route53/getTrafficPolicyDocument:getTrafficPolicyDocument": { - "description": "Generates an Route53 traffic policy document in JSON format for use with resources that expect policy documents such as `aws.route53.TrafficPolicy`.\n\n## Example Usage\n\n### Basic Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = Promise.all([current, current]).then(([current, current1]) =\u003e aws.route53.getTrafficPolicyDocument({\n recordType: \"A\",\n startRule: \"site_switch\",\n endpoints: [\n {\n id: \"my_elb\",\n type: \"elastic-load-balancer\",\n value: `elb-111111.${current.name}.elb.amazonaws.com`,\n },\n {\n id: \"site_down_banner\",\n type: \"s3-website\",\n region: current1.name,\n value: \"www.example.com\",\n },\n ],\n rules: [{\n id: \"site_switch\",\n type: \"failover\",\n primary: {\n endpointReference: \"my_elb\",\n },\n secondary: {\n endpointReference: \"site_down_banner\",\n },\n }],\n}));\nconst exampleTrafficPolicy = new aws.route53.TrafficPolicy(\"example\", {\n name: \"example\",\n comment: \"example comment\",\n document: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.route53.get_traffic_policy_document(record_type=\"A\",\n start_rule=\"site_switch\",\n endpoints=[\n {\n \"id\": \"my_elb\",\n \"type\": \"elastic-load-balancer\",\n \"value\": f\"elb-111111.{current.name}.elb.amazonaws.com\",\n },\n {\n \"id\": \"site_down_banner\",\n \"type\": \"s3-website\",\n \"region\": current.name,\n \"value\": \"www.example.com\",\n },\n ],\n rules=[{\n \"id\": \"site_switch\",\n \"type\": \"failover\",\n \"primary\": {\n \"endpoint_reference\": \"my_elb\",\n },\n \"secondary\": {\n \"endpoint_reference\": \"site_down_banner\",\n },\n }])\nexample_traffic_policy = aws.route53.TrafficPolicy(\"example\",\n name=\"example\",\n comment=\"example comment\",\n document=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = Aws.Route53.GetTrafficPolicyDocument.Invoke(new()\n {\n RecordType = \"A\",\n StartRule = \"site_switch\",\n Endpoints = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"my_elb\",\n Type = \"elastic-load-balancer\",\n Value = $\"elb-111111.{current.Apply(getRegionResult =\u003e getRegionResult.Name)}.elb.amazonaws.com\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"site_down_banner\",\n Type = \"s3-website\",\n Region = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n Value = \"www.example.com\",\n },\n },\n Rules = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleInputArgs\n {\n Id = \"site_switch\",\n Type = \"failover\",\n Primary = new Aws.Route53.Inputs.GetTrafficPolicyDocumentRulePrimaryInputArgs\n {\n EndpointReference = \"my_elb\",\n },\n Secondary = new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleSecondaryInputArgs\n {\n EndpointReference = \"site_down_banner\",\n },\n },\n },\n });\n\n var exampleTrafficPolicy = new Aws.Route53.TrafficPolicy(\"example\", new()\n {\n Name = \"example\",\n Comment = \"example comment\",\n Document = example.Apply(getTrafficPolicyDocumentResult =\u003e getTrafficPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := route53.GetTrafficPolicyDocument(ctx, \u0026route53.GetTrafficPolicyDocumentArgs{\n\t\t\tRecordType: pulumi.StringRef(\"A\"),\n\t\t\tStartRule: pulumi.StringRef(\"site_switch\"),\n\t\t\tEndpoints: []route53.GetTrafficPolicyDocumentEndpoint{\n\t\t\t\t{\n\t\t\t\t\tId: \"my_elb\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(fmt.Sprintf(\"elb-111111.%v.elb.amazonaws.com\", current.Name)),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"site_down_banner\",\n\t\t\t\t\tType: pulumi.StringRef(\"s3-website\"),\n\t\t\t\t\tRegion: pulumi.StringRef(current.Name),\n\t\t\t\t\tValue: pulumi.StringRef(\"www.example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tRules: []route53.GetTrafficPolicyDocumentRule{\n\t\t\t\t{\n\t\t\t\t\tId: \"site_switch\",\n\t\t\t\t\tType: pulumi.StringRef(\"failover\"),\n\t\t\t\t\tPrimary: {\n\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"my_elb\"),\n\t\t\t\t\t},\n\t\t\t\t\tSecondary: {\n\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"site_down_banner\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewTrafficPolicy(ctx, \"example\", \u0026route53.TrafficPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tComment: pulumi.String(\"example comment\"),\n\t\t\tDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.route53.Route53Functions;\nimport com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentArgs;\nimport com.pulumi.aws.route53.TrafficPolicy;\nimport com.pulumi.aws.route53.TrafficPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var example = Route53Functions.getTrafficPolicyDocument(GetTrafficPolicyDocumentArgs.builder()\n .recordType(\"A\")\n .startRule(\"site_switch\")\n .endpoints( \n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"my_elb\")\n .type(\"elastic-load-balancer\")\n .value(String.format(\"elb-111111.%s.elb.amazonaws.com\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build(),\n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"site_down_banner\")\n .type(\"s3-website\")\n .region(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .value(\"www.example.com\")\n .build())\n .rules(GetTrafficPolicyDocumentRuleArgs.builder()\n .id(\"site_switch\")\n .type(\"failover\")\n .primary(GetTrafficPolicyDocumentRulePrimaryArgs.builder()\n .endpointReference(\"my_elb\")\n .build())\n .secondary(GetTrafficPolicyDocumentRuleSecondaryArgs.builder()\n .endpointReference(\"site_down_banner\")\n .build())\n .build())\n .build());\n\n var exampleTrafficPolicy = new TrafficPolicy(\"exampleTrafficPolicy\", TrafficPolicyArgs.builder()\n .name(\"example\")\n .comment(\"example comment\")\n .document(example.applyValue(getTrafficPolicyDocumentResult -\u003e getTrafficPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleTrafficPolicy:\n type: aws:route53:TrafficPolicy\n name: example\n properties:\n name: example\n comment: example comment\n document: ${example.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:route53:getTrafficPolicyDocument\n Arguments:\n recordType: A\n startRule: site_switch\n endpoints:\n - id: my_elb\n type: elastic-load-balancer\n value: elb-111111.${current.name}.elb.amazonaws.com\n - id: site_down_banner\n type: s3-website\n region: ${current.name}\n value: www.example.com\n rules:\n - id: site_switch\n type: failover\n primary:\n endpointReference: my_elb\n secondary:\n endpointReference: site_down_banner\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Complex Example\n\nThe following example showcases the use of nested rules within the traffic policy document and introduces the `geoproximity` rule type.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.route53.getTrafficPolicyDocument({\n recordType: \"A\",\n startRule: \"geoproximity_rule\",\n endpoints: [\n {\n id: \"na_endpoint_a\",\n type: \"elastic-load-balancer\",\n value: \"elb-111111.us-west-1.elb.amazonaws.com\",\n },\n {\n id: \"na_endpoint_b\",\n type: \"elastic-load-balancer\",\n value: \"elb-222222.us-west-1.elb.amazonaws.com\",\n },\n {\n id: \"eu_endpoint\",\n type: \"elastic-load-balancer\",\n value: \"elb-333333.eu-west-1.elb.amazonaws.com\",\n },\n {\n id: \"ap_endpoint\",\n type: \"elastic-load-balancer\",\n value: \"elb-444444.ap-northeast-2.elb.amazonaws.com\",\n },\n ],\n rules: [\n {\n id: \"na_rule\",\n type: \"failover\",\n primary: {\n endpointReference: \"na_endpoint_a\",\n },\n secondary: {\n endpointReference: \"na_endpoint_b\",\n },\n },\n {\n id: \"geoproximity_rule\",\n type: \"geoproximity\",\n geoProximityLocations: [\n {\n region: \"aws:route53:us-west-1\",\n bias: \"10\",\n evaluateTargetHealth: true,\n ruleReference: \"na_rule\",\n },\n {\n region: \"aws:route53:eu-west-1\",\n bias: \"10\",\n evaluateTargetHealth: true,\n endpointReference: \"eu_endpoint\",\n },\n {\n region: \"aws:route53:ap-northeast-2\",\n bias: \"0\",\n evaluateTargetHealth: true,\n endpointReference: \"ap_endpoint\",\n },\n ],\n },\n ],\n});\nconst exampleTrafficPolicy = new aws.route53.TrafficPolicy(\"example\", {\n name: \"example\",\n comment: \"example comment\",\n document: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.route53.get_traffic_policy_document(record_type=\"A\",\n start_rule=\"geoproximity_rule\",\n endpoints=[\n {\n \"id\": \"na_endpoint_a\",\n \"type\": \"elastic-load-balancer\",\n \"value\": \"elb-111111.us-west-1.elb.amazonaws.com\",\n },\n {\n \"id\": \"na_endpoint_b\",\n \"type\": \"elastic-load-balancer\",\n \"value\": \"elb-222222.us-west-1.elb.amazonaws.com\",\n },\n {\n \"id\": \"eu_endpoint\",\n \"type\": \"elastic-load-balancer\",\n \"value\": \"elb-333333.eu-west-1.elb.amazonaws.com\",\n },\n {\n \"id\": \"ap_endpoint\",\n \"type\": \"elastic-load-balancer\",\n \"value\": \"elb-444444.ap-northeast-2.elb.amazonaws.com\",\n },\n ],\n rules=[\n {\n \"id\": \"na_rule\",\n \"type\": \"failover\",\n \"primary\": {\n \"endpoint_reference\": \"na_endpoint_a\",\n },\n \"secondary\": {\n \"endpoint_reference\": \"na_endpoint_b\",\n },\n },\n {\n \"id\": \"geoproximity_rule\",\n \"type\": \"geoproximity\",\n \"geo_proximity_locations\": [\n {\n \"region\": \"aws:route53:us-west-1\",\n \"bias\": \"10\",\n \"evaluate_target_health\": True,\n \"rule_reference\": \"na_rule\",\n },\n {\n \"region\": \"aws:route53:eu-west-1\",\n \"bias\": \"10\",\n \"evaluate_target_health\": True,\n \"endpoint_reference\": \"eu_endpoint\",\n },\n {\n \"region\": \"aws:route53:ap-northeast-2\",\n \"bias\": \"0\",\n \"evaluate_target_health\": True,\n \"endpoint_reference\": \"ap_endpoint\",\n },\n ],\n },\n ])\nexample_traffic_policy = aws.route53.TrafficPolicy(\"example\",\n name=\"example\",\n comment=\"example comment\",\n document=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Route53.GetTrafficPolicyDocument.Invoke(new()\n {\n RecordType = \"A\",\n StartRule = \"geoproximity_rule\",\n Endpoints = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"na_endpoint_a\",\n Type = \"elastic-load-balancer\",\n Value = \"elb-111111.us-west-1.elb.amazonaws.com\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"na_endpoint_b\",\n Type = \"elastic-load-balancer\",\n Value = \"elb-222222.us-west-1.elb.amazonaws.com\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"eu_endpoint\",\n Type = \"elastic-load-balancer\",\n Value = \"elb-333333.eu-west-1.elb.amazonaws.com\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"ap_endpoint\",\n Type = \"elastic-load-balancer\",\n Value = \"elb-444444.ap-northeast-2.elb.amazonaws.com\",\n },\n },\n Rules = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleInputArgs\n {\n Id = \"na_rule\",\n Type = \"failover\",\n Primary = new Aws.Route53.Inputs.GetTrafficPolicyDocumentRulePrimaryInputArgs\n {\n EndpointReference = \"na_endpoint_a\",\n },\n Secondary = new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleSecondaryInputArgs\n {\n EndpointReference = \"na_endpoint_b\",\n },\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleInputArgs\n {\n Id = \"geoproximity_rule\",\n Type = \"geoproximity\",\n GeoProximityLocations = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleGeoProximityLocationInputArgs\n {\n Region = \"aws:route53:us-west-1\",\n Bias = \"10\",\n EvaluateTargetHealth = true,\n RuleReference = \"na_rule\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleGeoProximityLocationInputArgs\n {\n Region = \"aws:route53:eu-west-1\",\n Bias = \"10\",\n EvaluateTargetHealth = true,\n EndpointReference = \"eu_endpoint\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleGeoProximityLocationInputArgs\n {\n Region = \"aws:route53:ap-northeast-2\",\n Bias = \"0\",\n EvaluateTargetHealth = true,\n EndpointReference = \"ap_endpoint\",\n },\n },\n },\n },\n });\n\n var exampleTrafficPolicy = new Aws.Route53.TrafficPolicy(\"example\", new()\n {\n Name = \"example\",\n Comment = \"example comment\",\n Document = example.Apply(getTrafficPolicyDocumentResult =\u003e getTrafficPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := route53.GetTrafficPolicyDocument(ctx, \u0026route53.GetTrafficPolicyDocumentArgs{\n\t\t\tRecordType: pulumi.StringRef(\"A\"),\n\t\t\tStartRule: pulumi.StringRef(\"geoproximity_rule\"),\n\t\t\tEndpoints: []route53.GetTrafficPolicyDocumentEndpoint{\n\t\t\t\t{\n\t\t\t\t\tId: \"na_endpoint_a\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(\"elb-111111.us-west-1.elb.amazonaws.com\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"na_endpoint_b\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(\"elb-222222.us-west-1.elb.amazonaws.com\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"eu_endpoint\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(\"elb-333333.eu-west-1.elb.amazonaws.com\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"ap_endpoint\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(\"elb-444444.ap-northeast-2.elb.amazonaws.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tRules: []route53.GetTrafficPolicyDocumentRule{\n\t\t\t\t{\n\t\t\t\t\tId: \"na_rule\",\n\t\t\t\t\tType: pulumi.StringRef(\"failover\"),\n\t\t\t\t\tPrimary: {\n\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"na_endpoint_a\"),\n\t\t\t\t\t},\n\t\t\t\t\tSecondary: {\n\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"na_endpoint_b\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"geoproximity_rule\",\n\t\t\t\t\tType: pulumi.StringRef(\"geoproximity\"),\n\t\t\t\t\tGeoProximityLocations: []route53.GetTrafficPolicyDocumentRuleGeoProximityLocation{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRegion: pulumi.StringRef(\"aws:route53:us-west-1\"),\n\t\t\t\t\t\t\tBias: pulumi.StringRef(\"10\"),\n\t\t\t\t\t\t\tEvaluateTargetHealth: pulumi.BoolRef(true),\n\t\t\t\t\t\t\tRuleReference: pulumi.StringRef(\"na_rule\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRegion: pulumi.StringRef(\"aws:route53:eu-west-1\"),\n\t\t\t\t\t\t\tBias: pulumi.StringRef(\"10\"),\n\t\t\t\t\t\t\tEvaluateTargetHealth: pulumi.BoolRef(true),\n\t\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"eu_endpoint\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRegion: pulumi.StringRef(\"aws:route53:ap-northeast-2\"),\n\t\t\t\t\t\t\tBias: pulumi.StringRef(\"0\"),\n\t\t\t\t\t\t\tEvaluateTargetHealth: pulumi.BoolRef(true),\n\t\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"ap_endpoint\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewTrafficPolicy(ctx, \"example\", \u0026route53.TrafficPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tComment: pulumi.String(\"example comment\"),\n\t\t\tDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.route53.Route53Functions;\nimport com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentArgs;\nimport com.pulumi.aws.route53.TrafficPolicy;\nimport com.pulumi.aws.route53.TrafficPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Route53Functions.getTrafficPolicyDocument(GetTrafficPolicyDocumentArgs.builder()\n .recordType(\"A\")\n .startRule(\"geoproximity_rule\")\n .endpoints( \n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"na_endpoint_a\")\n .type(\"elastic-load-balancer\")\n .value(\"elb-111111.us-west-1.elb.amazonaws.com\")\n .build(),\n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"na_endpoint_b\")\n .type(\"elastic-load-balancer\")\n .value(\"elb-222222.us-west-1.elb.amazonaws.com\")\n .build(),\n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"eu_endpoint\")\n .type(\"elastic-load-balancer\")\n .value(\"elb-333333.eu-west-1.elb.amazonaws.com\")\n .build(),\n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"ap_endpoint\")\n .type(\"elastic-load-balancer\")\n .value(\"elb-444444.ap-northeast-2.elb.amazonaws.com\")\n .build())\n .rules( \n GetTrafficPolicyDocumentRuleArgs.builder()\n .id(\"na_rule\")\n .type(\"failover\")\n .primary(GetTrafficPolicyDocumentRulePrimaryArgs.builder()\n .endpointReference(\"na_endpoint_a\")\n .build())\n .secondary(GetTrafficPolicyDocumentRuleSecondaryArgs.builder()\n .endpointReference(\"na_endpoint_b\")\n .build())\n .build(),\n GetTrafficPolicyDocumentRuleArgs.builder()\n .id(\"geoproximity_rule\")\n .type(\"geoproximity\")\n .geoProximityLocations( \n GetTrafficPolicyDocumentRuleGeoProximityLocationArgs.builder()\n .region(\"aws:route53:us-west-1\")\n .bias(10)\n .evaluateTargetHealth(true)\n .ruleReference(\"na_rule\")\n .build(),\n GetTrafficPolicyDocumentRuleGeoProximityLocationArgs.builder()\n .region(\"aws:route53:eu-west-1\")\n .bias(10)\n .evaluateTargetHealth(true)\n .endpointReference(\"eu_endpoint\")\n .build(),\n GetTrafficPolicyDocumentRuleGeoProximityLocationArgs.builder()\n .region(\"aws:route53:ap-northeast-2\")\n .bias(0)\n .evaluateTargetHealth(true)\n .endpointReference(\"ap_endpoint\")\n .build())\n .build())\n .build());\n\n var exampleTrafficPolicy = new TrafficPolicy(\"exampleTrafficPolicy\", TrafficPolicyArgs.builder()\n .name(\"example\")\n .comment(\"example comment\")\n .document(example.applyValue(getTrafficPolicyDocumentResult -\u003e getTrafficPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleTrafficPolicy:\n type: aws:route53:TrafficPolicy\n name: example\n properties:\n name: example\n comment: example comment\n document: ${example.json}\nvariables:\n example:\n fn::invoke:\n Function: aws:route53:getTrafficPolicyDocument\n Arguments:\n recordType: A\n startRule: geoproximity_rule\n endpoints:\n - id: na_endpoint_a\n type: elastic-load-balancer\n value: elb-111111.us-west-1.elb.amazonaws.com\n - id: na_endpoint_b\n type: elastic-load-balancer\n value: elb-222222.us-west-1.elb.amazonaws.com\n - id: eu_endpoint\n type: elastic-load-balancer\n value: elb-333333.eu-west-1.elb.amazonaws.com\n - id: ap_endpoint\n type: elastic-load-balancer\n value: elb-444444.ap-northeast-2.elb.amazonaws.com\n rules:\n - id: na_rule\n type: failover\n primary:\n endpointReference: na_endpoint_a\n secondary:\n endpointReference: na_endpoint_b\n - id: geoproximity_rule\n type: geoproximity\n geoProximityLocations:\n - region: aws:route53:us-west-1\n bias: 10\n evaluateTargetHealth: true\n ruleReference: na_rule\n - region: aws:route53:eu-west-1\n bias: 10\n evaluateTargetHealth: true\n endpointReference: eu_endpoint\n - region: aws:route53:ap-northeast-2\n bias: 0\n evaluateTargetHealth: true\n endpointReference: ap_endpoint\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Generates an Route53 traffic policy document in JSON format for use with resources that expect policy documents such as `aws.route53.TrafficPolicy`.\n\n## Example Usage\n\n### Basic Example\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.getRegion({});\nconst example = Promise.all([current, current]).then(([current, current1]) =\u003e aws.route53.getTrafficPolicyDocument({\n recordType: \"A\",\n startRule: \"site_switch\",\n endpoints: [\n {\n id: \"my_elb\",\n type: \"elastic-load-balancer\",\n value: `elb-111111.${current.name}.elb.amazonaws.com`,\n },\n {\n id: \"site_down_banner\",\n type: \"s3-website\",\n region: current1.name,\n value: \"www.example.com\",\n },\n ],\n rules: [{\n id: \"site_switch\",\n type: \"failover\",\n primary: {\n endpointReference: \"my_elb\",\n },\n secondary: {\n endpointReference: \"site_down_banner\",\n },\n }],\n}));\nconst exampleTrafficPolicy = new aws.route53.TrafficPolicy(\"example\", {\n name: \"example\",\n comment: \"example comment\",\n document: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.get_region()\nexample = aws.route53.get_traffic_policy_document(record_type=\"A\",\n start_rule=\"site_switch\",\n endpoints=[\n {\n \"id\": \"my_elb\",\n \"type\": \"elastic-load-balancer\",\n \"value\": f\"elb-111111.{current.name}.elb.amazonaws.com\",\n },\n {\n \"id\": \"site_down_banner\",\n \"type\": \"s3-website\",\n \"region\": current.name,\n \"value\": \"www.example.com\",\n },\n ],\n rules=[{\n \"id\": \"site_switch\",\n \"type\": \"failover\",\n \"primary\": {\n \"endpoint_reference\": \"my_elb\",\n },\n \"secondary\": {\n \"endpoint_reference\": \"site_down_banner\",\n },\n }])\nexample_traffic_policy = aws.route53.TrafficPolicy(\"example\",\n name=\"example\",\n comment=\"example comment\",\n document=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.GetRegion.Invoke();\n\n var example = Aws.Route53.GetTrafficPolicyDocument.Invoke(new()\n {\n RecordType = \"A\",\n StartRule = \"site_switch\",\n Endpoints = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"my_elb\",\n Type = \"elastic-load-balancer\",\n Value = $\"elb-111111.{current.Apply(getRegionResult =\u003e getRegionResult.Name)}.elb.amazonaws.com\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"site_down_banner\",\n Type = \"s3-website\",\n Region = current.Apply(getRegionResult =\u003e getRegionResult.Name),\n Value = \"www.example.com\",\n },\n },\n Rules = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleInputArgs\n {\n Id = \"site_switch\",\n Type = \"failover\",\n Primary = new Aws.Route53.Inputs.GetTrafficPolicyDocumentRulePrimaryInputArgs\n {\n EndpointReference = \"my_elb\",\n },\n Secondary = new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleSecondaryInputArgs\n {\n EndpointReference = \"site_down_banner\",\n },\n },\n },\n });\n\n var exampleTrafficPolicy = new Aws.Route53.TrafficPolicy(\"example\", new()\n {\n Name = \"example\",\n Comment = \"example comment\",\n Document = example.Apply(getTrafficPolicyDocumentResult =\u003e getTrafficPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws\"\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := aws.GetRegion(ctx, \u0026aws.GetRegionArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texample, err := route53.GetTrafficPolicyDocument(ctx, \u0026route53.GetTrafficPolicyDocumentArgs{\n\t\t\tRecordType: pulumi.StringRef(\"A\"),\n\t\t\tStartRule: pulumi.StringRef(\"site_switch\"),\n\t\t\tEndpoints: []route53.GetTrafficPolicyDocumentEndpoint{\n\t\t\t\t{\n\t\t\t\t\tId: \"my_elb\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(fmt.Sprintf(\"elb-111111.%v.elb.amazonaws.com\", current.Name)),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"site_down_banner\",\n\t\t\t\t\tType: pulumi.StringRef(\"s3-website\"),\n\t\t\t\t\tRegion: pulumi.StringRef(current.Name),\n\t\t\t\t\tValue: pulumi.StringRef(\"www.example.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tRules: []route53.GetTrafficPolicyDocumentRule{\n\t\t\t\t{\n\t\t\t\t\tId: \"site_switch\",\n\t\t\t\t\tType: pulumi.StringRef(\"failover\"),\n\t\t\t\t\tPrimary: {\n\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"my_elb\"),\n\t\t\t\t\t},\n\t\t\t\t\tSecondary: {\n\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"site_down_banner\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewTrafficPolicy(ctx, \"example\", \u0026route53.TrafficPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tComment: pulumi.String(\"example comment\"),\n\t\t\tDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.AwsFunctions;\nimport com.pulumi.aws.inputs.GetRegionArgs;\nimport com.pulumi.aws.route53.Route53Functions;\nimport com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentArgs;\nimport com.pulumi.aws.route53.TrafficPolicy;\nimport com.pulumi.aws.route53.TrafficPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = AwsFunctions.getRegion();\n\n final var example = Route53Functions.getTrafficPolicyDocument(GetTrafficPolicyDocumentArgs.builder()\n .recordType(\"A\")\n .startRule(\"site_switch\")\n .endpoints( \n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"my_elb\")\n .type(\"elastic-load-balancer\")\n .value(String.format(\"elb-111111.%s.elb.amazonaws.com\", current.applyValue(getRegionResult -\u003e getRegionResult.name())))\n .build(),\n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"site_down_banner\")\n .type(\"s3-website\")\n .region(current.applyValue(getRegionResult -\u003e getRegionResult.name()))\n .value(\"www.example.com\")\n .build())\n .rules(GetTrafficPolicyDocumentRuleArgs.builder()\n .id(\"site_switch\")\n .type(\"failover\")\n .primary(GetTrafficPolicyDocumentRulePrimaryArgs.builder()\n .endpointReference(\"my_elb\")\n .build())\n .secondary(GetTrafficPolicyDocumentRuleSecondaryArgs.builder()\n .endpointReference(\"site_down_banner\")\n .build())\n .build())\n .build());\n\n var exampleTrafficPolicy = new TrafficPolicy(\"exampleTrafficPolicy\", TrafficPolicyArgs.builder()\n .name(\"example\")\n .comment(\"example comment\")\n .document(example.applyValue(getTrafficPolicyDocumentResult -\u003e getTrafficPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleTrafficPolicy:\n type: aws:route53:TrafficPolicy\n name: example\n properties:\n name: example\n comment: example comment\n document: ${example.json}\nvariables:\n current:\n fn::invoke:\n Function: aws:getRegion\n Arguments: {}\n example:\n fn::invoke:\n Function: aws:route53:getTrafficPolicyDocument\n Arguments:\n recordType: A\n startRule: site_switch\n endpoints:\n - id: my_elb\n type: elastic-load-balancer\n value: elb-111111.${current.name}.elb.amazonaws.com\n - id: site_down_banner\n type: s3-website\n region: ${current.name}\n value: www.example.com\n rules:\n - id: site_switch\n type: failover\n primary:\n endpointReference: my_elb\n secondary:\n endpointReference: site_down_banner\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Complex Example\n\nThe following example showcases the use of nested rules within the traffic policy document and introduces the `geoproximity` rule type.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.route53.getTrafficPolicyDocument({\n recordType: \"A\",\n startRule: \"geoproximity_rule\",\n endpoints: [\n {\n id: \"na_endpoint_a\",\n type: \"elastic-load-balancer\",\n value: \"elb-111111.us-west-1.elb.amazonaws.com\",\n },\n {\n id: \"na_endpoint_b\",\n type: \"elastic-load-balancer\",\n value: \"elb-222222.us-west-1.elb.amazonaws.com\",\n },\n {\n id: \"eu_endpoint\",\n type: \"elastic-load-balancer\",\n value: \"elb-333333.eu-west-1.elb.amazonaws.com\",\n },\n {\n id: \"ap_endpoint\",\n type: \"elastic-load-balancer\",\n value: \"elb-444444.ap-northeast-2.elb.amazonaws.com\",\n },\n ],\n rules: [\n {\n id: \"na_rule\",\n type: \"failover\",\n primary: {\n endpointReference: \"na_endpoint_a\",\n },\n secondary: {\n endpointReference: \"na_endpoint_b\",\n },\n },\n {\n id: \"geoproximity_rule\",\n type: \"geoproximity\",\n geoProximityLocations: [\n {\n region: \"aws:route53:us-west-1\",\n bias: \"10\",\n evaluateTargetHealth: true,\n ruleReference: \"na_rule\",\n },\n {\n region: \"aws:route53:eu-west-1\",\n bias: \"10\",\n evaluateTargetHealth: true,\n endpointReference: \"eu_endpoint\",\n },\n {\n region: \"aws:route53:ap-northeast-2\",\n bias: \"0\",\n evaluateTargetHealth: true,\n endpointReference: \"ap_endpoint\",\n },\n ],\n },\n ],\n});\nconst exampleTrafficPolicy = new aws.route53.TrafficPolicy(\"example\", {\n name: \"example\",\n comment: \"example comment\",\n document: example.then(example =\u003e example.json),\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.route53.get_traffic_policy_document(record_type=\"A\",\n start_rule=\"geoproximity_rule\",\n endpoints=[\n {\n \"id\": \"na_endpoint_a\",\n \"type\": \"elastic-load-balancer\",\n \"value\": \"elb-111111.us-west-1.elb.amazonaws.com\",\n },\n {\n \"id\": \"na_endpoint_b\",\n \"type\": \"elastic-load-balancer\",\n \"value\": \"elb-222222.us-west-1.elb.amazonaws.com\",\n },\n {\n \"id\": \"eu_endpoint\",\n \"type\": \"elastic-load-balancer\",\n \"value\": \"elb-333333.eu-west-1.elb.amazonaws.com\",\n },\n {\n \"id\": \"ap_endpoint\",\n \"type\": \"elastic-load-balancer\",\n \"value\": \"elb-444444.ap-northeast-2.elb.amazonaws.com\",\n },\n ],\n rules=[\n {\n \"id\": \"na_rule\",\n \"type\": \"failover\",\n \"primary\": {\n \"endpoint_reference\": \"na_endpoint_a\",\n },\n \"secondary\": {\n \"endpoint_reference\": \"na_endpoint_b\",\n },\n },\n {\n \"id\": \"geoproximity_rule\",\n \"type\": \"geoproximity\",\n \"geo_proximity_locations\": [\n {\n \"region\": \"aws:route53:us-west-1\",\n \"bias\": \"10\",\n \"evaluate_target_health\": True,\n \"rule_reference\": \"na_rule\",\n },\n {\n \"region\": \"aws:route53:eu-west-1\",\n \"bias\": \"10\",\n \"evaluate_target_health\": True,\n \"endpoint_reference\": \"eu_endpoint\",\n },\n {\n \"region\": \"aws:route53:ap-northeast-2\",\n \"bias\": \"0\",\n \"evaluate_target_health\": True,\n \"endpoint_reference\": \"ap_endpoint\",\n },\n ],\n },\n ])\nexample_traffic_policy = aws.route53.TrafficPolicy(\"example\",\n name=\"example\",\n comment=\"example comment\",\n document=example.json)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Route53.GetTrafficPolicyDocument.Invoke(new()\n {\n RecordType = \"A\",\n StartRule = \"geoproximity_rule\",\n Endpoints = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"na_endpoint_a\",\n Type = \"elastic-load-balancer\",\n Value = \"elb-111111.us-west-1.elb.amazonaws.com\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"na_endpoint_b\",\n Type = \"elastic-load-balancer\",\n Value = \"elb-222222.us-west-1.elb.amazonaws.com\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"eu_endpoint\",\n Type = \"elastic-load-balancer\",\n Value = \"elb-333333.eu-west-1.elb.amazonaws.com\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentEndpointInputArgs\n {\n Id = \"ap_endpoint\",\n Type = \"elastic-load-balancer\",\n Value = \"elb-444444.ap-northeast-2.elb.amazonaws.com\",\n },\n },\n Rules = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleInputArgs\n {\n Id = \"na_rule\",\n Type = \"failover\",\n Primary = new Aws.Route53.Inputs.GetTrafficPolicyDocumentRulePrimaryInputArgs\n {\n EndpointReference = \"na_endpoint_a\",\n },\n Secondary = new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleSecondaryInputArgs\n {\n EndpointReference = \"na_endpoint_b\",\n },\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleInputArgs\n {\n Id = \"geoproximity_rule\",\n Type = \"geoproximity\",\n GeoProximityLocations = new[]\n {\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleGeoProximityLocationInputArgs\n {\n Region = \"aws:route53:us-west-1\",\n Bias = \"10\",\n EvaluateTargetHealth = true,\n RuleReference = \"na_rule\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleGeoProximityLocationInputArgs\n {\n Region = \"aws:route53:eu-west-1\",\n Bias = \"10\",\n EvaluateTargetHealth = true,\n EndpointReference = \"eu_endpoint\",\n },\n new Aws.Route53.Inputs.GetTrafficPolicyDocumentRuleGeoProximityLocationInputArgs\n {\n Region = \"aws:route53:ap-northeast-2\",\n Bias = \"0\",\n EvaluateTargetHealth = true,\n EndpointReference = \"ap_endpoint\",\n },\n },\n },\n },\n });\n\n var exampleTrafficPolicy = new Aws.Route53.TrafficPolicy(\"example\", new()\n {\n Name = \"example\",\n Comment = \"example comment\",\n Document = example.Apply(getTrafficPolicyDocumentResult =\u003e getTrafficPolicyDocumentResult.Json),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := route53.GetTrafficPolicyDocument(ctx, \u0026route53.GetTrafficPolicyDocumentArgs{\n\t\t\tRecordType: pulumi.StringRef(\"A\"),\n\t\t\tStartRule: pulumi.StringRef(\"geoproximity_rule\"),\n\t\t\tEndpoints: []route53.GetTrafficPolicyDocumentEndpoint{\n\t\t\t\t{\n\t\t\t\t\tId: \"na_endpoint_a\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(\"elb-111111.us-west-1.elb.amazonaws.com\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"na_endpoint_b\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(\"elb-222222.us-west-1.elb.amazonaws.com\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"eu_endpoint\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(\"elb-333333.eu-west-1.elb.amazonaws.com\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"ap_endpoint\",\n\t\t\t\t\tType: pulumi.StringRef(\"elastic-load-balancer\"),\n\t\t\t\t\tValue: pulumi.StringRef(\"elb-444444.ap-northeast-2.elb.amazonaws.com\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tRules: []route53.GetTrafficPolicyDocumentRule{\n\t\t\t\t{\n\t\t\t\t\tId: \"na_rule\",\n\t\t\t\t\tType: pulumi.StringRef(\"failover\"),\n\t\t\t\t\tPrimary: {\n\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"na_endpoint_a\"),\n\t\t\t\t\t},\n\t\t\t\t\tSecondary: {\n\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"na_endpoint_b\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tId: \"geoproximity_rule\",\n\t\t\t\t\tType: pulumi.StringRef(\"geoproximity\"),\n\t\t\t\t\tGeoProximityLocations: []route53.GetTrafficPolicyDocumentRuleGeoProximityLocation{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRegion: pulumi.StringRef(\"aws:route53:us-west-1\"),\n\t\t\t\t\t\t\tBias: pulumi.StringRef(\"10\"),\n\t\t\t\t\t\t\tEvaluateTargetHealth: pulumi.BoolRef(true),\n\t\t\t\t\t\t\tRuleReference: pulumi.StringRef(\"na_rule\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRegion: pulumi.StringRef(\"aws:route53:eu-west-1\"),\n\t\t\t\t\t\t\tBias: pulumi.StringRef(\"10\"),\n\t\t\t\t\t\t\tEvaluateTargetHealth: pulumi.BoolRef(true),\n\t\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"eu_endpoint\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRegion: pulumi.StringRef(\"aws:route53:ap-northeast-2\"),\n\t\t\t\t\t\t\tBias: pulumi.StringRef(\"0\"),\n\t\t\t\t\t\t\tEvaluateTargetHealth: pulumi.BoolRef(true),\n\t\t\t\t\t\t\tEndpointReference: pulumi.StringRef(\"ap_endpoint\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = route53.NewTrafficPolicy(ctx, \"example\", \u0026route53.TrafficPolicyArgs{\n\t\t\tName: pulumi.String(\"example\"),\n\t\t\tComment: pulumi.String(\"example comment\"),\n\t\t\tDocument: pulumi.String(example.Json),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.route53.Route53Functions;\nimport com.pulumi.aws.route53.inputs.GetTrafficPolicyDocumentArgs;\nimport com.pulumi.aws.route53.TrafficPolicy;\nimport com.pulumi.aws.route53.TrafficPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = Route53Functions.getTrafficPolicyDocument(GetTrafficPolicyDocumentArgs.builder()\n .recordType(\"A\")\n .startRule(\"geoproximity_rule\")\n .endpoints( \n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"na_endpoint_a\")\n .type(\"elastic-load-balancer\")\n .value(\"elb-111111.us-west-1.elb.amazonaws.com\")\n .build(),\n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"na_endpoint_b\")\n .type(\"elastic-load-balancer\")\n .value(\"elb-222222.us-west-1.elb.amazonaws.com\")\n .build(),\n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"eu_endpoint\")\n .type(\"elastic-load-balancer\")\n .value(\"elb-333333.eu-west-1.elb.amazonaws.com\")\n .build(),\n GetTrafficPolicyDocumentEndpointArgs.builder()\n .id(\"ap_endpoint\")\n .type(\"elastic-load-balancer\")\n .value(\"elb-444444.ap-northeast-2.elb.amazonaws.com\")\n .build())\n .rules( \n GetTrafficPolicyDocumentRuleArgs.builder()\n .id(\"na_rule\")\n .type(\"failover\")\n .primary(GetTrafficPolicyDocumentRulePrimaryArgs.builder()\n .endpointReference(\"na_endpoint_a\")\n .build())\n .secondary(GetTrafficPolicyDocumentRuleSecondaryArgs.builder()\n .endpointReference(\"na_endpoint_b\")\n .build())\n .build(),\n GetTrafficPolicyDocumentRuleArgs.builder()\n .id(\"geoproximity_rule\")\n .type(\"geoproximity\")\n .geoProximityLocations( \n GetTrafficPolicyDocumentRuleGeoProximityLocationArgs.builder()\n .region(\"aws:route53:us-west-1\")\n .bias(10)\n .evaluateTargetHealth(true)\n .ruleReference(\"na_rule\")\n .build(),\n GetTrafficPolicyDocumentRuleGeoProximityLocationArgs.builder()\n .region(\"aws:route53:eu-west-1\")\n .bias(10)\n .evaluateTargetHealth(true)\n .endpointReference(\"eu_endpoint\")\n .build(),\n GetTrafficPolicyDocumentRuleGeoProximityLocationArgs.builder()\n .region(\"aws:route53:ap-northeast-2\")\n .bias(0)\n .evaluateTargetHealth(true)\n .endpointReference(\"ap_endpoint\")\n .build())\n .build())\n .build());\n\n var exampleTrafficPolicy = new TrafficPolicy(\"exampleTrafficPolicy\", TrafficPolicyArgs.builder()\n .name(\"example\")\n .comment(\"example comment\")\n .document(example.applyValue(getTrafficPolicyDocumentResult -\u003e getTrafficPolicyDocumentResult.json()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleTrafficPolicy:\n type: aws:route53:TrafficPolicy\n name: example\n properties:\n name: example\n comment: example comment\n document: ${example.json}\nvariables:\n example:\n fn::invoke:\n Function: aws:route53:getTrafficPolicyDocument\n Arguments:\n recordType: A\n startRule: geoproximity_rule\n endpoints:\n - id: na_endpoint_a\n type: elastic-load-balancer\n value: elb-111111.us-west-1.elb.amazonaws.com\n - id: na_endpoint_b\n type: elastic-load-balancer\n value: elb-222222.us-west-1.elb.amazonaws.com\n - id: eu_endpoint\n type: elastic-load-balancer\n value: elb-333333.eu-west-1.elb.amazonaws.com\n - id: ap_endpoint\n type: elastic-load-balancer\n value: elb-444444.ap-northeast-2.elb.amazonaws.com\n rules:\n - id: na_rule\n type: failover\n primary:\n endpointReference: na_endpoint_a\n secondary:\n endpointReference: na_endpoint_b\n - id: geoproximity_rule\n type: geoproximity\n geoProximityLocations:\n - region: aws:route53:us-west-1\n bias: 10\n evaluateTargetHealth: true\n ruleReference: na_rule\n - region: aws:route53:eu-west-1\n bias: 10\n evaluateTargetHealth: true\n endpointReference: eu_endpoint\n - region: aws:route53:ap-northeast-2\n bias: 0\n evaluateTargetHealth: true\n endpointReference: ap_endpoint\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getTrafficPolicyDocument.\n", "properties": { @@ -414808,7 +414808,7 @@ } }, "aws:route53/getZones:getZones": { - "description": "This resource can be useful for getting back a list of Route53 Hosted Zone IDs for a Region.\n\n## Example Usage\n\nThe following example retrieves a list of all Hosted Zone IDs.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst all = aws.route53.getZones({});\nexport const example = all.then(all =\u003e all.ids);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nall = aws.route53.get_zones()\npulumi.export(\"example\", all.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var all = Aws.Route53.GetZones.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = all.Apply(getZonesResult =\u003e getZonesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tall, err := route53.GetZones(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", all.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.route53.Route53Functions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var all = Route53Functions.getZones();\n\n ctx.export(\"example\", all.applyValue(getZonesResult -\u003e getZonesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n all:\n fn::invoke:\n Function: aws:route53:getZones\n Arguments: {}\noutputs:\n example: ${all.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "This resource can be useful for getting back a list of Route53 Hosted Zone IDs for a Region.\n\n## Example Usage\n\nThe following example retrieves a list of all Hosted Zone IDs.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst all = aws.route53.getZones({});\nexport const example = all.then(all =\u003e all.ids);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nall = aws.route53.get_zones()\npulumi.export(\"example\", all.ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var all = Aws.Route53.GetZones.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"example\"] = all.Apply(getZonesResult =\u003e getZonesResult.Ids),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tall, err := route53.GetZones(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"example\", all.Ids)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.route53.Route53Functions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var all = Route53Functions.getZones();\n\n ctx.export(\"example\", all.applyValue(getZonesResult -\u003e getZonesResult.ids()));\n }\n}\n```\n```yaml\nvariables:\n all:\n fn::invoke:\n Function: aws:route53:getZones\n Arguments: {}\noutputs:\n example: ${all.ids}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getZones.\n", "properties": { @@ -414831,7 +414831,7 @@ } }, "aws:s3/getAccountPublicAccessBlock:getAccountPublicAccessBlock": { - "description": "The S3 account public access block data source returns account-level public access block configuration.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.s3.getAccountPublicAccessBlock({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.get_account_public_access_block()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.S3.GetAccountPublicAccessBlock.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.LookupAccountPublicAccessBlock(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.inputs.GetAccountPublicAccessBlockArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = S3Functions.getAccountPublicAccessBlock();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:s3:getAccountPublicAccessBlock\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The S3 account public access block data source returns account-level public access block configuration.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.s3.getAccountPublicAccessBlock({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.get_account_public_access_block()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.S3.GetAccountPublicAccessBlock.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.LookupAccountPublicAccessBlock(ctx, \u0026s3.LookupAccountPublicAccessBlockArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport com.pulumi.aws.s3.inputs.GetAccountPublicAccessBlockArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = S3Functions.getAccountPublicAccessBlock();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:s3:getAccountPublicAccessBlock\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getAccountPublicAccessBlock.\n", "properties": { @@ -415268,7 +415268,7 @@ } }, "aws:s3/getCanonicalUserId:getCanonicalUserId": { - "description": "The Canonical User ID data source allows access to the [canonical user ID](http://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html)\nfor the effective account in which this provider is working. \n\n\u003e **NOTE:** To use this data source, you must have the `s3:ListAllMyBuckets` permission.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.s3.getCanonicalUserId({});\nexport const canonicalUserId = current.then(current =\u003e current.id);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.s3.get_canonical_user_id()\npulumi.export(\"canonicalUserId\", current.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.S3.GetCanonicalUserId.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"canonicalUserId\"] = current.Apply(getCanonicalUserIdResult =\u003e getCanonicalUserIdResult.Id),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := s3.GetCanonicalUserId(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"canonicalUserId\", current.Id)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = S3Functions.getCanonicalUserId();\n\n ctx.export(\"canonicalUserId\", current.applyValue(getCanonicalUserIdResult -\u003e getCanonicalUserIdResult.id()));\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:s3:getCanonicalUserId\n Arguments: {}\noutputs:\n canonicalUserId: ${current.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "The Canonical User ID data source allows access to the [canonical user ID](http://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html)\nfor the effective account in which this provider is working. \n\n\u003e **NOTE:** To use this data source, you must have the `s3:ListAllMyBuckets` permission.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst current = aws.s3.getCanonicalUserId({});\nexport const canonicalUserId = current.then(current =\u003e current.id);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\ncurrent = aws.s3.get_canonical_user_id()\npulumi.export(\"canonicalUserId\", current.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = Aws.S3.GetCanonicalUserId.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"canonicalUserId\"] = current.Apply(getCanonicalUserIdResult =\u003e getCanonicalUserIdResult.Id),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := s3.GetCanonicalUserId(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"canonicalUserId\", current.Id)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var current = S3Functions.getCanonicalUserId();\n\n ctx.export(\"canonicalUserId\", current.applyValue(getCanonicalUserIdResult -\u003e getCanonicalUserIdResult.id()));\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: aws:s3:getCanonicalUserId\n Arguments: {}\noutputs:\n canonicalUserId: ${current.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getCanonicalUserId.\n", "properties": { @@ -415289,7 +415289,7 @@ } }, "aws:s3/getDirectoryBuckets:getDirectoryBuckets": { - "description": "Lists Amazon S3 Express directory buckets.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.s3.getDirectoryBuckets({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.get_directory_buckets()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.S3.GetDirectoryBuckets.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.GetDirectoryBuckets(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = S3Functions.getDirectoryBuckets();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:s3:getDirectoryBuckets\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Lists Amazon S3 Express directory buckets.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.s3.getDirectoryBuckets({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.s3.get_directory_buckets()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.S3.GetDirectoryBuckets.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := s3.GetDirectoryBuckets(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.s3.S3Functions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = S3Functions.getDirectoryBuckets();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:s3:getDirectoryBuckets\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getDirectoryBuckets.\n", "properties": { @@ -417166,7 +417166,7 @@ } }, "aws:ses/getActiveReceiptRuleSet:getActiveReceiptRuleSet": { - "description": "Retrieve the active SES receipt rule set\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.ses.getActiveReceiptRuleSet({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ses.get_active_receipt_rule_set()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.Ses.GetActiveReceiptRuleSet.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ses\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ses.LookupActiveReceiptRuleSet(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ses.SesFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = SesFunctions.getActiveReceiptRuleSet();\n\n }\n}\n```\n```yaml\nvariables:\n main:\n fn::invoke:\n Function: aws:ses:getActiveReceiptRuleSet\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Retrieve the active SES receipt rule set\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst main = aws.ses.getActiveReceiptRuleSet({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nmain = aws.ses.get_active_receipt_rule_set()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var main = Aws.Ses.GetActiveReceiptRuleSet.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ses\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ses.LookupActiveReceiptRuleSet(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ses.SesFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var main = SesFunctions.getActiveReceiptRuleSet();\n\n }\n}\n```\n```yaml\nvariables:\n main:\n fn::invoke:\n Function: aws:ses:getActiveReceiptRuleSet\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getActiveReceiptRuleSet.\n", "properties": { @@ -418832,7 +418832,7 @@ } }, "aws:ssmincidents/getReplicationSet:getReplicationSet": { - "description": "\u003e **NOTE:** The AWS Region specified by a provider must always be one of the Regions specified for the replication set.\n\nUse this data source to manage a replication set in AWS Systems Manager Incident Manager.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssmincidents.getReplicationSet({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.get_replication_set()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsmIncidents.GetReplicationSet.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssmincidents\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssmincidents.LookupReplicationSet(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssmincidents.SsmincidentsFunctions;\nimport com.pulumi.aws.ssmincidents.inputs.GetReplicationSetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsmincidentsFunctions.getReplicationSet();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssmincidents:getReplicationSet\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "\u003e **NOTE:** The AWS Region specified by a provider must always be one of the Regions specified for the replication set.\n\nUse this data source to manage a replication set in AWS Systems Manager Incident Manager.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssmincidents.getReplicationSet({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssmincidents.get_replication_set()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsmIncidents.GetReplicationSet.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssmincidents\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssmincidents.LookupReplicationSet(ctx, \u0026ssmincidents.LookupReplicationSetArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssmincidents.SsmincidentsFunctions;\nimport com.pulumi.aws.ssmincidents.inputs.GetReplicationSetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsmincidentsFunctions.getReplicationSet();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssmincidents:getReplicationSet\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getReplicationSet.\n", "properties": { @@ -419122,7 +419122,7 @@ } }, "aws:ssoadmin/getApplicationProviders:getApplicationProviders": { - "description": "Data source for managing AWS SSO Admin Application Providers.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getApplicationProviders({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_application_providers()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetApplicationProviders.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssoadmin.GetApplicationProviders(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.inputs.GetApplicationProvidersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getApplicationProviders();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getApplicationProviders\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing AWS SSO Admin Application Providers.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getApplicationProviders({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_application_providers()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetApplicationProviders.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := ssoadmin.GetApplicationProviders(ctx, \u0026ssoadmin.GetApplicationProvidersArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.inputs.GetApplicationProvidersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getApplicationProviders();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getApplicationProviders\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getApplicationProviders.\n", "properties": { @@ -419158,7 +419158,7 @@ } }, "aws:ssoadmin/getInstances:getInstances": { - "description": "Use this data source to get ARNs and Identity Store IDs of Single Sign-On (SSO) Instances.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nexport const arn = example.then(example =\u003e example.arns?.[0]);\nexport const identityStoreId = example.then(example =\u003e example.identityStoreIds?.[0]);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\npulumi.export(\"arn\", example.arns[0])\npulumi.export(\"identityStoreId\", example.identity_store_ids[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"arn\"] = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n [\"identityStoreId\"] = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"arn\", example.Arns[0])\n\t\tctx.Export(\"identityStoreId\", example.IdentityStoreIds[0])\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n ctx.export(\"arn\", example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]));\n ctx.export(\"identityStoreId\", example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\noutputs:\n arn: ${example.arns[0]}\n identityStoreId: ${example.identityStoreIds[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get ARNs and Identity Store IDs of Single Sign-On (SSO) Instances.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nexport const arn = example.then(example =\u003e example.arns?.[0]);\nexport const identityStoreId = example.then(example =\u003e example.identityStoreIds?.[0]);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\npulumi.export(\"arn\", example.arns[0])\npulumi.export(\"identityStoreId\", example.identity_store_ids[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"arn\"] = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n [\"identityStoreId\"] = example.Apply(getInstancesResult =\u003e getInstancesResult.IdentityStoreIds[0]),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"arn\", example.Arns[0])\n\t\tctx.Export(\"identityStoreId\", example.IdentityStoreIds[0])\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n ctx.export(\"arn\", example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]));\n ctx.export(\"identityStoreId\", example.applyValue(getInstancesResult -\u003e getInstancesResult.identityStoreIds()[0]));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\noutputs:\n arn: ${example.arns[0]}\n identityStoreId: ${example.identityStoreIds[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getInstances.\n", "properties": { @@ -419190,7 +419190,7 @@ } }, "aws:ssoadmin/getPermissionSet:getPermissionSet": { - "description": "Use this data source to get a Single Sign-On (SSO) Permission Set.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetPermissionSet = example.then(example =\u003e aws.ssoadmin.getPermissionSet({\n instanceArn: example.arns?.[0],\n name: \"Example\",\n}));\nexport const arn = exampleGetPermissionSet.then(exampleGetPermissionSet =\u003e exampleGetPermissionSet.arn);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_permission_set = aws.ssoadmin.get_permission_set(instance_arn=example.arns[0],\n name=\"Example\")\npulumi.export(\"arn\", example_get_permission_set.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetPermissionSet = Aws.SsoAdmin.GetPermissionSet.Invoke(new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n Name = \"Example\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"arn\"] = exampleGetPermissionSet.Apply(getPermissionSetResult =\u003e getPermissionSetResult.Arn),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetPermissionSet, err := ssoadmin.LookupPermissionSet(ctx, \u0026ssoadmin.LookupPermissionSetArgs{\n\t\t\tInstanceArn: example.Arns[0],\n\t\t\tName: pulumi.StringRef(\"Example\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"arn\", exampleGetPermissionSet.Arn)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.inputs.GetPermissionSetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetPermissionSet = SsoadminFunctions.getPermissionSet(GetPermissionSetArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .name(\"Example\")\n .build());\n\n ctx.export(\"arn\", exampleGetPermissionSet.applyValue(getPermissionSetResult -\u003e getPermissionSetResult.arn()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetPermissionSet:\n fn::invoke:\n Function: aws:ssoadmin:getPermissionSet\n Arguments:\n instanceArn: ${example.arns[0]}\n name: Example\noutputs:\n arn: ${exampleGetPermissionSet.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Use this data source to get a Single Sign-On (SSO) Permission Set.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetPermissionSet = example.then(example =\u003e aws.ssoadmin.getPermissionSet({\n instanceArn: example.arns?.[0],\n name: \"Example\",\n}));\nexport const arn = exampleGetPermissionSet.then(exampleGetPermissionSet =\u003e exampleGetPermissionSet.arn);\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_permission_set = aws.ssoadmin.get_permission_set(instance_arn=example.arns[0],\n name=\"Example\")\npulumi.export(\"arn\", example_get_permission_set.arn)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetPermissionSet = Aws.SsoAdmin.GetPermissionSet.Invoke(new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n Name = \"Example\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"arn\"] = exampleGetPermissionSet.Apply(getPermissionSetResult =\u003e getPermissionSetResult.Arn),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\texampleGetPermissionSet, err := ssoadmin.LookupPermissionSet(ctx, \u0026ssoadmin.LookupPermissionSetArgs{\n\t\t\tInstanceArn: example.Arns[0],\n\t\t\tName: pulumi.StringRef(\"Example\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"arn\", exampleGetPermissionSet.Arn)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.inputs.GetPermissionSetArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetPermissionSet = SsoadminFunctions.getPermissionSet(GetPermissionSetArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .name(\"Example\")\n .build());\n\n ctx.export(\"arn\", exampleGetPermissionSet.applyValue(getPermissionSetResult -\u003e getPermissionSetResult.arn()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetPermissionSet:\n fn::invoke:\n Function: aws:ssoadmin:getPermissionSet\n Arguments:\n instanceArn: ${example.arns[0]}\n name: Example\noutputs:\n arn: ${exampleGetPermissionSet.arn}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getPermissionSet.\n", "properties": { @@ -419273,7 +419273,7 @@ } }, "aws:ssoadmin/getPermissionSets:getPermissionSets": { - "description": "Data source returning the ARN of all AWS SSO Admin Permission Sets.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetPermissionSets = example.then(example =\u003e aws.ssoadmin.getPermissionSets({\n instanceArn: example.arns?.[0],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_permission_sets = aws.ssoadmin.get_permission_sets(instance_arn=example.arns[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetPermissionSets = Aws.SsoAdmin.GetPermissionSets.Invoke(new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.GetPermissionSets(ctx, \u0026ssoadmin.GetPermissionSetsArgs{\n\t\t\tInstanceArn: example.Arns[0],\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.inputs.GetPermissionSetsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetPermissionSets = SsoadminFunctions.getPermissionSets(GetPermissionSetsArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetPermissionSets:\n fn::invoke:\n Function: aws:ssoadmin:getPermissionSets\n Arguments:\n instanceArn: ${example.arns[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source returning the ARN of all AWS SSO Admin Permission Sets.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.ssoadmin.getInstances({});\nconst exampleGetPermissionSets = example.then(example =\u003e aws.ssoadmin.getPermissionSets({\n instanceArn: example.arns?.[0],\n}));\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.ssoadmin.get_instances()\nexample_get_permission_sets = aws.ssoadmin.get_permission_sets(instance_arn=example.arns[0])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.SsoAdmin.GetInstances.Invoke();\n\n var exampleGetPermissionSets = Aws.SsoAdmin.GetPermissionSets.Invoke(new()\n {\n InstanceArn = example.Apply(getInstancesResult =\u003e getInstancesResult.Arns[0]),\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ssoadmin.GetPermissionSets(ctx, \u0026ssoadmin.GetPermissionSetsArgs{\n\t\t\tInstanceArn: example.Arns[0],\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ssoadmin.SsoadminFunctions;\nimport com.pulumi.aws.ssoadmin.inputs.GetPermissionSetsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SsoadminFunctions.getInstances();\n\n final var exampleGetPermissionSets = SsoadminFunctions.getPermissionSets(GetPermissionSetsArgs.builder()\n .instanceArn(example.applyValue(getInstancesResult -\u003e getInstancesResult.arns()[0]))\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:ssoadmin:getInstances\n Arguments: {}\n exampleGetPermissionSets:\n fn::invoke:\n Function: aws:ssoadmin:getPermissionSets\n Arguments:\n instanceArn: ${example.arns[0]}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getPermissionSets.\n", "properties": { @@ -419500,7 +419500,7 @@ } }, "aws:synthetics/getRuntimeVersions:getRuntimeVersions": { - "description": "Data source for managing an AWS CloudWatch Synthetics Runtime Versions.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.synthetics.getRuntimeVersions({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.synthetics.get_runtime_versions()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Synthetics.GetRuntimeVersions.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/synthetics\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := synthetics.GetRuntimeVersions(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.synthetics.SyntheticsFunctions;\nimport com.pulumi.aws.synthetics.inputs.GetRuntimeVersionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SyntheticsFunctions.getRuntimeVersions();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:synthetics:getRuntimeVersions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing an AWS CloudWatch Synthetics Runtime Versions.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.synthetics.getRuntimeVersions({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.synthetics.get_runtime_versions()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Synthetics.GetRuntimeVersions.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/synthetics\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := synthetics.GetRuntimeVersions(ctx, \u0026synthetics.GetRuntimeVersionsArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.synthetics.SyntheticsFunctions;\nimport com.pulumi.aws.synthetics.inputs.GetRuntimeVersionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = SyntheticsFunctions.getRuntimeVersions();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:synthetics:getRuntimeVersions\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getRuntimeVersions.\n", "properties": { @@ -420144,7 +420144,7 @@ } }, "aws:vpclattice/getListener:getListener": { - "description": "Data source for managing an AWS VPC Lattice Listener.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.vpclattice.getListener({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.vpclattice.get_listener()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.VpcLattice.GetListener.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := vpclattice.LookupListener(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.vpclattice.VpclatticeFunctions;\nimport com.pulumi.aws.vpclattice.inputs.GetListenerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = VpclatticeFunctions.getListener();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:vpclattice:getListener\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "Data source for managing an AWS VPC Lattice Listener.\n\n## Example Usage\n\n### Basic Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\n\nconst example = aws.vpclattice.getListener({});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\n\nexample = aws.vpclattice.get_listener()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.VpcLattice.GetListener.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := vpclattice.LookupListener(ctx, \u0026vpclattice.LookupListenerArgs{}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.vpclattice.VpclatticeFunctions;\nimport com.pulumi.aws.vpclattice.inputs.GetListenerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = VpclatticeFunctions.getListener();\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: aws:vpclattice:getListener\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getListener.\n", "properties": { diff --git a/provider/go.mod b/provider/go.mod index a27c87e173a..4151335c6c9 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -19,11 +19,11 @@ require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 github.com/hashicorp/terraform-provider-aws v1.60.1-0.20220923175450-ca71523cdc36 github.com/mitchellh/go-homedir v1.1.0 - github.com/pulumi/providertest v0.0.14 - github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1 - github.com/pulumi/pulumi/pkg/v3 v3.133.0 - github.com/pulumi/pulumi/sdk/v3 v3.133.0 + github.com/pulumi/providertest v0.1.2 + github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0 + github.com/pulumi/pulumi/pkg/v3 v3.136.1 + github.com/pulumi/pulumi/sdk/v3 v3.136.1 github.com/stretchr/testify v1.9.0 pgregory.net/rapid v0.6.1 ) @@ -455,8 +455,8 @@ require ( github.com/pulumi/esc v0.10.0 // indirect github.com/pulumi/inflector v0.1.1 // indirect github.com/pulumi/pulumi-java/pkg v0.16.1 // indirect - github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect - github.com/pulumi/pulumi-yaml v1.10.0 // indirect + github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10 // indirect + github.com/pulumi/pulumi-yaml v1.10.3 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect diff --git a/provider/go.sum b/provider/go.sum index 5d3c56437d4..9863d1cbf69 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -2440,22 +2440,22 @@ github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE= github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c= github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+SobA= github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY= -github.com/pulumi/providertest v0.0.14 h1:5QlAPAAs82jkQraHsJvq1xgVfC7xtW8sFJwv2pHgxQ8= -github.com/pulumi/providertest v0.0.14/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= +github.com/pulumi/providertest v0.1.2 h1:9pJS9MeNkMyGwyNeHmvh8QqLgJy39Nk2/ym5u7r13ng= +github.com/pulumi/providertest v0.1.2/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= github.com/pulumi/pulumi-java/pkg v0.16.1 h1:orHnDWFbpOERwaBLry9f+6nqPX7x0MsrIkaa5QDGAns= github.com/pulumi/pulumi-java/pkg v0.16.1/go.mod h1:QH0DihZkWYle9XFc+LJ76m4hUo+fA3RdyaM90pqOaSM= -github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1 h1:39UPLBqbnvylm2heU/Rxa1+G++NZHdtW2Qg+hEhp5Wo= -github.com/pulumi/pulumi-terraform-bridge/pf v0.44.1/go.mod h1:Zj4XBf+TuV3um7y82X3xk2yQiP+pnQ7YxMc4fq/rVVw= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1 h1:Twh0IKS1pGHP6LHDq1oR0vbHlV52asoUCC7spEJl3Ao= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.91.1/go.mod h1:DvueDDtOIbf7W1Or4oH0o7F990ozp/ROmlm/vgLoe+g= -github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= -github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= -github.com/pulumi/pulumi-yaml v1.10.0 h1:djbgMJCxJBmYMr4kOpAXH5iauxGohYjEuTLfxD3NUUI= -github.com/pulumi/pulumi-yaml v1.10.0/go.mod h1://lTvwHpgJ+WBKeMGiLrd/jinc4dl3eWV5LZ3G8iCfE= -github.com/pulumi/pulumi/pkg/v3 v3.133.0 h1:j1rd7ToLZIQc5H0427ISOXSbOIIemZ6B0MXtRhQ38Yg= -github.com/pulumi/pulumi/pkg/v3 v3.133.0/go.mod h1:JtMAnrsFIccO138WcMfPdhO0PioDukKihnZC0xTRLwo= -github.com/pulumi/pulumi/sdk/v3 v3.133.0 h1:o+7dbJZY9BVgAjOF5GYIWgjp/zpKAgWZwD4pPjUMXKQ= -github.com/pulumi/pulumi/sdk/v3 v3.133.0/go.mod h1:J5kQEX8v87aeUhk6NdQXnjCo1DbiOnOiL3Sf2DuDda8= +github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0 h1:RIu3thoVfOR2yyyVS1xwuJ9ud05SPuXTf7Q+mnV6CQg= +github.com/pulumi/pulumi-terraform-bridge/pf v0.45.0/go.mod h1:bcSV/ALzPJm4Ib1qS2rga27/O3DCGo2mV4XXGrcNfZE= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0 h1:LOUHyMFGYkchv4Bzej7v+1W1ooaspgQG6/oZVJ+3lXY= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.92.0/go.mod h1:aI3U3eanRcyOX05No+Nk6FuJvppx4jjcQwFelHSI8yE= +github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10 h1:VAXmHuldKd760ZlMe6khXeJY0ccY3TJF1g1FnWGccaM= +github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.10/go.mod h1:+AQS/2h775Chx1a4vxb7cDdyiOsdEw2Q6gD7K5QCIwI= +github.com/pulumi/pulumi-yaml v1.10.3 h1:j5cjPiE32ILmjrWnC1cfZ0MWdqCZ8fg9wlaWk7HOtM4= +github.com/pulumi/pulumi-yaml v1.10.3/go.mod h1:MFMQXkaUP5YQUKVJ6Z/aagZDl2f8hdU9oGaJfTcMf1Y= +github.com/pulumi/pulumi/pkg/v3 v3.136.1 h1:zA8aJZ7qI0QgZkBKjjQaYHEcigK6pZfrbfG38imXzWo= +github.com/pulumi/pulumi/pkg/v3 v3.136.1/go.mod h1:Iz8QIs07AbEdrO52hEIEM5C4VBDUYFH2NdM9u2xxBxY= +github.com/pulumi/pulumi/sdk/v3 v3.136.1 h1:VJWTgdBrLvvzIkMbGq/epNEfT65P9gTvw14UF/I7hTI= +github.com/pulumi/pulumi/sdk/v3 v3.136.1/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= diff --git a/provider/provider_nodejs_test.go b/provider/provider_nodejs_test.go index cae317b805e..73ff42a5776 100644 --- a/provider/provider_nodejs_test.go +++ b/provider/provider_nodejs_test.go @@ -74,7 +74,7 @@ func TestRegress3094(t *testing.T) { opttest.YarnLink("@pulumi/aws"), } test := pulumitest.NewPulumiTest(t, dir, options...) - upResult := test.Up() + upResult := test.Up(t) t.Logf("#%v", upResult.Summary) } @@ -89,7 +89,7 @@ func TestRegress3835(t *testing.T) { opttest.YarnLink("@pulumi/aws"), } test := pulumitest.NewPulumiTest(t, dir, options...) - result := test.Preview() + result := test.Preview(t) t.Logf("#%v", result.ChangeSummary) } @@ -107,8 +107,8 @@ func TestChangingRegion(t *testing.T) { t.Run("default provider", func(t *testing.T) { test := pulumitest.NewPulumiTest(t, dir, options...) for _, region := range []string{"us-east-1", "us-west-1"} { - test.SetConfig("aws:region", region) - res := test.Up() + test.SetConfig(t, "aws:region", region) + res := test.Up(t) require.Equal(t, region, res.Outputs["actualRegion"].Value) } }) @@ -116,8 +116,8 @@ func TestChangingRegion(t *testing.T) { t.Run("explicit provider", func(t *testing.T) { test := pulumitest.NewPulumiTest(t, dir, options...) for _, region := range []string{"us-east-1", "us-west-1"} { - test.SetConfig("desired-region", region) - res := test.Up() + test.SetConfig(t, "desired-region", region) + res := test.Up(t) require.Equal(t, region, res.Outputs["actualRegion"].Value) } }) @@ -135,7 +135,7 @@ func TestRegressAttributeMustBeWholeNumber(t *testing.T) { opttest.YarnLink("@pulumi/aws"), } test := pulumitest.NewPulumiTest(t, dir, options...) - result := test.Preview() + result := test.Preview(t) t.Logf("#%v", result.ChangeSummary) } @@ -152,8 +152,8 @@ func TestRegress4079(t *testing.T) { } test := pulumitest.NewPulumiTest(t, dir, options...) - test.SetConfig("targetGroupCount", "2") - r1 := test.Up() + test.SetConfig(t, "targetGroupCount", "2") + r1 := test.Up(t) t.Logf("Stdout: %v", r1.StdOut) t.Logf("Stderr: %v", r1.StdErr) @@ -173,11 +173,11 @@ func TestRegress4079(t *testing.T) { }) require.NoError(t, err) - rr := test.Refresh() + rr := test.Refresh(t) t.Logf("Stdout: %v", rr.StdOut) t.Logf("Stderr: %v", rr.StdErr) - refreshedState := test.ExportStack() + refreshedState := test.ExportStack(t) type resource struct { Type string `json:"type"` @@ -251,11 +251,11 @@ func TestGameLift(t *testing.T) { } ptest := pulumiTest(t, filepath.Join("test-programs", "gamelift-typescript")) - ptest.SetConfig("customData", "A") - result1 := ptest.Up() + ptest.SetConfig(t, "customData", "A") + result1 := ptest.Up(t) require.Equal(t, "A", result1.Outputs["CustomEventData"].Value) - ptest.SetConfig("customData", "B") - result2 := ptest.Up() + ptest.SetConfig(t, "customData", "B") + result2 := ptest.Up(t) require.Equal(t, "B", result2.Outputs["CustomEventData"].Value) } @@ -270,9 +270,9 @@ func TestRegress4446(t *testing.T) { opttest.YarnLink("@pulumi/aws"), } test := pulumitest.NewPulumiTest(t, dir, options...) - upResult := test.Up() + upResult := test.Up(t) t.Logf("#%v", upResult.Summary) - result := test.Preview(optpreview.ExpectNoChanges()) + result := test.Preview(t, optpreview.ExpectNoChanges()) t.Logf("#%v", result.ChangeSummary) } @@ -287,7 +287,7 @@ func TestRegress4568(t *testing.T) { opttest.YarnLink("@pulumi/aws"), } test := pulumitest.NewPulumiTest(t, dir, options...) - upResult := test.Up() + upResult := test.Up(t) t.Logf("#%v", upResult.Summary) // The singular lifecyclePolicy should contain the first value diff --git a/provider/provider_python_test.go b/provider/provider_python_test.go index ba4f8e89771..6732178ec45 100644 --- a/provider/provider_python_test.go +++ b/provider/provider_python_test.go @@ -62,7 +62,7 @@ func TestRegress3887(t *testing.T) { // Make sure that importing an AWS targetGroup succeeds. func TestRegress2534(t *testing.T) { ptest := pulumiTest(t, filepath.Join("test-programs", "regress-2534")) - upResult := ptest.Up() + upResult := ptest.Up(t) targetGroupArn := upResult.Outputs["targetGroupArn"].Value.(string) targetGroupUrn := upResult.Outputs["targetGroupUrn"].Value.(string) workspace := ptest.CurrentStack().Workspace() @@ -76,7 +76,7 @@ func TestRegress2534(t *testing.T) { func TestRegress4457(t *testing.T) { ptest := pulumiTest(t, filepath.Join("test-programs", "regress-4457")) - upResult := ptest.Up() + upResult := ptest.Up(t) autoGroupArn := upResult.Outputs["autoGroupArn"].Value.(string) autoGroupUrn := upResult.Outputs["autoGroupUrn"].Value.(string) autoGroupName := upResult.Outputs["autoGroupName"].Value.(string) @@ -86,12 +86,12 @@ func TestRegress4457(t *testing.T) { workdir := workspace.WorkDir() t.Logf("workdir = %s", workdir) - importResult := ptest.Import("aws:autoscaling/group:Group", "newag", autoGroupName, "" /* providerUrn */) + importResult := ptest.Import(t, "aws:autoscaling/group:Group", "newag", autoGroupName, "" /* providerUrn */) t.Logf("Editing the program to add the code recommended by import") i := strings.Index(importResult.Stdout, "import pulumi") extraCode := importResult.Stdout[i:] - mainPy := filepath.Join(ptest.Source(), "__main__.py") + mainPy := filepath.Join(ptest.WorkingDir(), "__main__.py") pyBytes, err := os.ReadFile(mainPy) require.NoError(t, err) updatedPyBytes := bytes.ReplaceAll(pyBytes, []byte("# EXTRA CODE HERE"), []byte(extraCode)) @@ -99,7 +99,7 @@ func TestRegress4457(t *testing.T) { require.NoError(t, err) t.Logf("Previewing the edited program") - previewResult := ptest.Preview(optpreview.ExpectNoChanges()) + previewResult := ptest.Preview(t, optpreview.ExpectNoChanges()) t.Logf("%s", previewResult.StdOut) t.Logf("%s", previewResult.StdErr) } diff --git a/provider/provider_test.go b/provider/provider_test.go index 05dfa8ee713..349c8d3ae30 100644 --- a/provider/provider_test.go +++ b/provider/provider_test.go @@ -97,11 +97,11 @@ func testProviderUpgrade(t *testing.T, dir string, opts *testProviderUpgradeOpti } test := pulumitest.NewPulumiTest(t, dir, options...) if opts != nil && opts.setEnvRegion { - test.SetConfig("aws:region", "INVALID_REGION") - test.SetConfig("aws:envRegion", getEnvRegion(t)) + test.SetConfig(t, "aws:region", "INVALID_REGION") + test.SetConfig(t, "aws:envRegion", getEnvRegion(t)) } if opts != nil && opts.region != "" { - test.SetConfig("aws:region", opts.region) + test.SetConfig(t, "aws:region", opts.region) } result := providertest.PreviewProviderUpgrade(t, test, providerName, baselineVersion, optproviderupgrade.DisableAttach()) @@ -145,18 +145,18 @@ func testProviderCodeChanges(t *testing.T, opts *testProviderCodeChangesOptions) if opts != nil && opts.region != "" { region = opts.region } - pt.SetConfig("aws:region", region) + pt.SetConfig(t, "aws:region", region) var export *apitype.UntypedDeployment export, err = tryReadStackExport(stackExportFile) if err != nil { - pt.Up() - grptLog := pt.GrpcLog() + pt.Up(t) + grptLog := pt.GrpcLog(t) grpcLogPath := filepath.Join(cacheDir, "grpc.json") t.Logf("writing grpc log to %s", grpcLogPath) grptLog.WriteTo(grpcLogPath) - e := pt.ExportStack() + e := pt.ExportStack(t) export = &e err = writeStackExport(stackExportFile, export, true) assert.NoError(t, err) @@ -172,8 +172,8 @@ func testProviderCodeChanges(t *testing.T, opts *testProviderCodeChangesOptions) err = os.WriteFile(filepath.Join(workdir, "Pulumi.yaml"), opts.secondProgram, 0o600) require.NoError(t, err) secondTest := pulumitest.NewPulumiTest(t, workdir, secondOptions...) - secondTest.SetConfig("aws:region", region) - secondTest.ImportStack(*export) + secondTest.SetConfig(t, "aws:region", region) + secondTest.ImportStack(t, *export) return secondTest } @@ -195,7 +195,7 @@ func pulumiUpWithSnapshot(t *testing.T, pulumiTest *pulumitest.PulumiTest) { assert.NoError(t, err) tmpPlanFile := filepath.Join(workdir, "plan.json") - pulumiTest.Preview(optpreview.Plan(tmpPlanFile)) + pulumiTest.Preview(t, optpreview.Plan(tmpPlanFile)) if equal := planEqual(t, planFile, tmpPlanFile); equal { return @@ -203,8 +203,8 @@ func pulumiUpWithSnapshot(t *testing.T, pulumiTest *pulumitest.PulumiTest) { t.Log("Plan is not equal, re-running up") } - pulumiTest.Preview(optpreview.Plan(planFile)) - upResult := pulumiTest.Up(optup.Plan(planFile)) + pulumiTest.Preview(t, optpreview.Plan(planFile)) + upResult := pulumiTest.Up(t, optup.Plan(planFile)) t.Logf("stdout: %s \n", upResult.StdOut) t.Logf("stderr: %s \n", upResult.StdErr) } diff --git a/provider/provider_yaml_test.go b/provider/provider_yaml_test.go index c7a1d6803da..eaba19490ae 100644 --- a/provider/provider_yaml_test.go +++ b/provider/provider_yaml_test.go @@ -258,16 +258,16 @@ resources: opttest.LocalProviderPath("aws", filepath.Join(cwd, "..", "bin")), ) - pt.SetConfig("randSuffix", fmt.Sprintf("%d-x", rand.Intn(1024*1024))) + pt.SetConfig(t, "randSuffix", fmt.Sprintf("%d-x", rand.Intn(1024*1024))) if tc.applyMethod1 != nil { - pt.SetConfig("applyMethod", string(*tc.applyMethod1)) + pt.SetConfig(t, "applyMethod", string(*tc.applyMethod1)) } - pt.SetConfig("value", tc.value1) + pt.SetConfig(t, "value", tc.value1) - pt.Up() + pt.Up(t) - assertpreview.HasNoChanges(t, pt.Preview()) + assertpreview.HasNoChanges(t, pt.Preview(t)) err = os.WriteFile(filepath.Join(workdir, "Pulumi.yaml"), []byte(tc.file2), 0o600) require.NoError(t, err) @@ -276,22 +276,22 @@ resources: if tc.file2 == noApplyYaml { t.Errorf("WRONG FILE!") } - pt.SetConfig("applyMethod", string(*tc.applyMethod2)) + pt.SetConfig(t, "applyMethod", string(*tc.applyMethod2)) } - pt.SetConfig("value", tc.value2) + pt.SetConfig(t, "value", tc.value2) if tc.expectChanges { - pr := pt.Preview() + pr := pt.Preview(t) assert.Equal(t, 1, pr.ChangeSummary[apitype.OpUpdate]) } else { - assertpreview.HasNoChanges(t, pt.Preview()) + assertpreview.HasNoChanges(t, pt.Preview(t)) } - upr := pt.Up() + upr := pt.Up(t) t.Logf("stdout: %s", upr.StdOut) t.Logf("stderr: %s", upr.StdErr) - assertpreview.HasNoChanges(t, pt.Preview()) + assertpreview.HasNoChanges(t, pt.Preview(t)) }) } } @@ -310,10 +310,10 @@ func TestNonIdempotentSnsTopic(t *testing.T) { t.Parallel() ptest := pulumiTest(t, filepath.Join("test-programs", "non-idempotent-sns-topic"), opttest.SkipInstall()) - ptest.InstallStack("test") + ptest.InstallStack(t, "test") // generate random name topic_name := randSeq(12) - ptest.SetConfig("snsTopicName", topic_name) + ptest.SetConfig(t, "snsTopicName", topic_name) _, err := ptest.CurrentStack().Up(ptest.Context()) require.ErrorContains(t, err, "already exists") @@ -370,12 +370,12 @@ resources: }, }) - res := pulumiTest.Preview() + res := pulumiTest.Preview(t) t.Logf("stdout: %s \n", res.StdOut) t.Logf("stderr: %s \n", res.StdErr) assertpreview.HasNoChanges(t, res) - upResult := pulumiTest.Up() + upResult := pulumiTest.Up(t) t.Logf("stdout: %s \n", upResult.StdOut) t.Logf("stderr: %s \n", upResult.StdErr) }) @@ -392,7 +392,7 @@ resources: opttest.LocalProviderPath("aws", filepath.Join(cwd, "..", "bin")), ) - pulumiTest.SetConfig("aws:region", "us-east-2") + pulumiTest.SetConfig(t, "aws:region", "us-east-2") pulumiUpWithSnapshot(t, pulumiTest) }) @@ -402,13 +402,13 @@ resources: func TestRegress3674(t *testing.T) { t.Parallel() ptest := pulumiTest(t, filepath.Join("test-programs", "regress-3674"), opttest.SkipInstall()) - upResult := ptest.Up() + upResult := ptest.Up(t) bucketName := upResult.Outputs["bucketName"].Value.(string) deleteBucketTagging(ptest.Context(), bucketName) - result := ptest.Refresh() + result := ptest.Refresh(t) t.Logf("%s", result.StdOut) require.Equal(t, 1, (*result.Summary.ResourceChanges)["update"]) - state, err := ptest.ExportStack().Deployment.MarshalJSON() + state, err := ptest.ExportStack(t).Deployment.MarshalJSON() require.NoError(t, err) require.NotContainsf(t, string(state), "MyTestTag", "Expected MyTestTag to be removed") } @@ -457,14 +457,14 @@ func TestIMDSAuth(t *testing.T) { t.Run("IDMSv2", func(t *testing.T) { t.Parallel() ptest := pulumiTest(t, filepath.Join("test-programs", "imds-auth", "imds-v2"), opttest.SkipInstall()) - dir := ptest.Source() + dir := ptest.WorkingDir() localLocation := filepath.Join(dir, "pulumi-resource-aws") // need to copy the provider to the local directory for BucketObjectV2 to pick it up // otherwise you get an error `Argument must be a constant or contained in the project dir` err := copyFile(localProviderBuild, localLocation) assert.NoError(t, err) - ptest.SetConfig("localProviderBuild", localLocation) - result := ptest.Up() + ptest.SetConfig(t, "localProviderBuild", localLocation) + result := ptest.Up(t) t.Logf("stdout: %s", result.StdOut) t.Logf("stderr: %s", result.StdErr) t.Logf("commandOut: %v", result.Outputs["commandOut"].Value) @@ -501,7 +501,7 @@ func copyFile(src, dst string) error { func TestS3BucketObjectDeprecation(t *testing.T) { t.Parallel() ptest := pulumiTest(t, filepath.Join("test-programs", "regress-2796"), opttest.SkipInstall()) - result := ptest.Up() + result := ptest.Up(t) t.Logf("STDOUT: %v", result.StdOut) t.Logf("STDERR: %v", result.StdErr) require.NotContains(t, result.StdOut+result.StdErr, "aws_s3_object") diff --git a/sdk/go.mod b/sdk/go.mod index 6a8ce0b83d8..2e1bdc4257c 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,7 +4,7 @@ go 1.21.12 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.133.0 + github.com/pulumi/pulumi/sdk/v3 v3.136.1 ) retract ( diff --git a/sdk/go.sum b/sdk/go.sum index f18e726fb99..e34dbf5cbd2 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -151,8 +151,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/sdk/v3 v3.133.0 h1:o+7dbJZY9BVgAjOF5GYIWgjp/zpKAgWZwD4pPjUMXKQ= -github.com/pulumi/pulumi/sdk/v3 v3.133.0/go.mod h1:J5kQEX8v87aeUhk6NdQXnjCo1DbiOnOiL3Sf2DuDda8= +github.com/pulumi/pulumi/sdk/v3 v3.136.1 h1:VJWTgdBrLvvzIkMbGq/epNEfT65P9gTvw14UF/I7hTI= +github.com/pulumi/pulumi/sdk/v3 v3.136.1/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/sdk/go/aws/acmpca/certificateAuthorityCertificate.go b/sdk/go/aws/acmpca/certificateAuthorityCertificate.go index 6acef211256..341d0d506fe 100644 --- a/sdk/go/aws/acmpca/certificateAuthorityCertificate.go +++ b/sdk/go/aws/acmpca/certificateAuthorityCertificate.go @@ -46,7 +46,7 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetPartition(ctx, nil, nil) +// current, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } @@ -113,7 +113,7 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetPartition(ctx, nil, nil) +// current, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/amp/getWorkspaces.go b/sdk/go/aws/amp/getWorkspaces.go index e8900b3c73b..3e42879b11b 100644 --- a/sdk/go/aws/amp/getWorkspaces.go +++ b/sdk/go/aws/amp/getWorkspaces.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := amp.GetWorkspaces(ctx, nil, nil) +// _, err := amp.GetWorkspaces(ctx, &.GetWorkspacesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/appautoscaling/policy.go b/sdk/go/aws/appautoscaling/policy.go index 3c3426db411..1ce4a7ea382 100644 --- a/sdk/go/aws/appautoscaling/policy.go +++ b/sdk/go/aws/appautoscaling/policy.go @@ -103,7 +103,7 @@ import ( // StepAdjustments: appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArray{ // &appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{ // MetricIntervalUpperBound: pulumi.String("0"), -// ScalingAdjustment: int(-1), +// ScalingAdjustment: pulumi.Int(-1), // }, // }, // }, diff --git a/sdk/go/aws/appautoscaling/pulumiTypes.go b/sdk/go/aws/appautoscaling/pulumiTypes.go index 2b9530e72f3..ee59c3bd4c5 100644 --- a/sdk/go/aws/appautoscaling/pulumiTypes.go +++ b/sdk/go/aws/appautoscaling/pulumiTypes.go @@ -40,7 +40,7 @@ type PolicyStepScalingPolicyConfiguration struct { // &appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{ // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), - // ScalingAdjustment: int(-1), + // ScalingAdjustment: pulumi.Int(-1), // }, // &appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{ // MetricIntervalLowerBound: pulumi.String("2"), @@ -98,7 +98,7 @@ type PolicyStepScalingPolicyConfigurationArgs struct { // &appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{ // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), - // ScalingAdjustment: int(-1), + // ScalingAdjustment: pulumi.Int(-1), // }, // &appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{ // MetricIntervalLowerBound: pulumi.String("2"), @@ -235,7 +235,7 @@ func (o PolicyStepScalingPolicyConfigurationOutput) MinAdjustmentMagnitude() pul // &appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{ // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), -// ScalingAdjustment: int(-1), +// ScalingAdjustment: pulumi.Int(-1), // }, // &appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{ // MetricIntervalLowerBound: pulumi.String("2"), @@ -343,7 +343,7 @@ func (o PolicyStepScalingPolicyConfigurationPtrOutput) MinAdjustmentMagnitude() // &appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{ // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), -// ScalingAdjustment: int(-1), +// ScalingAdjustment: pulumi.Int(-1), // }, // &appautoscaling.PolicyStepScalingPolicyConfigurationStepAdjustmentArgs{ // MetricIntervalLowerBound: pulumi.String("2"), diff --git a/sdk/go/aws/appmesh/getMesh.go b/sdk/go/aws/appmesh/getMesh.go index 6f48d096c7d..ec76ebd05c9 100644 --- a/sdk/go/aws/appmesh/getMesh.go +++ b/sdk/go/aws/appmesh/getMesh.go @@ -52,7 +52,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/appmesh/getVirtualService.go b/sdk/go/aws/appmesh/getVirtualService.go index f9ed4501ef6..121fc663eb9 100644 --- a/sdk/go/aws/appmesh/getVirtualService.go +++ b/sdk/go/aws/appmesh/getVirtualService.go @@ -53,7 +53,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/apprunner/getHostedZoneId.go b/sdk/go/aws/apprunner/getHostedZoneId.go index 74ca8624b16..9437e3cb239 100644 --- a/sdk/go/aws/apprunner/getHostedZoneId.go +++ b/sdk/go/aws/apprunner/getHostedZoneId.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// main, err := apprunner.GetHostedZoneId(ctx, nil, nil) +// main, err := apprunner.GetHostedZoneId(ctx, &apprunner.GetHostedZoneIdArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/autoscaling/policy.go b/sdk/go/aws/autoscaling/policy.go index 624a5af0b29..bf5cf68bba3 100644 --- a/sdk/go/aws/autoscaling/policy.go +++ b/sdk/go/aws/autoscaling/policy.go @@ -323,7 +323,7 @@ type Policy struct { // _, err := autoscaling.NewPolicy(ctx, "example", &autoscaling.PolicyArgs{ // StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ // &autoscaling.PolicyStepAdjustmentArgs{ - // ScalingAdjustment: int(-1), + // ScalingAdjustment: pulumi.Int(-1), // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), // }, @@ -455,7 +455,7 @@ type policyState struct { // _, err := autoscaling.NewPolicy(ctx, "example", &autoscaling.PolicyArgs{ // StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ // &autoscaling.PolicyStepAdjustmentArgs{ - // ScalingAdjustment: int(-1), + // ScalingAdjustment: pulumi.Int(-1), // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), // }, @@ -555,7 +555,7 @@ type PolicyState struct { // _, err := autoscaling.NewPolicy(ctx, "example", &autoscaling.PolicyArgs{ // StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ // &autoscaling.PolicyStepAdjustmentArgs{ - // ScalingAdjustment: int(-1), + // ScalingAdjustment: pulumi.Int(-1), // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), // }, @@ -657,7 +657,7 @@ type policyArgs struct { // _, err := autoscaling.NewPolicy(ctx, "example", &autoscaling.PolicyArgs{ // StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ // &autoscaling.PolicyStepAdjustmentArgs{ - // ScalingAdjustment: int(-1), + // ScalingAdjustment: pulumi.Int(-1), // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), // }, @@ -756,7 +756,7 @@ type PolicyArgs struct { // _, err := autoscaling.NewPolicy(ctx, "example", &autoscaling.PolicyArgs{ // StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ // &autoscaling.PolicyStepAdjustmentArgs{ - // ScalingAdjustment: int(-1), + // ScalingAdjustment: pulumi.Int(-1), // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), // }, @@ -980,7 +980,7 @@ func (o PolicyOutput) ScalingAdjustment() pulumi.IntPtrOutput { // _, err := autoscaling.NewPolicy(ctx, "example", &autoscaling.PolicyArgs{ // StepAdjustments: autoscaling.PolicyStepAdjustmentArray{ // &autoscaling.PolicyStepAdjustmentArgs{ -// ScalingAdjustment: int(-1), +// ScalingAdjustment: pulumi.Int(-1), // MetricIntervalLowerBound: pulumi.String("1"), // MetricIntervalUpperBound: pulumi.String("2"), // }, diff --git a/sdk/go/aws/backup/vaultPolicy.go b/sdk/go/aws/backup/vaultPolicy.go index 6c39cb3877e..1c5ecc6874d 100644 --- a/sdk/go/aws/backup/vaultPolicy.go +++ b/sdk/go/aws/backup/vaultPolicy.go @@ -29,7 +29,8 @@ import ( // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil); +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/bedrock/agentAgent.go b/sdk/go/aws/bedrock/agentAgent.go index dee2cdb4499..42363f0d8d6 100644 --- a/sdk/go/aws/bedrock/agentAgent.go +++ b/sdk/go/aws/bedrock/agentAgent.go @@ -33,15 +33,18 @@ import ( // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil); +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{ +// }, nil); // if err != nil { // return err // } -// currentGetPartition, err := aws.GetPartition(ctx, nil, nil); +// currentGetPartition, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{ +// }, nil); // if err != nil { // return err // } -// currentGetRegion, err := aws.GetRegion(ctx, nil, nil); +// currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/bedrock/getCustomModels.go b/sdk/go/aws/bedrock/getCustomModels.go index 9de7d5628ab..8698f573cda 100644 --- a/sdk/go/aws/bedrock/getCustomModels.go +++ b/sdk/go/aws/bedrock/getCustomModels.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := bedrock.GetCustomModels(ctx, nil, nil) +// _, err := bedrock.GetCustomModels(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/bedrockfoundation/getModel.go b/sdk/go/aws/bedrockfoundation/getModel.go index 69b64a720ea..3b0d3a420e9 100644 --- a/sdk/go/aws/bedrockfoundation/getModel.go +++ b/sdk/go/aws/bedrockfoundation/getModel.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// test, err := bedrockfoundation.GetModels(ctx, nil, nil) +// test, err := bedrockfoundation.GetModels(ctx, &bedrockfoundation.GetModelsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/bedrockfoundation/getModels.go b/sdk/go/aws/bedrockfoundation/getModels.go index 0918710d8bb..db40380607b 100644 --- a/sdk/go/aws/bedrockfoundation/getModels.go +++ b/sdk/go/aws/bedrockfoundation/getModels.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := bedrockfoundation.GetModels(ctx, nil, nil) +// _, err := bedrockfoundation.GetModels(ctx, &bedrockfoundation.GetModelsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/budgets/budgetAction.go b/sdk/go/aws/budgets/budgetAction.go index d99a8f06737..cd262ee7ecc 100644 --- a/sdk/go/aws/budgets/budgetAction.go +++ b/sdk/go/aws/budgets/budgetAction.go @@ -56,7 +56,7 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetPartition(ctx, nil, nil) +// current, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/cloudfront/getLogDeliveryCanonicalUserId.go b/sdk/go/aws/cloudfront/getLogDeliveryCanonicalUserId.go index 02668c17bbd..f68a320fa71 100644 --- a/sdk/go/aws/cloudfront/getLogDeliveryCanonicalUserId.go +++ b/sdk/go/aws/cloudfront/getLogDeliveryCanonicalUserId.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := cloudfront.GetLogDeliveryCanonicalUserId(ctx, nil, nil) +// example, err := cloudfront.GetLogDeliveryCanonicalUserId(ctx, &cloudfront.GetLogDeliveryCanonicalUserIdArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/cloudfront/getOriginAccessIdentities.go b/sdk/go/aws/cloudfront/getOriginAccessIdentities.go index 6cdf19eaad8..308fb7eaacf 100644 --- a/sdk/go/aws/cloudfront/getOriginAccessIdentities.go +++ b/sdk/go/aws/cloudfront/getOriginAccessIdentities.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := cloudfront.GetOriginAccessIdentities(ctx, nil, nil) +// _, err := cloudfront.GetOriginAccessIdentities(ctx, &cloudfront.GetOriginAccessIdentitiesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/cloudtrail/getServiceAccount.go b/sdk/go/aws/cloudtrail/getServiceAccount.go index 8744a7076fb..b1fd5bb955a 100644 --- a/sdk/go/aws/cloudtrail/getServiceAccount.go +++ b/sdk/go/aws/cloudtrail/getServiceAccount.go @@ -33,7 +33,8 @@ import ( // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// main, err := cloudtrail.GetServiceAccount(ctx, nil, nil); +// main, err := cloudtrail.GetServiceAccount(ctx, &cloudtrail.GetServiceAccountArgs{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/cloudtrail/organizationDelegatedAdminAccount.go b/sdk/go/aws/cloudtrail/organizationDelegatedAdminAccount.go index b64100c3e6b..9d5d04e2e6e 100644 --- a/sdk/go/aws/cloudtrail/organizationDelegatedAdminAccount.go +++ b/sdk/go/aws/cloudtrail/organizationDelegatedAdminAccount.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// delegated, err := aws.GetCallerIdentity(ctx, nil, nil) +// delegated, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/cloudtrail/trail.go b/sdk/go/aws/cloudtrail/trail.go index bd831586bd0..2482470f4f4 100644 --- a/sdk/go/aws/cloudtrail/trail.go +++ b/sdk/go/aws/cloudtrail/trail.go @@ -49,15 +49,15 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetPartition, err := aws.GetPartition(ctx, nil, nil) +// currentGetPartition, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } -// currentGetRegion, err := aws.GetRegion(ctx, nil, nil) +// currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/cloudwatch/eventTarget.go b/sdk/go/aws/cloudwatch/eventTarget.go index d6ffe294def..3169e0e4269 100644 --- a/sdk/go/aws/cloudwatch/eventTarget.go +++ b/sdk/go/aws/cloudwatch/eventTarget.go @@ -134,7 +134,7 @@ import ( // tmpJSON0, err := json.Marshal(map[string]interface{}{ // "schemaVersion": "1.2", // "description": "Stop an instance", -// "parameters": nil, +// "parameters": map[string]interface{}{}, // "runtimeConfig": map[string]interface{}{ // "aws:runShellScript": map[string]interface{}{ // "properties": []map[string]interface{}{ diff --git a/sdk/go/aws/cloudwatch/getLogDataProtectionPolicyDocument.go b/sdk/go/aws/cloudwatch/getLogDataProtectionPolicyDocument.go index 47726f7874b..46ca836b783 100644 --- a/sdk/go/aws/cloudwatch/getLogDataProtectionPolicyDocument.go +++ b/sdk/go/aws/cloudwatch/getLogDataProtectionPolicyDocument.go @@ -62,7 +62,7 @@ import ( // }, // Operation: { // Deidentify: { -// MaskConfig: nil, +// MaskConfig: {}, // }, // }, // }, diff --git a/sdk/go/aws/cloudwatch/logAccountPolicy.go b/sdk/go/aws/cloudwatch/logAccountPolicy.go index 9fb0737a1c2..a31b5c9dfab 100644 --- a/sdk/go/aws/cloudwatch/logAccountPolicy.go +++ b/sdk/go/aws/cloudwatch/logAccountPolicy.go @@ -43,7 +43,7 @@ import ( // }, // "Operation": map[string]interface{}{ // "Audit": map[string]interface{}{ -// "FindingsDestination": nil, +// "FindingsDestination": map[string]interface{}{}, // }, // }, // }, @@ -54,7 +54,7 @@ import ( // }, // "Operation": map[string]interface{}{ // "Deidentify": map[string]interface{}{ -// "MaskConfig": nil, +// "MaskConfig": map[string]interface{}{}, // }, // }, // }, diff --git a/sdk/go/aws/cloudwatch/logDataProtectionPolicy.go b/sdk/go/aws/cloudwatch/logDataProtectionPolicy.go index d8fdfa2e7c9..be497ad0be8 100644 --- a/sdk/go/aws/cloudwatch/logDataProtectionPolicy.go +++ b/sdk/go/aws/cloudwatch/logDataProtectionPolicy.go @@ -75,7 +75,7 @@ import ( // }, // "Operation": map[string]interface{}{ // "Deidentify": map[string]interface{}{ -// "MaskConfig": nil, +// "MaskConfig": map[string]interface{}{}, // }, // }, // }, diff --git a/sdk/go/aws/codebuild/reportGroup.go b/sdk/go/aws/codebuild/reportGroup.go index 0733b18fe21..3d435b5d493 100644 --- a/sdk/go/aws/codebuild/reportGroup.go +++ b/sdk/go/aws/codebuild/reportGroup.go @@ -34,7 +34,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/codebuild/resourcePolicy.go b/sdk/go/aws/codebuild/resourcePolicy.go index aa8f7f1c967..1266b1f1c06 100644 --- a/sdk/go/aws/codebuild/resourcePolicy.go +++ b/sdk/go/aws/codebuild/resourcePolicy.go @@ -42,11 +42,11 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetPartition(ctx, nil, nil) +// current, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil) +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/codestarconnections/connection.go b/sdk/go/aws/codestarconnections/connection.go index f822e297c7f..0b795a0db42 100644 --- a/sdk/go/aws/codestarconnections/connection.go +++ b/sdk/go/aws/codestarconnections/connection.go @@ -39,7 +39,7 @@ import ( // } // _, err = codepipeline.NewPipeline(ctx, "example", &codepipeline.PipelineArgs{ // ArtifactStores: codepipeline.PipelineArtifactStoreArray{ -// nil, +// &codepipeline.PipelineArtifactStoreArgs{}, // }, // Stages: codepipeline.PipelineStageArray{ // &codepipeline.PipelineStageArgs{ @@ -64,13 +64,13 @@ import ( // }, // &codepipeline.PipelineStageArgs{ // Actions: codepipeline.PipelineStageActionArray{ -// nil, +// &codepipeline.PipelineStageActionArgs{}, // }, // Name: pulumi.String("Build"), // }, // &codepipeline.PipelineStageArgs{ // Actions: codepipeline.PipelineStageActionArray{ -// nil, +// &codepipeline.PipelineStageActionArgs{}, // }, // Name: pulumi.String("Deploy"), // }, diff --git a/sdk/go/aws/cognito/managedUserPoolClient.go b/sdk/go/aws/cognito/managedUserPoolClient.go index 9d98c0fda1f..4f62d69c2bf 100644 --- a/sdk/go/aws/cognito/managedUserPoolClient.go +++ b/sdk/go/aws/cognito/managedUserPoolClient.go @@ -51,7 +51,7 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetPartition(ctx, nil, nil) +// current, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/cognito/user.go b/sdk/go/aws/cognito/user.go index a8e8637bcf2..5f6f424b5ab 100644 --- a/sdk/go/aws/cognito/user.go +++ b/sdk/go/aws/cognito/user.go @@ -79,7 +79,7 @@ import ( // Mutable: pulumi.Bool(false), // Required: pulumi.Bool(false), // DeveloperOnlyAttribute: pulumi.Bool(false), -// StringAttributeConstraints: nil, +// StringAttributeConstraints: &cognito.UserPoolSchemaStringAttributeConstraintsArgs{}, // }, // }, // }) diff --git a/sdk/go/aws/cognito/userPoolClient.go b/sdk/go/aws/cognito/userPoolClient.go index 5a171c106f3..d4eb190ea40 100644 --- a/sdk/go/aws/cognito/userPoolClient.go +++ b/sdk/go/aws/cognito/userPoolClient.go @@ -161,7 +161,7 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/connect/botAssociation.go b/sdk/go/aws/connect/botAssociation.go index a5ac9f0e1be..846342863f9 100644 --- a/sdk/go/aws/connect/botAssociation.go +++ b/sdk/go/aws/connect/botAssociation.go @@ -65,7 +65,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/connect/contactFlow.go b/sdk/go/aws/connect/contactFlow.go index cdb88f64137..419304d265e 100644 --- a/sdk/go/aws/connect/contactFlow.go +++ b/sdk/go/aws/connect/contactFlow.go @@ -58,8 +58,8 @@ import ( // map[string]interface{}{ // "Identifier": "abcdef-abcd-abcd-abcd-abcdefghijkl", // "Type": "DisconnectParticipant", -// "Transitions": nil, -// "Parameters": nil, +// "Transitions": map[string]interface{}{}, +// "Parameters": map[string]interface{}{}, // }, // }, // }) diff --git a/sdk/go/aws/connect/contactFlowModule.go b/sdk/go/aws/connect/contactFlowModule.go index 25b81ebbbf8..f9c9af8f378 100644 --- a/sdk/go/aws/connect/contactFlowModule.go +++ b/sdk/go/aws/connect/contactFlowModule.go @@ -58,8 +58,8 @@ import ( // map[string]interface{}{ // "Identifier": "abcdef-abcd-abcd-abcd-abcdefghijkl", // "Type": "DisconnectParticipant", -// "Parameters": nil, -// "Transitions": nil, +// "Parameters": map[string]interface{}{}, +// "Transitions": map[string]interface{}{}, // }, // }, // "Settings": map[string]interface{}{ diff --git a/sdk/go/aws/datasync/agent.go b/sdk/go/aws/datasync/agent.go index 70f7db67150..79874c0b0e7 100644 --- a/sdk/go/aws/datasync/agent.go +++ b/sdk/go/aws/datasync/agent.go @@ -60,7 +60,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/datasync/task.go b/sdk/go/aws/datasync/task.go index fe9559737e3..7453a3af198 100644 --- a/sdk/go/aws/datasync/task.go +++ b/sdk/go/aws/datasync/task.go @@ -34,7 +34,7 @@ import ( // Name: pulumi.String("example"), // SourceLocationArn: pulumi.Any(source.Arn), // Options: &datasync.TaskOptionsArgs{ -// BytesPerSecond: int(-1), +// BytesPerSecond: pulumi.Int(-1), // }, // }) // if err != nil { diff --git a/sdk/go/aws/datazone/environmentProfile.go b/sdk/go/aws/datazone/environmentProfile.go index 776a4af7191..04c913fa05d 100644 --- a/sdk/go/aws/datazone/environmentProfile.go +++ b/sdk/go/aws/datazone/environmentProfile.go @@ -121,11 +121,11 @@ import ( // if err != nil { // return err // } -// test, err := aws.GetCallerIdentity(ctx, nil, nil) +// test, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// testGetRegion, err := aws.GetRegion(ctx, nil, nil) +// testGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/directconnect/getLocations.go b/sdk/go/aws/directconnect/getLocations.go index 754d58c96a0..ea82564f588 100644 --- a/sdk/go/aws/directconnect/getLocations.go +++ b/sdk/go/aws/directconnect/getLocations.go @@ -30,7 +30,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := directconnect.GetLocations(ctx, nil, nil) +// _, err := directconnect.GetLocations(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/directconnect/hostedPrivateVirtualInterfaceAccepter.go b/sdk/go/aws/directconnect/hostedPrivateVirtualInterfaceAccepter.go index 59e724150dd..95b22e7ccd4 100644 --- a/sdk/go/aws/directconnect/hostedPrivateVirtualInterfaceAccepter.go +++ b/sdk/go/aws/directconnect/hostedPrivateVirtualInterfaceAccepter.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// accepter, err := aws.GetCallerIdentity(ctx, nil, nil) +// accepter, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/directconnect/hostedPublicVirtualInterfaceAccepter.go b/sdk/go/aws/directconnect/hostedPublicVirtualInterfaceAccepter.go index ec6a4f7d179..ddee91792e6 100644 --- a/sdk/go/aws/directconnect/hostedPublicVirtualInterfaceAccepter.go +++ b/sdk/go/aws/directconnect/hostedPublicVirtualInterfaceAccepter.go @@ -30,7 +30,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// accepter, err := aws.GetCallerIdentity(ctx, nil, nil) +// accepter, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/directconnect/hostedTransitVirtualInterfaceAcceptor.go b/sdk/go/aws/directconnect/hostedTransitVirtualInterfaceAcceptor.go index fda4d3538be..527830daa2c 100644 --- a/sdk/go/aws/directconnect/hostedTransitVirtualInterfaceAcceptor.go +++ b/sdk/go/aws/directconnect/hostedTransitVirtualInterfaceAcceptor.go @@ -32,7 +32,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// accepter, err := aws.GetCallerIdentity(ctx, nil, nil) +// accepter, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/directoryservice/serviceRegion.go b/sdk/go/aws/directoryservice/serviceRegion.go index b0365df06b0..d932e36a7fa 100644 --- a/sdk/go/aws/directoryservice/serviceRegion.go +++ b/sdk/go/aws/directoryservice/serviceRegion.go @@ -31,7 +31,8 @@ import ( // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := aws.GetRegion(ctx, nil, nil); +// example, err := aws.GetRegion(ctx, &aws.GetRegionArgs{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/dlm/lifecyclePolicy.go b/sdk/go/aws/dlm/lifecyclePolicy.go index dfb2ad522e5..05bf2513164 100644 --- a/sdk/go/aws/dlm/lifecyclePolicy.go +++ b/sdk/go/aws/dlm/lifecyclePolicy.go @@ -154,7 +154,7 @@ import ( // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // // ...other configuration... -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -255,7 +255,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -268,7 +268,7 @@ import ( // Name: pulumi.String("tf-acc-basic"), // CrossRegionCopies: dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyArray{ // &dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyArgs{ -// EncryptionConfiguration: nil, +// EncryptionConfiguration: &dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyEncryptionConfigurationArgs{}, // RetainRule: &dlm.LifecyclePolicyPolicyDetailsActionCrossRegionCopyRetainRuleArgs{ // Interval: pulumi.Int(15), // IntervalUnit: pulumi.String("MONTHS"), diff --git a/sdk/go/aws/dynamodb/table.go b/sdk/go/aws/dynamodb/table.go index 436864fb4f1..c3be9d9bacd 100644 --- a/sdk/go/aws/dynamodb/table.go +++ b/sdk/go/aws/dynamodb/table.go @@ -162,15 +162,15 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// alternate, err := aws.GetRegion(ctx, nil, nil) +// alternate, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// third, err := aws.GetRegion(ctx, nil, nil) +// third, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/dynamodb/tag.go b/sdk/go/aws/dynamodb/tag.go index a6afb6b7335..bf769772d4d 100644 --- a/sdk/go/aws/dynamodb/tag.go +++ b/sdk/go/aws/dynamodb/tag.go @@ -34,11 +34,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// replica, err := aws.GetRegion(ctx, nil, nil) +// replica, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ebs/getDefaultKmsKey.go b/sdk/go/aws/ebs/getDefaultKmsKey.go index 5e91332d960..2f865fa22f3 100644 --- a/sdk/go/aws/ebs/getDefaultKmsKey.go +++ b/sdk/go/aws/ebs/getDefaultKmsKey.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := ebs.LookupDefaultKmsKey(ctx, nil, nil) +// current, err := ebs.LookupDefaultKmsKey(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ebs/getEncryptionByDefault.go b/sdk/go/aws/ebs/getEncryptionByDefault.go index bdb1b8e5db4..644f643924c 100644 --- a/sdk/go/aws/ebs/getEncryptionByDefault.go +++ b/sdk/go/aws/ebs/getEncryptionByDefault.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ebs.LookupEncryptionByDefault(ctx, nil, nil) +// _, err := ebs.LookupEncryptionByDefault(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/amiLaunchPermission.go b/sdk/go/aws/ec2/amiLaunchPermission.go index f919d81e739..db986514428 100644 --- a/sdk/go/aws/ec2/amiLaunchPermission.go +++ b/sdk/go/aws/ec2/amiLaunchPermission.go @@ -85,7 +85,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := organizations.LookupOrganization(ctx, nil, nil) +// current, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/getLocalGatewayRouteTables.go b/sdk/go/aws/ec2/getLocalGatewayRouteTables.go index 7d8aba8716b..c3d6873b89b 100644 --- a/sdk/go/aws/ec2/getLocalGatewayRouteTables.go +++ b/sdk/go/aws/ec2/getLocalGatewayRouteTables.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// foo, err := ec2.GetLocalGatewayRouteTables(ctx, nil, nil) +// foo, err := ec2.GetLocalGatewayRouteTables(ctx, &ec2.GetLocalGatewayRouteTablesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/getLocalGatewayVirtualInterfaceGroups.go b/sdk/go/aws/ec2/getLocalGatewayVirtualInterfaceGroups.go index 8746dc3fa31..0d593974303 100644 --- a/sdk/go/aws/ec2/getLocalGatewayVirtualInterfaceGroups.go +++ b/sdk/go/aws/ec2/getLocalGatewayVirtualInterfaceGroups.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ec2.GetLocalGatewayVirtualInterfaceGroups(ctx, nil, nil) +// _, err := ec2.GetLocalGatewayVirtualInterfaceGroups(ctx, &ec2.GetLocalGatewayVirtualInterfaceGroupsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/getManagedPrefixList.go b/sdk/go/aws/ec2/getManagedPrefixList.go index 8718e55c0c2..927870b323c 100644 --- a/sdk/go/aws/ec2/getManagedPrefixList.go +++ b/sdk/go/aws/ec2/getManagedPrefixList.go @@ -33,7 +33,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/getNetworkInterfaces.go b/sdk/go/aws/ec2/getNetworkInterfaces.go index ecba8984205..3fbf005a232 100644 --- a/sdk/go/aws/ec2/getNetworkInterfaces.go +++ b/sdk/go/aws/ec2/getNetworkInterfaces.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ec2.GetNetworkInterfaces(ctx, nil, nil) +// example, err := ec2.GetNetworkInterfaces(ctx, &ec2.GetNetworkInterfacesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/getPublicIpv4Pools.go b/sdk/go/aws/ec2/getPublicIpv4Pools.go index efe71bbe995..1136dd4eca3 100644 --- a/sdk/go/aws/ec2/getPublicIpv4Pools.go +++ b/sdk/go/aws/ec2/getPublicIpv4Pools.go @@ -30,7 +30,7 @@ import ( // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // // Returns all public IPv4 pools. -// _, err := ec2.GetPublicIpv4Pools(ctx, nil, nil) +// _, err := ec2.GetPublicIpv4Pools(ctx, &ec2.GetPublicIpv4PoolsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/getSerialConsoleAccess.go b/sdk/go/aws/ec2/getSerialConsoleAccess.go index 3e5d4a0a1fe..1c7eab4ba99 100644 --- a/sdk/go/aws/ec2/getSerialConsoleAccess.go +++ b/sdk/go/aws/ec2/getSerialConsoleAccess.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ec2.LookupSerialConsoleAccess(ctx, nil, nil) +// _, err := ec2.LookupSerialConsoleAccess(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/getTransitGatewayRouteTables.go b/sdk/go/aws/ec2/getTransitGatewayRouteTables.go index febdc6cdb39..f62899b99de 100644 --- a/sdk/go/aws/ec2/getTransitGatewayRouteTables.go +++ b/sdk/go/aws/ec2/getTransitGatewayRouteTables.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ec2.GetTransitGatewayRouteTables(ctx, nil, nil) +// example, err := ec2.GetTransitGatewayRouteTables(ctx, &ec2.GetTransitGatewayRouteTablesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/peeringConnectionOptions.go b/sdk/go/aws/ec2/peeringConnectionOptions.go index d12f80eeeae..4699e2bd5b4 100644 --- a/sdk/go/aws/ec2/peeringConnectionOptions.go +++ b/sdk/go/aws/ec2/peeringConnectionOptions.go @@ -105,7 +105,7 @@ import ( // if err != nil { // return err // } -// peer, err := aws.GetCallerIdentity(ctx, nil, nil) +// peer, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/securityGroupRule.go b/sdk/go/aws/ec2/securityGroupRule.go index a64f7dc69ec..1dc8d2bf3fc 100644 --- a/sdk/go/aws/ec2/securityGroupRule.go +++ b/sdk/go/aws/ec2/securityGroupRule.go @@ -122,7 +122,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpc.go b/sdk/go/aws/ec2/vpc.go index 448b4c249f0..cf6e0a8c9aa 100644 --- a/sdk/go/aws/ec2/vpc.go +++ b/sdk/go/aws/ec2/vpc.go @@ -86,7 +86,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcEndpoint.go b/sdk/go/aws/ec2/vpcEndpoint.go index bb77735fee0..01df256cc47 100644 --- a/sdk/go/aws/ec2/vpcEndpoint.go +++ b/sdk/go/aws/ec2/vpcEndpoint.go @@ -170,7 +170,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrinciple.go b/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrinciple.go index 068a50f6f63..064b19b6934 100644 --- a/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrinciple.go +++ b/sdk/go/aws/ec2/vpcEndpointServiceAllowedPrinciple.go @@ -37,7 +37,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcIpam.go b/sdk/go/aws/ec2/vpcIpam.go index edc9c78ef5d..c3aa1c01142 100644 --- a/sdk/go/aws/ec2/vpcIpam.go +++ b/sdk/go/aws/ec2/vpcIpam.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcIpamOrganizationAdminAccount.go b/sdk/go/aws/ec2/vpcIpamOrganizationAdminAccount.go index 75884269bf8..23631b9afdb 100644 --- a/sdk/go/aws/ec2/vpcIpamOrganizationAdminAccount.go +++ b/sdk/go/aws/ec2/vpcIpamOrganizationAdminAccount.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// delegated, err := aws.GetCallerIdentity(ctx, nil, nil) +// delegated, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcIpamPool.go b/sdk/go/aws/ec2/vpcIpamPool.go index 31be6b216f1..897a995c0d4 100644 --- a/sdk/go/aws/ec2/vpcIpamPool.go +++ b/sdk/go/aws/ec2/vpcIpamPool.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } @@ -74,7 +74,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcIpamPoolCidr.go b/sdk/go/aws/ec2/vpcIpamPoolCidr.go index 81f88502f92..f10646a528a 100644 --- a/sdk/go/aws/ec2/vpcIpamPoolCidr.go +++ b/sdk/go/aws/ec2/vpcIpamPoolCidr.go @@ -36,7 +36,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } @@ -86,7 +86,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcIpamPoolCidrAllocation.go b/sdk/go/aws/ec2/vpcIpamPoolCidrAllocation.go index ba996b71d5d..9a5e6b076c2 100644 --- a/sdk/go/aws/ec2/vpcIpamPoolCidrAllocation.go +++ b/sdk/go/aws/ec2/vpcIpamPoolCidrAllocation.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } @@ -90,7 +90,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcIpamPreviewNextCidr.go b/sdk/go/aws/ec2/vpcIpamPreviewNextCidr.go index cd12512040a..7e653960779 100644 --- a/sdk/go/aws/ec2/vpcIpamPreviewNextCidr.go +++ b/sdk/go/aws/ec2/vpcIpamPreviewNextCidr.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcIpamResourceDiscovery.go b/sdk/go/aws/ec2/vpcIpamResourceDiscovery.go index faf81d66a93..9771f3445ee 100644 --- a/sdk/go/aws/ec2/vpcIpamResourceDiscovery.go +++ b/sdk/go/aws/ec2/vpcIpamResourceDiscovery.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcIpamScope.go b/sdk/go/aws/ec2/vpcIpamScope.go index c01c7a41ce6..54e500ccb8d 100644 --- a/sdk/go/aws/ec2/vpcIpamScope.go +++ b/sdk/go/aws/ec2/vpcIpamScope.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2/vpcPeeringConnectionAccepter.go b/sdk/go/aws/ec2/vpcPeeringConnectionAccepter.go index bb2c44d9c20..ccadb1531f8 100644 --- a/sdk/go/aws/ec2/vpcPeeringConnectionAccepter.go +++ b/sdk/go/aws/ec2/vpcPeeringConnectionAccepter.go @@ -48,7 +48,7 @@ import ( // if err != nil { // return err // } -// peer, err := aws.GetCallerIdentity(ctx, nil, nil) +// peer, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2transitgateway/getPeeringAttachments.go b/sdk/go/aws/ec2transitgateway/getPeeringAttachments.go index 8c0fc077cf1..4c236ffca62 100644 --- a/sdk/go/aws/ec2transitgateway/getPeeringAttachments.go +++ b/sdk/go/aws/ec2transitgateway/getPeeringAttachments.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ec2transitgateway.GetPeeringAttachments(ctx, nil, nil) +// _, err := ec2transitgateway.GetPeeringAttachments(ctx, &ec2transitgateway.GetPeeringAttachmentsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ec2transitgateway/peeringAttachment.go b/sdk/go/aws/ec2transitgateway/peeringAttachment.go index d251673086f..db147114807 100644 --- a/sdk/go/aws/ec2transitgateway/peeringAttachment.go +++ b/sdk/go/aws/ec2transitgateway/peeringAttachment.go @@ -30,7 +30,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// peer, err := aws.GetRegion(ctx, nil, nil) +// peer, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ecr/getAuthorizationToken.go b/sdk/go/aws/ecr/getAuthorizationToken.go index 08fb682a240..2ceb7798cb1 100644 --- a/sdk/go/aws/ecr/getAuthorizationToken.go +++ b/sdk/go/aws/ecr/getAuthorizationToken.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ecr.GetAuthorizationToken(ctx, nil, nil) +// _, err := ecr.GetAuthorizationToken(ctx, &ecr.GetAuthorizationTokenArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ecr/getRepositories.go b/sdk/go/aws/ecr/getRepositories.go index 9f9e2229d5e..0548dbb9859 100644 --- a/sdk/go/aws/ecr/getRepositories.go +++ b/sdk/go/aws/ecr/getRepositories.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ecr.GetRepositories(ctx, nil, nil) +// _, err := ecr.GetRepositories(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ecr/registryPolicy.go b/sdk/go/aws/ecr/registryPolicy.go index 5a357d0eeed..889eb2836fc 100644 --- a/sdk/go/aws/ecr/registryPolicy.go +++ b/sdk/go/aws/ecr/registryPolicy.go @@ -34,15 +34,15 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetRegion, err := aws.GetRegion(ctx, nil, nil) +// currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// currentGetPartition, err := aws.GetPartition(ctx, nil, nil) +// currentGetPartition, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ecr/replicationConfiguration.go b/sdk/go/aws/ecr/replicationConfiguration.go index 26f30b65193..b168ea90391 100644 --- a/sdk/go/aws/ecr/replicationConfiguration.go +++ b/sdk/go/aws/ecr/replicationConfiguration.go @@ -28,11 +28,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// example, err := aws.GetRegions(ctx, nil, nil) +// example, err := aws.GetRegions(ctx, &aws.GetRegionsArgs{}, nil) // if err != nil { // return err // } @@ -74,11 +74,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// example, err := aws.GetRegions(ctx, nil, nil) +// example, err := aws.GetRegions(ctx, &aws.GetRegionsArgs{}, nil) // if err != nil { // return err // } @@ -124,11 +124,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// example, err := aws.GetRegions(ctx, nil, nil) +// example, err := aws.GetRegions(ctx, &aws.GetRegionsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ecrpublic/getAuthorizationToken.go b/sdk/go/aws/ecrpublic/getAuthorizationToken.go index b9b3e704335..5d75db6bd64 100644 --- a/sdk/go/aws/ecrpublic/getAuthorizationToken.go +++ b/sdk/go/aws/ecrpublic/getAuthorizationToken.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ecrpublic.GetAuthorizationToken(ctx, nil, nil) +// _, err := ecrpublic.GetAuthorizationToken(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ecs/cluster.go b/sdk/go/aws/ecs/cluster.go index be4564f8c1b..540456dc5fb 100644 --- a/sdk/go/aws/ecs/cluster.go +++ b/sdk/go/aws/ecs/cluster.go @@ -114,7 +114,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/elasticache/cluster.go b/sdk/go/aws/elasticache/cluster.go index fab1cfc5261..35bc5108084 100644 --- a/sdk/go/aws/elasticache/cluster.go +++ b/sdk/go/aws/elasticache/cluster.go @@ -186,7 +186,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := outposts.GetOutposts(ctx, nil, nil) +// example, err := outposts.GetOutposts(ctx, &outposts.GetOutpostsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/elasticbeanstalk/getHostedZone.go b/sdk/go/aws/elasticbeanstalk/getHostedZone.go index 432b3367963..9dcb6062b19 100644 --- a/sdk/go/aws/elasticbeanstalk/getHostedZone.go +++ b/sdk/go/aws/elasticbeanstalk/getHostedZone.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := elasticbeanstalk.GetHostedZone(ctx, nil, nil) +// _, err := elasticbeanstalk.GetHostedZone(ctx, &elasticbeanstalk.GetHostedZoneArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/elasticsearch/domain.go b/sdk/go/aws/elasticsearch/domain.go index 88209423c4a..20e3e7cf9d7 100644 --- a/sdk/go/aws/elasticsearch/domain.go +++ b/sdk/go/aws/elasticsearch/domain.go @@ -73,11 +73,11 @@ import ( // if param := cfg.Get("domain"); param != "" { // domain = param // } -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil) +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -231,11 +231,13 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetRegion(ctx, nil, nil); +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{ +// }, nil); // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil); +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/elb/getHostedZoneId.go b/sdk/go/aws/elb/getHostedZoneId.go index 80a90dd65e7..d1ec8bf3f55 100644 --- a/sdk/go/aws/elb/getHostedZoneId.go +++ b/sdk/go/aws/elb/getHostedZoneId.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// main, err := elb.GetHostedZoneId(ctx, nil, nil) +// main, err := elb.GetHostedZoneId(ctx, &elb.GetHostedZoneIdArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/elb/getServiceAccount.go b/sdk/go/aws/elb/getServiceAccount.go index a1509e18a4b..34a78e30309 100644 --- a/sdk/go/aws/elb/getServiceAccount.go +++ b/sdk/go/aws/elb/getServiceAccount.go @@ -33,7 +33,8 @@ import ( // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// main, err := elb.GetServiceAccount(ctx, nil, nil); +// main, err := elb.GetServiceAccount(ctx, &elb.GetServiceAccountArgs{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/emr/cluster.go b/sdk/go/aws/emr/cluster.go index a2cc827b69c..c186c4bdca3 100644 --- a/sdk/go/aws/emr/cluster.go +++ b/sdk/go/aws/emr/cluster.go @@ -369,7 +369,7 @@ import ( // MasterInstanceGroup: &emr.ClusterMasterInstanceGroupArgs{ // InstanceCount: pulumi.Int(3), // }, -// CoreInstanceGroup: nil, +// CoreInstanceGroup: &emr.ClusterCoreInstanceGroupArgs{}, // }) // if err != nil { // return err diff --git a/sdk/go/aws/finspace/kxEnvironment.go b/sdk/go/aws/finspace/kxEnvironment.go index c2875f66ec8..dce0a094218 100644 --- a/sdk/go/aws/finspace/kxEnvironment.go +++ b/sdk/go/aws/finspace/kxEnvironment.go @@ -151,8 +151,8 @@ import ( // To: pulumi.Int(53), // }, // IcmpTypeCode: &finspace.KxEnvironmentTransitGatewayConfigurationAttachmentNetworkAclConfigurationIcmpTypeCodeArgs{ -// Type: int(-1), -// Code: int(-1), +// Type: pulumi.Int(-1), +// Code: pulumi.Int(-1), // }, // }, // }, diff --git a/sdk/go/aws/gamelift/gameServerGroup.go b/sdk/go/aws/gamelift/gameServerGroup.go index 3d17fe1f883..e7681e7ff4a 100644 --- a/sdk/go/aws/gamelift/gameServerGroup.go +++ b/sdk/go/aws/gamelift/gameServerGroup.go @@ -133,7 +133,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetPartition(ctx, nil, nil) +// current, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/getBillingServiceAccount.go b/sdk/go/aws/getBillingServiceAccount.go index 7741fa80819..cf880a40a9a 100644 --- a/sdk/go/aws/getBillingServiceAccount.go +++ b/sdk/go/aws/getBillingServiceAccount.go @@ -30,7 +30,8 @@ import ( // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// main, err := aws.GetBillingServiceAccount(ctx, nil, nil); +// main, err := aws.GetBillingServiceAccount(ctx, &aws.GetBillingServiceAccountArgs{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/getCallerIdentity.go b/sdk/go/aws/getCallerIdentity.go index 1eea4f1f215..61e718502ac 100644 --- a/sdk/go/aws/getCallerIdentity.go +++ b/sdk/go/aws/getCallerIdentity.go @@ -28,7 +28,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/getDefaultTags.go b/sdk/go/aws/getDefaultTags.go index 6148a66733f..d82f90dee40 100644 --- a/sdk/go/aws/getDefaultTags.go +++ b/sdk/go/aws/getDefaultTags.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := aws.GetDefaultTags(ctx, nil, nil) +// _, err := aws.GetDefaultTags(ctx, &aws.GetDefaultTagsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/getPartition.go b/sdk/go/aws/getPartition.go index cbe46440139..d9062ddbb17 100644 --- a/sdk/go/aws/getPartition.go +++ b/sdk/go/aws/getPartition.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetPartition(ctx, nil, nil) +// current, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/getRegion.go b/sdk/go/aws/getRegion.go index f047e131945..11bf0d95b72 100644 --- a/sdk/go/aws/getRegion.go +++ b/sdk/go/aws/getRegion.go @@ -35,7 +35,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := aws.GetRegion(ctx, nil, nil) +// _, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/getRegions.go b/sdk/go/aws/getRegions.go index 11f86b862d9..0c118d17265 100644 --- a/sdk/go/aws/getRegions.go +++ b/sdk/go/aws/getRegions.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := aws.GetRegions(ctx, nil, nil) +// _, err := aws.GetRegions(ctx, &aws.GetRegionsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/getService.go b/sdk/go/aws/getService.go index 2eec597a981..9681d4cae9e 100644 --- a/sdk/go/aws/getService.go +++ b/sdk/go/aws/getService.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/glue/resourcePolicy.go b/sdk/go/aws/glue/resourcePolicy.go index da8bc79475e..82f17036c91 100644 --- a/sdk/go/aws/glue/resourcePolicy.go +++ b/sdk/go/aws/glue/resourcePolicy.go @@ -32,15 +32,15 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetPartition, err := aws.GetPartition(ctx, nil, nil) +// currentGetPartition, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } -// currentGetRegion, err := aws.GetRegion(ctx, nil, nil) +// currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/guardduty/getDetector.go b/sdk/go/aws/guardduty/getDetector.go index 2bc83f5f409..1bf1842bcfd 100644 --- a/sdk/go/aws/guardduty/getDetector.go +++ b/sdk/go/aws/guardduty/getDetector.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := guardduty.LookupDetector(ctx, nil, nil) +// _, err := guardduty.LookupDetector(ctx, &guardduty.LookupDetectorArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/guardduty/publishingDestination.go b/sdk/go/aws/guardduty/publishingDestination.go index 11e52673d55..65aac91a416 100644 --- a/sdk/go/aws/guardduty/publishingDestination.go +++ b/sdk/go/aws/guardduty/publishingDestination.go @@ -34,11 +34,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetRegion, err := aws.GetRegion(ctx, nil, nil) +// currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/iam/getAccountAlias.go b/sdk/go/aws/iam/getAccountAlias.go index 6cbdf9f71d0..1999c8de22b 100644 --- a/sdk/go/aws/iam/getAccountAlias.go +++ b/sdk/go/aws/iam/getAccountAlias.go @@ -28,7 +28,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := iam.LookupAccountAlias(ctx, nil, nil) +// current, err := iam.LookupAccountAlias(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/iam/getPrincipalPolicySimulation.go b/sdk/go/aws/iam/getPrincipalPolicySimulation.go index 6ee2bfabcad..f1bc92601d2 100644 --- a/sdk/go/aws/iam/getPrincipalPolicySimulation.go +++ b/sdk/go/aws/iam/getPrincipalPolicySimulation.go @@ -37,7 +37,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -110,7 +110,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/iam/getRoles.go b/sdk/go/aws/iam/getRoles.go index 34a946a8529..eaaf1d2da61 100644 --- a/sdk/go/aws/iam/getRoles.go +++ b/sdk/go/aws/iam/getRoles.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := iam.GetRoles(ctx, nil, nil) +// _, err := iam.GetRoles(ctx, &iam.GetRolesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/iam/getSessionContext.go b/sdk/go/aws/iam/getSessionContext.go index 8abd519e74f..ab8280d0bfb 100644 --- a/sdk/go/aws/iam/getSessionContext.go +++ b/sdk/go/aws/iam/getSessionContext.go @@ -60,7 +60,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/iam/getUsers.go b/sdk/go/aws/iam/getUsers.go index ff1fe72041b..31012e13253 100644 --- a/sdk/go/aws/iam/getUsers.go +++ b/sdk/go/aws/iam/getUsers.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := iam.GetUsers(ctx, nil, nil) +// _, err := iam.GetUsers(ctx, &iam.GetUsersArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/iam/role.go b/sdk/go/aws/iam/role.go index d092136ce81..11a784a5451 100644 --- a/sdk/go/aws/iam/role.go +++ b/sdk/go/aws/iam/role.go @@ -213,7 +213,7 @@ import ( // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := iam.NewRole(ctx, "example", &iam.RoleArgs{ // InlinePolicies: iam.RoleInlinePolicyArray{ -// nil, +// &iam.RoleInlinePolicyArgs{}, // }, // Name: pulumi.String("yak_role"), // AssumeRolePolicy: pulumi.Any(instanceAssumeRolePolicy.Json), diff --git a/sdk/go/aws/identitystore/getGroup.go b/sdk/go/aws/identitystore/getGroup.go index 61c1b9cd565..a5d04e30f30 100644 --- a/sdk/go/aws/identitystore/getGroup.go +++ b/sdk/go/aws/identitystore/getGroup.go @@ -28,7 +28,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/identitystore/getGroups.go b/sdk/go/aws/identitystore/getGroups.go index 71c10c8bb3c..164f922dbb1 100644 --- a/sdk/go/aws/identitystore/getGroups.go +++ b/sdk/go/aws/identitystore/getGroups.go @@ -30,7 +30,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/identitystore/getUser.go b/sdk/go/aws/identitystore/getUser.go index 6ef8bdb4d1b..3605cd6c346 100644 --- a/sdk/go/aws/identitystore/getUser.go +++ b/sdk/go/aws/identitystore/getUser.go @@ -28,7 +28,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/identitystore/groupMembership.go b/sdk/go/aws/identitystore/groupMembership.go index a656abe405c..0089b06a73a 100644 --- a/sdk/go/aws/identitystore/groupMembership.go +++ b/sdk/go/aws/identitystore/groupMembership.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/inspector/getRulesPackages.go b/sdk/go/aws/inspector/getRulesPackages.go index b8093f93e7f..4f1457ad6a9 100644 --- a/sdk/go/aws/inspector/getRulesPackages.go +++ b/sdk/go/aws/inspector/getRulesPackages.go @@ -30,7 +30,7 @@ import ( // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // // Declare the data source -// rules, err := inspector.GetRulesPackages(ctx, nil, nil) +// rules, err := inspector.GetRulesPackages(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/inspector2/delegatedAdminAccount.go b/sdk/go/aws/inspector2/delegatedAdminAccount.go index b280ab99044..dce9b4a2307 100644 --- a/sdk/go/aws/inspector2/delegatedAdminAccount.go +++ b/sdk/go/aws/inspector2/delegatedAdminAccount.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/inspector2/enabler.go b/sdk/go/aws/inspector2/enabler.go index 83bcb2b298c..bb9f5e09a5c 100644 --- a/sdk/go/aws/inspector2/enabler.go +++ b/sdk/go/aws/inspector2/enabler.go @@ -64,7 +64,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/iot/caCertificate.go b/sdk/go/aws/iot/caCertificate.go index d5326528e07..68bf0a95a11 100644 --- a/sdk/go/aws/iot/caCertificate.go +++ b/sdk/go/aws/iot/caCertificate.go @@ -58,7 +58,7 @@ import ( // if err != nil { // return err // } -// example, err := iot.GetRegistrationCode(ctx, nil, nil) +// example, err := iot.GetRegistrationCode(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/iot/getRegistrationCode.go b/sdk/go/aws/iot/getRegistrationCode.go index 696f408eb8f..c560d6c2851 100644 --- a/sdk/go/aws/iot/getRegistrationCode.go +++ b/sdk/go/aws/iot/getRegistrationCode.go @@ -28,7 +28,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := iot.GetRegistrationCode(ctx, nil, nil) +// example, err := iot.GetRegistrationCode(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/kendra/index.go b/sdk/go/aws/kendra/index.go index 512234cc5ef..921412c8ede 100644 --- a/sdk/go/aws/kendra/index.go +++ b/sdk/go/aws/kendra/index.go @@ -186,7 +186,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -216,7 +216,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -230,7 +230,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(2), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -258,7 +258,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -272,7 +272,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -286,7 +286,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -316,7 +316,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -330,7 +330,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -344,7 +344,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -416,7 +416,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -446,7 +446,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -460,7 +460,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(2), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -488,7 +488,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -502,7 +502,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -516,7 +516,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -546,7 +546,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -560,7 +560,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -574,7 +574,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ @@ -602,7 +602,7 @@ import ( // }, // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ // Importance: pulumi.Int(1), -// ValuesImportanceMap: nil, +// ValuesImportanceMap: pulumi.IntMap{}, // }, // }, // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ diff --git a/sdk/go/aws/kms/key.go b/sdk/go/aws/kms/key.go index 8452c55db18..22ccad3c9ed 100644 --- a/sdk/go/aws/kms/key.go +++ b/sdk/go/aws/kms/key.go @@ -37,7 +37,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -132,7 +132,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -194,7 +194,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -286,7 +286,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -378,7 +378,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/lakeformation/permissions.go b/sdk/go/aws/lakeformation/permissions.go index c1bf7c05d93..ae74dc59aab 100644 --- a/sdk/go/aws/lakeformation/permissions.go +++ b/sdk/go/aws/lakeformation/permissions.go @@ -43,7 +43,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/lambda/getFunctions.go b/sdk/go/aws/lambda/getFunctions.go index 116b7443927..d0f9c1fca94 100644 --- a/sdk/go/aws/lambda/getFunctions.go +++ b/sdk/go/aws/lambda/getFunctions.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := lambda.GetFunctions(ctx, nil, nil) +// _, err := lambda.GetFunctions(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/lb/getHostedZoneId.go b/sdk/go/aws/lb/getHostedZoneId.go index 52b42a8a8c7..daf8f33eef5 100644 --- a/sdk/go/aws/lb/getHostedZoneId.go +++ b/sdk/go/aws/lb/getHostedZoneId.go @@ -28,7 +28,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// main, err := lb.GetHostedZoneId(ctx, nil, nil) +// main, err := lb.GetHostedZoneId(ctx, &lb.GetHostedZoneIdArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/licensemanager/getLicenseGrants.go b/sdk/go/aws/licensemanager/getLicenseGrants.go index d4c1caa48a4..2a332519fbe 100644 --- a/sdk/go/aws/licensemanager/getLicenseGrants.go +++ b/sdk/go/aws/licensemanager/getLicenseGrants.go @@ -32,7 +32,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/mediastore/containerPolicy.go b/sdk/go/aws/mediastore/containerPolicy.go index eb34aca672a..e6b27260d39 100644 --- a/sdk/go/aws/mediastore/containerPolicy.go +++ b/sdk/go/aws/mediastore/containerPolicy.go @@ -30,11 +30,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil) +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/mq/getInstanceTypeOfferings.go b/sdk/go/aws/mq/getInstanceTypeOfferings.go index 83cfefcb510..b7b7a6da3ae 100644 --- a/sdk/go/aws/mq/getInstanceTypeOfferings.go +++ b/sdk/go/aws/mq/getInstanceTypeOfferings.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := mq.GetInstanceTypeOfferings(ctx, nil, nil) +// _, err := mq.GetInstanceTypeOfferings(ctx, &mq.GetInstanceTypeOfferingsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/msk/clusterPolicy.go b/sdk/go/aws/msk/clusterPolicy.go index 42ca346cb3a..cfa1d41528a 100644 --- a/sdk/go/aws/msk/clusterPolicy.go +++ b/sdk/go/aws/msk/clusterPolicy.go @@ -34,11 +34,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetPartition, err := aws.GetPartition(ctx, nil, nil) +// currentGetPartition, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/oam/getLinks.go b/sdk/go/aws/oam/getLinks.go index 428e4860554..6dd99e77f22 100644 --- a/sdk/go/aws/oam/getLinks.go +++ b/sdk/go/aws/oam/getLinks.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := oam.GetLinks(ctx, nil, nil) +// _, err := oam.GetLinks(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/oam/getSinks.go b/sdk/go/aws/oam/getSinks.go index aa7cc1c813d..f2ada71f200 100644 --- a/sdk/go/aws/oam/getSinks.go +++ b/sdk/go/aws/oam/getSinks.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := oam.GetSinks(ctx, nil, nil) +// _, err := oam.GetSinks(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/opensearch/domain.go b/sdk/go/aws/opensearch/domain.go index f228d3b7f9e..a5a4b99345f 100644 --- a/sdk/go/aws/opensearch/domain.go +++ b/sdk/go/aws/opensearch/domain.go @@ -91,11 +91,11 @@ import ( // if param := cfg.Get("domain"); param != "" { // domain = param // } -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil) +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -266,11 +266,13 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetRegion(ctx, nil, nil); +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{ +// }, nil); // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil); +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/opensearch/inboundConnectionAccepter.go b/sdk/go/aws/opensearch/inboundConnectionAccepter.go index 6700ea1474b..f6194fa6010 100644 --- a/sdk/go/aws/opensearch/inboundConnectionAccepter.go +++ b/sdk/go/aws/opensearch/inboundConnectionAccepter.go @@ -31,11 +31,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetRegion, err := aws.GetRegion(ctx, nil, nil) +// currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/opensearch/outboundConnection.go b/sdk/go/aws/opensearch/outboundConnection.go index fa01ab4ee52..152bae4651b 100644 --- a/sdk/go/aws/opensearch/outboundConnection.go +++ b/sdk/go/aws/opensearch/outboundConnection.go @@ -31,11 +31,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetRegion, err := aws.GetRegion(ctx, nil, nil) +// currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/opensearch/serverlessAccessPolicy.go b/sdk/go/aws/opensearch/serverlessAccessPolicy.go index 46e47ad5989..da16942b1bf 100644 --- a/sdk/go/aws/opensearch/serverlessAccessPolicy.go +++ b/sdk/go/aws/opensearch/serverlessAccessPolicy.go @@ -33,7 +33,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -100,7 +100,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/opensearchingest/pipeline.go b/sdk/go/aws/opensearchingest/pipeline.go index 86356a94c2d..b9e482882bd 100644 --- a/sdk/go/aws/opensearchingest/pipeline.go +++ b/sdk/go/aws/opensearchingest/pipeline.go @@ -35,7 +35,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/organizations/getOrganization.go b/sdk/go/aws/organizations/getOrganization.go index d2f36b3a78e..db4c750aa0e 100644 --- a/sdk/go/aws/organizations/getOrganization.go +++ b/sdk/go/aws/organizations/getOrganization.go @@ -28,7 +28,8 @@ import ( // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := organizations.LookupOrganization(ctx, nil, nil); +// example, err := organizations.LookupOrganization(ctx, map[string]interface{}{ +// }, nil); // if err != nil { // return err // } @@ -53,7 +54,8 @@ import ( // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := organizations.LookupOrganization(ctx, nil, nil); +// example, err := organizations.LookupOrganization(ctx, map[string]interface{}{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/organizations/getOrganizationalUnit.go b/sdk/go/aws/organizations/getOrganizationalUnit.go index c8971a77b60..6b946af35b6 100644 --- a/sdk/go/aws/organizations/getOrganizationalUnit.go +++ b/sdk/go/aws/organizations/getOrganizationalUnit.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// org, err := organizations.LookupOrganization(ctx, nil, nil) +// org, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/organizations/getOrganizationalUnitChildAccounts.go b/sdk/go/aws/organizations/getOrganizationalUnitChildAccounts.go index 073001144a7..ef408d6c839 100644 --- a/sdk/go/aws/organizations/getOrganizationalUnitChildAccounts.go +++ b/sdk/go/aws/organizations/getOrganizationalUnitChildAccounts.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// org, err := organizations.LookupOrganization(ctx, nil, nil) +// org, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/organizations/getOrganizationalUnitDescendantAccounts.go b/sdk/go/aws/organizations/getOrganizationalUnitDescendantAccounts.go index df5b2d4cd61..2487a0d457b 100644 --- a/sdk/go/aws/organizations/getOrganizationalUnitDescendantAccounts.go +++ b/sdk/go/aws/organizations/getOrganizationalUnitDescendantAccounts.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// org, err := organizations.LookupOrganization(ctx, nil, nil) +// org, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/organizations/getOrganizationalUnitDescendantOrganizationalUnits.go b/sdk/go/aws/organizations/getOrganizationalUnitDescendantOrganizationalUnits.go index 44e0edb62d6..0b486b34807 100644 --- a/sdk/go/aws/organizations/getOrganizationalUnitDescendantOrganizationalUnits.go +++ b/sdk/go/aws/organizations/getOrganizationalUnitDescendantOrganizationalUnits.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// org, err := organizations.LookupOrganization(ctx, nil, nil) +// org, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/organizations/getOrganizationalUnits.go b/sdk/go/aws/organizations/getOrganizationalUnits.go index 183fdc0a2ce..81451d9df0d 100644 --- a/sdk/go/aws/organizations/getOrganizationalUnits.go +++ b/sdk/go/aws/organizations/getOrganizationalUnits.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// org, err := organizations.LookupOrganization(ctx, nil, nil) +// org, err := organizations.LookupOrganization(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/outposts/getSites.go b/sdk/go/aws/outposts/getSites.go index dc97b34470a..1beb413a9fe 100644 --- a/sdk/go/aws/outposts/getSites.go +++ b/sdk/go/aws/outposts/getSites.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := outposts.GetSites(ctx, nil, nil) +// _, err := outposts.GetSites(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/pipes/pipe.go b/sdk/go/aws/pipes/pipe.go index c3dbd795ce9..fa5f1a9f4f7 100644 --- a/sdk/go/aws/pipes/pipe.go +++ b/sdk/go/aws/pipes/pipe.go @@ -41,7 +41,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// main, err := aws.GetCallerIdentity(ctx, nil, nil) +// main, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/polly/getVoices.go b/sdk/go/aws/polly/getVoices.go index dc2e1951655..ce5cf7ffead 100644 --- a/sdk/go/aws/polly/getVoices.go +++ b/sdk/go/aws/polly/getVoices.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := polly.GetVoices(ctx, nil, nil) +// _, err := polly.GetVoices(ctx, &polly.GetVoicesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ram/resourceShareAccepter.go b/sdk/go/aws/ram/resourceShareAccepter.go index 51bac013fc7..278691f139d 100644 --- a/sdk/go/aws/ram/resourceShareAccepter.go +++ b/sdk/go/aws/ram/resourceShareAccepter.go @@ -43,7 +43,7 @@ import ( // if err != nil { // return err // } -// receiver, err := aws.GetCallerIdentity(ctx, nil, nil) +// receiver, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/rds/getEventCategories.go b/sdk/go/aws/rds/getEventCategories.go index 7cb98016a22..f90bb8d816b 100644 --- a/sdk/go/aws/rds/getEventCategories.go +++ b/sdk/go/aws/rds/getEventCategories.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := rds.GetEventCategories(ctx, nil, nil) +// example, err := rds.GetEventCategories(ctx, &rds.GetEventCategoriesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/rds/integration.go b/sdk/go/aws/rds/integration.go index c135b829982..07b5cbb3956 100644 --- a/sdk/go/aws/rds/integration.go +++ b/sdk/go/aws/rds/integration.go @@ -90,7 +90,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/redshift/getDataShares.go b/sdk/go/aws/redshift/getDataShares.go index adb50e605b6..b87468dcfc8 100644 --- a/sdk/go/aws/redshift/getDataShares.go +++ b/sdk/go/aws/redshift/getDataShares.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := redshift.GetDataShares(ctx, nil, nil) +// _, err := redshift.GetDataShares(ctx, &redshift.GetDataSharesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/redshift/getServiceAccount.go b/sdk/go/aws/redshift/getServiceAccount.go index 44d4621b90e..1b21dd288f1 100644 --- a/sdk/go/aws/redshift/getServiceAccount.go +++ b/sdk/go/aws/redshift/getServiceAccount.go @@ -34,7 +34,8 @@ import ( // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// main, err := redshift.GetServiceAccount(ctx, nil, nil); +// main, err := redshift.GetServiceAccount(ctx, &redshift.GetServiceAccountArgs{ +// }, nil); // if err != nil { // return err // } diff --git a/sdk/go/aws/resourcegroupstaggingapi/getResources.go b/sdk/go/aws/resourcegroupstaggingapi/getResources.go index 591bf9f3eac..e5c9ba780fe 100644 --- a/sdk/go/aws/resourcegroupstaggingapi/getResources.go +++ b/sdk/go/aws/resourcegroupstaggingapi/getResources.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := resourcegroupstaggingapi.GetResources(ctx, nil, nil) +// _, err := resourcegroupstaggingapi.GetResources(ctx, &resourcegroupstaggingapi.GetResourcesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/rolesanywhere/trustAnchor.go b/sdk/go/aws/rolesanywhere/trustAnchor.go index 31a24ecd087..c092b025173 100644 --- a/sdk/go/aws/rolesanywhere/trustAnchor.go +++ b/sdk/go/aws/rolesanywhere/trustAnchor.go @@ -46,7 +46,7 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetPartition(ctx, nil, nil) +// current, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/route53/getTrafficPolicyDocument.go b/sdk/go/aws/route53/getTrafficPolicyDocument.go index 4135c8a64e0..f729fe7f6fd 100644 --- a/sdk/go/aws/route53/getTrafficPolicyDocument.go +++ b/sdk/go/aws/route53/getTrafficPolicyDocument.go @@ -32,7 +32,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/route53/getZones.go b/sdk/go/aws/route53/getZones.go index a866f00f00f..0141fa9bd98 100644 --- a/sdk/go/aws/route53/getZones.go +++ b/sdk/go/aws/route53/getZones.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// all, err := route53.GetZones(ctx, nil, nil) +// all, err := route53.GetZones(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/route53/hostedZoneDnsSec.go b/sdk/go/aws/route53/hostedZoneDnsSec.go index f8df614aad8..577aaa030e0 100644 --- a/sdk/go/aws/route53/hostedZoneDnsSec.go +++ b/sdk/go/aws/route53/hostedZoneDnsSec.go @@ -37,7 +37,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/route53/keySigningKey.go b/sdk/go/aws/route53/keySigningKey.go index 015e9211bb7..329eaf997c0 100644 --- a/sdk/go/aws/route53/keySigningKey.go +++ b/sdk/go/aws/route53/keySigningKey.go @@ -33,7 +33,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/route53/resolverFirewallRule.go b/sdk/go/aws/route53/resolverFirewallRule.go index 64443cde3cc..b578be7a634 100644 --- a/sdk/go/aws/route53/resolverFirewallRule.go +++ b/sdk/go/aws/route53/resolverFirewallRule.go @@ -33,14 +33,14 @@ import ( // Domains: pulumi.StringArray{ // pulumi.String("example.com"), // }, -// Tags: nil, +// Tags: pulumi.StringMap{}, // }) // if err != nil { // return err // } // exampleResolverFirewallRuleGroup, err := route53.NewResolverFirewallRuleGroup(ctx, "example", &route53.ResolverFirewallRuleGroupArgs{ // Name: pulumi.String("example"), -// Tags: nil, +// Tags: pulumi.StringMap{}, // }) // if err != nil { // return err diff --git a/sdk/go/aws/route53domains/delegationSignerRecord.go b/sdk/go/aws/route53domains/delegationSignerRecord.go index 1f2a56b1423..84acba77f51 100644 --- a/sdk/go/aws/route53domains/delegationSignerRecord.go +++ b/sdk/go/aws/route53domains/delegationSignerRecord.go @@ -36,7 +36,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/s3/bucketAclV2.go b/sdk/go/aws/s3/bucketAclV2.go index 0ad6a834bec..e16360d32cd 100644 --- a/sdk/go/aws/s3/bucketAclV2.go +++ b/sdk/go/aws/s3/bucketAclV2.go @@ -136,7 +136,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := s3.GetCanonicalUserId(ctx, nil, nil) +// current, err := s3.GetCanonicalUserId(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/s3/bucketLifecycleConfigurationV2.go b/sdk/go/aws/s3/bucketLifecycleConfigurationV2.go index 3fad809dddc..566c468afac 100644 --- a/sdk/go/aws/s3/bucketLifecycleConfigurationV2.go +++ b/sdk/go/aws/s3/bucketLifecycleConfigurationV2.go @@ -90,7 +90,7 @@ import ( // Rules: s3.BucketLifecycleConfigurationV2RuleArray{ // &s3.BucketLifecycleConfigurationV2RuleArgs{ // Id: pulumi.String("rule-1"), -// Filter: nil, +// Filter: &s3.BucketLifecycleConfigurationV2RuleFilterArgs{}, // Status: pulumi.String("Enabled"), // }, // }, diff --git a/sdk/go/aws/s3/bucketObjectv2.go b/sdk/go/aws/s3/bucketObjectv2.go index 41708f01ab0..05923890444 100644 --- a/sdk/go/aws/s3/bucketObjectv2.go +++ b/sdk/go/aws/s3/bucketObjectv2.go @@ -277,7 +277,7 @@ import ( // }, // OverrideProvider: &s3.BucketObjectv2OverrideProviderArgs{ // DefaultTags: &s3.BucketObjectv2OverrideProviderDefaultTagsArgs{ -// Tags: nil, +// Tags: pulumi.StringMap{}, // }, // }, // }) diff --git a/sdk/go/aws/s3/getAccountPublicAccessBlock.go b/sdk/go/aws/s3/getAccountPublicAccessBlock.go index a424cb4908b..c9cad865614 100644 --- a/sdk/go/aws/s3/getAccountPublicAccessBlock.go +++ b/sdk/go/aws/s3/getAccountPublicAccessBlock.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := s3.LookupAccountPublicAccessBlock(ctx, nil, nil) +// _, err := s3.LookupAccountPublicAccessBlock(ctx, &s3.LookupAccountPublicAccessBlockArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/s3/getCanonicalUserId.go b/sdk/go/aws/s3/getCanonicalUserId.go index 5c1f3c48d2b..c72d5feb1cb 100644 --- a/sdk/go/aws/s3/getCanonicalUserId.go +++ b/sdk/go/aws/s3/getCanonicalUserId.go @@ -30,7 +30,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := s3.GetCanonicalUserId(ctx, nil, nil) +// current, err := s3.GetCanonicalUserId(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/s3/getDirectoryBuckets.go b/sdk/go/aws/s3/getDirectoryBuckets.go index 54125126328..2f2f7ebaefc 100644 --- a/sdk/go/aws/s3/getDirectoryBuckets.go +++ b/sdk/go/aws/s3/getDirectoryBuckets.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := s3.GetDirectoryBuckets(ctx, nil, nil) +// _, err := s3.GetDirectoryBuckets(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/s3control/storageLensConfiguration.go b/sdk/go/aws/s3control/storageLensConfiguration.go index 102bec9edef..63f297629ef 100644 --- a/sdk/go/aws/s3control/storageLensConfiguration.go +++ b/sdk/go/aws/s3control/storageLensConfiguration.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } @@ -58,7 +58,7 @@ import ( // OutputSchemaVersion: pulumi.String("V_1"), // Encryption: &s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionArgs{ // SseS3s: s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionSseS3Array{ -// nil, +// &s3control.StorageLensConfigurationStorageLensConfigurationDataExportS3BucketDestinationEncryptionSseS3Args{}, // }, // }, // }, diff --git a/sdk/go/aws/schemas/schema.go b/sdk/go/aws/schemas/schema.go index d704de1f71f..fa5a9cd5cea 100644 --- a/sdk/go/aws/schemas/schema.go +++ b/sdk/go/aws/schemas/schema.go @@ -44,7 +44,7 @@ import ( // "version": "1.0.0", // "title": "Event", // }, -// "paths": nil, +// "paths": map[string]interface{}{}, // "components": map[string]interface{}{ // "schemas": map[string]interface{}{ // "Event": map[string]interface{}{ diff --git a/sdk/go/aws/securityhub/productSubscription.go b/sdk/go/aws/securityhub/productSubscription.go index ec06714b496..075883ed6db 100644 --- a/sdk/go/aws/securityhub/productSubscription.go +++ b/sdk/go/aws/securityhub/productSubscription.go @@ -35,7 +35,7 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/securityhub/standardsSubscription.go b/sdk/go/aws/securityhub/standardsSubscription.go index a77dc3fb8f6..9b92851839c 100644 --- a/sdk/go/aws/securityhub/standardsSubscription.go +++ b/sdk/go/aws/securityhub/standardsSubscription.go @@ -35,7 +35,7 @@ import ( // if err != nil { // return err // } -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/securitylake/subscriberNotification.go b/sdk/go/aws/securitylake/subscriberNotification.go index 3d27d85a70f..376dc28145d 100644 --- a/sdk/go/aws/securitylake/subscriberNotification.go +++ b/sdk/go/aws/securitylake/subscriberNotification.go @@ -33,7 +33,7 @@ import ( // _, err := securitylake.NewSubscriberNotification(ctx, "example", &securitylake.SubscriberNotificationArgs{ // SubscriberId: pulumi.Any(exampleAwsSecuritylakeSubscriber.Id), // Configuration: &securitylake.SubscriberNotificationConfigurationArgs{ -// SqsNotificationConfiguration: nil, +// SqsNotificationConfiguration: &securitylake.SubscriberNotificationConfigurationSqsNotificationConfigurationArgs{}, // }, // }) // if err != nil { diff --git a/sdk/go/aws/serverlessrepository/cloudFormationStack.go b/sdk/go/aws/serverlessrepository/cloudFormationStack.go index a9e47724ad5..a89286d4d82 100644 --- a/sdk/go/aws/serverlessrepository/cloudFormationStack.go +++ b/sdk/go/aws/serverlessrepository/cloudFormationStack.go @@ -31,11 +31,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetPartition(ctx, nil, nil) +// current, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } -// currentGetRegion, err := aws.GetRegion(ctx, nil, nil) +// currentGetRegion, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ses/getActiveReceiptRuleSet.go b/sdk/go/aws/ses/getActiveReceiptRuleSet.go index 4f8c79ae2a1..64d8c7aaadf 100644 --- a/sdk/go/aws/ses/getActiveReceiptRuleSet.go +++ b/sdk/go/aws/ses/getActiveReceiptRuleSet.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ses.LookupActiveReceiptRuleSet(ctx, nil, nil) +// _, err := ses.LookupActiveReceiptRuleSet(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/shield/applicationLayerAutomaticResponse.go b/sdk/go/aws/shield/applicationLayerAutomaticResponse.go index 82a2db4c0f0..0e0520a83f0 100644 --- a/sdk/go/aws/shield/applicationLayerAutomaticResponse.go +++ b/sdk/go/aws/shield/applicationLayerAutomaticResponse.go @@ -34,15 +34,15 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := aws.GetRegion(ctx, nil, nil) +// _, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil) +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetPartition, err := aws.GetPartition(ctx, nil, nil) +// currentGetPartition, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/shield/protection.go b/sdk/go/aws/shield/protection.go index 49a9417f8d3..3fa0cec7237 100644 --- a/sdk/go/aws/shield/protection.go +++ b/sdk/go/aws/shield/protection.go @@ -35,15 +35,15 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := aws.GetAvailabilityZones(ctx, nil, nil) +// _, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{}, nil) // if err != nil { // return err // } -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil) +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/shield/protectionGroup.go b/sdk/go/aws/shield/protectionGroup.go index ea7832593ae..86b29da2b38 100644 --- a/sdk/go/aws/shield/protectionGroup.go +++ b/sdk/go/aws/shield/protectionGroup.go @@ -64,11 +64,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil) +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/shield/protectionHealthCheckAssociation.go b/sdk/go/aws/shield/protectionHealthCheckAssociation.go index c927b642c25..043e375ed64 100644 --- a/sdk/go/aws/shield/protectionHealthCheckAssociation.go +++ b/sdk/go/aws/shield/protectionHealthCheckAssociation.go @@ -38,15 +38,15 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetRegion(ctx, nil, nil) +// current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil) // if err != nil { // return err // } -// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil) +// currentGetCallerIdentity, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetPartition, err := aws.GetPartition(ctx, nil, nil) +// currentGetPartition, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/sns/dataProtectionPolicy.go b/sdk/go/aws/sns/dataProtectionPolicy.go index 099f2385c1d..b59f4bde8fc 100644 --- a/sdk/go/aws/sns/dataProtectionPolicy.go +++ b/sdk/go/aws/sns/dataProtectionPolicy.go @@ -46,7 +46,7 @@ import ( // "arn:aws:dataprotection::aws:data-identifier/EmailAddress", // }, // "Operation": map[string]interface{}{ -// "Deny": nil, +// "Deny": map[string]interface{}{}, // }, // "Principal": []string{ // "*", diff --git a/sdk/go/aws/ssm/patchBaseline.go b/sdk/go/aws/ssm/patchBaseline.go index 1b05be52501..2bc409aaf50 100644 --- a/sdk/go/aws/ssm/patchBaseline.go +++ b/sdk/go/aws/ssm/patchBaseline.go @@ -228,7 +228,7 @@ import ( // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := ssm.NewPatchBaseline(ctx, "al_2017_09", &ssm.PatchBaselineArgs{ // ApprovalRules: ssm.PatchBaselineApprovalRuleArray{ -// nil, +// &ssm.PatchBaselineApprovalRuleArgs{}, // }, // Name: pulumi.String("Amazon-Linux-2017.09"), // Description: pulumi.String("My patch repository for Amazon Linux 2017.09"), diff --git a/sdk/go/aws/ssmincidents/getReplicationSet.go b/sdk/go/aws/ssmincidents/getReplicationSet.go index d3feacbfc12..b71598ecd7d 100644 --- a/sdk/go/aws/ssmincidents/getReplicationSet.go +++ b/sdk/go/aws/ssmincidents/getReplicationSet.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ssmincidents.LookupReplicationSet(ctx, nil, nil) +// _, err := ssmincidents.LookupReplicationSet(ctx, &ssmincidents.LookupReplicationSetArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/accountAssignment.go b/sdk/go/aws/ssoadmin/accountAssignment.go index fb305590a08..0aa65579f29 100644 --- a/sdk/go/aws/ssoadmin/accountAssignment.go +++ b/sdk/go/aws/ssoadmin/accountAssignment.go @@ -31,7 +31,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } @@ -88,7 +88,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/application.go b/sdk/go/aws/ssoadmin/application.go index d7f68046c2e..e93a5d75fe0 100644 --- a/sdk/go/aws/ssoadmin/application.go +++ b/sdk/go/aws/ssoadmin/application.go @@ -34,7 +34,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } @@ -66,7 +66,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/applicationAccessScope.go b/sdk/go/aws/ssoadmin/applicationAccessScope.go index 9daaadfe46a..9d58049b74d 100644 --- a/sdk/go/aws/ssoadmin/applicationAccessScope.go +++ b/sdk/go/aws/ssoadmin/applicationAccessScope.go @@ -30,7 +30,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/customerManagedPolicyAttachment.go b/sdk/go/aws/ssoadmin/customerManagedPolicyAttachment.go index 5f9dc8674b8..13ff485f770 100644 --- a/sdk/go/aws/ssoadmin/customerManagedPolicyAttachment.go +++ b/sdk/go/aws/ssoadmin/customerManagedPolicyAttachment.go @@ -33,7 +33,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/getApplicationProviders.go b/sdk/go/aws/ssoadmin/getApplicationProviders.go index 91f12b4d9b5..a614fbb21e9 100644 --- a/sdk/go/aws/ssoadmin/getApplicationProviders.go +++ b/sdk/go/aws/ssoadmin/getApplicationProviders.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := ssoadmin.GetApplicationProviders(ctx, nil, nil) +// _, err := ssoadmin.GetApplicationProviders(ctx, &ssoadmin.GetApplicationProvidersArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/getInstances.go b/sdk/go/aws/ssoadmin/getInstances.go index 6c404bbfe3a..7fdd0ef89f9 100644 --- a/sdk/go/aws/ssoadmin/getInstances.go +++ b/sdk/go/aws/ssoadmin/getInstances.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/getPermissionSet.go b/sdk/go/aws/ssoadmin/getPermissionSet.go index 4a974929296..13df7c1b04e 100644 --- a/sdk/go/aws/ssoadmin/getPermissionSet.go +++ b/sdk/go/aws/ssoadmin/getPermissionSet.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/getPermissionSets.go b/sdk/go/aws/ssoadmin/getPermissionSets.go index fe10b8de5a5..8fe373c502d 100644 --- a/sdk/go/aws/ssoadmin/getPermissionSets.go +++ b/sdk/go/aws/ssoadmin/getPermissionSets.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/instanceAccessControlAttributes.go b/sdk/go/aws/ssoadmin/instanceAccessControlAttributes.go index 30fceb5ab4f..b2df6330bc1 100644 --- a/sdk/go/aws/ssoadmin/instanceAccessControlAttributes.go +++ b/sdk/go/aws/ssoadmin/instanceAccessControlAttributes.go @@ -28,7 +28,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/managedPolicyAttachment.go b/sdk/go/aws/ssoadmin/managedPolicyAttachment.go index aad8e3deaa8..054af0d9e3b 100644 --- a/sdk/go/aws/ssoadmin/managedPolicyAttachment.go +++ b/sdk/go/aws/ssoadmin/managedPolicyAttachment.go @@ -32,7 +32,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } @@ -74,7 +74,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/permissionSet.go b/sdk/go/aws/ssoadmin/permissionSet.go index c0c8ceec892..200d93a500a 100644 --- a/sdk/go/aws/ssoadmin/permissionSet.go +++ b/sdk/go/aws/ssoadmin/permissionSet.go @@ -30,7 +30,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/permissionSetInlinePolicy.go b/sdk/go/aws/ssoadmin/permissionSetInlinePolicy.go index 3a5edd6a131..ec9299a520c 100644 --- a/sdk/go/aws/ssoadmin/permissionSetInlinePolicy.go +++ b/sdk/go/aws/ssoadmin/permissionSetInlinePolicy.go @@ -27,7 +27,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/permissionsBoundaryAttachment.go b/sdk/go/aws/ssoadmin/permissionsBoundaryAttachment.go index f20fc9356a7..a144055b5d6 100644 --- a/sdk/go/aws/ssoadmin/permissionsBoundaryAttachment.go +++ b/sdk/go/aws/ssoadmin/permissionsBoundaryAttachment.go @@ -35,7 +35,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/ssoadmin/trustedTokenIssuer.go b/sdk/go/aws/ssoadmin/trustedTokenIssuer.go index 54112f08ade..f2a2d98efc7 100644 --- a/sdk/go/aws/ssoadmin/trustedTokenIssuer.go +++ b/sdk/go/aws/ssoadmin/trustedTokenIssuer.go @@ -30,7 +30,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// example, err := ssoadmin.GetInstances(ctx, nil, nil) +// example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/synthetics/getRuntimeVersions.go b/sdk/go/aws/synthetics/getRuntimeVersions.go index cbdaaa77124..0ec0ba9467d 100644 --- a/sdk/go/aws/synthetics/getRuntimeVersions.go +++ b/sdk/go/aws/synthetics/getRuntimeVersions.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := synthetics.GetRuntimeVersions(ctx, nil, nil) +// _, err := synthetics.GetRuntimeVersions(ctx, &synthetics.GetRuntimeVersionsArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/vpclattice/getListener.go b/sdk/go/aws/vpclattice/getListener.go index 4c8b8eb1ca8..d6e9b4af65d 100644 --- a/sdk/go/aws/vpclattice/getListener.go +++ b/sdk/go/aws/vpclattice/getListener.go @@ -29,7 +29,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := vpclattice.LookupListener(ctx, nil, nil) +// _, err := vpclattice.LookupListener(ctx, &vpclattice.LookupListenerArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/vpclattice/resourcePolicy.go b/sdk/go/aws/vpclattice/resourcePolicy.go index 91bea63a2bf..18febb09455 100644 --- a/sdk/go/aws/vpclattice/resourcePolicy.go +++ b/sdk/go/aws/vpclattice/resourcePolicy.go @@ -34,11 +34,11 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } -// currentGetPartition, err := aws.GetPartition(ctx, nil, nil) +// currentGetPartition, err := aws.GetPartition(ctx, &aws.GetPartitionArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/wafregional/webAclAssociation.go b/sdk/go/aws/wafregional/webAclAssociation.go index e69fc0b63b1..095791e9e10 100644 --- a/sdk/go/aws/wafregional/webAclAssociation.go +++ b/sdk/go/aws/wafregional/webAclAssociation.go @@ -86,7 +86,7 @@ import ( // if err != nil { // return err // } -// available, err := aws.GetAvailabilityZones(ctx, nil, nil) +// available, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/go/aws/xray/encryptionConfig.go b/sdk/go/aws/xray/encryptionConfig.go index d93cf90a825..0b6a150c4dd 100644 --- a/sdk/go/aws/xray/encryptionConfig.go +++ b/sdk/go/aws/xray/encryptionConfig.go @@ -61,7 +61,7 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// current, err := aws.GetCallerIdentity(ctx, nil, nil) +// current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil) // if err != nil { // return err // } diff --git a/sdk/java/src/main/java/com/pulumi/aws/appautoscaling/Policy.java b/sdk/java/src/main/java/com/pulumi/aws/appautoscaling/Policy.java index 978697febe4..902c778a85e 100644 --- a/sdk/java/src/main/java/com/pulumi/aws/appautoscaling/Policy.java +++ b/sdk/java/src/main/java/com/pulumi/aws/appautoscaling/Policy.java @@ -82,6 +82,60 @@ * ### ECS Service Autoscaling * * <!--Start PulumiCodeChooser --> + *
+ * {@code + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.aws.appautoscaling.Target; + * import com.pulumi.aws.appautoscaling.TargetArgs; + * import com.pulumi.aws.appautoscaling.Policy; + * import com.pulumi.aws.appautoscaling.PolicyArgs; + * import com.pulumi.aws.appautoscaling.inputs.PolicyStepScalingPolicyConfigurationArgs; + * 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 ecsTarget = new Target("ecsTarget", TargetArgs.builder() + * .maxCapacity(4) + * .minCapacity(1) + * .resourceId("service/clusterName/serviceName") + * .scalableDimension("ecs:service:DesiredCount") + * .serviceNamespace("ecs") + * .build()); + * + * var ecsPolicy = new Policy("ecsPolicy", PolicyArgs.builder() + * .name("scale-down") + * .policyType("StepScaling") + * .resourceId(ecsTarget.resourceId()) + * .scalableDimension(ecsTarget.scalableDimension()) + * .serviceNamespace(ecsTarget.serviceNamespace()) + * .stepScalingPolicyConfiguration(PolicyStepScalingPolicyConfigurationArgs.builder() + * .adjustmentType("ChangeInCapacity") + * .cooldown(60) + * .metricAggregationType("Maximum") + * .stepAdjustments(PolicyStepScalingPolicyConfigurationStepAdjustmentArgs.builder() + * .metricIntervalUpperBound(0) + * .scalingAdjustment(-1) + * .build()) + * .build()) + * .build()); + * + * } + * } + * } + ** <!--End PulumiCodeChooser --> * * ### Preserve desired count when updating an autoscaled ECS Service diff --git a/sdk/java/src/main/java/com/pulumi/aws/appautoscaling/inputs/PolicyStepScalingPolicyConfigurationArgs.java b/sdk/java/src/main/java/com/pulumi/aws/appautoscaling/inputs/PolicyStepScalingPolicyConfigurationArgs.java index be4eacdc27e..48dcdc7805c 100644 --- a/sdk/java/src/main/java/com/pulumi/aws/appautoscaling/inputs/PolicyStepScalingPolicyConfigurationArgs.java +++ b/sdk/java/src/main/java/com/pulumi/aws/appautoscaling/inputs/PolicyStepScalingPolicyConfigurationArgs.java @@ -82,6 +82,49 @@ public Optional